@gradientedge/commercetools-utils 5.3.1 → 5.5.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,6 +1,6 @@
1
1
  import { CustomLineItemPriceMode, ExternalLineItemTotalPrice, ExternalTaxAmountDraft, ExternalTaxRateDraft, ItemShippingDetailsDraft, RoundingMode, ShippingRateInputDraft, TaxCalculationMode, TaxedPrice, TaxMode, TaxPortionDraft } from './cart';
2
2
  import { ChannelResourceIdentifier } from './channel';
3
- import { BaseAddress, BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, TypedMoney } from './common';
3
+ import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString, TypedMoney, _BaseAddress, _Money } from './common';
4
4
  import { CustomerGroupResourceIdentifier } from './customer-group';
5
5
  import { DiscountCodeReference } from './discount-code';
6
6
  import { ErrorObject } from './error';
@@ -115,7 +115,7 @@ export interface OrderEditSetStagedActionsAction {
115
115
  }
116
116
  export interface StagedOrderAddCustomLineItemAction {
117
117
  readonly action: 'addCustomLineItem';
118
- readonly money: Money;
118
+ readonly money: _Money;
119
119
  readonly name: LocalizedString;
120
120
  readonly quantity?: number;
121
121
  readonly slug: string;
@@ -127,7 +127,7 @@ export interface StagedOrderAddCustomLineItemAction {
127
127
  export interface StagedOrderAddDeliveryAction {
128
128
  readonly action: 'addDelivery';
129
129
  readonly items?: DeliveryItem[];
130
- readonly address?: BaseAddress;
130
+ readonly address?: _BaseAddress;
131
131
  readonly parcels?: ParcelDraft[];
132
132
  readonly custom?: CustomFieldsDraft;
133
133
  }
@@ -137,7 +137,7 @@ export interface StagedOrderAddDiscountCodeAction {
137
137
  }
138
138
  export interface StagedOrderAddItemShippingAddressAction {
139
139
  readonly action: 'addItemShippingAddress';
140
- readonly address: BaseAddress;
140
+ readonly address: _BaseAddress;
141
141
  }
142
142
  export interface StagedOrderAddLineItemAction {
143
143
  readonly action: 'addLineItem';
@@ -150,7 +150,7 @@ export interface StagedOrderAddLineItemAction {
150
150
  readonly quantity?: number;
151
151
  readonly addedAt?: string;
152
152
  readonly supplyChannel?: ChannelResourceIdentifier;
153
- readonly externalPrice?: Money;
153
+ readonly externalPrice?: _Money;
154
154
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
155
155
  readonly shippingDetails?: ItemShippingDetailsDraft;
156
156
  }
@@ -180,7 +180,7 @@ export interface StagedOrderAddShoppingListAction {
180
180
  export interface StagedOrderChangeCustomLineItemMoneyAction {
181
181
  readonly action: 'changeCustomLineItemMoney';
182
182
  readonly customLineItemId: string;
183
- readonly money: Money;
183
+ readonly money: _Money;
184
184
  }
185
185
  export interface StagedOrderChangeCustomLineItemQuantityAction {
186
186
  readonly action: 'changeCustomLineItemQuantity';
@@ -191,7 +191,7 @@ export interface StagedOrderChangeLineItemQuantityAction {
191
191
  readonly action: 'changeLineItemQuantity';
192
192
  readonly lineItemId: string;
193
193
  readonly quantity: number;
194
- readonly externalPrice?: Money;
194
+ readonly externalPrice?: _Money;
195
195
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
196
196
  }
197
197
  export interface StagedOrderChangeOrderStateAction {
@@ -248,7 +248,7 @@ export interface StagedOrderRemoveLineItemAction {
248
248
  readonly action: 'removeLineItem';
249
249
  readonly lineItemId: string;
250
250
  readonly quantity?: number;
251
- readonly externalPrice?: Money;
251
+ readonly externalPrice?: _Money;
252
252
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
253
253
  readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
254
254
  }
@@ -262,7 +262,7 @@ export interface StagedOrderRemovePaymentAction {
262
262
  }
263
263
  export interface StagedOrderSetBillingAddressAction {
264
264
  readonly action: 'setBillingAddress';
265
- readonly address?: BaseAddress;
265
+ readonly address?: _BaseAddress;
266
266
  }
267
267
  export interface StagedOrderSetBillingAddressCustomFieldAction {
268
268
  readonly action: 'setBillingAddressCustomField';
@@ -337,7 +337,7 @@ export interface StagedOrderSetCustomerIdAction {
337
337
  export interface StagedOrderSetDeliveryAddressAction {
338
338
  readonly action: 'setDeliveryAddress';
339
339
  readonly deliveryId: string;
340
- readonly address?: BaseAddress;
340
+ readonly address?: _BaseAddress;
341
341
  }
342
342
  export interface StagedOrderSetDeliveryAddressCustomFieldAction {
343
343
  readonly action: 'setDeliveryAddressCustomField';
@@ -400,7 +400,7 @@ export interface StagedOrderSetLineItemDistributionChannelAction {
400
400
  export interface StagedOrderSetLineItemPriceAction {
401
401
  readonly action: 'setLineItemPrice';
402
402
  readonly lineItemId: string;
403
- readonly externalPrice?: Money;
403
+ readonly externalPrice?: _Money;
404
404
  }
405
405
  export interface StagedOrderSetLineItemShippingDetailsAction {
406
406
  readonly action: 'setLineItemShippingDetails';
@@ -411,11 +411,13 @@ export interface StagedOrderSetLineItemTaxAmountAction {
411
411
  readonly action: 'setLineItemTaxAmount';
412
412
  readonly lineItemId: string;
413
413
  readonly externalTaxAmount?: ExternalTaxAmountDraft;
414
+ readonly shippingKey?: string;
414
415
  }
415
416
  export interface StagedOrderSetLineItemTaxRateAction {
416
417
  readonly action: 'setLineItemTaxRate';
417
418
  readonly lineItemId: string;
418
419
  readonly externalTaxRate?: ExternalTaxRateDraft;
420
+ readonly shippingKey?: string;
419
421
  }
420
422
  export interface StagedOrderSetLineItemTotalPriceAction {
421
423
  readonly action: 'setLineItemTotalPrice';
@@ -432,7 +434,7 @@ export interface StagedOrderSetOrderNumberAction {
432
434
  }
433
435
  export interface StagedOrderSetOrderTotalTaxAction {
434
436
  readonly action: 'setOrderTotalTax';
435
- readonly externalTotalGross: Money;
437
+ readonly externalTotalGross: _Money;
436
438
  readonly externalTaxPortions?: TaxPortionDraft[];
437
439
  }
438
440
  export interface StagedOrderSetParcelCustomFieldAction {
@@ -462,6 +464,10 @@ export interface StagedOrderSetParcelTrackingDataAction {
462
464
  readonly parcelId: string;
463
465
  readonly trackingData?: TrackingData;
464
466
  }
467
+ export interface StagedOrderSetPurchaseOrderNumberAction {
468
+ readonly action: 'setPurchaseOrderNumber';
469
+ readonly purchaseOrderNumber?: string;
470
+ }
465
471
  export interface StagedOrderSetReturnInfoAction {
466
472
  readonly action: 'setReturnInfo';
467
473
  readonly items?: ReturnInfoDraft[];
@@ -490,11 +496,11 @@ export interface StagedOrderSetReturnShipmentStateAction {
490
496
  }
491
497
  export interface StagedOrderSetShippingAddressAction {
492
498
  readonly action: 'setShippingAddress';
493
- readonly address?: BaseAddress;
499
+ readonly address?: _BaseAddress;
494
500
  }
495
501
  export interface StagedOrderSetShippingAddressAndCustomShippingMethodAction {
496
502
  readonly action: 'setShippingAddressAndCustomShippingMethod';
497
- readonly address: BaseAddress;
503
+ readonly address: _BaseAddress;
498
504
  readonly shippingMethodName: string;
499
505
  readonly shippingRate: ShippingRateDraft;
500
506
  readonly taxCategory?: TaxCategoryResourceIdentifier;
@@ -502,7 +508,7 @@ export interface StagedOrderSetShippingAddressAndCustomShippingMethodAction {
502
508
  }
503
509
  export interface StagedOrderSetShippingAddressAndShippingMethodAction {
504
510
  readonly action: 'setShippingAddressAndShippingMethod';
505
- readonly address: BaseAddress;
511
+ readonly address: _BaseAddress;
506
512
  readonly shippingMethod?: ShippingMethodResourceIdentifier;
507
513
  readonly externalTaxRate?: ExternalTaxRateDraft;
508
514
  }
@@ -556,7 +562,7 @@ export interface StagedOrderTransitionStateAction {
556
562
  }
557
563
  export interface StagedOrderUpdateItemShippingAddressAction {
558
564
  readonly action: 'updateItemShippingAddress';
559
- readonly address: BaseAddress;
565
+ readonly address: _BaseAddress;
560
566
  }
561
567
  export interface StagedOrderUpdateSyncInfoAction {
562
568
  readonly action: 'updateSyncInfo';
@@ -1,9 +1,10 @@
1
+ import { BusinessUnitKeyReference, BusinessUnitResourceIdentifier } from './business-unit';
1
2
  import { CartOrigin, CartReference, CartResourceIdentifier, CustomLineItem, CustomLineItemImportDraft, DiscountCodeInfo, DiscountedLineItemPortion, InventoryMode, ItemShippingDetailsDraft, LineItem, RoundingMode, Shipping, ShippingInfo, ShippingMethodState, ShippingMode, ShippingRateInput, TaxCalculationMode, TaxedPrice, TaxedPriceDraft, TaxMode } from './cart';
2
3
  import { CartDiscountReference } from './cart-discount';
3
4
  import { ChannelReference, ChannelResourceIdentifier } from './channel';
4
- import { Address, AddressDraft, BaseAddress, BaseResource, CreatedBy, Image, LastModifiedBy, LocalizedString, Money, PriceDraft, TypedMoney } from './common';
5
+ import { Address, AddressDraft, BaseAddress, BaseResource, CreatedBy, Image, LastModifiedBy, LocalizedString, PriceDraft, TypedMoney, _BaseAddress, _Money } from './common';
5
6
  import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group';
6
- import { StagedOrderAddCustomLineItemAction, StagedOrderAddDeliveryAction, StagedOrderAddDiscountCodeAction, StagedOrderAddItemShippingAddressAction, StagedOrderAddLineItemAction, StagedOrderAddParcelToDeliveryAction, StagedOrderAddPaymentAction, StagedOrderAddReturnInfoAction, StagedOrderAddShoppingListAction, StagedOrderChangeCustomLineItemMoneyAction, StagedOrderChangeCustomLineItemQuantityAction, StagedOrderChangeLineItemQuantityAction, StagedOrderChangeOrderStateAction, StagedOrderChangePaymentStateAction, StagedOrderChangeShipmentStateAction, StagedOrderChangeTaxCalculationModeAction, StagedOrderChangeTaxModeAction, StagedOrderChangeTaxRoundingModeAction, StagedOrderImportCustomLineItemStateAction, StagedOrderImportLineItemStateAction, StagedOrderRemoveCustomLineItemAction, StagedOrderRemoveDeliveryAction, StagedOrderRemoveDiscountCodeAction, StagedOrderRemoveItemShippingAddressAction, StagedOrderRemoveLineItemAction, StagedOrderRemoveParcelFromDeliveryAction, StagedOrderRemovePaymentAction, StagedOrderSetBillingAddressAction, StagedOrderSetBillingAddressCustomFieldAction, StagedOrderSetBillingAddressCustomTypeAction, StagedOrderSetCountryAction, StagedOrderSetCustomerEmailAction, StagedOrderSetCustomerGroupAction, StagedOrderSetCustomerIdAction, StagedOrderSetCustomFieldAction, StagedOrderSetCustomLineItemCustomFieldAction, StagedOrderSetCustomLineItemCustomTypeAction, StagedOrderSetCustomLineItemShippingDetailsAction, StagedOrderSetCustomLineItemTaxAmountAction, StagedOrderSetCustomLineItemTaxRateAction, StagedOrderSetCustomShippingMethodAction, StagedOrderSetCustomTypeAction, StagedOrderSetDeliveryAddressAction, StagedOrderSetDeliveryAddressCustomFieldAction, StagedOrderSetDeliveryAddressCustomTypeAction, StagedOrderSetDeliveryCustomFieldAction, StagedOrderSetDeliveryCustomTypeAction, StagedOrderSetDeliveryItemsAction, StagedOrderSetItemShippingAddressCustomFieldAction, StagedOrderSetItemShippingAddressCustomTypeAction, StagedOrderSetLineItemCustomFieldAction, StagedOrderSetLineItemCustomTypeAction, StagedOrderSetLineItemDistributionChannelAction, StagedOrderSetLineItemPriceAction, StagedOrderSetLineItemShippingDetailsAction, StagedOrderSetLineItemTaxAmountAction, StagedOrderSetLineItemTaxRateAction, StagedOrderSetLineItemTotalPriceAction, StagedOrderSetLocaleAction, StagedOrderSetOrderNumberAction, StagedOrderSetOrderTotalTaxAction, StagedOrderSetParcelCustomFieldAction, StagedOrderSetParcelCustomTypeAction, StagedOrderSetParcelItemsAction, StagedOrderSetParcelMeasurementsAction, StagedOrderSetParcelTrackingDataAction, StagedOrderSetReturnInfoAction, StagedOrderSetReturnItemCustomFieldAction, StagedOrderSetReturnItemCustomTypeAction, StagedOrderSetReturnPaymentStateAction, StagedOrderSetReturnShipmentStateAction, StagedOrderSetShippingAddressAction, StagedOrderSetShippingAddressAndCustomShippingMethodAction, StagedOrderSetShippingAddressAndShippingMethodAction, StagedOrderSetShippingAddressCustomFieldAction, StagedOrderSetShippingAddressCustomTypeAction, StagedOrderSetShippingMethodAction, StagedOrderSetShippingMethodTaxAmountAction, StagedOrderSetShippingMethodTaxRateAction, StagedOrderSetShippingRateInputAction, StagedOrderTransitionCustomLineItemStateAction, StagedOrderTransitionLineItemStateAction, StagedOrderTransitionStateAction, StagedOrderUpdateItemShippingAddressAction, StagedOrderUpdateSyncInfoAction } from './order-edit';
7
+ import { StagedOrder, StagedOrderAddCustomLineItemAction, StagedOrderAddDeliveryAction, StagedOrderAddDiscountCodeAction, StagedOrderAddItemShippingAddressAction, StagedOrderAddLineItemAction, StagedOrderAddParcelToDeliveryAction, StagedOrderAddPaymentAction, StagedOrderAddReturnInfoAction, StagedOrderAddShoppingListAction, StagedOrderChangeCustomLineItemMoneyAction, StagedOrderChangeCustomLineItemQuantityAction, StagedOrderChangeLineItemQuantityAction, StagedOrderChangeOrderStateAction, StagedOrderChangePaymentStateAction, StagedOrderChangeShipmentStateAction, StagedOrderChangeTaxCalculationModeAction, StagedOrderChangeTaxModeAction, StagedOrderChangeTaxRoundingModeAction, StagedOrderImportCustomLineItemStateAction, StagedOrderImportLineItemStateAction, StagedOrderRemoveCustomLineItemAction, StagedOrderRemoveDeliveryAction, StagedOrderRemoveDiscountCodeAction, StagedOrderRemoveItemShippingAddressAction, StagedOrderRemoveLineItemAction, StagedOrderRemoveParcelFromDeliveryAction, StagedOrderRemovePaymentAction, StagedOrderSetBillingAddressAction, StagedOrderSetBillingAddressCustomFieldAction, StagedOrderSetBillingAddressCustomTypeAction, StagedOrderSetCountryAction, StagedOrderSetCustomerEmailAction, StagedOrderSetCustomerGroupAction, StagedOrderSetCustomerIdAction, StagedOrderSetCustomFieldAction, StagedOrderSetCustomLineItemCustomFieldAction, StagedOrderSetCustomLineItemCustomTypeAction, StagedOrderSetCustomLineItemShippingDetailsAction, StagedOrderSetCustomLineItemTaxAmountAction, StagedOrderSetCustomLineItemTaxRateAction, StagedOrderSetCustomShippingMethodAction, StagedOrderSetCustomTypeAction, StagedOrderSetDeliveryAddressAction, StagedOrderSetDeliveryAddressCustomFieldAction, StagedOrderSetDeliveryAddressCustomTypeAction, StagedOrderSetDeliveryCustomFieldAction, StagedOrderSetDeliveryCustomTypeAction, StagedOrderSetDeliveryItemsAction, StagedOrderSetItemShippingAddressCustomFieldAction, StagedOrderSetItemShippingAddressCustomTypeAction, StagedOrderSetLineItemCustomFieldAction, StagedOrderSetLineItemCustomTypeAction, StagedOrderSetLineItemDistributionChannelAction, StagedOrderSetLineItemPriceAction, StagedOrderSetLineItemShippingDetailsAction, StagedOrderSetLineItemTaxAmountAction, StagedOrderSetLineItemTaxRateAction, StagedOrderSetLineItemTotalPriceAction, StagedOrderSetLocaleAction, StagedOrderSetOrderNumberAction, StagedOrderSetOrderTotalTaxAction, StagedOrderSetParcelCustomFieldAction, StagedOrderSetParcelCustomTypeAction, StagedOrderSetParcelItemsAction, StagedOrderSetParcelMeasurementsAction, StagedOrderSetParcelTrackingDataAction, StagedOrderSetPurchaseOrderNumberAction, StagedOrderSetReturnInfoAction, StagedOrderSetReturnItemCustomFieldAction, StagedOrderSetReturnItemCustomTypeAction, StagedOrderSetReturnPaymentStateAction, StagedOrderSetReturnShipmentStateAction, StagedOrderSetShippingAddressAction, StagedOrderSetShippingAddressAndCustomShippingMethodAction, StagedOrderSetShippingAddressAndShippingMethodAction, StagedOrderSetShippingAddressCustomFieldAction, StagedOrderSetShippingAddressCustomTypeAction, StagedOrderSetShippingMethodAction, StagedOrderSetShippingMethodTaxAmountAction, StagedOrderSetShippingMethodTaxRateAction, StagedOrderSetShippingRateInputAction, StagedOrderTransitionCustomLineItemStateAction, StagedOrderTransitionLineItemStateAction, StagedOrderTransitionStateAction, StagedOrderUpdateItemShippingAddressAction, StagedOrderUpdateSyncInfoAction } from './order-edit';
7
8
  import { PaymentReference, PaymentResourceIdentifier } from './payment';
8
9
  import { Attribute } from './product';
9
10
  import { QuoteReference, QuoteResourceIdentifier } from './quote';
@@ -12,7 +13,7 @@ import { StateReference, StateResourceIdentifier } from './state';
12
13
  import { StoreKeyReference, StoreResourceIdentifier } from './store';
13
14
  import { TaxCategoryResourceIdentifier, TaxRate } from './tax-category';
14
15
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
15
- export type StagedOrderUpdateAction = StagedOrderAddCustomLineItemAction | StagedOrderAddDeliveryAction | StagedOrderAddDiscountCodeAction | StagedOrderAddItemShippingAddressAction | StagedOrderAddLineItemAction | StagedOrderAddParcelToDeliveryAction | StagedOrderAddPaymentAction | StagedOrderAddReturnInfoAction | StagedOrderAddShoppingListAction | StagedOrderChangeCustomLineItemMoneyAction | StagedOrderChangeCustomLineItemQuantityAction | StagedOrderChangeLineItemQuantityAction | StagedOrderChangeOrderStateAction | StagedOrderChangePaymentStateAction | StagedOrderChangeShipmentStateAction | StagedOrderChangeTaxCalculationModeAction | StagedOrderChangeTaxModeAction | StagedOrderChangeTaxRoundingModeAction | StagedOrderImportCustomLineItemStateAction | StagedOrderImportLineItemStateAction | StagedOrderRemoveCustomLineItemAction | StagedOrderRemoveDeliveryAction | StagedOrderRemoveDiscountCodeAction | StagedOrderRemoveItemShippingAddressAction | StagedOrderRemoveLineItemAction | StagedOrderRemoveParcelFromDeliveryAction | StagedOrderRemovePaymentAction | StagedOrderSetBillingAddressAction | StagedOrderSetBillingAddressCustomFieldAction | StagedOrderSetBillingAddressCustomTypeAction | StagedOrderSetCountryAction | StagedOrderSetCustomFieldAction | StagedOrderSetCustomLineItemCustomFieldAction | StagedOrderSetCustomLineItemCustomTypeAction | StagedOrderSetCustomLineItemShippingDetailsAction | StagedOrderSetCustomLineItemTaxAmountAction | StagedOrderSetCustomLineItemTaxRateAction | StagedOrderSetCustomShippingMethodAction | StagedOrderSetCustomTypeAction | StagedOrderSetCustomerEmailAction | StagedOrderSetCustomerGroupAction | StagedOrderSetCustomerIdAction | StagedOrderSetDeliveryAddressAction | StagedOrderSetDeliveryAddressCustomFieldAction | StagedOrderSetDeliveryAddressCustomTypeAction | StagedOrderSetDeliveryCustomFieldAction | StagedOrderSetDeliveryCustomTypeAction | StagedOrderSetDeliveryItemsAction | StagedOrderSetItemShippingAddressCustomFieldAction | StagedOrderSetItemShippingAddressCustomTypeAction | StagedOrderSetLineItemCustomFieldAction | StagedOrderSetLineItemCustomTypeAction | StagedOrderSetLineItemDistributionChannelAction | StagedOrderSetLineItemPriceAction | StagedOrderSetLineItemShippingDetailsAction | StagedOrderSetLineItemTaxAmountAction | StagedOrderSetLineItemTaxRateAction | StagedOrderSetLineItemTotalPriceAction | StagedOrderSetLocaleAction | StagedOrderSetOrderNumberAction | StagedOrderSetOrderTotalTaxAction | StagedOrderSetParcelCustomFieldAction | StagedOrderSetParcelCustomTypeAction | StagedOrderSetParcelItemsAction | StagedOrderSetParcelMeasurementsAction | StagedOrderSetParcelTrackingDataAction | StagedOrderSetReturnInfoAction | StagedOrderSetReturnItemCustomFieldAction | StagedOrderSetReturnItemCustomTypeAction | StagedOrderSetReturnPaymentStateAction | StagedOrderSetReturnShipmentStateAction | StagedOrderSetShippingAddressAction | StagedOrderSetShippingAddressAndCustomShippingMethodAction | StagedOrderSetShippingAddressAndShippingMethodAction | StagedOrderSetShippingAddressCustomFieldAction | StagedOrderSetShippingAddressCustomTypeAction | StagedOrderSetShippingMethodAction | StagedOrderSetShippingMethodTaxAmountAction | StagedOrderSetShippingMethodTaxRateAction | StagedOrderSetShippingRateInputAction | StagedOrderTransitionCustomLineItemStateAction | StagedOrderTransitionLineItemStateAction | StagedOrderTransitionStateAction | StagedOrderUpdateItemShippingAddressAction | StagedOrderUpdateSyncInfoAction;
16
+ export type StagedOrderUpdateAction = StagedOrderAddCustomLineItemAction | StagedOrderAddDeliveryAction | StagedOrderAddDiscountCodeAction | StagedOrderAddItemShippingAddressAction | StagedOrderAddLineItemAction | StagedOrderAddParcelToDeliveryAction | StagedOrderAddPaymentAction | StagedOrderAddReturnInfoAction | StagedOrderAddShoppingListAction | StagedOrderChangeCustomLineItemMoneyAction | StagedOrderChangeCustomLineItemQuantityAction | StagedOrderChangeLineItemQuantityAction | StagedOrderChangeOrderStateAction | StagedOrderChangePaymentStateAction | StagedOrderChangeShipmentStateAction | StagedOrderChangeTaxCalculationModeAction | StagedOrderChangeTaxModeAction | StagedOrderChangeTaxRoundingModeAction | StagedOrderImportCustomLineItemStateAction | StagedOrderImportLineItemStateAction | StagedOrderRemoveCustomLineItemAction | StagedOrderRemoveDeliveryAction | StagedOrderRemoveDiscountCodeAction | StagedOrderRemoveItemShippingAddressAction | StagedOrderRemoveLineItemAction | StagedOrderRemoveParcelFromDeliveryAction | StagedOrderRemovePaymentAction | StagedOrderSetBillingAddressAction | StagedOrderSetBillingAddressCustomFieldAction | StagedOrderSetBillingAddressCustomTypeAction | StagedOrderSetCountryAction | StagedOrderSetCustomFieldAction | StagedOrderSetCustomLineItemCustomFieldAction | StagedOrderSetCustomLineItemCustomTypeAction | StagedOrderSetCustomLineItemShippingDetailsAction | StagedOrderSetCustomLineItemTaxAmountAction | StagedOrderSetCustomLineItemTaxRateAction | StagedOrderSetCustomShippingMethodAction | StagedOrderSetCustomTypeAction | StagedOrderSetCustomerEmailAction | StagedOrderSetCustomerGroupAction | StagedOrderSetCustomerIdAction | StagedOrderSetDeliveryAddressAction | StagedOrderSetDeliveryAddressCustomFieldAction | StagedOrderSetDeliveryAddressCustomTypeAction | StagedOrderSetDeliveryCustomFieldAction | StagedOrderSetDeliveryCustomTypeAction | StagedOrderSetDeliveryItemsAction | StagedOrderSetItemShippingAddressCustomFieldAction | StagedOrderSetItemShippingAddressCustomTypeAction | StagedOrderSetLineItemCustomFieldAction | StagedOrderSetLineItemCustomTypeAction | StagedOrderSetLineItemDistributionChannelAction | StagedOrderSetLineItemPriceAction | StagedOrderSetLineItemShippingDetailsAction | StagedOrderSetLineItemTaxAmountAction | StagedOrderSetLineItemTaxRateAction | StagedOrderSetLineItemTotalPriceAction | StagedOrderSetLocaleAction | StagedOrderSetOrderNumberAction | StagedOrderSetOrderTotalTaxAction | StagedOrderSetParcelCustomFieldAction | StagedOrderSetParcelCustomTypeAction | StagedOrderSetParcelItemsAction | StagedOrderSetParcelMeasurementsAction | StagedOrderSetParcelTrackingDataAction | StagedOrderSetPurchaseOrderNumberAction | StagedOrderSetReturnInfoAction | StagedOrderSetReturnItemCustomFieldAction | StagedOrderSetReturnItemCustomTypeAction | StagedOrderSetReturnPaymentStateAction | StagedOrderSetReturnShipmentStateAction | StagedOrderSetShippingAddressAction | StagedOrderSetShippingAddressAndCustomShippingMethodAction | StagedOrderSetShippingAddressAndShippingMethodAction | StagedOrderSetShippingAddressCustomFieldAction | StagedOrderSetShippingAddressCustomTypeAction | StagedOrderSetShippingMethodAction | StagedOrderSetShippingMethodTaxAmountAction | StagedOrderSetShippingMethodTaxRateAction | StagedOrderSetShippingRateInputAction | StagedOrderTransitionCustomLineItemStateAction | StagedOrderTransitionLineItemStateAction | StagedOrderTransitionStateAction | StagedOrderUpdateItemShippingAddressAction | StagedOrderUpdateSyncInfoAction;
16
17
  export interface Hit {
17
18
  readonly id: string;
18
19
  readonly version: number;
@@ -24,6 +25,42 @@ export interface OrderPagedSearchResponse {
24
25
  readonly limit?: number;
25
26
  readonly hits: Hit[];
26
27
  }
28
+ export type OrderSearchMatchType = 'all' | 'any' | string;
29
+ export interface OrderSearchQueryExpressionValue {
30
+ readonly field: string;
31
+ readonly boost?: number;
32
+ readonly customType?: string;
33
+ }
34
+ export type _OrderSearchQueryExpressionValue = OrderSearchQueryExpressionValue | OrderSearchAnyValue | OrderSearchDateRangeValue | OrderSearchFullTextValue | OrderSearchLongRangeValue | OrderSearchNumberRangeValue | OrderSearchStringValue;
35
+ export interface OrderSearchAnyValue extends OrderSearchQueryExpressionValue {
36
+ readonly value: any;
37
+ readonly language?: string;
38
+ readonly caseInsensitive?: boolean;
39
+ }
40
+ export interface OrderSearchDateRangeValue extends OrderSearchQueryExpressionValue {
41
+ readonly gte?: string;
42
+ readonly lte?: string;
43
+ }
44
+ export interface OrderSearchFullTextValue extends OrderSearchQueryExpressionValue {
45
+ readonly value: string;
46
+ readonly language?: string;
47
+ readonly mustMatch?: OrderSearchMatchType;
48
+ }
49
+ export interface OrderSearchLongRangeValue extends OrderSearchQueryExpressionValue {
50
+ readonly gte?: number;
51
+ readonly lte?: number;
52
+ }
53
+ export interface OrderSearchNumberRangeValue extends OrderSearchQueryExpressionValue {
54
+ readonly gte?: number;
55
+ readonly lte?: number;
56
+ }
57
+ export type OrderSearchSortMode = 'avg' | 'max' | 'min' | 'sum' | string;
58
+ export type OrderSearchSortOrder = 'asc' | 'desc' | string;
59
+ export interface OrderSearchStringValue extends OrderSearchQueryExpressionValue {
60
+ readonly value: string;
61
+ readonly language?: string;
62
+ readonly caseInsensitive?: boolean;
63
+ }
27
64
  export interface Delivery {
28
65
  readonly id: string;
29
66
  readonly createdAt: string;
@@ -43,7 +80,7 @@ export interface DeliveryItem {
43
80
  readonly quantity: number;
44
81
  }
45
82
  export interface DiscountedLineItemPriceDraft {
46
- readonly value: Money;
83
+ readonly value: _Money;
47
84
  readonly includedDiscounts: DiscountedLineItemPortion[];
48
85
  }
49
86
  export interface ItemState {
@@ -76,6 +113,7 @@ export interface Order extends BaseResource {
76
113
  readonly customerId?: string;
77
114
  readonly customerEmail?: string;
78
115
  readonly anonymousId?: string;
116
+ readonly businessUnit?: BusinessUnitKeyReference;
79
117
  readonly store?: StoreKeyReference;
80
118
  readonly lineItems: LineItem[];
81
119
  readonly customLineItems: CustomLineItem[];
@@ -85,6 +123,8 @@ export interface Order extends BaseResource {
85
123
  readonly shippingAddress?: Address;
86
124
  readonly billingAddress?: Address;
87
125
  readonly shippingMode: ShippingMode;
126
+ readonly shippingKey?: string;
127
+ readonly shippingCustomFields?: CustomFields;
88
128
  readonly shipping: Shipping[];
89
129
  readonly taxMode?: TaxMode;
90
130
  readonly taxRoundingMode?: RoundingMode;
@@ -97,6 +137,7 @@ export interface Order extends BaseResource {
97
137
  readonly shippingInfo?: ShippingInfo;
98
138
  readonly syncInfo: SyncInfo[];
99
139
  readonly returnInfo?: ReturnInfo[];
140
+ readonly purchaseOrderNumber?: string;
100
141
  readonly discountCodes?: DiscountCodeInfo[];
101
142
  readonly lastMessageSequenceNumber?: number;
102
143
  readonly cart?: CartReference;
@@ -111,11 +152,13 @@ export interface Order extends BaseResource {
111
152
  readonly itemShippingAddresses?: Address[];
112
153
  readonly refusedGifts: CartDiscountReference[];
113
154
  }
155
+ export type _Order = Order | StagedOrder;
114
156
  export interface OrderFromCartDraft {
115
157
  readonly id?: string;
116
158
  readonly cart?: CartResourceIdentifier;
117
159
  readonly version: number;
118
160
  readonly orderNumber?: string;
161
+ readonly purchaseOrderNumber?: string;
119
162
  readonly paymentState?: PaymentState;
120
163
  readonly shipmentState?: ShipmentState;
121
164
  readonly orderState?: OrderState;
@@ -125,6 +168,7 @@ export interface OrderFromCartDraft {
125
168
  export interface OrderFromQuoteDraft {
126
169
  readonly quote: QuoteResourceIdentifier;
127
170
  readonly version: number;
171
+ readonly quoteStateToAccepted?: boolean;
128
172
  readonly orderNumber?: string;
129
173
  readonly paymentState?: PaymentState;
130
174
  readonly shipmentState?: ShipmentState;
@@ -137,10 +181,10 @@ export interface OrderImportDraft {
137
181
  readonly customerEmail?: string;
138
182
  readonly lineItems?: LineItemImportDraft[];
139
183
  readonly customLineItems?: CustomLineItemImportDraft[];
140
- readonly totalPrice: Money;
184
+ readonly totalPrice: _Money;
141
185
  readonly taxedPrice?: TaxedPriceDraft;
142
- readonly shippingAddress?: BaseAddress;
143
- readonly billingAddress?: BaseAddress;
186
+ readonly shippingAddress?: _BaseAddress;
187
+ readonly billingAddress?: _BaseAddress;
144
188
  readonly customerGroup?: CustomerGroupResourceIdentifier;
145
189
  readonly country?: string;
146
190
  readonly orderState?: OrderState;
@@ -154,6 +198,7 @@ export interface OrderImportDraft {
154
198
  readonly inventoryMode?: InventoryMode;
155
199
  readonly taxRoundingMode?: RoundingMode;
156
200
  readonly itemShippingAddresses?: BaseAddress[];
201
+ readonly businessUnit?: BusinessUnitResourceIdentifier;
157
202
  readonly store?: StoreResourceIdentifier;
158
203
  readonly origin?: CartOrigin;
159
204
  }
@@ -167,7 +212,7 @@ export interface OrderPagedQueryResponse {
167
212
  export interface OrderReference {
168
213
  readonly typeId: 'order';
169
214
  readonly id: string;
170
- readonly obj?: Order;
215
+ readonly obj?: _Order;
171
216
  }
172
217
  export interface OrderResourceIdentifier {
173
218
  readonly typeId: 'order';
@@ -176,18 +221,68 @@ export interface OrderResourceIdentifier {
176
221
  }
177
222
  export interface OrderSearchQuery {
178
223
  }
224
+ export type _OrderSearchQuery = OrderSearchQuery | OrderSearchCompoundExpression | OrderSearchQueryExpression;
225
+ export interface OrderSearchCompoundExpression extends OrderSearchQuery {
226
+ }
227
+ export type _OrderSearchCompoundExpression = OrderSearchCompoundExpression | OrderSearchAndExpression | OrderSearchFilterExpression | OrderSearchNotExpression | OrderSearchOrExpression;
228
+ export interface OrderSearchAndExpression extends OrderSearchCompoundExpression {
229
+ readonly and: OrderSearchQuery[];
230
+ }
231
+ export interface OrderSearchFilterExpression extends OrderSearchCompoundExpression {
232
+ readonly filter: OrderSearchQueryExpression[];
233
+ }
234
+ export interface OrderSearchNotExpression extends OrderSearchCompoundExpression {
235
+ readonly not: OrderSearchQuery[];
236
+ }
237
+ export interface OrderSearchOrExpression extends OrderSearchCompoundExpression {
238
+ readonly or: OrderSearchQuery[];
239
+ }
240
+ export interface OrderSearchQueryExpression extends OrderSearchQuery {
241
+ }
242
+ export type _OrderSearchQueryExpression = OrderSearchQueryExpression | OrderSearchDateRangeExpression | OrderSearchExactExpression | OrderSearchExistsExpression | OrderSearchFullTextExpression | OrderSearchLongRangeExpression | OrderSearchNumberRangeExpression | OrderSearchPrefixExpression | OrderSearchWildCardExpression;
243
+ export interface OrderSearchDateRangeExpression extends OrderSearchQueryExpression {
244
+ readonly range: OrderSearchDateRangeValue;
245
+ }
246
+ export interface OrderSearchExactExpression extends OrderSearchQueryExpression {
247
+ readonly exact: OrderSearchAnyValue;
248
+ }
249
+ export interface OrderSearchExistsExpression extends OrderSearchQueryExpression {
250
+ readonly exists: _OrderSearchQueryExpressionValue;
251
+ }
252
+ export interface OrderSearchFullTextExpression extends OrderSearchQueryExpression {
253
+ readonly fullText: OrderSearchFullTextValue;
254
+ }
255
+ export interface OrderSearchLongRangeExpression extends OrderSearchQueryExpression {
256
+ readonly range: OrderSearchLongRangeValue;
257
+ }
258
+ export interface OrderSearchNumberRangeExpression extends OrderSearchQueryExpression {
259
+ readonly range: OrderSearchNumberRangeValue;
260
+ }
261
+ export interface OrderSearchPrefixExpression extends OrderSearchQueryExpression {
262
+ readonly prefix: OrderSearchStringValue;
263
+ }
264
+ export interface OrderSearchWildCardExpression extends OrderSearchQueryExpression {
265
+ readonly wildcard: OrderSearchStringValue;
266
+ }
179
267
  export interface OrderSearchRequest {
180
- readonly query: OrderSearchQuery;
181
- readonly sort?: string;
268
+ readonly query: _OrderSearchQuery;
269
+ readonly sort?: OrderSearchSorting[];
182
270
  readonly limit?: number;
183
271
  readonly offset?: number;
184
272
  }
185
- export type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open';
273
+ export interface OrderSearchSorting {
274
+ readonly field: string;
275
+ readonly language?: string;
276
+ readonly order?: OrderSearchSortOrder;
277
+ readonly mode?: OrderSearchSortMode;
278
+ readonly filter?: _OrderSearchQueryExpression;
279
+ }
280
+ export type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open' | string;
186
281
  export interface OrderUpdate {
187
282
  readonly version: number;
188
283
  readonly actions: OrderUpdateAction[];
189
284
  }
190
- export type OrderUpdateAction = OrderAddDeliveryAction | OrderAddItemShippingAddressAction | OrderAddParcelToDeliveryAction | OrderAddPaymentAction | OrderAddReturnInfoAction | OrderChangeOrderStateAction | OrderChangePaymentStateAction | OrderChangeShipmentStateAction | OrderImportCustomLineItemStateAction | OrderImportLineItemStateAction | OrderRemoveDeliveryAction | OrderRemoveItemShippingAddressAction | OrderRemoveParcelFromDeliveryAction | OrderRemovePaymentAction | OrderSetBillingAddressAction | OrderSetBillingAddressCustomFieldAction | OrderSetBillingAddressCustomTypeAction | OrderSetCustomFieldAction | OrderSetCustomLineItemCustomFieldAction | OrderSetCustomLineItemCustomTypeAction | OrderSetCustomLineItemShippingDetailsAction | OrderSetCustomTypeAction | OrderSetCustomerEmailAction | OrderSetCustomerIdAction | OrderSetDeliveryAddressAction | OrderSetDeliveryAddressCustomFieldAction | OrderSetDeliveryAddressCustomTypeAction | OrderSetDeliveryCustomFieldAction | OrderSetDeliveryCustomTypeAction | OrderSetDeliveryItemsAction | OrderSetItemShippingAddressCustomFieldAction | OrderSetItemShippingAddressCustomTypeAction | OrderSetLineItemCustomFieldAction | OrderSetLineItemCustomTypeAction | OrderSetLineItemShippingDetailsAction | OrderSetLocaleAction | OrderSetOrderNumberAction | OrderSetParcelCustomFieldAction | OrderSetParcelCustomTypeAction | OrderSetParcelItemsAction | OrderSetParcelMeasurementsAction | OrderSetParcelTrackingDataAction | OrderSetReturnInfoAction | OrderSetReturnItemCustomFieldAction | OrderSetReturnItemCustomTypeAction | OrderSetReturnPaymentStateAction | OrderSetReturnShipmentStateAction | OrderSetShippingAddressAction | OrderSetShippingAddressCustomFieldAction | OrderSetShippingAddressCustomTypeAction | OrderSetStoreAction | OrderTransitionCustomLineItemStateAction | OrderTransitionLineItemStateAction | OrderTransitionStateAction | OrderUpdateItemShippingAddressAction | OrderUpdateSyncInfoAction;
285
+ export type OrderUpdateAction = OrderAddDeliveryAction | OrderAddItemShippingAddressAction | OrderAddParcelToDeliveryAction | OrderAddPaymentAction | OrderAddReturnInfoAction | OrderChangeOrderStateAction | OrderChangePaymentStateAction | OrderChangeShipmentStateAction | OrderImportCustomLineItemStateAction | OrderImportLineItemStateAction | OrderRemoveDeliveryAction | OrderRemoveItemShippingAddressAction | OrderRemoveParcelFromDeliveryAction | OrderRemovePaymentAction | OrderSetBillingAddressAction | OrderSetBillingAddressCustomFieldAction | OrderSetBillingAddressCustomTypeAction | OrderSetCustomFieldAction | OrderSetCustomLineItemCustomFieldAction | OrderSetCustomLineItemCustomTypeAction | OrderSetCustomLineItemShippingDetailsAction | OrderSetCustomTypeAction | OrderSetCustomerEmailAction | OrderSetCustomerIdAction | OrderSetDeliveryAddressAction | OrderSetDeliveryAddressCustomFieldAction | OrderSetDeliveryAddressCustomTypeAction | OrderSetDeliveryCustomFieldAction | OrderSetDeliveryCustomTypeAction | OrderSetDeliveryItemsAction | OrderSetItemShippingAddressCustomFieldAction | OrderSetItemShippingAddressCustomTypeAction | OrderSetLineItemCustomFieldAction | OrderSetLineItemCustomTypeAction | OrderSetLineItemShippingDetailsAction | OrderSetLocaleAction | OrderSetOrderNumberAction | OrderSetParcelCustomFieldAction | OrderSetParcelCustomTypeAction | OrderSetParcelItemsAction | OrderSetParcelMeasurementsAction | OrderSetParcelTrackingDataAction | OrderSetPurchaseOrderNumberAction | OrderSetReturnInfoAction | OrderSetReturnItemCustomFieldAction | OrderSetReturnItemCustomTypeAction | OrderSetReturnPaymentStateAction | OrderSetReturnShipmentStateAction | OrderSetShippingAddressAction | OrderSetShippingAddressCustomFieldAction | OrderSetShippingAddressCustomTypeAction | OrderSetStoreAction | OrderTransitionCustomLineItemStateAction | OrderTransitionLineItemStateAction | OrderTransitionStateAction | OrderUpdateItemShippingAddressAction | OrderUpdateSyncInfoAction;
191
286
  export interface Parcel {
192
287
  readonly id: string;
193
288
  readonly createdAt: string;
@@ -211,7 +306,7 @@ export interface ParcelMeasurements {
211
306
  export interface PaymentInfo {
212
307
  readonly payments: PaymentReference[];
213
308
  }
214
- export type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending';
309
+ export type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending' | string;
215
310
  export interface ProductVariantImportDraft {
216
311
  readonly id?: number;
217
312
  readonly sku?: string;
@@ -262,12 +357,12 @@ export interface ReturnItemDraft {
262
357
  readonly shipmentState: ReturnShipmentState;
263
358
  readonly custom?: CustomFieldsDraft;
264
359
  }
265
- export type ReturnPaymentState = 'Initial' | 'NonRefundable' | 'NotRefunded' | 'Refunded';
266
- export type ReturnShipmentState = 'Advised' | 'BackInStock' | 'Returned' | 'Unusable';
267
- export type ShipmentState = 'Backorder' | 'Delayed' | 'Partial' | 'Pending' | 'Ready' | 'Shipped';
360
+ export type ReturnPaymentState = 'Initial' | 'NonRefundable' | 'NotRefunded' | 'Refunded' | string;
361
+ export type ReturnShipmentState = 'Advised' | 'BackInStock' | 'Returned' | 'Unusable' | string;
362
+ export type ShipmentState = 'Backorder' | 'Delayed' | 'Delivered' | 'Partial' | 'Pending' | 'Ready' | 'Shipped' | string;
268
363
  export interface ShippingInfoImportDraft {
269
364
  readonly shippingMethodName: string;
270
- readonly price: Money;
365
+ readonly price: _Money;
271
366
  readonly shippingRate: ShippingRateDraft;
272
367
  readonly taxRate?: TaxRate;
273
368
  readonly taxCategory?: TaxCategoryResourceIdentifier;
@@ -282,8 +377,8 @@ export interface SyncInfo {
282
377
  readonly syncedAt: string;
283
378
  }
284
379
  export interface TaxedItemPriceDraft {
285
- readonly totalNet: Money;
286
- readonly totalGross: Money;
380
+ readonly totalNet: _Money;
381
+ readonly totalGross: _Money;
287
382
  }
288
383
  export interface TrackingData {
289
384
  readonly trackingId?: string;
@@ -296,13 +391,13 @@ export interface OrderAddDeliveryAction {
296
391
  readonly action: 'addDelivery';
297
392
  readonly items?: DeliveryItem[];
298
393
  readonly shippingKey?: string;
299
- readonly address?: BaseAddress;
394
+ readonly address?: _BaseAddress;
300
395
  readonly parcels?: ParcelDraft[];
301
396
  readonly custom?: CustomFieldsDraft;
302
397
  }
303
398
  export interface OrderAddItemShippingAddressAction {
304
399
  readonly action: 'addItemShippingAddress';
305
- readonly address: BaseAddress;
400
+ readonly address: _BaseAddress;
306
401
  }
307
402
  export interface OrderAddParcelToDeliveryAction {
308
403
  readonly action: 'addParcelToDelivery';
@@ -361,7 +456,7 @@ export interface OrderRemovePaymentAction {
361
456
  }
362
457
  export interface OrderSetBillingAddressAction {
363
458
  readonly action: 'setBillingAddress';
364
- readonly address?: BaseAddress;
459
+ readonly address?: _BaseAddress;
365
460
  }
366
461
  export interface OrderSetBillingAddressCustomFieldAction {
367
462
  readonly action: 'setBillingAddressCustomField';
@@ -411,7 +506,7 @@ export interface OrderSetCustomerIdAction {
411
506
  export interface OrderSetDeliveryAddressAction {
412
507
  readonly action: 'setDeliveryAddress';
413
508
  readonly deliveryId: string;
414
- readonly address?: BaseAddress;
509
+ readonly address?: _BaseAddress;
415
510
  }
416
511
  export interface OrderSetDeliveryAddressCustomFieldAction {
417
512
  readonly action: 'setDeliveryAddressCustomField';
@@ -506,6 +601,10 @@ export interface OrderSetParcelTrackingDataAction {
506
601
  readonly parcelId: string;
507
602
  readonly trackingData?: TrackingData;
508
603
  }
604
+ export interface OrderSetPurchaseOrderNumberAction {
605
+ readonly action: 'setPurchaseOrderNumber';
606
+ readonly purchaseOrderNumber?: string;
607
+ }
509
608
  export interface OrderSetReturnInfoAction {
510
609
  readonly action: 'setReturnInfo';
511
610
  readonly items?: ReturnInfoDraft[];
@@ -534,7 +633,7 @@ export interface OrderSetReturnShipmentStateAction {
534
633
  }
535
634
  export interface OrderSetShippingAddressAction {
536
635
  readonly action: 'setShippingAddress';
537
- readonly address?: BaseAddress;
636
+ readonly address?: _BaseAddress;
538
637
  }
539
638
  export interface OrderSetShippingAddressCustomFieldAction {
540
639
  readonly action: 'setShippingAddressCustomField';
@@ -573,7 +672,7 @@ export interface OrderTransitionStateAction {
573
672
  }
574
673
  export interface OrderUpdateItemShippingAddressAction {
575
674
  readonly action: 'updateItemShippingAddress';
576
- readonly address: BaseAddress;
675
+ readonly address: _BaseAddress;
577
676
  }
578
677
  export interface OrderUpdateSyncInfoAction {
579
678
  readonly action: 'updateSyncInfo';
@@ -1,4 +1,4 @@
1
- import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, TypedMoney } from './common';
1
+ import { BaseResource, CentPrecisionMoney, CreatedBy, LastModifiedBy, LocalizedString, TypedMoney, _Money } from './common';
2
2
  import { CustomerReference, CustomerResourceIdentifier } from './customer';
3
3
  import { StateReference, StateResourceIdentifier } from './state';
4
4
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
@@ -11,8 +11,13 @@ export interface Payment extends BaseResource {
11
11
  readonly createdBy?: CreatedBy;
12
12
  readonly customer?: CustomerReference;
13
13
  readonly anonymousId?: string;
14
+ readonly externalId?: string;
14
15
  readonly interfaceId?: string;
15
- readonly amountPlanned: TypedMoney;
16
+ readonly amountPlanned: CentPrecisionMoney;
17
+ readonly amountAuthorized?: TypedMoney;
18
+ readonly authorizedUntil?: string;
19
+ readonly amountPaid?: TypedMoney;
20
+ readonly amountRefunded?: TypedMoney;
16
21
  readonly paymentMethodInfo: PaymentMethodInfo;
17
22
  readonly paymentStatus: PaymentStatus;
18
23
  readonly transactions: Transaction[];
@@ -25,7 +30,11 @@ export interface PaymentDraft {
25
30
  readonly anonymousId?: string;
26
31
  readonly externalId?: string;
27
32
  readonly interfaceId?: string;
28
- readonly amountPlanned: Money;
33
+ readonly amountPlanned: _Money;
34
+ readonly amountAuthorized?: _Money;
35
+ readonly authorizedUntil?: string;
36
+ readonly amountPaid?: _Money;
37
+ readonly amountRefunded?: _Money;
29
38
  readonly paymentMethodInfo?: PaymentMethodInfo;
30
39
  readonly paymentStatus?: PaymentStatusDraft;
31
40
  readonly transactions?: TransactionDraft[];
@@ -69,26 +78,26 @@ export interface PaymentUpdate {
69
78
  readonly version: number;
70
79
  readonly actions: PaymentUpdateAction[];
71
80
  }
72
- export type PaymentUpdateAction = PaymentAddInterfaceInteractionAction | PaymentAddTransactionAction | PaymentChangeAmountPlannedAction | PaymentChangeTransactionInteractionIdAction | PaymentChangeTransactionStateAction | PaymentChangeTransactionTimestampAction | PaymentSetAnonymousIdAction | PaymentSetCustomFieldAction | PaymentSetCustomTypeAction | PaymentSetCustomerAction | PaymentSetExternalIdAction | PaymentSetInterfaceIdAction | PaymentSetKeyAction | PaymentSetMethodInfoInterfaceAction | PaymentSetMethodInfoMethodAction | PaymentSetMethodInfoNameAction | PaymentSetStatusInterfaceCodeAction | PaymentSetStatusInterfaceTextAction | PaymentSetTransactionCustomFieldAction | PaymentSetTransactionCustomTypeAction | PaymentTransitionStateAction;
81
+ export type PaymentUpdateAction = PaymentAddInterfaceInteractionAction | PaymentAddTransactionAction | PaymentChangeAmountPlannedAction | PaymentChangeTransactionInteractionIdAction | PaymentChangeTransactionStateAction | PaymentChangeTransactionTimestampAction | PaymentSetAnonymousIdAction | PaymentSetCustomFieldAction | PaymentSetCustomTypeAction | PaymentSetCustomerAction | PaymentSetInterfaceIdAction | PaymentSetKeyAction | PaymentSetMethodInfoInterfaceAction | PaymentSetMethodInfoMethodAction | PaymentSetMethodInfoNameAction | PaymentSetStatusInterfaceCodeAction | PaymentSetStatusInterfaceTextAction | PaymentSetTransactionCustomFieldAction | PaymentSetTransactionCustomTypeAction | PaymentTransitionStateAction;
73
82
  export interface Transaction {
74
83
  readonly id: string;
75
84
  readonly timestamp?: string;
76
85
  readonly type: TransactionType;
77
- readonly amount: TypedMoney;
86
+ readonly amount: CentPrecisionMoney;
78
87
  readonly interactionId?: string;
79
- readonly state?: TransactionState;
88
+ readonly state: TransactionState;
80
89
  readonly custom?: CustomFields;
81
90
  }
82
91
  export interface TransactionDraft {
83
92
  readonly timestamp?: string;
84
93
  readonly type: TransactionType;
85
- readonly amount: Money;
94
+ readonly amount: _Money;
86
95
  readonly interactionId?: string;
87
96
  readonly state?: TransactionState;
88
97
  readonly custom?: CustomFieldsDraft;
89
98
  }
90
- export type TransactionState = 'Failure' | 'Initial' | 'Pending' | 'Success';
91
- export type TransactionType = 'Authorization' | 'CancelAuthorization' | 'Charge' | 'Chargeback' | 'Refund';
99
+ export type TransactionState = 'Failure' | 'Initial' | 'Pending' | 'Success' | string;
100
+ export type TransactionType = 'Authorization' | 'CancelAuthorization' | 'Charge' | 'Chargeback' | 'Refund' | string;
92
101
  export interface PaymentAddInterfaceInteractionAction {
93
102
  readonly action: 'addInterfaceInteraction';
94
103
  readonly type: TypeResourceIdentifier;
@@ -100,7 +109,7 @@ export interface PaymentAddTransactionAction {
100
109
  }
101
110
  export interface PaymentChangeAmountPlannedAction {
102
111
  readonly action: 'changeAmountPlanned';
103
- readonly amount: Money;
112
+ readonly amount: _Money;
104
113
  }
105
114
  export interface PaymentChangeTransactionInteractionIdAction {
106
115
  readonly action: 'changeTransactionInteractionId';
@@ -135,10 +144,6 @@ export interface PaymentSetCustomerAction {
135
144
  readonly action: 'setCustomer';
136
145
  readonly customer?: CustomerResourceIdentifier;
137
146
  }
138
- export interface PaymentSetExternalIdAction {
139
- readonly action: 'setExternalId';
140
- readonly externalId?: string;
141
- }
142
147
  export interface PaymentSetInterfaceIdAction {
143
148
  readonly action: 'setInterfaceId';
144
149
  readonly interfaceId: string;