@rebilly/instruments 8.25.3 → 8.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.js +34 -5
- package/dist/index.min.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [8.27.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.26.0...instruments/core-v8.27.0) (2024-01-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **instruments:** Add new property `additionalFields` ([#3043](https://github.com/Rebilly/rebilly/issues/3043)) ([9f742b1](https://github.com/Rebilly/rebilly/commit/9f742b1aba7fb12c480fb4e8a77680a160ba395e))
|
|
7
|
+
|
|
8
|
+
## [8.26.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.25.3...instruments/core-v8.26.0) (2024-01-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **api-metadata:** Update resources based on latest api definitions ([#2970](https://github.com/Rebilly/rebilly/issues/2970)) ([2ffb71a](https://github.com/Rebilly/rebilly/commit/2ffb71afb884fb2c6977c75a33b540bdcdf02e39))
|
|
14
|
+
|
|
1
15
|
## [8.25.3](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.25.2...instruments/core-v8.25.3) (2024-01-23)
|
|
2
16
|
|
|
3
17
|
|
package/dist/index.js
CHANGED
|
@@ -23006,6 +23006,7 @@ const addressFields = [
|
|
|
23006
23006
|
"address",
|
|
23007
23007
|
"address2"
|
|
23008
23008
|
];
|
|
23009
|
+
const additionalFields = ["poNumber"];
|
|
23009
23010
|
const addressSchema = {
|
|
23010
23011
|
type: "object",
|
|
23011
23012
|
properties: {
|
|
@@ -23093,7 +23094,28 @@ const paymentInstrumentsDisplayOptionsSchema = {
|
|
|
23093
23094
|
required: []
|
|
23094
23095
|
}),
|
|
23095
23096
|
googlePay: optional(digitalWalletConfigurationSchema),
|
|
23096
|
-
applePay: optional(digitalWalletConfigurationSchema)
|
|
23097
|
+
applePay: optional(digitalWalletConfigurationSchema),
|
|
23098
|
+
additionalFields: optional({
|
|
23099
|
+
type: "object",
|
|
23100
|
+
properties: {
|
|
23101
|
+
show: optional({
|
|
23102
|
+
type: "array",
|
|
23103
|
+
default: [],
|
|
23104
|
+
items: {
|
|
23105
|
+
type: "string",
|
|
23106
|
+
enum: [...additionalFields]
|
|
23107
|
+
}
|
|
23108
|
+
}),
|
|
23109
|
+
require: optional({
|
|
23110
|
+
type: "array",
|
|
23111
|
+
default: [],
|
|
23112
|
+
items: {
|
|
23113
|
+
type: "string",
|
|
23114
|
+
enum: [...additionalFields]
|
|
23115
|
+
}
|
|
23116
|
+
})
|
|
23117
|
+
}
|
|
23118
|
+
})
|
|
23097
23119
|
},
|
|
23098
23120
|
default: {},
|
|
23099
23121
|
required: []
|
|
@@ -23364,7 +23386,7 @@ function handleComputedProperty(options) {
|
|
|
23364
23386
|
var _a;
|
|
23365
23387
|
return Object.assign({}, options, {
|
|
23366
23388
|
_computed: {
|
|
23367
|
-
version: "8.
|
|
23389
|
+
version: "8.26.0",
|
|
23368
23390
|
paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
|
|
23369
23391
|
}
|
|
23370
23392
|
});
|
|
@@ -26187,7 +26209,8 @@ async function postPurchase({ data }) {
|
|
|
26187
26209
|
"shippingRateId",
|
|
26188
26210
|
"couponIds",
|
|
26189
26211
|
"password",
|
|
26190
|
-
"redirectUrl"
|
|
26212
|
+
"redirectUrl",
|
|
26213
|
+
"poNumber"
|
|
26191
26214
|
];
|
|
26192
26215
|
Object.keys(data).forEach((key) => {
|
|
26193
26216
|
if (!purchaseSchemaKeys.includes(key)) {
|
|
@@ -26232,7 +26255,7 @@ async function postPayment({ data }) {
|
|
|
26232
26255
|
});
|
|
26233
26256
|
}
|
|
26234
26257
|
async function makePurchase({ payload }) {
|
|
26235
|
-
|
|
26258
|
+
let data = {
|
|
26236
26259
|
websiteId: state.options.websiteId,
|
|
26237
26260
|
paymentInstruction: {
|
|
26238
26261
|
token: payload._raw.id
|
|
@@ -26254,6 +26277,12 @@ async function makePurchase({ payload }) {
|
|
|
26254
26277
|
}
|
|
26255
26278
|
});
|
|
26256
26279
|
}
|
|
26280
|
+
if (data.additionalFields) {
|
|
26281
|
+
data = {
|
|
26282
|
+
...data,
|
|
26283
|
+
...data.additionalFields
|
|
26284
|
+
};
|
|
26285
|
+
}
|
|
26257
26286
|
const { fields } = await postPurchase({ data });
|
|
26258
26287
|
return fields;
|
|
26259
26288
|
}
|
|
@@ -26688,7 +26717,7 @@ class RebillyInstrumentsInstance {
|
|
|
26688
26717
|
await show({ componentName, payload });
|
|
26689
26718
|
}
|
|
26690
26719
|
get version() {
|
|
26691
|
-
return `RebillyInstruments Ver.${"8.
|
|
26720
|
+
return `RebillyInstruments Ver.${"8.26.0"}`;
|
|
26692
26721
|
}
|
|
26693
26722
|
on(eventName, callback) {
|
|
26694
26723
|
on({ eventName, callback });
|