@gradientedge/commercetools-utils 4.11.3 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ge-commercetools-utils-browser.cjs.js +1 -1
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-node.esm.js +1 -1
- package/dist/typings/api/CommercetoolsApi.d.ts +1 -1
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/models/cart-discount.d.ts +196 -0
- package/dist/typings/models/cart.d.ts +597 -0
- package/dist/typings/models/category.d.ts +166 -0
- package/dist/typings/models/channel.d.ts +103 -0
- package/dist/typings/models/common.d.ts +232 -0
- package/dist/typings/models/custom-object.d.ts +30 -0
- package/dist/typings/models/customer-group.d.ts +58 -0
- package/dist/typings/models/customer.d.ts +276 -0
- package/dist/typings/models/discount-code.d.ts +116 -0
- package/dist/typings/models/error.d.ts +412 -0
- package/dist/typings/models/extension.d.ts +78 -0
- package/dist/typings/models/graph-ql.d.ts +21 -0
- package/dist/typings/models/index.d.ts +33 -0
- package/dist/typings/models/inventory.d.ts +82 -0
- package/dist/typings/models/me.d.ts +481 -0
- package/dist/typings/models/message.d.ts +1823 -0
- package/dist/typings/models/order-edit.d.ts +565 -0
- package/dist/typings/models/order.d.ts +558 -0
- package/dist/typings/models/payment.d.ts +208 -0
- package/dist/typings/models/product-discount.d.ts +123 -0
- package/dist/typings/models/product-selection.d.ts +106 -0
- package/dist/typings/models/product-type.d.ts +216 -0
- package/dist/typings/models/product.d.ts +517 -0
- package/dist/typings/models/project.d.ts +108 -0
- package/dist/typings/models/review.d.ts +115 -0
- package/dist/typings/models/scalar-types.d.ts +4 -0
- package/dist/typings/models/shipping-method.d.ts +160 -0
- package/dist/typings/models/shopping-list.d.ts +217 -0
- package/dist/typings/models/state.d.ts +86 -0
- package/dist/typings/models/store.d.ts +121 -0
- package/dist/typings/models/subscription.d.ts +148 -0
- package/dist/typings/models/tax-category.d.ts +87 -0
- package/dist/typings/models/type.d.ts +182 -0
- package/dist/typings/models/zone.d.ts +65 -0
- package/package.json +13 -14
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { CartDiscountReference } from './cart-discount';
|
|
2
|
+
import { ChannelReference, ChannelResourceIdentifier } from './channel';
|
|
3
|
+
import { Address, BaseAddress, BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, Price, TypedMoney } from './common';
|
|
4
|
+
import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group';
|
|
5
|
+
import { DiscountCodeReference } from './discount-code';
|
|
6
|
+
import { Delivery, ItemState, OrderReference, PaymentInfo } from './order';
|
|
7
|
+
import { PaymentResourceIdentifier } from './payment';
|
|
8
|
+
import { ProductVariant } from './product';
|
|
9
|
+
import { ProductTypeReference } from './product-type';
|
|
10
|
+
import { ShippingMethodReference, ShippingMethodResourceIdentifier, ShippingRate, ShippingRateDraft } from './shipping-method';
|
|
11
|
+
import { ShoppingListResourceIdentifier } from './shopping-list';
|
|
12
|
+
import { StoreKeyReference, StoreResourceIdentifier } from './store';
|
|
13
|
+
import { SubRate, TaxCategoryReference, TaxCategoryResourceIdentifier, TaxRate } from './tax-category';
|
|
14
|
+
import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
|
|
15
|
+
export interface Cart extends BaseResource {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly key?: string;
|
|
18
|
+
readonly version: number;
|
|
19
|
+
readonly createdAt: string;
|
|
20
|
+
readonly lastModifiedAt: string;
|
|
21
|
+
readonly lastModifiedBy?: LastModifiedBy;
|
|
22
|
+
readonly createdBy?: CreatedBy;
|
|
23
|
+
readonly customerId?: string;
|
|
24
|
+
readonly customerEmail?: string;
|
|
25
|
+
readonly anonymousId?: string;
|
|
26
|
+
readonly store?: StoreKeyReference;
|
|
27
|
+
readonly lineItems: LineItem[];
|
|
28
|
+
readonly customLineItems: CustomLineItem[];
|
|
29
|
+
readonly totalPrice: TypedMoney;
|
|
30
|
+
readonly taxedPrice?: TaxedPrice;
|
|
31
|
+
readonly cartState: CartState;
|
|
32
|
+
readonly shippingAddress?: Address;
|
|
33
|
+
readonly billingAddress?: Address;
|
|
34
|
+
readonly inventoryMode?: InventoryMode;
|
|
35
|
+
readonly taxMode: TaxMode;
|
|
36
|
+
readonly taxRoundingMode: RoundingMode;
|
|
37
|
+
readonly taxCalculationMode: TaxCalculationMode;
|
|
38
|
+
readonly customerGroup?: CustomerGroupReference;
|
|
39
|
+
readonly country?: string;
|
|
40
|
+
readonly shippingInfo?: ShippingInfo;
|
|
41
|
+
readonly discountCodes?: DiscountCodeInfo[];
|
|
42
|
+
readonly custom?: CustomFields;
|
|
43
|
+
readonly paymentInfo?: PaymentInfo;
|
|
44
|
+
readonly locale?: string;
|
|
45
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
46
|
+
readonly refusedGifts: CartDiscountReference[];
|
|
47
|
+
readonly origin: CartOrigin;
|
|
48
|
+
readonly shippingRateInput?: ShippingRateInput;
|
|
49
|
+
readonly itemShippingAddresses?: Address[];
|
|
50
|
+
readonly totalLineItemQuantity?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface CartDraft {
|
|
53
|
+
readonly currency: string;
|
|
54
|
+
readonly key?: string;
|
|
55
|
+
readonly customerId?: string;
|
|
56
|
+
readonly customerEmail?: string;
|
|
57
|
+
readonly customerGroup?: CustomerGroupResourceIdentifier;
|
|
58
|
+
readonly anonymousId?: string;
|
|
59
|
+
readonly store?: StoreResourceIdentifier;
|
|
60
|
+
readonly country?: string;
|
|
61
|
+
readonly inventoryMode?: InventoryMode;
|
|
62
|
+
readonly taxMode?: TaxMode;
|
|
63
|
+
readonly taxRoundingMode?: RoundingMode;
|
|
64
|
+
readonly taxCalculationMode?: TaxCalculationMode;
|
|
65
|
+
readonly lineItems?: LineItemDraft[];
|
|
66
|
+
readonly customLineItems?: CustomLineItemDraft[];
|
|
67
|
+
readonly shippingAddress?: BaseAddress;
|
|
68
|
+
readonly billingAddress?: BaseAddress;
|
|
69
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
70
|
+
readonly externalTaxRateForShippingMethod?: ExternalTaxRateDraft;
|
|
71
|
+
readonly custom?: CustomFieldsDraft;
|
|
72
|
+
readonly locale?: string;
|
|
73
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
74
|
+
readonly origin?: CartOrigin;
|
|
75
|
+
readonly shippingRateInput?: ShippingRateInputDraft;
|
|
76
|
+
readonly itemShippingAddresses?: BaseAddress[];
|
|
77
|
+
readonly discountCodes?: string[];
|
|
78
|
+
}
|
|
79
|
+
export declare type CartOrigin = 'Customer' | 'Merchant';
|
|
80
|
+
export interface CartPagedQueryResponse {
|
|
81
|
+
readonly limit: number;
|
|
82
|
+
readonly count: number;
|
|
83
|
+
readonly total?: number;
|
|
84
|
+
readonly offset: number;
|
|
85
|
+
readonly results: Cart[];
|
|
86
|
+
}
|
|
87
|
+
export interface CartReference {
|
|
88
|
+
readonly typeId: 'cart';
|
|
89
|
+
readonly id: string;
|
|
90
|
+
readonly obj?: Cart;
|
|
91
|
+
}
|
|
92
|
+
export interface CartResourceIdentifier {
|
|
93
|
+
readonly typeId: 'cart';
|
|
94
|
+
readonly id?: string;
|
|
95
|
+
readonly key?: string;
|
|
96
|
+
}
|
|
97
|
+
export declare type CartState = 'Active' | 'Merged' | 'Ordered';
|
|
98
|
+
export interface CartUpdate {
|
|
99
|
+
readonly version: number;
|
|
100
|
+
readonly actions: CartUpdateAction[];
|
|
101
|
+
}
|
|
102
|
+
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 | CartSetItemShippingAddressCustomFieldAction | CartSetItemShippingAddressCustomTypeAction | CartSetKeyAction | CartSetLineItemCustomFieldAction | CartSetLineItemCustomTypeAction | CartSetLineItemDistributionChannelAction | CartSetLineItemPriceAction | CartSetLineItemShippingDetailsAction | CartSetLineItemSupplyChannelAction | CartSetLineItemTaxAmountAction | CartSetLineItemTaxRateAction | CartSetLineItemTotalPriceAction | CartSetLocaleAction | CartSetShippingAddressAction | CartSetShippingAddressCustomFieldAction | CartSetShippingAddressCustomTypeAction | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUpdateItemShippingAddressAction;
|
|
103
|
+
export interface CustomLineItem {
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly name: LocalizedString;
|
|
106
|
+
readonly money: TypedMoney;
|
|
107
|
+
readonly taxedPrice?: TaxedItemPrice;
|
|
108
|
+
readonly totalPrice: TypedMoney;
|
|
109
|
+
readonly slug: string;
|
|
110
|
+
readonly quantity: number;
|
|
111
|
+
readonly state: ItemState[];
|
|
112
|
+
readonly taxCategory?: TaxCategoryReference;
|
|
113
|
+
readonly taxRate?: TaxRate;
|
|
114
|
+
readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
|
|
115
|
+
readonly custom?: CustomFields;
|
|
116
|
+
readonly shippingDetails?: ItemShippingDetails;
|
|
117
|
+
}
|
|
118
|
+
export interface CustomLineItemDraft {
|
|
119
|
+
readonly name: LocalizedString;
|
|
120
|
+
readonly quantity: number;
|
|
121
|
+
readonly money: Money;
|
|
122
|
+
readonly slug: string;
|
|
123
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
124
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
125
|
+
readonly custom?: CustomFieldsDraft;
|
|
126
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
127
|
+
}
|
|
128
|
+
export interface DiscountCodeInfo {
|
|
129
|
+
readonly discountCode: DiscountCodeReference;
|
|
130
|
+
readonly state: DiscountCodeState;
|
|
131
|
+
}
|
|
132
|
+
export declare type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid';
|
|
133
|
+
export interface DiscountedLineItemPortion {
|
|
134
|
+
readonly discount: CartDiscountReference;
|
|
135
|
+
readonly discountedAmount: TypedMoney;
|
|
136
|
+
}
|
|
137
|
+
export interface DiscountedLineItemPrice {
|
|
138
|
+
readonly value: TypedMoney;
|
|
139
|
+
readonly includedDiscounts: DiscountedLineItemPortion[];
|
|
140
|
+
}
|
|
141
|
+
export interface DiscountedLineItemPriceForQuantity {
|
|
142
|
+
readonly quantity: number;
|
|
143
|
+
readonly discountedPrice: DiscountedLineItemPrice;
|
|
144
|
+
}
|
|
145
|
+
export interface ExternalLineItemTotalPrice {
|
|
146
|
+
readonly price: Money;
|
|
147
|
+
readonly totalPrice: Money;
|
|
148
|
+
}
|
|
149
|
+
export interface ExternalTaxAmountDraft {
|
|
150
|
+
readonly totalGross: Money;
|
|
151
|
+
readonly taxRate: ExternalTaxRateDraft;
|
|
152
|
+
}
|
|
153
|
+
export interface ExternalTaxRateDraft {
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly amount?: number;
|
|
156
|
+
readonly country: string;
|
|
157
|
+
readonly state?: string;
|
|
158
|
+
readonly subRates?: SubRate[];
|
|
159
|
+
readonly includedInPrice?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export declare type InventoryMode = 'None' | 'ReserveOnOrder' | 'TrackOnly';
|
|
162
|
+
export interface ItemShippingDetails {
|
|
163
|
+
readonly targets: ItemShippingTarget[];
|
|
164
|
+
readonly valid: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface ItemShippingDetailsDraft {
|
|
167
|
+
readonly targets: ItemShippingTarget[];
|
|
168
|
+
}
|
|
169
|
+
export interface ItemShippingTarget {
|
|
170
|
+
readonly addressKey: string;
|
|
171
|
+
readonly quantity: number;
|
|
172
|
+
}
|
|
173
|
+
export interface LineItem {
|
|
174
|
+
readonly id: string;
|
|
175
|
+
readonly productId: string;
|
|
176
|
+
readonly productKey?: string;
|
|
177
|
+
readonly name: LocalizedString;
|
|
178
|
+
readonly productSlug?: LocalizedString;
|
|
179
|
+
readonly productType: ProductTypeReference;
|
|
180
|
+
readonly variant: ProductVariant;
|
|
181
|
+
readonly price: Price;
|
|
182
|
+
readonly taxedPrice?: TaxedItemPrice;
|
|
183
|
+
readonly totalPrice: TypedMoney;
|
|
184
|
+
readonly quantity: number;
|
|
185
|
+
readonly addedAt?: string;
|
|
186
|
+
readonly state: ItemState[];
|
|
187
|
+
readonly taxRate?: TaxRate;
|
|
188
|
+
readonly supplyChannel?: ChannelReference;
|
|
189
|
+
readonly distributionChannel?: ChannelReference;
|
|
190
|
+
readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
|
|
191
|
+
readonly priceMode: LineItemPriceMode;
|
|
192
|
+
readonly lineItemMode: LineItemMode;
|
|
193
|
+
readonly custom?: CustomFields;
|
|
194
|
+
readonly shippingDetails?: ItemShippingDetails;
|
|
195
|
+
readonly lastModifiedAt?: string;
|
|
196
|
+
}
|
|
197
|
+
export interface LineItemDraft {
|
|
198
|
+
readonly productId?: string;
|
|
199
|
+
readonly variantId?: number;
|
|
200
|
+
readonly sku?: string;
|
|
201
|
+
readonly quantity?: number;
|
|
202
|
+
readonly addedAt?: string;
|
|
203
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
204
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
205
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
206
|
+
readonly custom?: CustomFieldsDraft;
|
|
207
|
+
readonly externalPrice?: Money;
|
|
208
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
209
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
210
|
+
}
|
|
211
|
+
export declare type LineItemMode = 'GiftLineItem' | 'Standard';
|
|
212
|
+
export declare type LineItemPriceMode = 'ExternalPrice' | 'ExternalTotal' | 'Platform';
|
|
213
|
+
export interface ReplicaCartDraft {
|
|
214
|
+
readonly reference: CartReference | OrderReference;
|
|
215
|
+
readonly key?: string;
|
|
216
|
+
}
|
|
217
|
+
export declare type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp';
|
|
218
|
+
export interface ShippingInfo {
|
|
219
|
+
readonly shippingMethodName: string;
|
|
220
|
+
readonly price: TypedMoney;
|
|
221
|
+
readonly shippingRate: ShippingRate;
|
|
222
|
+
readonly taxedPrice?: TaxedItemPrice;
|
|
223
|
+
readonly taxRate?: TaxRate;
|
|
224
|
+
readonly taxCategory?: TaxCategoryReference;
|
|
225
|
+
readonly shippingMethod?: ShippingMethodReference;
|
|
226
|
+
readonly deliveries?: Delivery[];
|
|
227
|
+
readonly discountedPrice?: DiscountedLineItemPrice;
|
|
228
|
+
readonly shippingMethodState: ShippingMethodState;
|
|
229
|
+
}
|
|
230
|
+
export declare type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart';
|
|
231
|
+
export declare type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
|
|
232
|
+
export interface ClassificationShippingRateInput {
|
|
233
|
+
readonly type: 'Classification';
|
|
234
|
+
readonly key: string;
|
|
235
|
+
readonly label: LocalizedString;
|
|
236
|
+
}
|
|
237
|
+
export interface ScoreShippingRateInput {
|
|
238
|
+
readonly type: 'Score';
|
|
239
|
+
readonly score: number;
|
|
240
|
+
}
|
|
241
|
+
export declare type ShippingRateInputDraft = ClassificationShippingRateInputDraft | ScoreShippingRateInputDraft;
|
|
242
|
+
export interface ClassificationShippingRateInputDraft {
|
|
243
|
+
readonly type: 'Classification';
|
|
244
|
+
readonly key: string;
|
|
245
|
+
}
|
|
246
|
+
export interface ScoreShippingRateInputDraft {
|
|
247
|
+
readonly type: 'Score';
|
|
248
|
+
readonly score: number;
|
|
249
|
+
}
|
|
250
|
+
export declare type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel';
|
|
251
|
+
export declare type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform';
|
|
252
|
+
export interface TaxPortion {
|
|
253
|
+
readonly name?: string;
|
|
254
|
+
readonly rate: number;
|
|
255
|
+
readonly amount: TypedMoney;
|
|
256
|
+
}
|
|
257
|
+
export interface TaxPortionDraft {
|
|
258
|
+
readonly name?: string;
|
|
259
|
+
readonly rate: number;
|
|
260
|
+
readonly amount: Money;
|
|
261
|
+
}
|
|
262
|
+
export interface TaxedItemPrice {
|
|
263
|
+
readonly totalNet: TypedMoney;
|
|
264
|
+
readonly totalGross: TypedMoney;
|
|
265
|
+
}
|
|
266
|
+
export interface TaxedPrice {
|
|
267
|
+
readonly totalNet: TypedMoney;
|
|
268
|
+
readonly totalGross: TypedMoney;
|
|
269
|
+
readonly taxPortions: TaxPortion[];
|
|
270
|
+
}
|
|
271
|
+
export interface TaxedPriceDraft {
|
|
272
|
+
readonly totalNet: Money;
|
|
273
|
+
readonly totalGross: Money;
|
|
274
|
+
readonly taxPortions: TaxPortionDraft[];
|
|
275
|
+
}
|
|
276
|
+
export interface CartAddCustomLineItemAction {
|
|
277
|
+
readonly action: 'addCustomLineItem';
|
|
278
|
+
readonly money: Money;
|
|
279
|
+
readonly name: LocalizedString;
|
|
280
|
+
readonly quantity: number;
|
|
281
|
+
readonly slug: string;
|
|
282
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
283
|
+
readonly custom?: CustomFieldsDraft;
|
|
284
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
285
|
+
}
|
|
286
|
+
export interface CartAddDiscountCodeAction {
|
|
287
|
+
readonly action: 'addDiscountCode';
|
|
288
|
+
readonly code: string;
|
|
289
|
+
}
|
|
290
|
+
export interface CartAddItemShippingAddressAction {
|
|
291
|
+
readonly action: 'addItemShippingAddress';
|
|
292
|
+
readonly address: BaseAddress;
|
|
293
|
+
}
|
|
294
|
+
export interface CartAddLineItemAction {
|
|
295
|
+
readonly action: 'addLineItem';
|
|
296
|
+
readonly custom?: CustomFieldsDraft;
|
|
297
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
298
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
299
|
+
readonly productId?: string;
|
|
300
|
+
readonly variantId?: number;
|
|
301
|
+
readonly sku?: string;
|
|
302
|
+
readonly quantity?: number;
|
|
303
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
304
|
+
readonly externalPrice?: Money;
|
|
305
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
306
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
307
|
+
}
|
|
308
|
+
export interface CartAddPaymentAction {
|
|
309
|
+
readonly action: 'addPayment';
|
|
310
|
+
readonly payment: PaymentResourceIdentifier;
|
|
311
|
+
}
|
|
312
|
+
export interface CartAddShoppingListAction {
|
|
313
|
+
readonly action: 'addShoppingList';
|
|
314
|
+
readonly shoppingList: ShoppingListResourceIdentifier;
|
|
315
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
316
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
317
|
+
}
|
|
318
|
+
export interface CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction {
|
|
319
|
+
readonly action: 'applyDeltaToCustomLineItemShippingDetailsTargets';
|
|
320
|
+
readonly customLineItemId: string;
|
|
321
|
+
readonly targetsDelta: ItemShippingTarget[];
|
|
322
|
+
}
|
|
323
|
+
export interface CartApplyDeltaToLineItemShippingDetailsTargetsAction {
|
|
324
|
+
readonly action: 'applyDeltaToLineItemShippingDetailsTargets';
|
|
325
|
+
readonly lineItemId: string;
|
|
326
|
+
readonly targetsDelta: ItemShippingTarget[];
|
|
327
|
+
}
|
|
328
|
+
export interface CartChangeCustomLineItemMoneyAction {
|
|
329
|
+
readonly action: 'changeCustomLineItemMoney';
|
|
330
|
+
readonly customLineItemId: string;
|
|
331
|
+
readonly money: Money;
|
|
332
|
+
}
|
|
333
|
+
export interface CartChangeCustomLineItemQuantityAction {
|
|
334
|
+
readonly action: 'changeCustomLineItemQuantity';
|
|
335
|
+
readonly customLineItemId: string;
|
|
336
|
+
readonly quantity: number;
|
|
337
|
+
}
|
|
338
|
+
export interface CartChangeLineItemQuantityAction {
|
|
339
|
+
readonly action: 'changeLineItemQuantity';
|
|
340
|
+
readonly lineItemId: string;
|
|
341
|
+
readonly quantity: number;
|
|
342
|
+
readonly externalPrice?: Money;
|
|
343
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
344
|
+
}
|
|
345
|
+
export interface CartChangeTaxCalculationModeAction {
|
|
346
|
+
readonly action: 'changeTaxCalculationMode';
|
|
347
|
+
readonly taxCalculationMode: TaxCalculationMode;
|
|
348
|
+
}
|
|
349
|
+
export interface CartChangeTaxModeAction {
|
|
350
|
+
readonly action: 'changeTaxMode';
|
|
351
|
+
readonly taxMode: TaxMode;
|
|
352
|
+
}
|
|
353
|
+
export interface CartChangeTaxRoundingModeAction {
|
|
354
|
+
readonly action: 'changeTaxRoundingMode';
|
|
355
|
+
readonly taxRoundingMode: RoundingMode;
|
|
356
|
+
}
|
|
357
|
+
export interface CartRecalculateAction {
|
|
358
|
+
readonly action: 'recalculate';
|
|
359
|
+
readonly updateProductData?: boolean;
|
|
360
|
+
}
|
|
361
|
+
export interface CartRemoveCustomLineItemAction {
|
|
362
|
+
readonly action: 'removeCustomLineItem';
|
|
363
|
+
readonly customLineItemId: string;
|
|
364
|
+
}
|
|
365
|
+
export interface CartRemoveDiscountCodeAction {
|
|
366
|
+
readonly action: 'removeDiscountCode';
|
|
367
|
+
readonly discountCode: DiscountCodeReference;
|
|
368
|
+
}
|
|
369
|
+
export interface CartRemoveItemShippingAddressAction {
|
|
370
|
+
readonly action: 'removeItemShippingAddress';
|
|
371
|
+
readonly addressKey: string;
|
|
372
|
+
}
|
|
373
|
+
export interface CartRemoveLineItemAction {
|
|
374
|
+
readonly action: 'removeLineItem';
|
|
375
|
+
readonly lineItemId: string;
|
|
376
|
+
readonly quantity?: number;
|
|
377
|
+
readonly externalPrice?: Money;
|
|
378
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
379
|
+
readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
|
|
380
|
+
}
|
|
381
|
+
export interface CartRemovePaymentAction {
|
|
382
|
+
readonly action: 'removePayment';
|
|
383
|
+
readonly payment: PaymentResourceIdentifier;
|
|
384
|
+
}
|
|
385
|
+
export interface CartSetAnonymousIdAction {
|
|
386
|
+
readonly action: 'setAnonymousId';
|
|
387
|
+
readonly anonymousId?: string;
|
|
388
|
+
}
|
|
389
|
+
export interface CartSetBillingAddressAction {
|
|
390
|
+
readonly action: 'setBillingAddress';
|
|
391
|
+
readonly address?: BaseAddress;
|
|
392
|
+
}
|
|
393
|
+
export interface CartSetBillingAddressCustomFieldAction {
|
|
394
|
+
readonly action: 'setBillingAddressCustomField';
|
|
395
|
+
readonly name: string;
|
|
396
|
+
readonly value?: any;
|
|
397
|
+
}
|
|
398
|
+
export interface CartSetBillingAddressCustomTypeAction {
|
|
399
|
+
readonly action: 'setBillingAddressCustomType';
|
|
400
|
+
readonly type?: TypeResourceIdentifier;
|
|
401
|
+
readonly fields?: FieldContainer;
|
|
402
|
+
}
|
|
403
|
+
export interface CartSetCartTotalTaxAction {
|
|
404
|
+
readonly action: 'setCartTotalTax';
|
|
405
|
+
readonly externalTotalGross: Money;
|
|
406
|
+
readonly externalTaxPortions?: TaxPortionDraft[];
|
|
407
|
+
}
|
|
408
|
+
export interface CartSetCountryAction {
|
|
409
|
+
readonly action: 'setCountry';
|
|
410
|
+
readonly country?: string;
|
|
411
|
+
}
|
|
412
|
+
export interface CartSetCustomFieldAction {
|
|
413
|
+
readonly action: 'setCustomField';
|
|
414
|
+
readonly name: string;
|
|
415
|
+
readonly value?: any;
|
|
416
|
+
}
|
|
417
|
+
export interface CartSetCustomLineItemCustomFieldAction {
|
|
418
|
+
readonly action: 'setCustomLineItemCustomField';
|
|
419
|
+
readonly customLineItemId: string;
|
|
420
|
+
readonly name: string;
|
|
421
|
+
readonly value?: any;
|
|
422
|
+
}
|
|
423
|
+
export interface CartSetCustomLineItemCustomTypeAction {
|
|
424
|
+
readonly action: 'setCustomLineItemCustomType';
|
|
425
|
+
readonly customLineItemId: string;
|
|
426
|
+
readonly type?: TypeResourceIdentifier;
|
|
427
|
+
readonly fields?: FieldContainer;
|
|
428
|
+
}
|
|
429
|
+
export interface CartSetCustomLineItemShippingDetailsAction {
|
|
430
|
+
readonly action: 'setCustomLineItemShippingDetails';
|
|
431
|
+
readonly customLineItemId: string;
|
|
432
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
433
|
+
}
|
|
434
|
+
export interface CartSetCustomLineItemTaxAmountAction {
|
|
435
|
+
readonly action: 'setCustomLineItemTaxAmount';
|
|
436
|
+
readonly customLineItemId: string;
|
|
437
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
438
|
+
}
|
|
439
|
+
export interface CartSetCustomLineItemTaxRateAction {
|
|
440
|
+
readonly action: 'setCustomLineItemTaxRate';
|
|
441
|
+
readonly customLineItemId: string;
|
|
442
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
443
|
+
}
|
|
444
|
+
export interface CartSetCustomShippingMethodAction {
|
|
445
|
+
readonly action: 'setCustomShippingMethod';
|
|
446
|
+
readonly shippingMethodName: string;
|
|
447
|
+
readonly shippingRate: ShippingRateDraft;
|
|
448
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
449
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
450
|
+
}
|
|
451
|
+
export interface CartSetCustomTypeAction {
|
|
452
|
+
readonly action: 'setCustomType';
|
|
453
|
+
readonly type?: TypeResourceIdentifier;
|
|
454
|
+
readonly fields?: FieldContainer;
|
|
455
|
+
}
|
|
456
|
+
export interface CartSetCustomerEmailAction {
|
|
457
|
+
readonly action: 'setCustomerEmail';
|
|
458
|
+
readonly email: string;
|
|
459
|
+
}
|
|
460
|
+
export interface CartSetCustomerGroupAction {
|
|
461
|
+
readonly action: 'setCustomerGroup';
|
|
462
|
+
readonly customerGroup?: CustomerGroupResourceIdentifier;
|
|
463
|
+
}
|
|
464
|
+
export interface CartSetCustomerIdAction {
|
|
465
|
+
readonly action: 'setCustomerId';
|
|
466
|
+
readonly customerId?: string;
|
|
467
|
+
}
|
|
468
|
+
export interface CartSetDeleteDaysAfterLastModificationAction {
|
|
469
|
+
readonly action: 'setDeleteDaysAfterLastModification';
|
|
470
|
+
readonly deleteDaysAfterLastModification?: number;
|
|
471
|
+
}
|
|
472
|
+
export interface CartSetDeliveryAddressCustomFieldAction {
|
|
473
|
+
readonly action: 'setDeliveryAddressCustomField';
|
|
474
|
+
readonly deliveryId: string;
|
|
475
|
+
readonly name: string;
|
|
476
|
+
readonly value?: any;
|
|
477
|
+
}
|
|
478
|
+
export interface CartSetDeliveryAddressCustomTypeAction {
|
|
479
|
+
readonly action: 'setDeliveryAddressCustomType';
|
|
480
|
+
readonly deliveryId: string;
|
|
481
|
+
readonly type?: TypeResourceIdentifier;
|
|
482
|
+
readonly fields?: FieldContainer;
|
|
483
|
+
}
|
|
484
|
+
export interface CartSetItemShippingAddressCustomFieldAction {
|
|
485
|
+
readonly action: 'setItemShippingAddressCustomField';
|
|
486
|
+
readonly addressKey: string;
|
|
487
|
+
readonly name: string;
|
|
488
|
+
readonly value?: any;
|
|
489
|
+
}
|
|
490
|
+
export interface CartSetItemShippingAddressCustomTypeAction {
|
|
491
|
+
readonly action: 'setItemShippingAddressCustomType';
|
|
492
|
+
readonly addressKey: string;
|
|
493
|
+
readonly type?: TypeResourceIdentifier;
|
|
494
|
+
readonly fields?: FieldContainer;
|
|
495
|
+
}
|
|
496
|
+
export interface CartSetKeyAction {
|
|
497
|
+
readonly action: 'setKey';
|
|
498
|
+
readonly key?: string;
|
|
499
|
+
}
|
|
500
|
+
export interface CartSetLineItemCustomFieldAction {
|
|
501
|
+
readonly action: 'setLineItemCustomField';
|
|
502
|
+
readonly lineItemId: string;
|
|
503
|
+
readonly name: string;
|
|
504
|
+
readonly value?: any;
|
|
505
|
+
}
|
|
506
|
+
export interface CartSetLineItemCustomTypeAction {
|
|
507
|
+
readonly action: 'setLineItemCustomType';
|
|
508
|
+
readonly lineItemId: string;
|
|
509
|
+
readonly type?: TypeResourceIdentifier;
|
|
510
|
+
readonly fields?: FieldContainer;
|
|
511
|
+
}
|
|
512
|
+
export interface CartSetLineItemDistributionChannelAction {
|
|
513
|
+
readonly action: 'setLineItemDistributionChannel';
|
|
514
|
+
readonly lineItemId: string;
|
|
515
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
516
|
+
}
|
|
517
|
+
export interface CartSetLineItemPriceAction {
|
|
518
|
+
readonly action: 'setLineItemPrice';
|
|
519
|
+
readonly lineItemId: string;
|
|
520
|
+
readonly externalPrice?: Money;
|
|
521
|
+
}
|
|
522
|
+
export interface CartSetLineItemShippingDetailsAction {
|
|
523
|
+
readonly action: 'setLineItemShippingDetails';
|
|
524
|
+
readonly lineItemId: string;
|
|
525
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
526
|
+
}
|
|
527
|
+
export interface CartSetLineItemSupplyChannelAction {
|
|
528
|
+
readonly action: 'setLineItemSupplyChannel';
|
|
529
|
+
readonly lineItemId: string;
|
|
530
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
531
|
+
}
|
|
532
|
+
export interface CartSetLineItemTaxAmountAction {
|
|
533
|
+
readonly action: 'setLineItemTaxAmount';
|
|
534
|
+
readonly lineItemId: string;
|
|
535
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
536
|
+
}
|
|
537
|
+
export interface CartSetLineItemTaxRateAction {
|
|
538
|
+
readonly action: 'setLineItemTaxRate';
|
|
539
|
+
readonly lineItemId: string;
|
|
540
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
541
|
+
}
|
|
542
|
+
export interface CartSetLineItemTotalPriceAction {
|
|
543
|
+
readonly action: 'setLineItemTotalPrice';
|
|
544
|
+
readonly lineItemId: string;
|
|
545
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
546
|
+
}
|
|
547
|
+
export interface CartSetLocaleAction {
|
|
548
|
+
readonly action: 'setLocale';
|
|
549
|
+
readonly locale?: string;
|
|
550
|
+
}
|
|
551
|
+
export interface CartSetShippingAddressAction {
|
|
552
|
+
readonly action: 'setShippingAddress';
|
|
553
|
+
readonly address?: BaseAddress;
|
|
554
|
+
}
|
|
555
|
+
export interface CartSetShippingAddressCustomFieldAction {
|
|
556
|
+
readonly action: 'setShippingAddressCustomField';
|
|
557
|
+
readonly name: string;
|
|
558
|
+
readonly value?: any;
|
|
559
|
+
}
|
|
560
|
+
export interface CartSetShippingAddressCustomTypeAction {
|
|
561
|
+
readonly action: 'setShippingAddressCustomType';
|
|
562
|
+
readonly type?: TypeResourceIdentifier;
|
|
563
|
+
readonly fields?: FieldContainer;
|
|
564
|
+
}
|
|
565
|
+
export interface CartSetShippingMethodAction {
|
|
566
|
+
readonly action: 'setShippingMethod';
|
|
567
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
568
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
569
|
+
}
|
|
570
|
+
export interface CartSetShippingMethodTaxAmountAction {
|
|
571
|
+
readonly action: 'setShippingMethodTaxAmount';
|
|
572
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
573
|
+
}
|
|
574
|
+
export interface CartSetShippingMethodTaxRateAction {
|
|
575
|
+
readonly action: 'setShippingMethodTaxRate';
|
|
576
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
577
|
+
}
|
|
578
|
+
export interface CartSetShippingRateInputAction {
|
|
579
|
+
readonly action: 'setShippingRateInput';
|
|
580
|
+
readonly shippingRateInput?: ShippingRateInputDraft;
|
|
581
|
+
}
|
|
582
|
+
export interface CartUpdateItemShippingAddressAction {
|
|
583
|
+
readonly action: 'updateItemShippingAddress';
|
|
584
|
+
readonly address: BaseAddress;
|
|
585
|
+
}
|
|
586
|
+
export interface CustomLineItemImportDraft {
|
|
587
|
+
readonly name: LocalizedString;
|
|
588
|
+
readonly quantity: number;
|
|
589
|
+
readonly money: Money;
|
|
590
|
+
readonly slug: string;
|
|
591
|
+
readonly state?: ItemState[];
|
|
592
|
+
readonly taxRate?: TaxRate;
|
|
593
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
594
|
+
readonly custom?: CustomFieldsDraft;
|
|
595
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
596
|
+
}
|
|
597
|
+
export declare type ProductPublishScope = 'All' | 'Prices';
|