@bigcommerce/checkout-sdk 1.716.0 → 1.718.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/dist/checkout-button.js +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-sdk.d.ts +17 -36
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/hosted-form-v2-iframe-host.js +1 -1
- package/dist/hosted-form-v2-iframe-host.umd.js +1 -1
- package/dist/internal-mappers.d.ts +17 -0
- package/docs/README.md +10 -1
- package/docs/interfaces/BasePaymentInitializeOptions.md +0 -10
- package/docs/interfaces/Consignment.md +7 -0
- package/docs/interfaces/ConsignmentAutomaticDiscount.md +47 -0
- package/docs/interfaces/ConsignmentCouponDiscount.md +61 -0
- package/docs/interfaces/ConsignmentDiscountBase.md +43 -0
- package/package.json +1 -1
- package/docs/interfaces/OpyPaymentInitializeOptions.md +0 -40
|
@@ -130,6 +130,7 @@ declare interface Consignment {
|
|
|
130
130
|
id: string;
|
|
131
131
|
address: Address;
|
|
132
132
|
shippingAddress: Address;
|
|
133
|
+
discounts: ConsignmentDiscount[];
|
|
133
134
|
handlingCost: number;
|
|
134
135
|
shippingCost: number;
|
|
135
136
|
availableShippingOptions?: ShippingOption[];
|
|
@@ -138,6 +139,22 @@ declare interface Consignment {
|
|
|
138
139
|
lineItemIds: string[];
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
declare interface ConsignmentAutomaticDiscount extends ConsignmentDiscountBase<'AUTOMATIC'> {
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare interface ConsignmentCouponDiscount extends ConsignmentDiscountBase<'COUPON'> {
|
|
146
|
+
couponId: number;
|
|
147
|
+
couponCode: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare type ConsignmentDiscount = ConsignmentAutomaticDiscount | ConsignmentCouponDiscount;
|
|
151
|
+
|
|
152
|
+
declare interface ConsignmentDiscountBase<T> {
|
|
153
|
+
id: number;
|
|
154
|
+
amount: number;
|
|
155
|
+
type: T;
|
|
156
|
+
}
|
|
157
|
+
|
|
141
158
|
declare interface ConsignmentPickupOption {
|
|
142
159
|
pickupMethodId: number;
|
|
143
160
|
}
|
package/docs/README.md
CHANGED
|
@@ -183,7 +183,10 @@
|
|
|
183
183
|
- [Consignment](interfaces/Consignment.md)
|
|
184
184
|
- [ConsignmentAssignmentBaseRequestBodyWithAddress](interfaces/ConsignmentAssignmentBaseRequestBodyWithAddress.md)
|
|
185
185
|
- [ConsignmentAssignmentBaseRequestBodyWithShippingAddress](interfaces/ConsignmentAssignmentBaseRequestBodyWithShippingAddress.md)
|
|
186
|
+
- [ConsignmentAutomaticDiscount](interfaces/ConsignmentAutomaticDiscount.md)
|
|
187
|
+
- [ConsignmentCouponDiscount](interfaces/ConsignmentCouponDiscount.md)
|
|
186
188
|
- [ConsignmentCreateRequestBody](interfaces/ConsignmentCreateRequestBody.md)
|
|
189
|
+
- [ConsignmentDiscountBase](interfaces/ConsignmentDiscountBase.md)
|
|
187
190
|
- [ConsignmentLineItem](interfaces/ConsignmentLineItem.md)
|
|
188
191
|
- [ConsignmentPickupOption](interfaces/ConsignmentPickupOption.md)
|
|
189
192
|
- [ConsignmentSelector](interfaces/ConsignmentSelector.md)
|
|
@@ -320,7 +323,6 @@
|
|
|
320
323
|
- [NonceInstrument](interfaces/NonceInstrument.md)
|
|
321
324
|
- [Option](interfaces/Option.md)
|
|
322
325
|
- [OptionsResponse](interfaces/OptionsResponse.md)
|
|
323
|
-
- [OpyPaymentInitializeOptions](interfaces/OpyPaymentInitializeOptions.md)
|
|
324
326
|
- [Order](interfaces/Order.md)
|
|
325
327
|
- [OrderBillingAddress](interfaces/OrderBillingAddress.md)
|
|
326
328
|
- [OrderBillingAddressSelector](interfaces/OrderBillingAddressSelector.md)
|
|
@@ -508,6 +510,7 @@
|
|
|
508
510
|
- [CheckoutIncludeParam](README.md#checkoutincludeparam)
|
|
509
511
|
- [ComparableCheckout](README.md#comparablecheckout)
|
|
510
512
|
- [ConsignmentAssignmentRequestBody](README.md#consignmentassignmentrequestbody)
|
|
513
|
+
- [ConsignmentDiscount](README.md#consignmentdiscount)
|
|
511
514
|
- [ConsignmentsRequestBody](README.md#consignmentsrequestbody)
|
|
512
515
|
- [CustomerAddressRequestBody](README.md#customeraddressrequestbody)
|
|
513
516
|
- [CustomerInitializeOptions](README.md#customerinitializeoptions)
|
|
@@ -664,6 +667,12 @@ ___
|
|
|
664
667
|
|
|
665
668
|
___
|
|
666
669
|
|
|
670
|
+
### ConsignmentDiscount
|
|
671
|
+
|
|
672
|
+
Ƭ **ConsignmentDiscount**: [`ConsignmentAutomaticDiscount`](interfaces/ConsignmentAutomaticDiscount.md) \| [`ConsignmentCouponDiscount`](interfaces/ConsignmentCouponDiscount.md)
|
|
673
|
+
|
|
674
|
+
___
|
|
675
|
+
|
|
667
676
|
### ConsignmentsRequestBody
|
|
668
677
|
|
|
669
678
|
Ƭ **ConsignmentsRequestBody**: [`ConsignmentCreateRequestBody`](interfaces/ConsignmentCreateRequestBody.md)[]
|
|
@@ -23,7 +23,6 @@ current checkout flow.
|
|
|
23
23
|
- [gatewayId](BasePaymentInitializeOptions.md#gatewayid)
|
|
24
24
|
- [masterpass](BasePaymentInitializeOptions.md#masterpass)
|
|
25
25
|
- [methodId](BasePaymentInitializeOptions.md#methodid)
|
|
26
|
-
- [opy](BasePaymentInitializeOptions.md#opy)
|
|
27
26
|
- [params](BasePaymentInitializeOptions.md#params)
|
|
28
27
|
- [paypalexpress](BasePaymentInitializeOptions.md#paypalexpress)
|
|
29
28
|
- [timeout](BasePaymentInitializeOptions.md#timeout)
|
|
@@ -113,15 +112,6 @@ The identifier of the payment method.
|
|
|
113
112
|
|
|
114
113
|
___
|
|
115
114
|
|
|
116
|
-
### opy
|
|
117
|
-
|
|
118
|
-
• `Optional` **opy**: [`OpyPaymentInitializeOptions`](OpyPaymentInitializeOptions.md)
|
|
119
|
-
|
|
120
|
-
The options that are required to initialize the Opy payment
|
|
121
|
-
method. They can be omitted unless you need to support Opy.
|
|
122
|
-
|
|
123
|
-
___
|
|
124
|
-
|
|
125
115
|
### params
|
|
126
116
|
|
|
127
117
|
• `Optional` **params**: `Object`
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- [address](Consignment.md#address)
|
|
10
10
|
- [availableShippingOptions](Consignment.md#availableshippingoptions)
|
|
11
|
+
- [discounts](Consignment.md#discounts)
|
|
11
12
|
- [handlingCost](Consignment.md#handlingcost)
|
|
12
13
|
- [id](Consignment.md#id)
|
|
13
14
|
- [lineItemIds](Consignment.md#lineitemids)
|
|
@@ -30,6 +31,12 @@ ___
|
|
|
30
31
|
|
|
31
32
|
___
|
|
32
33
|
|
|
34
|
+
### discounts
|
|
35
|
+
|
|
36
|
+
• **discounts**: [`ConsignmentDiscount`](../README.md#consignmentdiscount)[]
|
|
37
|
+
|
|
38
|
+
___
|
|
39
|
+
|
|
33
40
|
### handlingCost
|
|
34
41
|
|
|
35
42
|
• **handlingCost**: `number`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ConsignmentAutomaticDiscount
|
|
2
|
+
|
|
3
|
+
# Interface: ConsignmentAutomaticDiscount
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`ConsignmentDiscountBase`](ConsignmentDiscountBase.md)<``"AUTOMATIC"``\>
|
|
8
|
+
|
|
9
|
+
↳ **`ConsignmentAutomaticDiscount`**
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [amount](ConsignmentAutomaticDiscount.md#amount)
|
|
16
|
+
- [id](ConsignmentAutomaticDiscount.md#id)
|
|
17
|
+
- [type](ConsignmentAutomaticDiscount.md#type)
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### amount
|
|
22
|
+
|
|
23
|
+
• **amount**: `number`
|
|
24
|
+
|
|
25
|
+
#### Inherited from
|
|
26
|
+
|
|
27
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[amount](ConsignmentDiscountBase.md#amount)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### id
|
|
32
|
+
|
|
33
|
+
• **id**: `number`
|
|
34
|
+
|
|
35
|
+
#### Inherited from
|
|
36
|
+
|
|
37
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[id](ConsignmentDiscountBase.md#id)
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### type
|
|
42
|
+
|
|
43
|
+
• **type**: ``"AUTOMATIC"``
|
|
44
|
+
|
|
45
|
+
#### Inherited from
|
|
46
|
+
|
|
47
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[type](ConsignmentDiscountBase.md#type)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ConsignmentCouponDiscount
|
|
2
|
+
|
|
3
|
+
# Interface: ConsignmentCouponDiscount
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`ConsignmentDiscountBase`](ConsignmentDiscountBase.md)<``"COUPON"``\>
|
|
8
|
+
|
|
9
|
+
↳ **`ConsignmentCouponDiscount`**
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [amount](ConsignmentCouponDiscount.md#amount)
|
|
16
|
+
- [couponCode](ConsignmentCouponDiscount.md#couponcode)
|
|
17
|
+
- [couponId](ConsignmentCouponDiscount.md#couponid)
|
|
18
|
+
- [id](ConsignmentCouponDiscount.md#id)
|
|
19
|
+
- [type](ConsignmentCouponDiscount.md#type)
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
### amount
|
|
24
|
+
|
|
25
|
+
• **amount**: `number`
|
|
26
|
+
|
|
27
|
+
#### Inherited from
|
|
28
|
+
|
|
29
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[amount](ConsignmentDiscountBase.md#amount)
|
|
30
|
+
|
|
31
|
+
___
|
|
32
|
+
|
|
33
|
+
### couponCode
|
|
34
|
+
|
|
35
|
+
• **couponCode**: `string`
|
|
36
|
+
|
|
37
|
+
___
|
|
38
|
+
|
|
39
|
+
### couponId
|
|
40
|
+
|
|
41
|
+
• **couponId**: `number`
|
|
42
|
+
|
|
43
|
+
___
|
|
44
|
+
|
|
45
|
+
### id
|
|
46
|
+
|
|
47
|
+
• **id**: `number`
|
|
48
|
+
|
|
49
|
+
#### Inherited from
|
|
50
|
+
|
|
51
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[id](ConsignmentDiscountBase.md#id)
|
|
52
|
+
|
|
53
|
+
___
|
|
54
|
+
|
|
55
|
+
### type
|
|
56
|
+
|
|
57
|
+
• **type**: ``"COUPON"``
|
|
58
|
+
|
|
59
|
+
#### Inherited from
|
|
60
|
+
|
|
61
|
+
[ConsignmentDiscountBase](ConsignmentDiscountBase.md).[type](ConsignmentDiscountBase.md#type)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[@bigcommerce/checkout-sdk](../README.md) / ConsignmentDiscountBase
|
|
2
|
+
|
|
3
|
+
# Interface: ConsignmentDiscountBase<T\>
|
|
4
|
+
|
|
5
|
+
## Type parameters
|
|
6
|
+
|
|
7
|
+
| Name |
|
|
8
|
+
| :------ |
|
|
9
|
+
| `T` |
|
|
10
|
+
|
|
11
|
+
## Hierarchy
|
|
12
|
+
|
|
13
|
+
- **`ConsignmentDiscountBase`**
|
|
14
|
+
|
|
15
|
+
↳ [`ConsignmentAutomaticDiscount`](ConsignmentAutomaticDiscount.md)
|
|
16
|
+
|
|
17
|
+
↳ [`ConsignmentCouponDiscount`](ConsignmentCouponDiscount.md)
|
|
18
|
+
|
|
19
|
+
## Table of contents
|
|
20
|
+
|
|
21
|
+
### Properties
|
|
22
|
+
|
|
23
|
+
- [amount](ConsignmentDiscountBase.md#amount)
|
|
24
|
+
- [id](ConsignmentDiscountBase.md#id)
|
|
25
|
+
- [type](ConsignmentDiscountBase.md#type)
|
|
26
|
+
|
|
27
|
+
## Properties
|
|
28
|
+
|
|
29
|
+
### amount
|
|
30
|
+
|
|
31
|
+
• **amount**: `number`
|
|
32
|
+
|
|
33
|
+
___
|
|
34
|
+
|
|
35
|
+
### id
|
|
36
|
+
|
|
37
|
+
• **id**: `number`
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### type
|
|
42
|
+
|
|
43
|
+
• **type**: `T`
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
[@bigcommerce/checkout-sdk](../README.md) / OpyPaymentInitializeOptions
|
|
2
|
-
|
|
3
|
-
# Interface: OpyPaymentInitializeOptions
|
|
4
|
-
|
|
5
|
-
A set of options that are required to initialize the payment step of
|
|
6
|
-
checkout in order to support Opy.
|
|
7
|
-
|
|
8
|
-
When Opy is initialized, a widget will be inserted into the DOM. The
|
|
9
|
-
widget will open a modal that will show more information about Opy when
|
|
10
|
-
clicking it.
|
|
11
|
-
|
|
12
|
-
**`example`**
|
|
13
|
-
|
|
14
|
-
```html
|
|
15
|
-
<!-- This is where the Opy widget will be inserted -->
|
|
16
|
-
<div id="opy-widget"></div>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
```js
|
|
20
|
-
service.initializePayment({
|
|
21
|
-
methodId: 'opy',
|
|
22
|
-
opy: {
|
|
23
|
-
containerId: 'opy-widget',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Table of contents
|
|
29
|
-
|
|
30
|
-
### Properties
|
|
31
|
-
|
|
32
|
-
- [containerId](OpyPaymentInitializeOptions.md#containerid)
|
|
33
|
-
|
|
34
|
-
## Properties
|
|
35
|
-
|
|
36
|
-
### containerId
|
|
37
|
-
|
|
38
|
-
• **containerId**: `string`
|
|
39
|
-
|
|
40
|
-
The ID of a container which the payment widget should insert into.
|