@gradientedge/commercetools-utils 5.3.0 → 5.4.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.
Files changed (42) hide show
  1. package/dist/ge-commercetools-utils-browser.cjs.js +1 -1
  2. package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
  3. package/dist/ge-commercetools-utils-browser.esm.js +1 -1
  4. package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
  5. package/dist/ge-commercetools-utils-node.cjs.js +1 -1
  6. package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
  7. package/dist/ge-commercetools-utils-node.esm.js +1 -1
  8. package/dist/typings/models/associate-role.d.ts +79 -0
  9. package/dist/typings/models/attribute-group.d.ts +68 -0
  10. package/dist/typings/models/business-unit.d.ts +272 -0
  11. package/dist/typings/models/cart-discount.d.ts +2 -2
  12. package/dist/typings/models/cart.d.ts +133 -115
  13. package/dist/typings/models/channel.d.ts +4 -4
  14. package/dist/typings/models/common.d.ts +49 -40
  15. package/dist/typings/models/customer.d.ts +16 -13
  16. package/dist/typings/models/error.d.ts +451 -18
  17. package/dist/typings/models/extension.d.ts +7 -3
  18. package/dist/typings/models/graph-ql.d.ts +3 -1
  19. package/dist/typings/models/index.d.ts +13 -6
  20. package/dist/typings/models/me.d.ts +179 -37
  21. package/dist/typings/models/message.d.ts +849 -20
  22. package/dist/typings/models/order-edit.d.ts +22 -16
  23. package/dist/typings/models/order.d.ts +124 -25
  24. package/dist/typings/models/payment.d.ts +19 -14
  25. package/dist/typings/models/product-selection.d.ts +39 -6
  26. package/dist/typings/models/product-type.d.ts +4 -4
  27. package/dist/typings/models/product.d.ts +13 -5
  28. package/dist/typings/models/project.d.ts +18 -3
  29. package/dist/typings/models/quote-request.d.ts +5 -1
  30. package/dist/typings/models/quote.d.ts +8 -3
  31. package/dist/typings/models/scalar-types.d.ts +0 -1
  32. package/dist/typings/models/shipping-method.d.ts +7 -7
  33. package/dist/typings/models/shopping-list.d.ts +22 -22
  34. package/dist/typings/models/staged-quote.d.ts +5 -1
  35. package/dist/typings/models/standalone-price.d.ts +9 -5
  36. package/dist/typings/models/state.d.ts +2 -2
  37. package/dist/typings/models/store-country.d.ts +3 -0
  38. package/dist/typings/models/store.d.ts +16 -1
  39. package/dist/typings/models/subscription.d.ts +27 -14
  40. package/dist/typings/models/tax-category.d.ts +6 -2
  41. package/dist/typings/models/type.d.ts +3 -3
  42. package/package.json +19 -19
@@ -1,9 +1,10 @@
1
+ import { BusinessUnitKeyReference, BusinessUnitResourceIdentifier } from './business-unit';
1
2
  import { CartDiscountReference, CartDiscountTarget, CartDiscountValue } from './cart-discount';
2
3
  import { ChannelReference, ChannelResourceIdentifier } from './channel';
3
- import { Address, BaseAddress, BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, Price, TypedMoney } from './common';
4
+ import { Address, BaseAddress, BaseResource, CentPrecisionMoney, CreatedBy, LastModifiedBy, LocalizedString, Price, Reference, TypedMoney, _BaseAddress, _Money } from './common';
4
5
  import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group';
5
6
  import { DiscountCodeReference } from './discount-code';
6
- import { Delivery, ItemState, OrderReference, PaymentInfo } from './order';
7
+ import { Delivery, DeliveryDraft, ItemState, OrderReference, PaymentInfo } from './order';
7
8
  import { PaymentResourceIdentifier } from './payment';
8
9
  import { ProductVariant } from './product';
9
10
  import { ProductTypeReference } from './product-type';
@@ -14,44 +15,47 @@ import { SubRate, TaxCategoryReference, TaxCategoryResourceIdentifier, TaxRate }
14
15
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
15
16
  export interface Cart extends BaseResource {
16
17
  readonly id: string;
17
- readonly key?: string;
18
18
  readonly version: number;
19
- readonly createdAt: string;
20
- readonly lastModifiedAt: string;
21
- readonly lastModifiedBy?: LastModifiedBy;
22
- readonly createdBy?: CreatedBy;
19
+ readonly key?: string;
23
20
  readonly customerId?: string;
24
21
  readonly customerEmail?: string;
22
+ readonly customerGroup?: CustomerGroupReference;
25
23
  readonly anonymousId?: string;
24
+ readonly businessUnit?: BusinessUnitKeyReference;
26
25
  readonly store?: StoreKeyReference;
27
26
  readonly lineItems: LineItem[];
28
27
  readonly customLineItems: CustomLineItem[];
29
- readonly totalPrice: TypedMoney;
28
+ readonly totalLineItemQuantity?: number;
29
+ readonly totalPrice: CentPrecisionMoney;
30
30
  readonly taxedPrice?: TaxedPrice;
31
31
  readonly taxedShippingPrice?: TaxedPrice;
32
- readonly cartState: CartState;
33
- readonly shippingAddress?: Address;
34
- readonly billingAddress?: Address;
35
- readonly shippingMode: ShippingMode;
36
- readonly shipping: Shipping[];
37
- readonly inventoryMode?: InventoryMode;
38
32
  readonly taxMode: TaxMode;
39
33
  readonly taxRoundingMode: RoundingMode;
40
34
  readonly taxCalculationMode: TaxCalculationMode;
41
- readonly customerGroup?: CustomerGroupReference;
42
- readonly country?: string;
35
+ readonly inventoryMode: InventoryMode;
36
+ readonly cartState: CartState;
37
+ readonly billingAddress?: Address;
38
+ readonly shippingAddress?: Address;
39
+ readonly shippingMode: ShippingMode;
40
+ readonly shippingKey?: string;
43
41
  readonly shippingInfo?: ShippingInfo;
44
- readonly discountCodes?: DiscountCodeInfo[];
45
- readonly directDiscounts?: DirectDiscount[];
46
- readonly custom?: CustomFields;
42
+ readonly shippingRateInput?: ShippingRateInput;
43
+ readonly shippingCustomFields?: CustomFields;
44
+ readonly shipping: Shipping[];
45
+ readonly itemShippingAddresses: Address[];
46
+ readonly discountCodes: DiscountCodeInfo[];
47
+ readonly directDiscounts: DirectDiscount[];
48
+ readonly refusedGifts: CartDiscountReference[];
47
49
  readonly paymentInfo?: PaymentInfo;
50
+ readonly country?: string;
48
51
  readonly locale?: string;
49
- readonly deleteDaysAfterLastModification?: number;
50
- readonly refusedGifts: CartDiscountReference[];
51
52
  readonly origin: CartOrigin;
52
- readonly shippingRateInput?: ShippingRateInput;
53
- readonly itemShippingAddresses?: Address[];
54
- readonly totalLineItemQuantity?: number;
53
+ readonly custom?: CustomFields;
54
+ readonly deleteDaysAfterLastModification?: number;
55
+ readonly createdAt: string;
56
+ readonly lastModifiedAt: string;
57
+ readonly lastModifiedBy?: LastModifiedBy;
58
+ readonly createdBy?: CreatedBy;
55
59
  }
56
60
  export interface CartDraft {
57
61
  readonly currency: string;
@@ -60,35 +64,36 @@ export interface CartDraft {
60
64
  readonly customerEmail?: string;
61
65
  readonly customerGroup?: CustomerGroupResourceIdentifier;
62
66
  readonly anonymousId?: string;
67
+ readonly businessUnit?: BusinessUnitResourceIdentifier;
63
68
  readonly store?: StoreResourceIdentifier;
64
- readonly country?: string;
65
- readonly inventoryMode?: InventoryMode;
69
+ readonly lineItems?: LineItemDraft[];
70
+ readonly customLineItems?: CustomLineItemDraft[];
66
71
  readonly taxMode?: TaxMode;
72
+ readonly externalTaxRateForShippingMethod?: ExternalTaxRateDraft;
67
73
  readonly taxRoundingMode?: RoundingMode;
68
74
  readonly taxCalculationMode?: TaxCalculationMode;
69
- readonly lineItems?: LineItemDraft[];
70
- readonly customLineItems?: CustomLineItemDraft[];
71
- readonly shippingAddress?: BaseAddress;
72
- readonly billingAddress?: BaseAddress;
75
+ readonly inventoryMode?: InventoryMode;
76
+ readonly billingAddress?: _BaseAddress;
77
+ readonly shippingAddress?: _BaseAddress;
73
78
  readonly shippingMethod?: ShippingMethodResourceIdentifier;
74
- readonly externalTaxRateForShippingMethod?: ExternalTaxRateDraft;
75
- readonly custom?: CustomFieldsDraft;
76
- readonly locale?: string;
77
- readonly deleteDaysAfterLastModification?: number;
78
- readonly origin?: CartOrigin;
79
+ readonly shippingRateInput?: ShippingRateInputDraft;
79
80
  readonly shippingMode?: ShippingMode;
80
81
  readonly customShipping?: CustomShippingDraft[];
81
82
  readonly shipping?: ShippingDraft[];
82
- readonly shippingRateInput?: ShippingRateInputDraft;
83
83
  readonly itemShippingAddresses?: BaseAddress[];
84
84
  readonly discountCodes?: string[];
85
+ readonly country?: string;
86
+ readonly locale?: string;
87
+ readonly origin?: CartOrigin;
88
+ readonly deleteDaysAfterLastModification?: number;
89
+ readonly custom?: CustomFieldsDraft;
85
90
  }
86
- export type CartOrigin = 'Customer' | 'Merchant' | 'Quote';
91
+ export type CartOrigin = 'Customer' | 'Merchant' | 'Quote' | string;
87
92
  export interface CartPagedQueryResponse {
88
93
  readonly limit: number;
94
+ readonly offset: number;
89
95
  readonly count: number;
90
96
  readonly total?: number;
91
- readonly offset: number;
92
97
  readonly results: Cart[];
93
98
  }
94
99
  export interface CartReference {
@@ -101,18 +106,18 @@ export interface CartResourceIdentifier {
101
106
  readonly id?: string;
102
107
  readonly key?: string;
103
108
  }
104
- export type CartState = 'Active' | 'Merged' | 'Ordered';
109
+ export type CartState = 'Active' | 'Frozen' | 'Merged' | 'Ordered' | string;
105
110
  export interface CartUpdate {
106
111
  readonly version: number;
107
112
  readonly actions: CartUpdateAction[];
108
113
  }
109
- export type CartUpdateAction = CartAddCustomLineItemAction | CartAddCustomShippingMethodAction | CartAddDiscountCodeAction | CartAddItemShippingAddressAction | CartAddLineItemAction | CartAddPaymentAction | CartAddShippingMethodAction | CartAddShoppingListAction | CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction | CartApplyDeltaToLineItemShippingDetailsTargetsAction | CartChangeCustomLineItemMoneyAction | CartChangeCustomLineItemPriceModeAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction | CartRecalculateAction | CartRemoveCustomLineItemAction | CartRemoveDiscountCodeAction | CartRemoveItemShippingAddressAction | CartRemoveLineItemAction | CartRemovePaymentAction | CartRemoveShippingMethodAction | CartSetAnonymousIdAction | CartSetBillingAddressAction | CartSetBillingAddressCustomFieldAction | CartSetBillingAddressCustomTypeAction | CartSetCartTotalTaxAction | CartSetCountryAction | CartSetCustomFieldAction | CartSetCustomLineItemCustomFieldAction | CartSetCustomLineItemCustomTypeAction | CartSetCustomLineItemShippingDetailsAction | CartSetCustomLineItemTaxAmountAction | CartSetCustomLineItemTaxRateAction | CartSetCustomShippingMethodAction | CartSetCustomTypeAction | CartSetCustomerEmailAction | CartSetCustomerGroupAction | CartSetCustomerIdAction | CartSetDeleteDaysAfterLastModificationAction | CartSetDeliveryAddressCustomFieldAction | CartSetDeliveryAddressCustomTypeAction | CartSetDirectDiscountsAction | CartFreezeCartAction | CartSetItemShippingAddressCustomFieldAction | CartSetItemShippingAddressCustomTypeAction | CartSetKeyAction | CartSetLineItemCustomFieldAction | CartSetLineItemCustomTypeAction | CartSetLineItemDistributionChannelAction | CartSetLineItemPriceAction | CartSetLineItemShippingDetailsAction | CartSetLineItemSupplyChannelAction | CartSetLineItemTaxAmountAction | CartSetLineItemTaxRateAction | CartSetLineItemTotalPriceAction | CartSetLocaleAction | CartSetShippingAddressAction | CartSetShippingAddressCustomFieldAction | CartSetShippingAddressCustomTypeAction | CartSetShippingCustomFieldAction | CartSetShippingCustomTypeAction | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUnfreezeCartAction | CartUpdateItemShippingAddressAction;
114
+ export type CartUpdateAction = CartAddCustomLineItemAction | CartAddCustomShippingMethodAction | CartAddDiscountCodeAction | CartAddItemShippingAddressAction | CartAddLineItemAction | CartAddPaymentAction | CartAddShippingMethodAction | CartAddShoppingListAction | CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction | CartApplyDeltaToLineItemShippingDetailsTargetsAction | CartChangeCustomLineItemMoneyAction | CartChangeCustomLineItemPriceModeAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction | CartFreezeCartAction | CartRecalculateAction | CartRemoveCustomLineItemAction | CartRemoveDiscountCodeAction | CartRemoveItemShippingAddressAction | CartRemoveLineItemAction | CartRemovePaymentAction | CartRemoveShippingMethodAction | CartSetAnonymousIdAction | CartSetBillingAddressAction | CartSetBillingAddressCustomFieldAction | CartSetBillingAddressCustomTypeAction | CartSetBusinessUnitAction | CartSetCartTotalTaxAction | CartSetCountryAction | CartSetCustomFieldAction | CartSetCustomLineItemCustomFieldAction | CartSetCustomLineItemCustomTypeAction | CartSetCustomLineItemShippingDetailsAction | CartSetCustomLineItemTaxAmountAction | CartSetCustomLineItemTaxRateAction | CartSetCustomShippingMethodAction | CartSetCustomTypeAction | CartSetCustomerEmailAction | CartSetCustomerGroupAction | CartSetCustomerIdAction | CartSetDeleteDaysAfterLastModificationAction | CartSetDeliveryAddressCustomFieldAction | CartSetDeliveryAddressCustomTypeAction | CartSetDirectDiscountsAction | CartSetItemShippingAddressCustomFieldAction | CartSetItemShippingAddressCustomTypeAction | CartSetKeyAction | CartSetLineItemCustomFieldAction | CartSetLineItemCustomTypeAction | CartSetLineItemDistributionChannelAction | CartSetLineItemPriceAction | CartSetLineItemShippingDetailsAction | CartSetLineItemSupplyChannelAction | CartSetLineItemTaxAmountAction | CartSetLineItemTaxRateAction | CartSetLineItemTotalPriceAction | CartSetLocaleAction | CartSetShippingAddressAction | CartSetShippingAddressCustomFieldAction | CartSetShippingAddressCustomTypeAction | CartSetShippingCustomFieldAction | CartSetShippingCustomTypeAction | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUnfreezeCartAction | CartUpdateItemShippingAddressAction;
110
115
  export interface CustomLineItem {
111
116
  readonly id: string;
112
117
  readonly name: LocalizedString;
113
118
  readonly money: TypedMoney;
114
119
  readonly taxedPrice?: TaxedItemPrice;
115
- readonly totalPrice: TypedMoney;
120
+ readonly totalPrice: CentPrecisionMoney;
116
121
  readonly slug: string;
117
122
  readonly quantity: number;
118
123
  readonly state: ItemState[];
@@ -125,8 +130,8 @@ export interface CustomLineItem {
125
130
  }
126
131
  export interface CustomLineItemDraft {
127
132
  readonly name: LocalizedString;
128
- readonly quantity: number;
129
- readonly money: Money;
133
+ readonly quantity?: number;
134
+ readonly money: _Money;
130
135
  readonly slug: string;
131
136
  readonly taxCategory?: TaxCategoryResourceIdentifier;
132
137
  readonly externalTaxRate?: ExternalTaxRateDraft;
@@ -134,17 +139,17 @@ export interface CustomLineItemDraft {
134
139
  readonly shippingDetails?: ItemShippingDetailsDraft;
135
140
  readonly priceMode: CustomLineItemPriceMode;
136
141
  }
137
- export type CustomLineItemPriceMode = 'External' | 'Standard';
142
+ export type CustomLineItemPriceMode = 'External' | 'Standard' | string;
138
143
  export interface CustomShippingDraft {
139
144
  readonly key: string;
140
145
  readonly shippingMethodName: string;
141
- readonly shippingAddress?: BaseAddress;
146
+ readonly shippingAddress?: _BaseAddress;
142
147
  readonly shippingRate: ShippingRateDraft;
143
148
  readonly shippingRateInput?: ShippingRateInputDraft;
144
149
  readonly taxCategory?: TaxCategoryResourceIdentifier;
145
- readonly externalTaxRate?: string;
146
- readonly deliveries: Delivery[];
147
- readonly custom?: string;
150
+ readonly externalTaxRate?: ExternalTaxRateDraft;
151
+ readonly deliveries?: DeliveryDraft[];
152
+ readonly custom?: CustomFieldsDraft;
148
153
  }
149
154
  export interface DirectDiscount {
150
155
  readonly id: string;
@@ -155,13 +160,17 @@ export interface DirectDiscountDraft {
155
160
  readonly value: CartDiscountValue;
156
161
  readonly target?: CartDiscountTarget;
157
162
  }
163
+ export interface DirectDiscountReference {
164
+ readonly typeId: 'direct-discount';
165
+ readonly id: string;
166
+ }
158
167
  export interface DiscountCodeInfo {
159
168
  readonly discountCode: DiscountCodeReference;
160
169
  readonly state: DiscountCodeState;
161
170
  }
162
- export type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid';
171
+ export type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid' | string;
163
172
  export interface DiscountedLineItemPortion {
164
- readonly discount: CartDiscountReference;
173
+ readonly discount: Reference;
165
174
  readonly discountedAmount: TypedMoney;
166
175
  }
167
176
  export interface DiscountedLineItemPrice {
@@ -173,22 +182,22 @@ export interface DiscountedLineItemPriceForQuantity {
173
182
  readonly discountedPrice: DiscountedLineItemPrice;
174
183
  }
175
184
  export interface ExternalLineItemTotalPrice {
176
- readonly price: Money;
177
- readonly totalPrice: Money;
185
+ readonly price: _Money;
186
+ readonly totalPrice: _Money;
178
187
  }
179
188
  export interface ExternalTaxAmountDraft {
180
- readonly totalGross: Money;
189
+ readonly totalGross: _Money;
181
190
  readonly taxRate: ExternalTaxRateDraft;
182
191
  }
183
192
  export interface ExternalTaxRateDraft {
184
193
  readonly name: string;
185
194
  readonly amount?: number;
195
+ readonly includedInPrice?: boolean;
186
196
  readonly country: string;
187
197
  readonly state?: string;
188
198
  readonly subRates?: SubRate[];
189
- readonly includedInPrice?: boolean;
190
199
  }
191
- export type InventoryMode = 'None' | 'ReserveOnOrder' | 'TrackOnly';
200
+ export type InventoryMode = 'None' | 'ReserveOnOrder' | 'TrackOnly' | string;
192
201
  export interface ItemShippingDetails {
193
202
  readonly targets: ItemShippingTarget[];
194
203
  readonly valid: boolean;
@@ -210,22 +219,22 @@ export interface LineItem {
210
219
  readonly productType: ProductTypeReference;
211
220
  readonly variant: ProductVariant;
212
221
  readonly price: Price;
222
+ readonly quantity: number;
223
+ readonly totalPrice: CentPrecisionMoney;
224
+ readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
213
225
  readonly taxedPrice?: TaxedItemPrice;
214
226
  readonly taxedPricePortions: MethodTaxedPrice[];
215
- readonly totalPrice: TypedMoney;
216
- readonly quantity: number;
217
- readonly addedAt?: string;
218
227
  readonly state: ItemState[];
219
228
  readonly taxRate?: TaxRate;
220
229
  readonly perMethodTaxRate: MethodTaxRate[];
221
230
  readonly supplyChannel?: ChannelReference;
222
231
  readonly distributionChannel?: ChannelReference;
223
- readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
224
232
  readonly priceMode: LineItemPriceMode;
225
233
  readonly lineItemMode: LineItemMode;
226
- readonly custom?: CustomFields;
227
234
  readonly inventoryMode?: InventoryMode;
228
235
  readonly shippingDetails?: ItemShippingDetails;
236
+ readonly custom?: CustomFields;
237
+ readonly addedAt?: string;
229
238
  readonly lastModifiedAt?: string;
230
239
  }
231
240
  export interface LineItemDraft {
@@ -234,17 +243,17 @@ export interface LineItemDraft {
234
243
  readonly sku?: string;
235
244
  readonly quantity?: number;
236
245
  readonly addedAt?: string;
237
- readonly supplyChannel?: ChannelResourceIdentifier;
238
246
  readonly distributionChannel?: ChannelResourceIdentifier;
239
- readonly externalTaxRate?: ExternalTaxRateDraft;
240
- readonly custom?: CustomFieldsDraft;
241
- readonly externalPrice?: Money;
247
+ readonly supplyChannel?: ChannelResourceIdentifier;
248
+ readonly externalPrice?: _Money;
242
249
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
250
+ readonly externalTaxRate?: ExternalTaxRateDraft;
243
251
  readonly inventoryMode?: InventoryMode;
244
252
  readonly shippingDetails?: ItemShippingDetailsDraft;
253
+ readonly custom?: CustomFieldsDraft;
245
254
  }
246
- export type LineItemMode = 'GiftLineItem' | 'Standard';
247
- export type LineItemPriceMode = 'ExternalPrice' | 'ExternalTotal' | 'Platform';
255
+ export type LineItemMode = 'GiftLineItem' | 'Standard' | string;
256
+ export type LineItemPriceMode = 'ExternalPrice' | 'ExternalTotal' | 'Platform' | string;
248
257
  export interface MethodTaxRate {
249
258
  readonly shippingMethodKey: string;
250
259
  readonly taxRate?: TaxRate;
@@ -257,7 +266,7 @@ export interface ReplicaCartDraft {
257
266
  readonly reference: CartReference | OrderReference;
258
267
  readonly key?: string;
259
268
  }
260
- export type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp';
269
+ export type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp' | string;
261
270
  export interface Shipping {
262
271
  readonly shippingKey: string;
263
272
  readonly shippingInfo: ShippingInfo;
@@ -268,15 +277,15 @@ export interface Shipping {
268
277
  export interface ShippingDraft {
269
278
  readonly key: string;
270
279
  readonly shippingMethod?: ShippingMethodReference;
271
- readonly shippingAddress?: BaseAddress;
280
+ readonly shippingAddress: _BaseAddress;
272
281
  readonly shippingRateInput?: ShippingRateInputDraft;
273
- readonly externalTaxRate?: string;
274
- readonly deliveries: Delivery[];
275
- readonly custom?: string;
282
+ readonly externalTaxRate?: ExternalTaxRateDraft;
283
+ readonly deliveries?: DeliveryDraft[];
284
+ readonly custom?: CustomFieldsDraft;
276
285
  }
277
286
  export interface ShippingInfo {
278
287
  readonly shippingMethodName: string;
279
- readonly price: TypedMoney;
288
+ readonly price: CentPrecisionMoney;
280
289
  readonly shippingRate: ShippingRate;
281
290
  readonly taxedPrice?: TaxedItemPrice;
282
291
  readonly taxRate?: TaxRate;
@@ -286,8 +295,8 @@ export interface ShippingInfo {
286
295
  readonly discountedPrice?: DiscountedLineItemPrice;
287
296
  readonly shippingMethodState: ShippingMethodState;
288
297
  }
289
- export type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart';
290
- export type ShippingMode = 'Multiple' | 'Single';
298
+ export type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart' | string;
299
+ export type ShippingMode = 'Multiple' | 'Single' | string;
291
300
  export type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
292
301
  export interface ClassificationShippingRateInput {
293
302
  readonly type: 'Classification';
@@ -307,56 +316,57 @@ export interface ScoreShippingRateInputDraft {
307
316
  readonly type: 'Score';
308
317
  readonly score: number;
309
318
  }
310
- export type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel';
311
- export type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform';
319
+ export type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel' | string;
320
+ export type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform' | string;
312
321
  export interface TaxPortion {
313
322
  readonly name?: string;
314
323
  readonly rate: number;
315
- readonly amount: TypedMoney;
324
+ readonly amount: CentPrecisionMoney;
316
325
  }
317
326
  export interface TaxPortionDraft {
318
327
  readonly name?: string;
319
328
  readonly rate: number;
320
- readonly amount: Money;
329
+ readonly amount: _Money;
321
330
  }
322
331
  export interface TaxedItemPrice {
323
- readonly totalNet: TypedMoney;
324
- readonly totalGross: TypedMoney;
325
- readonly totalTax?: TypedMoney;
332
+ readonly totalNet: CentPrecisionMoney;
333
+ readonly totalGross: CentPrecisionMoney;
334
+ readonly totalTax?: CentPrecisionMoney;
326
335
  }
327
336
  export interface TaxedPrice {
328
- readonly totalNet: TypedMoney;
329
- readonly totalGross: TypedMoney;
337
+ readonly totalNet: CentPrecisionMoney;
338
+ readonly totalGross: CentPrecisionMoney;
330
339
  readonly taxPortions: TaxPortion[];
331
- readonly totalTax?: TypedMoney;
340
+ readonly totalTax?: CentPrecisionMoney;
332
341
  }
333
342
  export interface TaxedPriceDraft {
334
- readonly totalNet: Money;
335
- readonly totalGross: Money;
343
+ readonly totalNet: _Money;
344
+ readonly totalGross: _Money;
336
345
  readonly taxPortions: TaxPortionDraft[];
337
346
  }
338
347
  export interface CartAddCustomLineItemAction {
339
348
  readonly action: 'addCustomLineItem';
340
- readonly money: Money;
349
+ readonly money: _Money;
341
350
  readonly name: LocalizedString;
342
- readonly quantity: number;
351
+ readonly quantity?: number;
343
352
  readonly slug: string;
344
353
  readonly taxCategory?: TaxCategoryResourceIdentifier;
345
- readonly custom?: CustomFieldsDraft;
346
354
  readonly externalTaxRate?: ExternalTaxRateDraft;
355
+ readonly shippingDetails?: ItemShippingDetailsDraft;
356
+ readonly custom?: CustomFieldsDraft;
347
357
  readonly priceMode?: CustomLineItemPriceMode;
348
358
  }
349
359
  export interface CartAddCustomShippingMethodAction {
350
360
  readonly action: 'addCustomShippingMethod';
351
361
  readonly shippingKey: string;
352
362
  readonly shippingMethodName: string;
353
- readonly shippingAddress?: BaseAddress;
363
+ readonly shippingAddress: _BaseAddress;
354
364
  readonly shippingRate: ShippingRateDraft;
355
365
  readonly shippingRateInput?: ShippingRateInputDraft;
356
366
  readonly taxCategory?: TaxCategoryResourceIdentifier;
357
- readonly externalTaxRate?: string;
358
- readonly deliveries: Delivery[];
359
- readonly custom?: string;
367
+ readonly externalTaxRate?: ExternalTaxRateDraft;
368
+ readonly deliveries?: DeliveryDraft[];
369
+ readonly custom?: CustomFieldsDraft;
360
370
  }
361
371
  export interface CartAddDiscountCodeAction {
362
372
  readonly action: 'addDiscountCode';
@@ -364,21 +374,23 @@ export interface CartAddDiscountCodeAction {
364
374
  }
365
375
  export interface CartAddItemShippingAddressAction {
366
376
  readonly action: 'addItemShippingAddress';
367
- readonly address: BaseAddress;
377
+ readonly address: _BaseAddress;
368
378
  }
369
379
  export interface CartAddLineItemAction {
370
380
  readonly action: 'addLineItem';
371
- readonly custom?: CustomFieldsDraft;
372
- readonly distributionChannel?: ChannelResourceIdentifier;
373
- readonly externalTaxRate?: ExternalTaxRateDraft;
374
381
  readonly productId?: string;
375
382
  readonly variantId?: number;
376
383
  readonly sku?: string;
377
384
  readonly quantity?: number;
385
+ readonly addedAt?: string;
386
+ readonly distributionChannel?: ChannelResourceIdentifier;
378
387
  readonly supplyChannel?: ChannelResourceIdentifier;
379
- readonly externalPrice?: Money;
388
+ readonly externalPrice?: _Money;
380
389
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
390
+ readonly externalTaxRate?: ExternalTaxRateDraft;
391
+ readonly inventoryMode?: InventoryMode;
381
392
  readonly shippingDetails?: ItemShippingDetailsDraft;
393
+ readonly custom?: CustomFieldsDraft;
382
394
  }
383
395
  export interface CartAddPaymentAction {
384
396
  readonly action: 'addPayment';
@@ -387,18 +399,18 @@ export interface CartAddPaymentAction {
387
399
  export interface CartAddShippingMethodAction {
388
400
  readonly action: 'addShippingMethod';
389
401
  readonly shippingKey: string;
390
- readonly shippingMethod?: ShippingMethodReference;
391
- readonly shippingAddress?: BaseAddress;
402
+ readonly shippingMethod: ShippingMethodResourceIdentifier;
403
+ readonly shippingAddress: _BaseAddress;
392
404
  readonly shippingRateInput?: ShippingRateInputDraft;
393
- readonly externalTaxRate?: string;
394
- readonly deliveries: Delivery[];
395
- readonly custom?: string;
405
+ readonly externalTaxRate?: ExternalTaxRateDraft;
406
+ readonly deliveries?: DeliveryDraft[];
407
+ readonly custom?: CustomFieldsDraft;
396
408
  }
397
409
  export interface CartAddShoppingListAction {
398
410
  readonly action: 'addShoppingList';
399
411
  readonly shoppingList: ShoppingListResourceIdentifier;
400
- readonly supplyChannel?: ChannelResourceIdentifier;
401
412
  readonly distributionChannel?: ChannelResourceIdentifier;
413
+ readonly supplyChannel?: ChannelResourceIdentifier;
402
414
  }
403
415
  export interface CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction {
404
416
  readonly action: 'applyDeltaToCustomLineItemShippingDetailsTargets';
@@ -413,7 +425,7 @@ export interface CartApplyDeltaToLineItemShippingDetailsTargetsAction {
413
425
  export interface CartChangeCustomLineItemMoneyAction {
414
426
  readonly action: 'changeCustomLineItemMoney';
415
427
  readonly customLineItemId: string;
416
- readonly money: Money;
428
+ readonly money: _Money;
417
429
  }
418
430
  export interface CartChangeCustomLineItemPriceModeAction {
419
431
  readonly action: 'changeCustomLineItemPriceMode';
@@ -429,7 +441,7 @@ export interface CartChangeLineItemQuantityAction {
429
441
  readonly action: 'changeLineItemQuantity';
430
442
  readonly lineItemId: string;
431
443
  readonly quantity: number;
432
- readonly externalPrice?: Money;
444
+ readonly externalPrice?: _Money;
433
445
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
434
446
  }
435
447
  export interface CartChangeTaxCalculationModeAction {
@@ -467,7 +479,7 @@ export interface CartRemoveLineItemAction {
467
479
  readonly action: 'removeLineItem';
468
480
  readonly lineItemId: string;
469
481
  readonly quantity?: number;
470
- readonly externalPrice?: Money;
482
+ readonly externalPrice?: _Money;
471
483
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
472
484
  readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
473
485
  }
@@ -485,7 +497,7 @@ export interface CartSetAnonymousIdAction {
485
497
  }
486
498
  export interface CartSetBillingAddressAction {
487
499
  readonly action: 'setBillingAddress';
488
- readonly address?: BaseAddress;
500
+ readonly address?: _BaseAddress;
489
501
  }
490
502
  export interface CartSetBillingAddressCustomFieldAction {
491
503
  readonly action: 'setBillingAddressCustomField';
@@ -497,9 +509,13 @@ export interface CartSetBillingAddressCustomTypeAction {
497
509
  readonly type?: TypeResourceIdentifier;
498
510
  readonly fields?: FieldContainer;
499
511
  }
512
+ export interface CartSetBusinessUnitAction {
513
+ readonly action: 'setBusinessUnit';
514
+ readonly businessUnit: BusinessUnitResourceIdentifier;
515
+ }
500
516
  export interface CartSetCartTotalTaxAction {
501
517
  readonly action: 'setCartTotalTax';
502
- readonly externalTotalGross: Money;
518
+ readonly externalTotalGross: _Money;
503
519
  readonly externalTaxPortions?: TaxPortionDraft[];
504
520
  }
505
521
  export interface CartSetCountryAction {
@@ -552,7 +568,7 @@ export interface CartSetCustomTypeAction {
552
568
  }
553
569
  export interface CartSetCustomerEmailAction {
554
570
  readonly action: 'setCustomerEmail';
555
- readonly email: string;
571
+ readonly email?: string;
556
572
  }
557
573
  export interface CartSetCustomerGroupAction {
558
574
  readonly action: 'setCustomerGroup';
@@ -618,7 +634,7 @@ export interface CartSetLineItemDistributionChannelAction {
618
634
  export interface CartSetLineItemPriceAction {
619
635
  readonly action: 'setLineItemPrice';
620
636
  readonly lineItemId: string;
621
- readonly externalPrice?: Money;
637
+ readonly externalPrice?: _Money;
622
638
  }
623
639
  export interface CartSetLineItemShippingDetailsAction {
624
640
  readonly action: 'setLineItemShippingDetails';
@@ -634,11 +650,13 @@ export interface CartSetLineItemTaxAmountAction {
634
650
  readonly action: 'setLineItemTaxAmount';
635
651
  readonly lineItemId: string;
636
652
  readonly externalTaxAmount?: ExternalTaxAmountDraft;
653
+ readonly shippingKey?: string;
637
654
  }
638
655
  export interface CartSetLineItemTaxRateAction {
639
656
  readonly action: 'setLineItemTaxRate';
640
657
  readonly lineItemId: string;
641
658
  readonly externalTaxRate?: ExternalTaxRateDraft;
659
+ readonly shippingKey?: string;
642
660
  }
643
661
  export interface CartSetLineItemTotalPriceAction {
644
662
  readonly action: 'setLineItemTotalPrice';
@@ -651,7 +669,7 @@ export interface CartSetLocaleAction {
651
669
  }
652
670
  export interface CartSetShippingAddressAction {
653
671
  readonly action: 'setShippingAddress';
654
- readonly address?: BaseAddress;
672
+ readonly address?: _BaseAddress;
655
673
  }
656
674
  export interface CartSetShippingAddressCustomFieldAction {
657
675
  readonly action: 'setShippingAddressCustomField';
@@ -697,12 +715,12 @@ export interface CartUnfreezeCartAction {
697
715
  }
698
716
  export interface CartUpdateItemShippingAddressAction {
699
717
  readonly action: 'updateItemShippingAddress';
700
- readonly address: BaseAddress;
718
+ readonly address: _BaseAddress;
701
719
  }
702
720
  export interface CustomLineItemImportDraft {
703
721
  readonly name: LocalizedString;
704
722
  readonly quantity: number;
705
- readonly money: Money;
723
+ readonly money: _Money;
706
724
  readonly slug: string;
707
725
  readonly state?: ItemState[];
708
726
  readonly taxRate?: TaxRate;
@@ -711,4 +729,4 @@ export interface CustomLineItemImportDraft {
711
729
  readonly shippingDetails?: ItemShippingDetailsDraft;
712
730
  readonly priceMode: CustomLineItemPriceMode;
713
731
  }
714
- export type ProductPublishScope = 'All' | 'Prices';
732
+ export type ProductPublishScope = 'All' | 'Prices' | string;
@@ -1,4 +1,4 @@
1
- import { Address, BaseAddress, BaseResource, CreatedBy, GeoJson, LastModifiedBy, LocalizedString } from './common';
1
+ import { Address, BaseResource, CreatedBy, GeoJson, LastModifiedBy, LocalizedString, _BaseAddress } from './common';
2
2
  import { ReviewRatingStatistics } from './review';
3
3
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
4
4
  export interface Channel extends BaseResource {
@@ -22,7 +22,7 @@ export interface ChannelDraft {
22
22
  readonly roles?: ChannelRoleEnum[];
23
23
  readonly name?: LocalizedString;
24
24
  readonly description?: LocalizedString;
25
- readonly address?: BaseAddress;
25
+ readonly address?: _BaseAddress;
26
26
  readonly custom?: CustomFieldsDraft;
27
27
  readonly geoLocation?: GeoJson;
28
28
  }
@@ -43,7 +43,7 @@ export interface ChannelResourceIdentifier {
43
43
  readonly id?: string;
44
44
  readonly key?: string;
45
45
  }
46
- export type ChannelRoleEnum = 'InventorySupply' | 'OrderExport' | 'OrderImport' | 'Primary' | 'ProductDistribution';
46
+ export type ChannelRoleEnum = 'InventorySupply' | 'OrderExport' | 'OrderImport' | 'Primary' | 'ProductDistribution' | string;
47
47
  export interface ChannelUpdate {
48
48
  readonly version: number;
49
49
  readonly actions: ChannelUpdateAction[];
@@ -71,7 +71,7 @@ export interface ChannelRemoveRolesAction {
71
71
  }
72
72
  export interface ChannelSetAddressAction {
73
73
  readonly action: 'setAddress';
74
- readonly address?: BaseAddress;
74
+ readonly address?: _BaseAddress;
75
75
  }
76
76
  export interface ChannelSetAddressCustomFieldAction {
77
77
  readonly action: 'setAddressCustomField';