@gradientedge/commercetools-utils 4.21.1 → 4.22.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.
@@ -1,5 +1,5 @@
1
1
  import { ChannelReference, ChannelResourceIdentifier } from './channel';
2
- import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, Reference, TypedMoney } from './common';
2
+ import { BaseResource, CentPrecisionMoney, CreatedBy, LastModifiedBy, LocalizedString, Money, Reference } from './common';
3
3
  import { ProductReference, ProductResourceIdentifier } from './product';
4
4
  import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
5
5
  export interface CartDiscount extends BaseResource {
@@ -41,9 +41,9 @@ export interface CartDiscountDraft {
41
41
  }
42
42
  export interface CartDiscountPagedQueryResponse {
43
43
  readonly limit: number;
44
+ readonly offset: number;
44
45
  readonly count: number;
45
46
  readonly total?: number;
46
- readonly offset: number;
47
47
  readonly results: CartDiscount[];
48
48
  }
49
49
  export interface CartDiscountReference {
@@ -76,7 +76,7 @@ export declare type CartDiscountUpdateAction = CartDiscountChangeCartPredicateAc
76
76
  export declare type CartDiscountValue = CartDiscountValueAbsolute | CartDiscountValueFixed | CartDiscountValueGiftLineItem | CartDiscountValueRelative;
77
77
  export interface CartDiscountValueAbsolute {
78
78
  readonly type: 'absolute';
79
- readonly money: TypedMoney[];
79
+ readonly money: CentPrecisionMoney[];
80
80
  }
81
81
  export declare type CartDiscountValueDraft = CartDiscountValueAbsoluteDraft | CartDiscountValueFixedDraft | CartDiscountValueGiftLineItemDraft | CartDiscountValueRelativeDraft;
82
82
  export interface CartDiscountValueAbsoluteDraft {
@@ -85,7 +85,7 @@ export interface CartDiscountValueAbsoluteDraft {
85
85
  }
86
86
  export interface CartDiscountValueFixed {
87
87
  readonly type: 'fixed';
88
- readonly money: TypedMoney[];
88
+ readonly money: CentPrecisionMoney[];
89
89
  }
90
90
  export interface CartDiscountValueFixedDraft {
91
91
  readonly type: 'fixed';
@@ -1,4 +1,4 @@
1
- import { CartDiscountReference, CartDiscountTarget, CartDiscountValue, CartDiscountValueDraft } from './cart-discount';
1
+ import { CartDiscountReference, CartDiscountTarget, CartDiscountValue } from './cart-discount';
2
2
  import { ChannelReference, ChannelResourceIdentifier } from './channel';
3
3
  import { Address, BaseAddress, BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, Price, TypedMoney } from './common';
4
4
  import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group';
@@ -38,8 +38,8 @@ export interface Cart extends BaseResource {
38
38
  readonly customerGroup?: CustomerGroupReference;
39
39
  readonly country?: string;
40
40
  readonly shippingInfo?: ShippingInfo;
41
- readonly directDiscounts?: DirectDiscount[];
42
41
  readonly discountCodes?: DiscountCodeInfo[];
42
+ readonly directDiscounts?: DirectDiscount[];
43
43
  readonly custom?: CustomFields;
44
44
  readonly paymentInfo?: PaymentInfo;
45
45
  readonly locale?: string;
@@ -77,7 +77,7 @@ export interface CartDraft {
77
77
  readonly itemShippingAddresses?: BaseAddress[];
78
78
  readonly discountCodes?: string[];
79
79
  }
80
- export declare type CartOrigin = 'Customer' | 'Merchant';
80
+ export declare type CartOrigin = 'Customer' | 'Merchant' | 'Quote';
81
81
  export interface CartPagedQueryResponse {
82
82
  readonly limit: number;
83
83
  readonly count: number;
@@ -100,7 +100,7 @@ export interface CartUpdate {
100
100
  readonly version: number;
101
101
  readonly actions: CartUpdateAction[];
102
102
  }
103
- export declare type CartUpdateAction = CartAddCustomLineItemAction | CartAddDiscountCodeAction | CartAddItemShippingAddressAction | CartAddLineItemAction | CartAddPaymentAction | CartAddShoppingListAction | CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction | CartApplyDeltaToLineItemShippingDetailsTargetsAction | CartChangeCustomLineItemMoneyAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction | CartRecalculateAction | CartRemoveCustomLineItemAction | CartRemoveDiscountCodeAction | CartRemoveItemShippingAddressAction | CartRemoveLineItemAction | CartRemovePaymentAction | CartSetAnonymousIdAction | CartSetBillingAddressAction | CartSetBillingAddressCustomFieldAction | CartSetBillingAddressCustomTypeAction | 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 | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUpdateItemShippingAddressAction;
103
+ export declare type CartUpdateAction = CartAddCustomLineItemAction | CartAddDiscountCodeAction | CartAddItemShippingAddressAction | CartAddLineItemAction | CartAddPaymentAction | CartAddShoppingListAction | CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction | CartApplyDeltaToLineItemShippingDetailsTargetsAction | CartChangeCustomLineItemMoneyAction | CartChangeCustomLineItemPriceModeAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction | CartRecalculateAction | CartRemoveCustomLineItemAction | CartRemoveDiscountCodeAction | CartRemoveItemShippingAddressAction | CartRemoveLineItemAction | CartRemovePaymentAction | CartSetAnonymousIdAction | CartSetBillingAddressAction | CartSetBillingAddressCustomFieldAction | CartSetBillingAddressCustomTypeAction | 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 | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUpdateItemShippingAddressAction;
104
104
  export interface CustomLineItem {
105
105
  readonly id: string;
106
106
  readonly name: LocalizedString;
@@ -115,6 +115,7 @@ export interface CustomLineItem {
115
115
  readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
116
116
  readonly custom?: CustomFields;
117
117
  readonly shippingDetails?: ItemShippingDetails;
118
+ readonly priceMode: CustomLineItemPriceMode;
118
119
  }
119
120
  export interface CustomLineItemDraft {
120
121
  readonly name: LocalizedString;
@@ -126,14 +127,15 @@ export interface CustomLineItemDraft {
126
127
  readonly custom?: CustomFieldsDraft;
127
128
  readonly shippingDetails?: ItemShippingDetailsDraft;
128
129
  }
130
+ export declare type CustomLineItemPriceMode = 'External' | 'Standard';
129
131
  export interface DirectDiscount {
130
- id: string;
131
- value: CartDiscountValue;
132
- target?: CartDiscountTarget;
132
+ readonly id: string;
133
+ readonly value: CartDiscountValue;
134
+ readonly target?: CartDiscountTarget;
133
135
  }
134
136
  export interface DirectDiscountDraft {
135
- value: CartDiscountValueDraft;
136
- target?: CartDiscountTarget;
137
+ readonly value: CartDiscountValue;
138
+ readonly target?: CartDiscountTarget;
137
139
  }
138
140
  export interface DiscountCodeInfo {
139
141
  readonly discountCode: DiscountCodeReference;
@@ -201,6 +203,7 @@ export interface LineItem {
201
203
  readonly priceMode: LineItemPriceMode;
202
204
  readonly lineItemMode: LineItemMode;
203
205
  readonly custom?: CustomFields;
206
+ readonly inventoryMode?: InventoryMode;
204
207
  readonly shippingDetails?: ItemShippingDetails;
205
208
  readonly lastModifiedAt?: string;
206
209
  }
@@ -216,6 +219,7 @@ export interface LineItemDraft {
216
219
  readonly custom?: CustomFieldsDraft;
217
220
  readonly externalPrice?: Money;
218
221
  readonly externalTotalPrice?: ExternalLineItemTotalPrice;
222
+ readonly inventoryMode?: InventoryMode;
219
223
  readonly shippingDetails?: ItemShippingDetailsDraft;
220
224
  }
221
225
  export declare type LineItemMode = 'GiftLineItem' | 'Standard';
@@ -342,6 +346,11 @@ export interface CartChangeCustomLineItemMoneyAction {
342
346
  readonly customLineItemId: string;
343
347
  readonly money: Money;
344
348
  }
349
+ export interface CartChangeCustomLineItemPriceModeAction {
350
+ readonly action: 'changeCustomLineItemPriceMode';
351
+ readonly customLineItemId: string;
352
+ readonly mode: CustomLineItemPriceMode;
353
+ }
345
354
  export interface CartChangeCustomLineItemQuantityAction {
346
355
  readonly action: 'changeCustomLineItemQuantity';
347
356
  readonly customLineItemId: string;
@@ -37,9 +37,9 @@ export interface CategoryDraft {
37
37
  }
38
38
  export interface CategoryPagedQueryResponse {
39
39
  readonly limit: number;
40
+ readonly offset: number;
40
41
  readonly count: number;
41
42
  readonly total?: number;
42
- readonly offset: number;
43
43
  readonly results: Category[];
44
44
  }
45
45
  export interface CategoryReference {
@@ -105,7 +105,7 @@ export interface CategorySetAssetCustomTypeAction {
105
105
  readonly assetId?: string;
106
106
  readonly assetKey?: string;
107
107
  readonly type?: TypeResourceIdentifier;
108
- readonly fields?: any;
108
+ readonly fields?: FieldContainer;
109
109
  }
110
110
  export interface CategorySetAssetDescriptionAction {
111
111
  readonly action: 'setAssetDescription';
@@ -14,9 +14,13 @@ import { ProductReference, ProductResourceIdentifier } from './product';
14
14
  import { ProductDiscountReference, ProductDiscountResourceIdentifier } from './product-discount';
15
15
  import { ProductSelectionReference, ProductSelectionResourceIdentifier } from './product-selection';
16
16
  import { ProductTypeReference, ProductTypeResourceIdentifier } from './product-type';
17
+ import { QuoteReference, QuoteResourceIdentifier } from './quote';
18
+ import { QuoteRequestReference, QuoteRequestResourceIdentifier } from './quote-request';
17
19
  import { ReviewReference, ReviewResourceIdentifier } from './review';
18
20
  import { ShippingMethodReference, ShippingMethodResourceIdentifier } from './shipping-method';
19
21
  import { ShoppingListReference, ShoppingListResourceIdentifier } from './shopping-list';
22
+ import { StagedQuoteReference, StagedQuoteResourceIdentifier } from './staged-quote';
23
+ import { StandalonePriceReference, StandalonePriceResourceIdentifier } from './standalone-price';
20
24
  import { StateReference, StateResourceIdentifier } from './state';
21
25
  import { StoreKeyReference, StoreReference, StoreResourceIdentifier } from './store';
22
26
  import { TaxCategoryReference, TaxCategoryResourceIdentifier } from './tax-category';
@@ -24,9 +28,9 @@ import { CustomFields, CustomFieldsDraft, TypeReference, TypeResourceIdentifier
24
28
  import { ZoneReference, ZoneResourceIdentifier } from './zone';
25
29
  export interface PagedQueryResponse {
26
30
  readonly limit: number;
31
+ readonly offset: number;
27
32
  readonly count: number;
28
33
  readonly total?: number;
29
- readonly offset: number;
30
34
  readonly results: BaseResource[];
31
35
  readonly meta?: any;
32
36
  }
@@ -67,6 +71,7 @@ export interface AssetSource {
67
71
  export interface BaseAddress {
68
72
  readonly id?: string;
69
73
  readonly key?: string;
74
+ readonly country: string;
70
75
  readonly title?: string;
71
76
  readonly salutation?: string;
72
77
  readonly firstName?: string;
@@ -78,7 +83,6 @@ export interface BaseAddress {
78
83
  readonly city?: string;
79
84
  readonly region?: string;
80
85
  readonly state?: string;
81
- readonly country: string;
82
86
  readonly company?: string;
83
87
  readonly department?: string;
84
88
  readonly building?: string;
@@ -92,10 +96,13 @@ export interface BaseAddress {
92
96
  readonly externalId?: string;
93
97
  }
94
98
  export interface Address extends BaseAddress {
99
+ readonly id?: string;
95
100
  readonly custom?: CustomFields;
96
101
  }
97
102
  export interface AddressDraft extends BaseAddress {
98
103
  readonly custom?: CustomFieldsDraft;
104
+ readonly id?: string;
105
+ readonly key?: string;
99
106
  }
100
107
  export interface BaseResource {
101
108
  readonly id: string;
@@ -110,6 +117,10 @@ export interface ClientLogging {
110
117
  readonly anonymousId?: string;
111
118
  }
112
119
  export interface CreatedBy extends ClientLogging {
120
+ readonly clientId?: string;
121
+ readonly externalUserId?: string;
122
+ readonly customer?: CustomerReference;
123
+ readonly anonymousId?: string;
113
124
  }
114
125
  export interface DiscountedPrice {
115
126
  readonly value: TypedMoney;
@@ -135,6 +146,10 @@ export interface ImageDimensions {
135
146
  }
136
147
  export declare type KeyReference = StoreKeyReference;
137
148
  export interface LastModifiedBy extends ClientLogging {
149
+ readonly clientId?: string;
150
+ readonly externalUserId?: string;
151
+ readonly customer?: CustomerReference;
152
+ readonly anonymousId?: string;
138
153
  }
139
154
  export interface LocalizedString {
140
155
  [key: string]: string;
@@ -153,8 +168,8 @@ export interface Price {
153
168
  readonly validFrom?: string;
154
169
  readonly validUntil?: string;
155
170
  readonly discounted?: DiscountedPrice;
156
- readonly custom?: CustomFields;
157
171
  readonly tiers?: PriceTier[];
172
+ readonly custom?: CustomFields;
158
173
  }
159
174
  export interface PriceDraft {
160
175
  readonly value: Money;
@@ -163,9 +178,9 @@ export interface PriceDraft {
163
178
  readonly channel?: ChannelResourceIdentifier;
164
179
  readonly validFrom?: string;
165
180
  readonly validUntil?: string;
166
- readonly custom?: CustomFieldsDraft;
167
- readonly tiers?: PriceTierDraft[];
168
181
  readonly discounted?: DiscountedPriceDraft;
182
+ readonly tiers?: PriceTierDraft[];
183
+ readonly custom?: CustomFieldsDraft;
169
184
  }
170
185
  export interface PriceTier {
171
186
  readonly minimumQuantity: number;
@@ -176,7 +191,7 @@ export interface PriceTierDraft {
176
191
  readonly value: Money;
177
192
  }
178
193
  export interface QueryPrice {
179
- readonly id: string;
194
+ readonly id?: string;
180
195
  readonly value: Money;
181
196
  readonly country?: string;
182
197
  readonly customerGroup?: CustomerGroupReference;
@@ -187,9 +202,9 @@ export interface QueryPrice {
187
202
  readonly custom?: CustomFields;
188
203
  readonly tiers?: PriceTierDraft[];
189
204
  }
190
- export declare type Reference = CartDiscountReference | CartReference | CategoryReference | ChannelReference | CustomObjectReference | CustomerGroupReference | CustomerReference | DiscountCodeReference | InventoryEntryReference | OrderEditReference | OrderReference | PaymentReference | ProductDiscountReference | ProductReference | ProductSelectionReference | ProductTypeReference | ReviewReference | ShippingMethodReference | ShoppingListReference | StateReference | StoreReference | TaxCategoryReference | TypeReference | ZoneReference;
191
- export declare type ReferenceTypeId = 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-email-token' | 'customer-group' | 'customer-password-token' | 'discount-code' | 'extension' | 'inventory-entry' | 'key-value-document' | 'order' | 'order-edit' | 'payment' | 'product' | 'product-discount' | 'product-selection' | 'product-type' | 'review' | 'shipping-method' | 'shopping-list' | 'state' | 'store' | 'subscription' | 'tax-category' | 'type' | 'zone';
192
- export declare type ResourceIdentifier = CartDiscountResourceIdentifier | CartResourceIdentifier | CategoryResourceIdentifier | ChannelResourceIdentifier | CustomerGroupResourceIdentifier | CustomerResourceIdentifier | DiscountCodeResourceIdentifier | InventoryEntryResourceIdentifier | OrderEditResourceIdentifier | OrderResourceIdentifier | PaymentResourceIdentifier | ProductDiscountResourceIdentifier | ProductResourceIdentifier | ProductSelectionResourceIdentifier | ProductTypeResourceIdentifier | ReviewResourceIdentifier | ShippingMethodResourceIdentifier | ShoppingListResourceIdentifier | StateResourceIdentifier | StoreResourceIdentifier | TaxCategoryResourceIdentifier | TypeResourceIdentifier | ZoneResourceIdentifier;
205
+ export declare type Reference = CartDiscountReference | CartReference | CategoryReference | ChannelReference | CustomObjectReference | CustomerGroupReference | CustomerReference | DiscountCodeReference | InventoryEntryReference | OrderEditReference | OrderReference | PaymentReference | ProductDiscountReference | ProductReference | ProductSelectionReference | ProductTypeReference | QuoteReference | QuoteRequestReference | ReviewReference | ShippingMethodReference | ShoppingListReference | StagedQuoteReference | StandalonePriceReference | StateReference | StoreReference | TaxCategoryReference | TypeReference | ZoneReference;
206
+ export declare type ReferenceTypeId = 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'extension' | 'inventory-entry' | 'key-value-document' | 'order' | 'order-edit' | 'payment' | 'product' | 'product-discount' | 'product-price' | 'product-selection' | 'product-type' | 'quote' | 'quote-request' | 'review' | 'shipping-method' | 'shopping-list' | 'staged-quote' | 'state' | 'store' | 'subscription' | 'tax-category' | 'type' | 'zone';
207
+ export declare type ResourceIdentifier = CartDiscountResourceIdentifier | CartResourceIdentifier | CategoryResourceIdentifier | ChannelResourceIdentifier | CustomerGroupResourceIdentifier | CustomerResourceIdentifier | DiscountCodeResourceIdentifier | InventoryEntryResourceIdentifier | OrderEditResourceIdentifier | OrderResourceIdentifier | PaymentResourceIdentifier | ProductDiscountResourceIdentifier | ProductResourceIdentifier | ProductSelectionResourceIdentifier | ProductTypeResourceIdentifier | QuoteRequestResourceIdentifier | QuoteResourceIdentifier | ReviewResourceIdentifier | ShippingMethodResourceIdentifier | ShoppingListResourceIdentifier | StagedQuoteResourceIdentifier | StandalonePriceResourceIdentifier | StateResourceIdentifier | StoreResourceIdentifier | TaxCategoryResourceIdentifier | TypeResourceIdentifier | ZoneResourceIdentifier;
193
208
  export interface ScopedPrice {
194
209
  readonly id: string;
195
210
  readonly value: TypedMoney;
@@ -227,6 +242,6 @@ export interface HighPrecisionMoneyDraft {
227
242
  readonly type: 'highPrecision';
228
243
  readonly centAmount?: number;
229
244
  readonly currencyCode: string;
230
- readonly fractionDigits?: number;
245
+ readonly fractionDigits: number;
231
246
  readonly preciseAmount: number;
232
247
  }
@@ -18,9 +18,9 @@ export interface CustomObjectDraft {
18
18
  }
19
19
  export interface CustomObjectPagedQueryResponse {
20
20
  readonly limit: number;
21
+ readonly offset: number;
21
22
  readonly count: number;
22
23
  readonly total?: number;
23
- readonly offset: number;
24
24
  readonly results: CustomObject[];
25
25
  }
26
26
  export interface CustomObjectReference {
@@ -142,6 +142,12 @@ export interface MyCustomerResetPassword {
142
142
  readonly tokenValue: string;
143
143
  readonly newPassword: string;
144
144
  }
145
+ export interface MyCustomerSignin {
146
+ readonly email: string;
147
+ readonly password: string;
148
+ readonly activeCartSignInMode?: AnonymousCartSignInMode;
149
+ readonly updateProductData?: boolean;
150
+ }
145
151
  export interface CustomerAddAddressAction {
146
152
  readonly action: 'addAddress';
147
153
  readonly address: BaseAddress;
@@ -39,9 +39,9 @@ export interface DiscountCodeDraft {
39
39
  }
40
40
  export interface DiscountCodePagedQueryResponse {
41
41
  readonly limit: number;
42
+ readonly offset: number;
42
43
  readonly count: number;
43
44
  readonly total?: number;
44
- readonly offset: number;
45
45
  readonly results: DiscountCode[];
46
46
  }
47
47
  export interface DiscountCodeReference {
@@ -1,13 +1,14 @@
1
1
  import { ChannelReference, ChannelResourceIdentifier, ChannelRoleEnum } from './channel';
2
2
  import { LocalizedString, Price, PriceDraft, Reference, ReferenceTypeId } from './common';
3
- import { CustomerGroupReference } from './customer-group';
3
+ import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group';
4
4
  import { OrderEditPreviewFailure } from './order-edit';
5
5
  import { Attribute } from './product';
6
+ import { StandalonePriceReference } from './standalone-price';
6
7
  export interface ErrorByExtension {
7
8
  readonly id: string;
8
9
  readonly key?: string;
9
10
  }
10
- export declare type ErrorObject = AccessDeniedError | AnonymousIdAlreadyInUseError | AttributeDefinitionAlreadyExistsError | AttributeDefinitionTypeConflictError | AttributeNameDoesNotExistError | BadGatewayError | ConcurrentModificationError | DiscountCodeNonApplicableError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateEnumValuesError | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError | EnumKeyDoesNotExistError | EnumValueIsUsedError | EnumValuesMustMatchError | ExtensionBadResponseError | ExtensionNoResponseError | ExtensionUpdateActionsFailedError | ExternalOAuthFailedError | FeatureRemovedError | GeneralError | InsufficientScopeError | InternalConstraintViolatedError | InvalidCredentialsError | InvalidCurrentPasswordError | InvalidFieldError | InvalidInputError | InvalidItemShippingDetailsError | InvalidJsonInputError | InvalidOperationError | InvalidSubjectError | InvalidTokenError | LanguageUsedInStoresError | MatchingPriceNotFoundError | MaxResourceLimitExceededError | MissingRoleOnChannelError | MissingTaxRateForCountryError | NoMatchingProductDiscountFoundError | NotEnabledError | ObjectNotFoundError | OutOfStockError | OverCapacityError | PendingOperationError | PriceChangedError | ProjectNotConfiguredForLanguagesError | QueryComplexityLimitExceededError | QueryTimedOutError | ReferenceExistsError | ReferencedResourceNotFoundError | RequiredFieldError | ResourceNotFoundError | ResourceSizeLimitExceededError | SearchDeactivatedError | SearchExecutionFailureError | SearchFacetPathNotFoundError | SearchIndexingInProgressError | SemanticErrorError | ShippingMethodDoesNotMatchCartError | SyntaxErrorError | WeakPasswordError;
11
+ export declare type ErrorObject = AccessDeniedError | AnonymousIdAlreadyInUseError | AttributeDefinitionAlreadyExistsError | AttributeDefinitionTypeConflictError | AttributeNameDoesNotExistError | BadGatewayError | ConcurrentModificationError | DiscountCodeNonApplicableError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateEnumValuesError | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceScopeError | DuplicateStandalonePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError | EnumKeyDoesNotExistError | EnumValueIsUsedError | EnumValuesMustMatchError | ExtensionBadResponseError | ExtensionNoResponseError | ExtensionUpdateActionsFailedError | ExternalOAuthFailedError | FeatureRemovedError | GeneralError | InsufficientScopeError | InternalConstraintViolatedError | InvalidCredentialsError | InvalidCurrentPasswordError | InvalidFieldError | InvalidInputError | InvalidItemShippingDetailsError | InvalidJsonInputError | InvalidOperationError | InvalidSubjectError | InvalidTokenError | LanguageUsedInStoresError | MatchingPriceNotFoundError | MaxResourceLimitExceededError | MissingRoleOnChannelError | MissingTaxRateForCountryError | NoMatchingProductDiscountFoundError | NotEnabledError | ObjectNotFoundError | OutOfStockError | OverCapacityError | OverlappingStandalonePriceValidityError | PendingOperationError | PriceChangedError | ProjectNotConfiguredForLanguagesError | QueryComplexityLimitExceededError | QueryTimedOutError | ReferenceExistsError | ReferencedResourceNotFoundError | RequiredFieldError | ResourceNotFoundError | ResourceSizeLimitExceededError | SearchDeactivatedError | SearchExecutionFailureError | SearchFacetPathNotFoundError | SearchIndexingInProgressError | SemanticErrorError | ShippingMethodDoesNotMatchCartError | SyntaxErrorError | WeakPasswordError;
11
12
  export interface AccessDeniedError {
12
13
  readonly code: 'access_denied';
13
14
  [key: string]: any;
@@ -102,6 +103,19 @@ export interface DuplicatePriceScopeError {
102
103
  readonly message: string;
103
104
  readonly conflictingPrices: Price[];
104
105
  }
106
+ export interface DuplicateStandalonePriceScopeError {
107
+ readonly code: 'DuplicateStandalonePriceScope';
108
+ [key: string]: any;
109
+ readonly message: string;
110
+ readonly conflictingStandalonePrice: StandalonePriceReference;
111
+ readonly sku: string;
112
+ readonly currency: string;
113
+ readonly country?: string;
114
+ readonly customerGroup?: CustomerGroupResourceIdentifier;
115
+ readonly channel?: ChannelResourceIdentifier;
116
+ readonly validFrom?: string;
117
+ readonly validUntil?: string;
118
+ }
105
119
  export interface DuplicateVariantValuesError {
106
120
  readonly code: 'DuplicateVariantValues';
107
121
  [key: string]: any;
@@ -307,6 +321,21 @@ export interface OverCapacityError {
307
321
  [key: string]: any;
308
322
  readonly message: string;
309
323
  }
324
+ export interface OverlappingStandalonePriceValidityError {
325
+ readonly code: 'OverlappingStandalonePriceValidity';
326
+ [key: string]: any;
327
+ readonly message: string;
328
+ readonly conflictingStandalonePrice: StandalonePriceReference;
329
+ readonly sku: string;
330
+ readonly currency: string;
331
+ readonly country?: string;
332
+ readonly customerGroup?: CustomerGroupResourceIdentifier;
333
+ readonly channel?: ChannelResourceIdentifier;
334
+ readonly validFrom?: string;
335
+ readonly validUntil?: string;
336
+ readonly conflictingValidFrom?: string;
337
+ readonly conflictingValidUntil?: string;
338
+ }
310
339
  export interface PendingOperationError {
311
340
  readonly code: 'PendingOperation';
312
341
  [key: string]: any;
@@ -36,10 +36,11 @@ export interface ExtensionPagedQueryResponse {
36
36
  readonly total?: number;
37
37
  readonly results: Extension[];
38
38
  }
39
- export declare type ExtensionResourceTypeId = 'cart' | 'customer' | 'order' | 'payment';
39
+ export declare type ExtensionResourceTypeId = 'cart' | 'customer' | 'order' | 'payment' | 'quote' | 'quote-request' | 'staged-quote';
40
40
  export interface ExtensionTrigger {
41
41
  readonly resourceTypeId: ExtensionResourceTypeId;
42
42
  readonly actions: ExtensionAction[];
43
+ readonly condition?: string;
43
44
  }
44
45
  export interface ExtensionUpdate {
45
46
  readonly version: number;
@@ -43,9 +43,9 @@ export interface InventoryEntryUpdate {
43
43
  export declare type InventoryEntryUpdateAction = InventoryEntryAddQuantityAction | InventoryEntryChangeQuantityAction | InventoryEntryRemoveQuantityAction | InventoryEntrySetCustomFieldAction | InventoryEntrySetCustomTypeAction | InventoryEntrySetExpectedDeliveryAction | InventoryEntrySetKeyAction | InventoryEntrySetRestockableInDaysAction | InventoryEntrySetSupplyChannelAction;
44
44
  export interface InventoryPagedQueryResponse {
45
45
  readonly limit: number;
46
+ readonly offset: number;
46
47
  readonly count: number;
47
48
  readonly total?: number;
48
- readonly offset: number;
49
49
  readonly results: InventoryEntry[];
50
50
  }
51
51
  export interface InventoryEntryAddQuantityAction {
@@ -1,4 +1,4 @@
1
- import { CartReference, DiscountCodeInfo, ExternalLineItemTotalPrice, ExternalTaxRateDraft, InventoryMode, ItemShippingDetailsDraft, ItemShippingTarget, TaxMode } from './cart';
1
+ import { CartReference, CartResourceIdentifier, DiscountCodeInfo, ExternalLineItemTotalPrice, ExternalTaxRateDraft, InventoryMode, ItemShippingDetailsDraft, ItemShippingTarget, TaxMode } from './cart';
2
2
  import { ChannelResourceIdentifier } from './channel';
3
3
  import { BaseAddress, LocalizedString, Money, TypedMoney } from './common';
4
4
  import { CustomerReference } from './customer';
@@ -96,6 +96,16 @@ export interface MyPaymentUpdate {
96
96
  readonly actions: MyPaymentUpdateAction[];
97
97
  }
98
98
  export declare type MyPaymentUpdateAction = MyPaymentAddTransactionAction | MyPaymentChangeAmountPlannedAction | MyPaymentSetCustomFieldAction | MyPaymentSetMethodInfoInterfaceAction | MyPaymentSetMethodInfoMethodAction | MyPaymentSetMethodInfoNameAction | MyPaymentSetTransactionCustomFieldAction;
99
+ export interface MyQuoteRequestDraft {
100
+ readonly cart: CartResourceIdentifier;
101
+ readonly version: number;
102
+ readonly comment: string;
103
+ }
104
+ export interface MyQuoteRequestUpdate {
105
+ readonly version: number;
106
+ readonly actions: MyQuoteRequestUpdateAction[];
107
+ }
108
+ export declare type MyQuoteRequestUpdateAction = MyQuoteRequestCancelAction;
99
109
  export interface MyShoppingListDraft {
100
110
  readonly name: LocalizedString;
101
111
  readonly description?: LocalizedString;
@@ -382,6 +392,9 @@ export interface MyPaymentSetTransactionCustomFieldAction {
382
392
  readonly name: string;
383
393
  readonly value?: any;
384
394
  }
395
+ export interface MyQuoteRequestCancelAction {
396
+ readonly action: 'cancelQuoteRequest';
397
+ }
385
398
  export interface MyShoppingListAddLineItemAction {
386
399
  readonly action: 'addLineItem';
387
400
  readonly sku?: string;