@bigcommerce/checkout-sdk 1.717.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.
@@ -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)
@@ -507,6 +510,7 @@
507
510
  - [CheckoutIncludeParam](README.md#checkoutincludeparam)
508
511
  - [ComparableCheckout](README.md#comparablecheckout)
509
512
  - [ConsignmentAssignmentRequestBody](README.md#consignmentassignmentrequestbody)
513
+ - [ConsignmentDiscount](README.md#consignmentdiscount)
510
514
  - [ConsignmentsRequestBody](README.md#consignmentsrequestbody)
511
515
  - [CustomerAddressRequestBody](README.md#customeraddressrequestbody)
512
516
  - [CustomerInitializeOptions](README.md#customerinitializeoptions)
@@ -663,6 +667,12 @@ ___
663
667
 
664
668
  ___
665
669
 
670
+ ### ConsignmentDiscount
671
+
672
+ Ƭ **ConsignmentDiscount**: [`ConsignmentAutomaticDiscount`](interfaces/ConsignmentAutomaticDiscount.md) \| [`ConsignmentCouponDiscount`](interfaces/ConsignmentCouponDiscount.md)
673
+
674
+ ___
675
+
666
676
  ### ConsignmentsRequestBody
667
677
 
668
678
  Ƭ **ConsignmentsRequestBody**: [`ConsignmentCreateRequestBody`](interfaces/ConsignmentCreateRequestBody.md)[]
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/checkout-sdk",
3
- "version": "1.717.0",
3
+ "version": "1.718.0",
4
4
  "description": "BigCommerce Checkout JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/checkout-sdk.js",