@viu/emporix-sdk 2.8.0 → 2.9.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/CHANGELOG.md +64 -0
- package/dist/{chunk-5JHTZBOC.js → chunk-B4UOYJKW.js} +12 -2
- package/dist/chunk-B4UOYJKW.js.map +1 -0
- package/dist/{chunk-SCI7D74B.js → chunk-BK25FDTH.js} +17 -5
- package/dist/chunk-BK25FDTH.js.map +1 -0
- package/dist/{chunk-B56JZNI7.js → chunk-HAEVK6IS.js} +6 -3
- package/dist/chunk-HAEVK6IS.js.map +1 -0
- package/dist/{chunk-6UNFMCHZ.js → chunk-KVBCTXVH.js} +2 -2
- package/dist/chunk-KVBCTXVH.js.map +1 -0
- package/dist/{chunk-NM7VDXBR.js → chunk-LGLFJL3S.js} +6 -3
- package/dist/chunk-LGLFJL3S.js.map +1 -0
- package/dist/chunk-LGOC5XOI.js +40 -0
- package/dist/chunk-LGOC5XOI.js.map +1 -0
- package/dist/{chunk-RXVVFNYN.js → chunk-MM6JF3Z7.js} +6 -3
- package/dist/chunk-MM6JF3Z7.js.map +1 -0
- package/dist/companies.cjs +4 -1
- package/dist/companies.cjs.map +1 -1
- package/dist/companies.d.cts +7 -4
- package/dist/companies.d.ts +7 -4
- package/dist/companies.js +1 -1
- package/dist/contacts.cjs +4 -1
- package/dist/contacts.cjs.map +1 -1
- package/dist/contacts.d.cts +6 -4
- package/dist/contacts.d.ts +6 -4
- package/dist/contacts.js +1 -1
- package/dist/customer-groups.cjs +17 -0
- package/dist/customer-groups.cjs.map +1 -1
- package/dist/customer-groups.d.cts +94 -21
- package/dist/customer-groups.d.ts +94 -21
- package/dist/customer-groups.js +1 -1
- package/dist/index.cjs +63 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +23 -16
- package/dist/index.js.map +1 -1
- package/dist/locations.cjs +4 -1
- package/dist/locations.cjs.map +1 -1
- package/dist/locations.d.cts +7 -4
- package/dist/locations.d.ts +7 -4
- package/dist/locations.js +1 -1
- package/dist/orders.cjs.map +1 -1
- package/dist/orders.d.cts +1726 -80
- package/dist/orders.d.ts +1726 -80
- package/dist/orders.js +1 -1
- package/dist/price.cjs +15 -3
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.cts +23 -4
- package/dist/price.d.ts +23 -4
- package/dist/price.js +1 -1
- package/dist/product.cjs +10 -0
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +10 -0
- package/dist/product.d.ts +10 -0
- package/dist/product.js +1 -1
- package/dist/types.gen-C_wOXYZB.d.cts +455 -0
- package/dist/types.gen-C_wOXYZB.d.ts +455 -0
- package/package.json +1 -1
- package/dist/chunk-5JHTZBOC.js.map +0 -1
- package/dist/chunk-6UNFMCHZ.js.map +0 -1
- package/dist/chunk-B56JZNI7.js.map +0 -1
- package/dist/chunk-NM7VDXBR.js.map +0 -1
- package/dist/chunk-RXVVFNYN.js.map +0 -1
- package/dist/chunk-SCI7D74B.js.map +0 -1
- package/dist/chunk-SKX7KCMH.js +0 -23
- package/dist/chunk-SKX7KCMH.js.map +0 -1
- package/dist/types.gen-D1QuqPLs.d.cts +0 -166
- package/dist/types.gen-D1QuqPLs.d.ts +0 -166
package/dist/orders.d.cts
CHANGED
|
@@ -1,104 +1,1750 @@
|
|
|
1
1
|
import { C as ClientContext, b as AuthContext, P as PaginatedItems } from './context-DJDTlhLW.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* subset). Captures /orders, /orders/{id}, /orders/{id}/transitions, and
|
|
6
|
-
* /salesorders/{id} response/body shapes.
|
|
4
|
+
* Access control identifier that determines who can view or manage the order.
|
|
7
5
|
*
|
|
8
|
-
* **
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* **Purpose**: Restricts order visibility based on scope permissions. Only users/applications
|
|
7
|
+
* with matching restriction scopes can access orders with a specific restriction value.
|
|
8
|
+
*
|
|
9
|
+
* **Access Control**:
|
|
10
|
+
* - *Reading*: Users can only query and view orders with the `restriction` value that matches one of their authorized restrictions.
|
|
11
|
+
*
|
|
12
|
+
* **Validation**: The value must exist in the tenant's configured list of valid restrictions.
|
|
13
|
+
*
|
|
14
|
+
* **Site Synchronization**: If the `restriction` property is not set with tenant configuration property `enableSyncBetweenRestrictionsAndSiteCodes` set to `true`, the `restriction` field automatically syncs with `siteCode` property.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
type Restriction = string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Localized value which can have different structure which depends on provided `Content-Language` header.
|
|
11
20
|
*/
|
|
12
|
-
type
|
|
13
|
-
|
|
21
|
+
type LocalizedValue = string | {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
type AggregateFee = {
|
|
25
|
+
total: {
|
|
26
|
+
subTotal?: number;
|
|
27
|
+
totalTax?: number;
|
|
28
|
+
total?: number;
|
|
29
|
+
};
|
|
30
|
+
elements?: Array<{
|
|
31
|
+
name?: LocalizedValue & {
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Unique identifier of the fee.
|
|
36
|
+
*/
|
|
37
|
+
yrn?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Tax code of the fee.
|
|
40
|
+
*/
|
|
41
|
+
taxCode?: string;
|
|
42
|
+
total?: {
|
|
43
|
+
subTotal?: number;
|
|
44
|
+
totalTax?: number;
|
|
45
|
+
total?: number;
|
|
46
|
+
};
|
|
47
|
+
taxValues?: Array<{
|
|
48
|
+
/**
|
|
49
|
+
* Name of the tax.
|
|
50
|
+
*/
|
|
51
|
+
name?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Value of the tax.
|
|
54
|
+
*/
|
|
55
|
+
value?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Rate of the tax.
|
|
58
|
+
*/
|
|
59
|
+
rate?: number;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
type Channel = {
|
|
64
|
+
name?: string;
|
|
65
|
+
source?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The ordered item.
|
|
69
|
+
*/
|
|
70
|
+
type OrderEntry = {
|
|
71
|
+
/**
|
|
72
|
+
* The ordered item ID.
|
|
73
|
+
*/
|
|
74
|
+
id?: string;
|
|
75
|
+
itemYrn?: Yrn;
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated
|
|
78
|
+
*/
|
|
79
|
+
fees?: AggregateFee & {
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* The amount of items.
|
|
84
|
+
*/
|
|
14
85
|
amount: number;
|
|
86
|
+
/**
|
|
87
|
+
* The ordered amount of items.
|
|
88
|
+
*/
|
|
89
|
+
orderedAmount?: number;
|
|
90
|
+
/**
|
|
91
|
+
* The packed amount of items.
|
|
92
|
+
*/
|
|
93
|
+
packedAmountInPc?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Effective quantity is q calculated average quantity customer is paying for.
|
|
96
|
+
*/
|
|
97
|
+
effectiveQuantity?: number;
|
|
98
|
+
/**
|
|
99
|
+
* The original amount. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
|
|
100
|
+
* @deprecated
|
|
101
|
+
*/
|
|
102
|
+
originalAmount?: number;
|
|
103
|
+
/**
|
|
104
|
+
* The original price. This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
|
|
105
|
+
* @deprecated
|
|
106
|
+
*/
|
|
107
|
+
originalPrice?: number;
|
|
108
|
+
/**
|
|
109
|
+
* **This field is deprecated**. Please use `calculatedUnitPrice` instead. The `calculatedUnitPrice` field provides the same value with updated functionality.
|
|
110
|
+
* @deprecated
|
|
111
|
+
*/
|
|
112
|
+
unitPrice?: number;
|
|
113
|
+
calculatedUnitPrice: CalculatedPrice & {
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
};
|
|
116
|
+
measurementUnit?: MeasurementUnit;
|
|
117
|
+
/**
|
|
118
|
+
* Link to product.
|
|
119
|
+
*/
|
|
120
|
+
link?: string;
|
|
121
|
+
/**
|
|
122
|
+
* The discount list. **This field is deprecated**. Please use `calculatedPrice.totalDiscount` instead. The `calculatedPrice.totalDiscount` field provides the same value with updated functionality.
|
|
123
|
+
* @deprecated
|
|
124
|
+
*/
|
|
125
|
+
discounts?: unknown;
|
|
126
|
+
/**
|
|
127
|
+
* The total price of items. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality.
|
|
128
|
+
* @deprecated
|
|
129
|
+
*/
|
|
130
|
+
totalPrice?: number;
|
|
131
|
+
/**
|
|
132
|
+
* The authorized amount. **This field is deprecated**. Please use `calculatedPrice.upliftValue` instead. The `calculatedPrice.upliftValue` field how much payment authorization should be increased for given item.
|
|
133
|
+
* @deprecated
|
|
134
|
+
*/
|
|
135
|
+
authorizedAmount?: number;
|
|
136
|
+
product?: Product;
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated
|
|
139
|
+
*/
|
|
140
|
+
tax?: Tax & {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
price?: Price;
|
|
144
|
+
metadata?: MixinsMetadata;
|
|
145
|
+
mixins?: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
calculatedPrice: OrderEntryCalculatedPrice & {
|
|
149
|
+
[key: string]: unknown;
|
|
150
|
+
};
|
|
151
|
+
priceMatchDetails?: PriceMatchDetails;
|
|
152
|
+
/**
|
|
153
|
+
* External discounts applied to this order entry.
|
|
154
|
+
*/
|
|
155
|
+
externalDiscounts?: Array<ExternalDiscount>;
|
|
156
|
+
/**
|
|
157
|
+
* External fees applied to this order entry.
|
|
158
|
+
*/
|
|
159
|
+
externalFees?: Array<ExternalFee>;
|
|
160
|
+
};
|
|
161
|
+
type DeliveryWindow = {
|
|
162
|
+
/**
|
|
163
|
+
* Id of the delivery window
|
|
164
|
+
*/
|
|
165
|
+
id?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Delivery date.
|
|
168
|
+
*/
|
|
169
|
+
deliveryDate?: string;
|
|
170
|
+
/**
|
|
171
|
+
* ID of the delivery slot
|
|
172
|
+
*/
|
|
173
|
+
slotId?: string;
|
|
174
|
+
deliveryTimeRange?: DeliveryTimeRange;
|
|
175
|
+
/**
|
|
176
|
+
* Delivery cycle to which the order is assigned (containing date)
|
|
177
|
+
*/
|
|
178
|
+
deliveryCycle?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Delivery cycle name to which the order is assigned
|
|
181
|
+
*/
|
|
182
|
+
deliveryCycleName?: string;
|
|
183
|
+
};
|
|
184
|
+
type DeliveryTimeRange = {
|
|
185
|
+
/**
|
|
186
|
+
* Start Time
|
|
187
|
+
*/
|
|
188
|
+
timeFrom?: string;
|
|
189
|
+
/**
|
|
190
|
+
* End Time
|
|
191
|
+
*/
|
|
192
|
+
timeTo?: string;
|
|
193
|
+
};
|
|
194
|
+
type Discount = {
|
|
195
|
+
/**
|
|
196
|
+
* Discount's code.
|
|
197
|
+
*/
|
|
198
|
+
code: string;
|
|
199
|
+
/**
|
|
200
|
+
* Amount of discount.
|
|
201
|
+
*/
|
|
202
|
+
amount?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
205
|
+
*/
|
|
15
206
|
currency: string;
|
|
16
|
-
|
|
17
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Discount's name.
|
|
209
|
+
*/
|
|
210
|
+
name?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Discount's rate.
|
|
213
|
+
*/
|
|
214
|
+
discountRate?: number;
|
|
215
|
+
/**
|
|
216
|
+
* Discount's code.calculation type.
|
|
217
|
+
*/
|
|
218
|
+
calculationType?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Determines whether the coupon is applied to the total or subtotal value of the order.
|
|
221
|
+
*/
|
|
222
|
+
discountCalculationType?: 'SUBTOTAL' | 'TOTAL';
|
|
223
|
+
/**
|
|
224
|
+
* Discount's type.
|
|
225
|
+
*/
|
|
226
|
+
discountType?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Discount's unique sequence ID identifier.
|
|
229
|
+
*/
|
|
230
|
+
sequenceId?: number;
|
|
231
|
+
link?: Reference & {
|
|
232
|
+
[key: string]: unknown;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* This flag indicates if discount is category restricted.
|
|
236
|
+
*/
|
|
237
|
+
categoryRestricted?: boolean;
|
|
238
|
+
restrictions?: DiscountRestrictions & {
|
|
239
|
+
[key: string]: unknown;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
type DiscountRestrictions = {
|
|
243
|
+
/**
|
|
244
|
+
* The date from which the discount restriction is valid.
|
|
245
|
+
*/
|
|
246
|
+
validFrom?: string;
|
|
247
|
+
/**
|
|
248
|
+
* The date from which the discount restriction is valid.
|
|
249
|
+
*/
|
|
250
|
+
validUntil?: string;
|
|
251
|
+
minOrderValue?: DiscountRestrictionsPrice & {
|
|
252
|
+
[key: string]: unknown;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* List of included categories.
|
|
256
|
+
*/
|
|
257
|
+
includedCategories?: Array<string>;
|
|
258
|
+
/**
|
|
259
|
+
* List of excluded categories.
|
|
260
|
+
*/
|
|
261
|
+
excludedCategories?: Array<string>;
|
|
262
|
+
};
|
|
263
|
+
type DiscountRestrictionsPrice = {
|
|
264
|
+
/**
|
|
265
|
+
* The amount of discount price
|
|
266
|
+
*/
|
|
267
|
+
amount?: number;
|
|
268
|
+
/**
|
|
269
|
+
* The currency of the price
|
|
270
|
+
*/
|
|
271
|
+
currency?: string;
|
|
272
|
+
};
|
|
273
|
+
type Reference = {
|
|
274
|
+
/**
|
|
275
|
+
* Unique identifier of a link.
|
|
276
|
+
*/
|
|
18
277
|
id: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Link type.
|
|
280
|
+
*/
|
|
281
|
+
type: string;
|
|
282
|
+
/**
|
|
283
|
+
* URL of the link.
|
|
284
|
+
*/
|
|
285
|
+
url: string;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Customer data.
|
|
289
|
+
*
|
|
290
|
+
* One of these properties needs to be provided:
|
|
291
|
+
* - `name` for business customers (B2B)
|
|
292
|
+
* - `firstName` and `lastName` for individual customers (B2C)
|
|
293
|
+
*
|
|
294
|
+
*/
|
|
295
|
+
type Customer = {
|
|
296
|
+
/**
|
|
297
|
+
* Customer's unique identifier.
|
|
298
|
+
*/
|
|
28
299
|
id?: string;
|
|
29
|
-
|
|
300
|
+
/**
|
|
301
|
+
* Customer's name.
|
|
302
|
+
*/
|
|
303
|
+
name?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Customer's title.
|
|
306
|
+
*/
|
|
307
|
+
title?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Customer's first name.
|
|
310
|
+
*/
|
|
30
311
|
firstName?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Customer's middle name.
|
|
314
|
+
*/
|
|
315
|
+
middleName?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Customer's last name.
|
|
318
|
+
*/
|
|
31
319
|
lastName?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Company name.
|
|
322
|
+
*/
|
|
323
|
+
company?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Customer's email address.
|
|
326
|
+
*/
|
|
327
|
+
email: string;
|
|
328
|
+
metadata?: MixinsMetadata & {
|
|
329
|
+
[key: string]: unknown;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Customer additional information.
|
|
333
|
+
*/
|
|
334
|
+
mixins?: {
|
|
335
|
+
[key: string]: unknown;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Customer's address.
|
|
340
|
+
*/
|
|
341
|
+
type Address = {
|
|
342
|
+
/**
|
|
343
|
+
* Customer's name.
|
|
344
|
+
*/
|
|
345
|
+
contactName: string;
|
|
346
|
+
/**
|
|
347
|
+
* Company name.
|
|
348
|
+
*/
|
|
32
349
|
companyName?: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
350
|
+
/**
|
|
351
|
+
* Street name.
|
|
352
|
+
*/
|
|
353
|
+
street: string;
|
|
354
|
+
/**
|
|
355
|
+
* Street number.
|
|
356
|
+
*/
|
|
39
357
|
streetNumber?: string;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Street appendix.
|
|
360
|
+
*/
|
|
361
|
+
streetAppendix?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Additional address information.
|
|
364
|
+
*/
|
|
365
|
+
extraLine1?: string;
|
|
366
|
+
/**
|
|
367
|
+
* Additional address information.
|
|
368
|
+
*/
|
|
369
|
+
extraLine2?: string;
|
|
370
|
+
/**
|
|
371
|
+
* Additional address information.
|
|
372
|
+
*/
|
|
373
|
+
extraLine3?: string;
|
|
374
|
+
/**
|
|
375
|
+
* Additional address information.
|
|
376
|
+
*/
|
|
377
|
+
extraLine4?: string;
|
|
378
|
+
/**
|
|
379
|
+
* Customer's address - zip code.
|
|
380
|
+
*/
|
|
381
|
+
zipCode: string;
|
|
382
|
+
/**
|
|
383
|
+
* City name.
|
|
384
|
+
*/
|
|
385
|
+
city: string;
|
|
386
|
+
/**
|
|
387
|
+
* State name.
|
|
388
|
+
*/
|
|
389
|
+
state?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Country name.
|
|
392
|
+
*/
|
|
393
|
+
country: string;
|
|
394
|
+
/**
|
|
395
|
+
* Customer's contact phone.
|
|
396
|
+
*/
|
|
397
|
+
contactPhone?: string;
|
|
398
|
+
metadata?: MixinsMetadata & {
|
|
399
|
+
[key: string]: unknown;
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* Additional address information.
|
|
403
|
+
*/
|
|
404
|
+
mixins?: {
|
|
405
|
+
[key: string]: unknown;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
/**
|
|
409
|
+
* Payment details.
|
|
410
|
+
*/
|
|
411
|
+
type Payment = {
|
|
412
|
+
/**
|
|
413
|
+
* Payment method.
|
|
414
|
+
*/
|
|
415
|
+
method: string;
|
|
416
|
+
/**
|
|
417
|
+
* Payment status.
|
|
418
|
+
*/
|
|
419
|
+
status?: PaymentStatus;
|
|
420
|
+
/**
|
|
421
|
+
* Payment response.
|
|
422
|
+
*/
|
|
423
|
+
paymentResponse?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Paid amount.
|
|
426
|
+
*/
|
|
427
|
+
paidAmount: number;
|
|
428
|
+
/**
|
|
429
|
+
* Refund amount.
|
|
430
|
+
*/
|
|
431
|
+
refundAmount?: number;
|
|
432
|
+
/**
|
|
433
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
434
|
+
*/
|
|
435
|
+
currency: string;
|
|
436
|
+
/**
|
|
437
|
+
* The ID of the payment transaction.
|
|
438
|
+
*/
|
|
47
439
|
transactionId?: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
440
|
+
/**
|
|
441
|
+
* Redirect url.
|
|
442
|
+
*/
|
|
443
|
+
redirectUrl?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Authorized amount.
|
|
446
|
+
*/
|
|
447
|
+
authorizedAmount?: number;
|
|
448
|
+
/**
|
|
449
|
+
* Payment provider.
|
|
450
|
+
*/
|
|
451
|
+
provider?: string;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* Shipping details.
|
|
455
|
+
*/
|
|
456
|
+
type Shipping = {
|
|
457
|
+
/**
|
|
458
|
+
* Total shipping amount.
|
|
459
|
+
*/
|
|
460
|
+
total: {
|
|
461
|
+
/**
|
|
462
|
+
* Shipping amount.
|
|
463
|
+
*/
|
|
464
|
+
amount?: number;
|
|
465
|
+
/**
|
|
466
|
+
* Currency of the shipping amount.
|
|
467
|
+
*/
|
|
468
|
+
currency?: string;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Shipping line list.
|
|
472
|
+
*/
|
|
473
|
+
lines?: Array<ShippingLine>;
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* Shipping line.
|
|
477
|
+
*/
|
|
478
|
+
type ShippingLine = {
|
|
479
|
+
/**
|
|
480
|
+
* Shipping line amount.
|
|
481
|
+
*/
|
|
482
|
+
amount?: number;
|
|
483
|
+
/**
|
|
484
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
485
|
+
*/
|
|
486
|
+
currency?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Shipping line code.
|
|
489
|
+
*/
|
|
490
|
+
code: string;
|
|
491
|
+
/**
|
|
492
|
+
* Shipping line name.
|
|
493
|
+
*/
|
|
494
|
+
name?: string;
|
|
495
|
+
/**
|
|
496
|
+
* Shipping line name in a form of a map of translations.
|
|
497
|
+
*/
|
|
498
|
+
localizedName?: {
|
|
499
|
+
[key: string]: string;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Shipping line discount.
|
|
503
|
+
*/
|
|
504
|
+
discounts?: Array<Discount>;
|
|
505
|
+
tax?: ShippingTax;
|
|
506
|
+
link?: Reference;
|
|
507
|
+
shippingTaxCode?: string;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* Shippment details.
|
|
511
|
+
*/
|
|
512
|
+
type Shipment = {
|
|
513
|
+
/**
|
|
514
|
+
* Shipped date.
|
|
515
|
+
*/
|
|
516
|
+
shippedDate: string;
|
|
517
|
+
/**
|
|
518
|
+
* Carrier.
|
|
519
|
+
*/
|
|
520
|
+
carrier: string;
|
|
521
|
+
/**
|
|
522
|
+
* Tracking number.
|
|
523
|
+
*/
|
|
51
524
|
trackingNumber?: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
525
|
+
/**
|
|
526
|
+
* Expected delivery date.
|
|
527
|
+
*/
|
|
528
|
+
expectDeliveryOn?: string;
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* Tax details.
|
|
532
|
+
*/
|
|
533
|
+
type Tax = {
|
|
534
|
+
lines?: Array<TaxLine>;
|
|
535
|
+
total: TaxTotal;
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* Tax details.
|
|
539
|
+
*/
|
|
540
|
+
type ShippingTax = {
|
|
541
|
+
lines?: Array<TaxLine>;
|
|
542
|
+
total: TaxTotal;
|
|
543
|
+
/**
|
|
544
|
+
* The rate of the shipping tax
|
|
545
|
+
*/
|
|
546
|
+
rate?: number;
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* Tax line details.
|
|
550
|
+
*/
|
|
551
|
+
type TaxLine = {
|
|
552
|
+
/**
|
|
553
|
+
* Tax line amount.
|
|
554
|
+
*/
|
|
56
555
|
amount: number;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
createdAt: string;
|
|
61
|
-
modifiedAt: string;
|
|
62
|
-
mixins?: Record<string, unknown>;
|
|
63
|
-
}
|
|
64
|
-
interface Order {
|
|
65
|
-
id: string;
|
|
66
|
-
orderNumber: string;
|
|
67
|
-
status: OrderStatus;
|
|
556
|
+
/**
|
|
557
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
558
|
+
*/
|
|
68
559
|
currency: string;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
560
|
+
/**
|
|
561
|
+
* Tax code.
|
|
562
|
+
*/
|
|
563
|
+
code?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Tax name.
|
|
566
|
+
*/
|
|
567
|
+
name?: string;
|
|
568
|
+
/**
|
|
569
|
+
* Tax rate.
|
|
570
|
+
*/
|
|
571
|
+
rate?: number;
|
|
572
|
+
/**
|
|
573
|
+
* Order's taxable amount.
|
|
574
|
+
*/
|
|
575
|
+
taxable?: number;
|
|
576
|
+
/**
|
|
577
|
+
* Sequence ID.
|
|
578
|
+
*/
|
|
579
|
+
sequenceId: number;
|
|
580
|
+
/**
|
|
581
|
+
* Inclusive flag.
|
|
582
|
+
*/
|
|
583
|
+
inclusive: boolean;
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* The tax total tax amount.
|
|
587
|
+
*/
|
|
588
|
+
type TaxTotal = {
|
|
589
|
+
/**
|
|
590
|
+
* Total tax amount.
|
|
591
|
+
*/
|
|
592
|
+
amount: number;
|
|
593
|
+
/**
|
|
594
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
595
|
+
*/
|
|
596
|
+
currency: string;
|
|
597
|
+
/**
|
|
598
|
+
* Total tax inclusive flag.
|
|
599
|
+
*/
|
|
600
|
+
inclusive: boolean;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Product details.
|
|
604
|
+
*/
|
|
605
|
+
type Product = {
|
|
606
|
+
/**
|
|
607
|
+
* Unique identifier of a product.
|
|
608
|
+
*/
|
|
609
|
+
id?: string;
|
|
610
|
+
/**
|
|
611
|
+
* Product sku.
|
|
612
|
+
*/
|
|
613
|
+
sku?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Unique code of a product.
|
|
616
|
+
*/
|
|
617
|
+
code?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Unique name of a product.
|
|
620
|
+
*/
|
|
621
|
+
name?: string;
|
|
622
|
+
/**
|
|
623
|
+
* A product's name represented as a map, with language as the key and the corresponding translated name as the value
|
|
624
|
+
*/
|
|
625
|
+
localizedName?: {
|
|
626
|
+
[key: string]: string;
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* Product description.
|
|
630
|
+
*/
|
|
631
|
+
description?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Product published flag.
|
|
634
|
+
*/
|
|
635
|
+
published?: boolean;
|
|
636
|
+
/**
|
|
637
|
+
* Type of the product (BASIC, VARIANT, BUNDLE).
|
|
638
|
+
*/
|
|
639
|
+
productType?: 'BASIC' | 'VARIANT' | 'BUNDLE';
|
|
640
|
+
/**
|
|
641
|
+
* The collection of products assigned to the bundle.
|
|
642
|
+
*/
|
|
643
|
+
bundledProducts?: Array<BundleProduct>;
|
|
644
|
+
/**
|
|
645
|
+
* Product images.
|
|
646
|
+
*/
|
|
647
|
+
images?: Array<Media>;
|
|
648
|
+
vendor?: Vendor;
|
|
649
|
+
/**
|
|
650
|
+
* Product additional information.
|
|
651
|
+
*/
|
|
652
|
+
mixins?: {
|
|
653
|
+
[key: string]: unknown;
|
|
654
|
+
};
|
|
655
|
+
metadata?: MixinsMetadata & {
|
|
656
|
+
[key: string]: unknown;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
/**
|
|
660
|
+
* Represents the product used in a bundle.
|
|
661
|
+
*/
|
|
662
|
+
type BundleProduct = {
|
|
663
|
+
/**
|
|
664
|
+
* The number of given products assigned to the bundle.
|
|
665
|
+
*/
|
|
666
|
+
amount?: number;
|
|
667
|
+
/**
|
|
668
|
+
* Id of the product assigned to the bundle.
|
|
669
|
+
*/
|
|
670
|
+
productId?: string;
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* Price details.
|
|
674
|
+
*/
|
|
675
|
+
type Price = {
|
|
676
|
+
/**
|
|
677
|
+
* Id of the price related to order entry.
|
|
678
|
+
*/
|
|
679
|
+
priceId?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Identifier of price list. The field should be populated only in case when the returned prices belongs to any price list.
|
|
682
|
+
*/
|
|
683
|
+
priceListId?: string;
|
|
684
|
+
/**
|
|
685
|
+
* Effective amount is a calculated average item price after a discount.
|
|
686
|
+
*/
|
|
687
|
+
effectiveAmount?: number;
|
|
688
|
+
/**
|
|
689
|
+
* Oryginal amount is a price set by the merchant.
|
|
690
|
+
*/
|
|
691
|
+
originalAmount?: number;
|
|
692
|
+
/**
|
|
693
|
+
* Currency of the entry price.
|
|
694
|
+
*/
|
|
695
|
+
currency?: string;
|
|
696
|
+
salePrice?: SalePrice & {
|
|
697
|
+
[key: string]: unknown;
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* The media.
|
|
702
|
+
*/
|
|
703
|
+
type Media = {
|
|
704
|
+
/**
|
|
705
|
+
* Unique identifier of a media file.
|
|
706
|
+
*/
|
|
707
|
+
id?: string;
|
|
708
|
+
/**
|
|
709
|
+
* Media URL.
|
|
710
|
+
*/
|
|
711
|
+
url?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Media stored flag.
|
|
714
|
+
*/
|
|
715
|
+
stored?: boolean;
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* The sale price.
|
|
719
|
+
*/
|
|
720
|
+
type SalePrice = {
|
|
721
|
+
/**
|
|
722
|
+
* Amount of the discount for sale price promotion.
|
|
723
|
+
*/
|
|
724
|
+
discountAmount?: number;
|
|
725
|
+
/**
|
|
726
|
+
* Rate of the discount for sale price promotion.
|
|
727
|
+
*/
|
|
728
|
+
discountRate?: number;
|
|
729
|
+
/**
|
|
730
|
+
* The sale price description.
|
|
731
|
+
*/
|
|
732
|
+
description?: string;
|
|
733
|
+
};
|
|
734
|
+
/**
|
|
735
|
+
* Product Metadata
|
|
736
|
+
*/
|
|
737
|
+
type MixinsMetadata = {
|
|
738
|
+
/**
|
|
739
|
+
* A key-value map of mixins, where the mixin name is a key and schema url is a value
|
|
740
|
+
*/
|
|
741
|
+
mixins?: {
|
|
742
|
+
[key: string]: unknown;
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* The document version number.
|
|
746
|
+
*/
|
|
747
|
+
version?: number;
|
|
748
|
+
[key: string]: unknown | {
|
|
749
|
+
[key: string]: unknown;
|
|
750
|
+
} | number | undefined;
|
|
751
|
+
};
|
|
752
|
+
/**
|
|
753
|
+
* The entry measurement unit
|
|
754
|
+
*/
|
|
755
|
+
type MeasurementUnit = {
|
|
756
|
+
/**
|
|
757
|
+
* Code of the unit, like `kg` or `l`.
|
|
758
|
+
*/
|
|
759
|
+
unit?: string;
|
|
760
|
+
/**
|
|
761
|
+
* Quantity of given unit.
|
|
762
|
+
*/
|
|
763
|
+
value: number;
|
|
764
|
+
};
|
|
765
|
+
type Vendor = {
|
|
766
|
+
/**
|
|
767
|
+
* An identifier of a vendor
|
|
768
|
+
*/
|
|
769
|
+
id: string;
|
|
770
|
+
/**
|
|
771
|
+
* vendor name
|
|
772
|
+
*/
|
|
773
|
+
name?: string;
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* The base order fields. This object is inherited by all of other order objects as Order Creation DTO, Order Update DTO etc.
|
|
777
|
+
*/
|
|
778
|
+
type OrderCommonDto = {
|
|
779
|
+
restriction?: Restriction;
|
|
780
|
+
/**
|
|
781
|
+
* @deprecated
|
|
782
|
+
*/
|
|
783
|
+
feeYrnAggregate?: AggregateFee & {
|
|
784
|
+
[key: string]: unknown;
|
|
785
|
+
};
|
|
786
|
+
status?: OrderStatus;
|
|
787
|
+
/**
|
|
788
|
+
* The identifier of a cart that was used to create this order.
|
|
789
|
+
*/
|
|
790
|
+
cartId?: string;
|
|
791
|
+
vendor?: Vendor;
|
|
792
|
+
orderType?: SplitOrderType;
|
|
793
|
+
/**
|
|
794
|
+
* The identifier of a master order. Available on suborders that have been created after splitting the master order.
|
|
795
|
+
*/
|
|
796
|
+
masterOrder?: string;
|
|
797
|
+
splitInfo?: SplitInfo;
|
|
798
|
+
/**
|
|
799
|
+
* A list of string IDs for suborders created after a split. Available only on the master order from which the split originated.
|
|
800
|
+
*/
|
|
801
|
+
subOrders?: Array<unknown>;
|
|
802
|
+
/**
|
|
803
|
+
* Ordered item list.
|
|
804
|
+
*/
|
|
805
|
+
entries: Array<OrderEntry>;
|
|
806
|
+
/**
|
|
807
|
+
* Discount list.
|
|
808
|
+
*/
|
|
809
|
+
discounts?: Array<Discount>;
|
|
810
|
+
customer: Customer;
|
|
811
|
+
/**
|
|
812
|
+
* Site's unique identifier. A site is a specific shop.
|
|
813
|
+
*/
|
|
81
814
|
siteCode?: string;
|
|
815
|
+
/**
|
|
816
|
+
* Two-letter country code, compliant with the ISO 3166 standard.
|
|
817
|
+
*/
|
|
818
|
+
countryCode?: string;
|
|
819
|
+
billingAddress?: Address;
|
|
820
|
+
shippingAddress?: Address;
|
|
821
|
+
/**
|
|
822
|
+
* Payment list.
|
|
823
|
+
*/
|
|
824
|
+
payments?: Array<Payment>;
|
|
825
|
+
/**
|
|
826
|
+
* @deprecated
|
|
827
|
+
*/
|
|
828
|
+
shipping?: Shipping & {
|
|
829
|
+
[key: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
/**
|
|
832
|
+
* @deprecated
|
|
833
|
+
*/
|
|
834
|
+
tax?: Tax & {
|
|
835
|
+
[key: string]: unknown;
|
|
836
|
+
};
|
|
837
|
+
/**
|
|
838
|
+
* Order sub total price. **This field is deprecated**. Please use `calculatedPrice.price` or `calculatedPrice.discountedPrice` instead. These fields provide the same value with updated functionality.
|
|
839
|
+
* @deprecated
|
|
840
|
+
*/
|
|
841
|
+
subTotalPrice?: number;
|
|
842
|
+
/**
|
|
843
|
+
* Order total price. **This field is deprecated**. Please use `calculatedPrice.finalPrice` instead. The `calculatedPrice.finalPrice` field provides the same value with updated functionality.
|
|
844
|
+
* @deprecated
|
|
845
|
+
*/
|
|
846
|
+
totalPrice?: number;
|
|
847
|
+
/**
|
|
848
|
+
* The amount that should be authorized with payment provider. It's a sum of `calculatedPrice.finalPrice.grossValue` and `calculatedPrice.upliftValue.grossValue`.
|
|
849
|
+
*/
|
|
850
|
+
totalAuthorizedAmount?: number;
|
|
851
|
+
/**
|
|
852
|
+
* Three-letter currency code, compliant with the ISO 4217 standard.
|
|
853
|
+
*/
|
|
854
|
+
currency?: string;
|
|
855
|
+
/**
|
|
856
|
+
* Order cycle date.
|
|
857
|
+
*
|
|
858
|
+
* ***NOTE***
|
|
859
|
+
* This attribute is DEPRECATED, please use the `deliveryWindow.deliveryCycle` attribute
|
|
860
|
+
* @deprecated
|
|
861
|
+
*/
|
|
862
|
+
orderCycle?: string;
|
|
863
|
+
/**
|
|
864
|
+
* Delivery window's unique identifier.
|
|
865
|
+
*
|
|
866
|
+
* ***NOTE***
|
|
867
|
+
* This attribute is DEPRECATED, please use the `deliveryWindow.id` attribute
|
|
868
|
+
* @deprecated
|
|
869
|
+
*/
|
|
870
|
+
deliveryWindowId?: string;
|
|
871
|
+
deliveryWindow?: DeliveryWindow;
|
|
872
|
+
metadata?: MetadataMixins;
|
|
873
|
+
mixins?: {
|
|
874
|
+
[key: string]: unknown;
|
|
875
|
+
};
|
|
876
|
+
calculatedPrice: OrderCalculatedPrice & {
|
|
877
|
+
[key: string]: unknown;
|
|
878
|
+
};
|
|
879
|
+
/**
|
|
880
|
+
* The identifier of the legal entity on whose behalf the order was placed.
|
|
881
|
+
*/
|
|
82
882
|
legalEntityId?: string;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
status: OrderStatus;
|
|
90
|
-
comment?: string;
|
|
91
|
-
}
|
|
92
|
-
interface SalesOrderPatch {
|
|
883
|
+
};
|
|
884
|
+
type Order = {
|
|
885
|
+
/**
|
|
886
|
+
* Order's unique identifier.
|
|
887
|
+
*/
|
|
888
|
+
id?: string;
|
|
93
889
|
status?: OrderStatus;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
890
|
+
/**
|
|
891
|
+
* Order's creation date.
|
|
892
|
+
*/
|
|
893
|
+
created?: string;
|
|
894
|
+
/**
|
|
895
|
+
* Order's completion date.
|
|
896
|
+
*/
|
|
897
|
+
completed?: string;
|
|
898
|
+
/**
|
|
899
|
+
* Order last status change date.
|
|
900
|
+
*/
|
|
901
|
+
lastStatusChange?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Shipment list.
|
|
904
|
+
*/
|
|
905
|
+
shipments?: Array<Shipment>;
|
|
906
|
+
} & OrderCommonDto;
|
|
907
|
+
type SalesOrder = {
|
|
908
|
+
/**
|
|
909
|
+
* Order's unique identifier.
|
|
910
|
+
*/
|
|
911
|
+
id?: string;
|
|
912
|
+
/**
|
|
913
|
+
* Identifier of the quote from which the order has been created
|
|
914
|
+
*/
|
|
915
|
+
quoteId?: string;
|
|
916
|
+
/**
|
|
917
|
+
* Order's creator name.
|
|
918
|
+
*/
|
|
919
|
+
createdBy?: string;
|
|
920
|
+
assistedBuying?: AssistedBuying;
|
|
921
|
+
/**
|
|
922
|
+
* Indicates whether this order was created through checkout. Available in tenant-managed responses only.
|
|
923
|
+
*
|
|
924
|
+
* When set to `true`, only one order can be created per cart ID — enforcing that a checkout cart results in a single order.
|
|
925
|
+
* Orders created through the checkout flow have this flag set to `true` by default.
|
|
926
|
+
*
|
|
927
|
+
*/
|
|
928
|
+
checkout?: boolean;
|
|
929
|
+
} & OrderUpdateDto;
|
|
930
|
+
type OrderUpdateDto = {
|
|
931
|
+
channel?: Channel;
|
|
932
|
+
/**
|
|
933
|
+
* Order's creation date.
|
|
934
|
+
*/
|
|
935
|
+
created?: string;
|
|
936
|
+
/**
|
|
937
|
+
* Order's completion date.
|
|
938
|
+
*/
|
|
939
|
+
completed?: string;
|
|
940
|
+
/**
|
|
941
|
+
* Order last status change date.
|
|
942
|
+
*/
|
|
943
|
+
lastStatusChange?: string;
|
|
944
|
+
/**
|
|
945
|
+
* Shipment list.
|
|
946
|
+
*/
|
|
947
|
+
shipments?: Array<Shipment>;
|
|
948
|
+
} & OrderCommonDto;
|
|
949
|
+
/**
|
|
950
|
+
* Status of the order. Supported order statuses are `IN_CHECKOUT`, `CREATED`, `CONFIRMED`, `DECLINED`, `SHIPPED`, `COMPLETED`'. Customers can only change the order status from `CREATED` to `DECLINED`.
|
|
951
|
+
*/
|
|
952
|
+
type OrderStatus = 'IN_CHECKOUT' | 'CREATED' | 'CONFIRMED' | 'DECLINED' | 'SHIPPED' | 'COMPLETED';
|
|
953
|
+
/**
|
|
954
|
+
* Available on orders that have been split. For standard orders, the value is `null`. For the original order that was split, the value is `MASTER_ORDER`s, and for the created suborders, the value is `SUB_ORDER`.
|
|
955
|
+
*/
|
|
956
|
+
type SplitOrderType = 'MASTER_ORDER' | 'SUB_ORDER';
|
|
957
|
+
/**
|
|
958
|
+
* Specifies the criteria used to split a master order into suborders. Currently, only `VENDOR_ID` is supported.
|
|
959
|
+
*/
|
|
960
|
+
type SplitBy = 'VENDOR_ID';
|
|
961
|
+
/**
|
|
962
|
+
* Information about how the order was split from the master order.
|
|
963
|
+
*/
|
|
964
|
+
type SplitInfo = {
|
|
965
|
+
splitBy?: SplitBy;
|
|
966
|
+
/**
|
|
967
|
+
* A unique value used to split the entries of a master order into separate suborders. Available only on suborders that had uniqueValue for the split. Not available on master order.
|
|
968
|
+
*/
|
|
969
|
+
uniqueValue?: string;
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* Status of the payment.
|
|
973
|
+
*/
|
|
974
|
+
type PaymentStatus = 'PENDING' | 'AUTHORIZATION_SUCCESS' | 'AUTHORIZATION_FAILURE' | 'CAPTURE_SUCCESS' | 'CAPTURE_FAILURE' | 'SUCCESS' | 'FAILURE' | 'CANCELLATION_SUCCESS' | 'CANCELLATION_FAILURE' | 'REFUND_SUCCESS' | 'REFUND_FAILURE';
|
|
975
|
+
/**
|
|
976
|
+
* Order status transition.
|
|
977
|
+
*/
|
|
978
|
+
type Transition = {
|
|
979
|
+
status?: OrderStatus;
|
|
980
|
+
};
|
|
981
|
+
type MetadataMixins = {
|
|
982
|
+
mixins?: {
|
|
983
|
+
[key: string]: unknown;
|
|
99
984
|
};
|
|
100
|
-
|
|
985
|
+
version?: number;
|
|
986
|
+
[key: string]: unknown | {
|
|
987
|
+
[key: string]: unknown;
|
|
988
|
+
} | number | undefined;
|
|
989
|
+
};
|
|
990
|
+
/**
|
|
991
|
+
* In YaaS, a global resource identifier is a Uniform Resource Name (URN) with a custom YaaS schema and is called a YaaS Resource Name, or YRN.
|
|
992
|
+
*
|
|
993
|
+
* It is a unique identifier, which stores information about a resource, such as its type, ID or name of the tenant.
|
|
994
|
+
*/
|
|
995
|
+
type Yrn = string;
|
|
996
|
+
type AssistedBuyingEntry = {
|
|
997
|
+
/**
|
|
998
|
+
* Identifier of an employee who performed an action on behalf of a customer.
|
|
999
|
+
*/
|
|
1000
|
+
employeeId?: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* 'Indicates an operation type done by an employee on behalf of a customer. Available options: `CREATE` and `UPDATE_STATUS`'
|
|
1003
|
+
*/
|
|
1004
|
+
operation?: 'CREATE' | 'UPDATE_STATUS';
|
|
1005
|
+
/**
|
|
1006
|
+
* Indicates a timestamp when an operation was performed.
|
|
1007
|
+
*/
|
|
1008
|
+
timestamp?: string;
|
|
1009
|
+
};
|
|
1010
|
+
/**
|
|
1011
|
+
* The field is populated only if an assisted buying operation was performed. The field is read-only. There is no possibility to update it by PUT/PATCH operation.
|
|
1012
|
+
*/
|
|
1013
|
+
type AssistedBuying = {
|
|
1014
|
+
/**
|
|
1015
|
+
* List of operations done by an employee on behalf of a customer.
|
|
1016
|
+
*/
|
|
1017
|
+
entries?: Array<AssistedBuyingEntry>;
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* A breakdown of the total price calculated from all line items, including detailed pricing components.
|
|
1021
|
+
*/
|
|
1022
|
+
type OrderCalculatedPrice = {
|
|
1023
|
+
price?: CalculatedPrice & {
|
|
1024
|
+
/**
|
|
1025
|
+
* Net value of the price, price without tax.
|
|
1026
|
+
*/
|
|
1027
|
+
netValue?: number;
|
|
1028
|
+
/**
|
|
1029
|
+
* Gross value of the price, price with tax.
|
|
1030
|
+
*/
|
|
1031
|
+
grossValue?: number;
|
|
1032
|
+
/**
|
|
1033
|
+
* Tax value of the price, it's the actual amount of tax that has to be paid.
|
|
1034
|
+
*/
|
|
1035
|
+
taxValue?: number;
|
|
1036
|
+
/**
|
|
1037
|
+
* Tax code applied to the price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1038
|
+
*/
|
|
1039
|
+
taxCode?: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* Tax rate applied to the price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1042
|
+
*/
|
|
1043
|
+
taxRate?: number;
|
|
1044
|
+
};
|
|
1045
|
+
upliftValue?: CalculatedPrice & {
|
|
1046
|
+
/**
|
|
1047
|
+
* Net value of the uplift amount, value without tax.
|
|
1048
|
+
*/
|
|
1049
|
+
netValue?: number;
|
|
1050
|
+
/**
|
|
1051
|
+
* Gross value of the uplift amount, value with tax.
|
|
1052
|
+
*/
|
|
1053
|
+
grossValue?: number;
|
|
1054
|
+
/**
|
|
1055
|
+
* Tax value of the uplift amount, it's the actual amount of tax that has to be paid.
|
|
1056
|
+
*/
|
|
1057
|
+
taxValue?: number;
|
|
1058
|
+
/**
|
|
1059
|
+
* Tax code applied to the uplift amount, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1060
|
+
*/
|
|
1061
|
+
taxCode?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1064
|
+
*/
|
|
1065
|
+
taxRate?: number;
|
|
1066
|
+
};
|
|
1067
|
+
discountedPrice?: CalculatedPriceWithDiscounts & {
|
|
1068
|
+
/**
|
|
1069
|
+
* The net value after applying discounts.
|
|
1070
|
+
*/
|
|
1071
|
+
netValue?: number;
|
|
1072
|
+
/**
|
|
1073
|
+
* The gross value after applying discounts.
|
|
1074
|
+
*/
|
|
1075
|
+
grossValue?: number;
|
|
1076
|
+
/**
|
|
1077
|
+
* The difference between `grossValue` and `netValue`.
|
|
1078
|
+
*/
|
|
1079
|
+
taxValue?: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Tax code applied to the discounted price, a tax code is a country's set of tax rules. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1082
|
+
*/
|
|
1083
|
+
taxCode?: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed. If all fees have the same taxRate, then the value is present. Otherwise, the field is not returned.
|
|
1086
|
+
*/
|
|
1087
|
+
taxRate?: number;
|
|
1088
|
+
};
|
|
1089
|
+
/**
|
|
1090
|
+
* The list of payment fees applied to an order. Payment fees are not changed and are not discounted, even when a discount or coupon is applied to the total.
|
|
1091
|
+
*/
|
|
1092
|
+
paymentFees?: Array<CalculatedPaymentFee & {
|
|
1093
|
+
/**
|
|
1094
|
+
* Payment fee identifier.
|
|
1095
|
+
*/
|
|
1096
|
+
id?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Type of the payment fee. PERCENT for the fee’s `feePercentage`` multiplied by sum of line items `finalPrice` plus shipping cost. ABSOLUTE - monetary amount that is assigned to the payment method.
|
|
1099
|
+
*/
|
|
1100
|
+
type?: 'PERCENT' | 'ABSOLUTE' | 'ABSOLUTE_MULTIPLY_ITEMQUANTITY';
|
|
1101
|
+
/**
|
|
1102
|
+
* Calculated price of the fee.
|
|
1103
|
+
*/
|
|
1104
|
+
price?: {
|
|
1105
|
+
/**
|
|
1106
|
+
* The monetary amount of the fee, depending on the fee type. ABSOLUTE for the value of defined fee’s `feeAbsolute.amount` attribute. The amount is treated as `netValue`. PERCENT, when defined on fee level percentage, `feePercentage` attribute, of sum of all item line’s `finalPrice.netValue` plus cart’s `calculatedPrice.totalShipping.netValue`. If the fee is taxable and has a tax code, the gross value is calculated. Otherwise, `grossValue` is equal to `netValue`.
|
|
1107
|
+
*/
|
|
1108
|
+
netValue?: number;
|
|
1109
|
+
/**
|
|
1110
|
+
* For a fee where `taxable=true` and a valid `taxCode` is provided, the tax rate associated with that tax code is used to calculate `grossValue`. If the fee is not taxable, `netValue` is equal to `grossValue`.
|
|
1111
|
+
*/
|
|
1112
|
+
grossValue?: number;
|
|
1113
|
+
/**
|
|
1114
|
+
* Tax value of the payment fee, it's the actual amount of tax that has to be paid.
|
|
1115
|
+
*/
|
|
1116
|
+
taxValue?: number;
|
|
1117
|
+
/**
|
|
1118
|
+
* If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the `taxCode` provided at the fee level. A taxable fee must have a defined `taxCode`.
|
|
1119
|
+
*/
|
|
1120
|
+
taxRate?: number;
|
|
1121
|
+
/**
|
|
1122
|
+
* The tax code defined at the fee level, for example STANDARD. The value must correspond to the available tax codes in the system configuration.
|
|
1123
|
+
*/
|
|
1124
|
+
taxCode?: string;
|
|
1125
|
+
};
|
|
1126
|
+
}>;
|
|
1127
|
+
fees?: CalculatedPrice & {
|
|
1128
|
+
[key: string]: unknown;
|
|
1129
|
+
};
|
|
1130
|
+
totalFee?: CalculatedPriceWithDiscounts & {
|
|
1131
|
+
/**
|
|
1132
|
+
* Net value of the total fee, value without tax.
|
|
1133
|
+
*/
|
|
1134
|
+
netValue?: number;
|
|
1135
|
+
/**
|
|
1136
|
+
* Gross value of the total fee, value with tax.
|
|
1137
|
+
*/
|
|
1138
|
+
grossValue?: number;
|
|
1139
|
+
/**
|
|
1140
|
+
* Tax value of the total fee, it's the actual amount of tax that has to be paid.
|
|
1141
|
+
*/
|
|
1142
|
+
taxValue?: number;
|
|
1143
|
+
/**
|
|
1144
|
+
* If all fees have the same `taxCode` defined, resulting in the same `taxRate`, the value is present. Otherwise, the field is not returned in the response.
|
|
1145
|
+
*/
|
|
1146
|
+
taxRate?: number;
|
|
1147
|
+
/**
|
|
1148
|
+
* If all fees have the same `taxCode` defined, the value is present. Otherwise, the field is not returned in the response.
|
|
1149
|
+
*/
|
|
1150
|
+
taxCode?: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* A list of discounts applied to on the line item fees. The payment fee itself is not discountable.
|
|
1153
|
+
*/
|
|
1154
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1155
|
+
/**
|
|
1156
|
+
* Discount identifier.
|
|
1157
|
+
*/
|
|
1158
|
+
id?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* The sum of all `lines[].calculatedPrice.totalFee[].appliedDiscounts[].value` grouped by `discount.id`.
|
|
1161
|
+
*/
|
|
1162
|
+
value?: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* PERCENT for percentage discounts and ABSOLUTE for amount applied to the fee.
|
|
1165
|
+
*/
|
|
1166
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1167
|
+
}>;
|
|
1168
|
+
};
|
|
1169
|
+
totalDiscount?: CalculatedTotalDiscount & {
|
|
1170
|
+
/**
|
|
1171
|
+
* Indicates whether discounts were applied to net or gross values.
|
|
1172
|
+
*/
|
|
1173
|
+
calculationType?: 'ApplyDiscountBeforeTax' | 'ApplyDiscountAfterTax';
|
|
1174
|
+
/**
|
|
1175
|
+
* Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`.
|
|
1176
|
+
*/
|
|
1177
|
+
value?: number;
|
|
1178
|
+
/**
|
|
1179
|
+
* A list of the applied discounts.
|
|
1180
|
+
*/
|
|
1181
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1182
|
+
/**
|
|
1183
|
+
* Discount identifier.
|
|
1184
|
+
*/
|
|
1185
|
+
id?: string;
|
|
1186
|
+
/**
|
|
1187
|
+
* The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID.
|
|
1188
|
+
*/
|
|
1189
|
+
value?: number;
|
|
1190
|
+
/**
|
|
1191
|
+
* PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted.
|
|
1192
|
+
*/
|
|
1193
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1194
|
+
}>;
|
|
1195
|
+
};
|
|
1196
|
+
shipping?: CalculatedPrice & {
|
|
1197
|
+
[key: string]: unknown;
|
|
1198
|
+
};
|
|
1199
|
+
totalShipping?: CalculatedPriceWithDiscounts & {
|
|
1200
|
+
/**
|
|
1201
|
+
* The net value after applying discounts.
|
|
1202
|
+
*/
|
|
1203
|
+
netValue?: number;
|
|
1204
|
+
/**
|
|
1205
|
+
* The gross value after applying discounts.
|
|
1206
|
+
*/
|
|
1207
|
+
grossValue?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* The difference between `grossValue` and `netValue`.
|
|
1210
|
+
*/
|
|
1211
|
+
taxValue?: number;
|
|
1212
|
+
/**
|
|
1213
|
+
* Tax code applied to the shipping cost, a tax code is a country's set of tax rules.
|
|
1214
|
+
*/
|
|
1215
|
+
taxCode?: string;
|
|
1216
|
+
/**
|
|
1217
|
+
* Tax rate applied to the shipping cost, it's the percentage at which an individual or business is taxed.
|
|
1218
|
+
*/
|
|
1219
|
+
taxRate?: number;
|
|
1220
|
+
/**
|
|
1221
|
+
* A list of discounts applied to shipping.
|
|
1222
|
+
*/
|
|
1223
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1224
|
+
/**
|
|
1225
|
+
* Discount identifier.
|
|
1226
|
+
*/
|
|
1227
|
+
id?: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* Value of the discount that was applied.
|
|
1230
|
+
*/
|
|
1231
|
+
value?: number;
|
|
1232
|
+
/**
|
|
1233
|
+
* PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item.
|
|
1234
|
+
*/
|
|
1235
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1236
|
+
}>;
|
|
1237
|
+
};
|
|
1238
|
+
finalPrice?: CalculatedPriceWithTaxAggregate & {
|
|
1239
|
+
/**
|
|
1240
|
+
* The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`.
|
|
1241
|
+
*/
|
|
1242
|
+
netValue?: number;
|
|
1243
|
+
/**
|
|
1244
|
+
* The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`.
|
|
1245
|
+
*/
|
|
1246
|
+
grossValue?: number;
|
|
1247
|
+
/**
|
|
1248
|
+
* The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices.
|
|
1249
|
+
*/
|
|
1250
|
+
taxValue?: number;
|
|
1251
|
+
/**
|
|
1252
|
+
* If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response.
|
|
1253
|
+
*/
|
|
1254
|
+
taxRate?: number;
|
|
1255
|
+
/**
|
|
1256
|
+
* The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty.
|
|
1257
|
+
*/
|
|
1258
|
+
taxCode?: string;
|
|
1259
|
+
taxAggregate?: {
|
|
1260
|
+
lines?: CalculatedPrice & {
|
|
1261
|
+
/**
|
|
1262
|
+
* Net value of the tax, value without tax.
|
|
1263
|
+
*/
|
|
1264
|
+
netValue?: number;
|
|
1265
|
+
/**
|
|
1266
|
+
* Gross value of the tax, value with tax.
|
|
1267
|
+
*/
|
|
1268
|
+
grossValue?: number;
|
|
1269
|
+
/**
|
|
1270
|
+
* Tax value of the tax, it's the actual amount of tax that has to be paid.
|
|
1271
|
+
*/
|
|
1272
|
+
taxValue?: number;
|
|
1273
|
+
/**
|
|
1274
|
+
* Tax code applied to the tax, a tax code is a country's set of tax rules.
|
|
1275
|
+
*/
|
|
1276
|
+
taxCode?: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* Tax rate applied to the tax, it's the percentage at which an individual or business is taxed.
|
|
1279
|
+
*/
|
|
1280
|
+
taxRate?: number;
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
/**
|
|
1286
|
+
* A price calculation model containing net and gross amounts along with their associated tax details.
|
|
1287
|
+
*/
|
|
1288
|
+
type CalculatedPrice = {
|
|
1289
|
+
/**
|
|
1290
|
+
* Net value of the price.
|
|
1291
|
+
*/
|
|
1292
|
+
netValue: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* Gross value of the price.
|
|
1295
|
+
*/
|
|
1296
|
+
grossValue: number;
|
|
1297
|
+
/**
|
|
1298
|
+
* Tax value of the price.
|
|
1299
|
+
*/
|
|
1300
|
+
taxValue: number;
|
|
1301
|
+
/**
|
|
1302
|
+
* Tax code applied to the price.
|
|
1303
|
+
*/
|
|
1304
|
+
taxCode?: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* Tax rate applied to the price.
|
|
1307
|
+
*/
|
|
1308
|
+
taxRate?: number;
|
|
1309
|
+
};
|
|
1310
|
+
type CalculatedPriceWithTaxAggregate = CalculatedPrice & {
|
|
1311
|
+
taxAggregate?: CalculatedTaxAggregate;
|
|
1312
|
+
};
|
|
1313
|
+
/**
|
|
1314
|
+
* Aggregated tax information showing detailed tax calculations
|
|
1315
|
+
*/
|
|
1316
|
+
type CalculatedTaxAggregate = {
|
|
1317
|
+
/**
|
|
1318
|
+
* List of tax calculations grouped by taxCode and taxRate
|
|
1319
|
+
*/
|
|
1320
|
+
lines?: Array<CalculatedPrice>;
|
|
1321
|
+
};
|
|
1322
|
+
type CalculatedFee = {
|
|
1323
|
+
/**
|
|
1324
|
+
* Unique identifier of the fee.
|
|
1325
|
+
*/
|
|
1326
|
+
id?: string;
|
|
1327
|
+
/**
|
|
1328
|
+
* Type of the fee.
|
|
1329
|
+
*/
|
|
1330
|
+
type?: 'PERCENT' | 'ABSOLUTE' | 'ABSOLUTE_MULTIPLY_ITEMQUANTITY';
|
|
1331
|
+
/**
|
|
1332
|
+
* Localized names of the fee.
|
|
1333
|
+
*/
|
|
1334
|
+
name?: {
|
|
1335
|
+
[key: string]: string;
|
|
1336
|
+
};
|
|
1337
|
+
/**
|
|
1338
|
+
* origin of the fee, `INTERNAL` defined in commerce engine, `EXTERNAL` specified when item is added to the cart.
|
|
1339
|
+
*/
|
|
1340
|
+
origin?: 'INTERNAL' | 'EXTERNAL';
|
|
1341
|
+
price?: CalculatedPrice;
|
|
1342
|
+
discountedPrice?: CalculatedPriceWithDiscounts;
|
|
1343
|
+
};
|
|
1344
|
+
type CalculatedPaymentFee = {
|
|
1345
|
+
/**
|
|
1346
|
+
* Unique identifier of the fee.
|
|
1347
|
+
*/
|
|
1348
|
+
id?: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* Type of the fee.
|
|
1351
|
+
*/
|
|
1352
|
+
type?: 'PERCENT' | 'ABSOLUTE' | 'ABSOLUTE_MULTIPLY_ITEMQUANTITY';
|
|
1353
|
+
/**
|
|
1354
|
+
* Localized names of the fee.
|
|
1355
|
+
*/
|
|
1356
|
+
name?: {
|
|
1357
|
+
[key: string]: string;
|
|
1358
|
+
};
|
|
1359
|
+
price?: CalculatedPrice;
|
|
1360
|
+
};
|
|
1361
|
+
type CalculatedPriceWithDiscounts = CalculatedPrice & {
|
|
1362
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount>;
|
|
1363
|
+
};
|
|
1364
|
+
type CalculatedAppliedDiscount = {
|
|
1365
|
+
/**
|
|
1366
|
+
* The ID of the applied discount.
|
|
1367
|
+
*/
|
|
1368
|
+
id?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* The calculated value of the discount.
|
|
1371
|
+
*/
|
|
1372
|
+
value?: number;
|
|
1373
|
+
price?: CalculatedPrice & {
|
|
1374
|
+
[key: string]: unknown;
|
|
1375
|
+
};
|
|
1376
|
+
/**
|
|
1377
|
+
* The discount type which shows how the discount was calculated.
|
|
1378
|
+
*/
|
|
1379
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1380
|
+
/**
|
|
1381
|
+
* Indicates whether the discount is from internal coupon (INTERNAL) or external discount (EXTERNAL).
|
|
1382
|
+
*/
|
|
1383
|
+
origin?: 'INTERNAL' | 'EXTERNAL';
|
|
1384
|
+
};
|
|
1385
|
+
/**
|
|
1386
|
+
* The total combined value of all applied discounts.
|
|
1387
|
+
*/
|
|
1388
|
+
type CalculatedTotalDiscount = {
|
|
1389
|
+
/**
|
|
1390
|
+
* Indicates whether discounts were calculated using net or gross price values.
|
|
1391
|
+
*/
|
|
1392
|
+
calculationType?: 'ApplyDiscountBeforeTax' | 'ApplyDiscountAfterTax';
|
|
1393
|
+
/**
|
|
1394
|
+
* The calculated amount of all discounts.
|
|
1395
|
+
*/
|
|
1396
|
+
value?: number;
|
|
1397
|
+
price?: CalculatedPrice & {
|
|
1398
|
+
[key: string]: unknown;
|
|
1399
|
+
};
|
|
1400
|
+
/**
|
|
1401
|
+
* All applied discounts that are parts of the sum.
|
|
1402
|
+
*/
|
|
1403
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount>;
|
|
1404
|
+
};
|
|
1405
|
+
type OrderEntryCalculatedPrice = {
|
|
1406
|
+
price?: CalculatedPrice & {
|
|
1407
|
+
[key: string]: unknown;
|
|
1408
|
+
} & {
|
|
1409
|
+
/**
|
|
1410
|
+
* Indicates how the line item price was determined. - `INTERNAL` — Calculated by Emporix using unit price × quantity. - `EXTERNAL` — Provided externally with `lineTax`.
|
|
1411
|
+
*/
|
|
1412
|
+
calculated?: 'INTERNAL' | 'EXTERNAL';
|
|
1413
|
+
};
|
|
1414
|
+
upliftValue?: CalculatedPrice & {
|
|
1415
|
+
/**
|
|
1416
|
+
* Net value of the uplift amount, value without tax.
|
|
1417
|
+
*/
|
|
1418
|
+
netValue?: number;
|
|
1419
|
+
/**
|
|
1420
|
+
* Gross value of the uplift amount, value with tax.
|
|
1421
|
+
*/
|
|
1422
|
+
grossValue?: number;
|
|
1423
|
+
/**
|
|
1424
|
+
* Tax value of the uplift amount, it's the actual amount of tax that has to be paid.
|
|
1425
|
+
*/
|
|
1426
|
+
taxValue?: number;
|
|
1427
|
+
/**
|
|
1428
|
+
* Tax code applied to uplift amount, a tax code is a country's set of tax rules.
|
|
1429
|
+
*/
|
|
1430
|
+
taxCode?: string;
|
|
1431
|
+
/**
|
|
1432
|
+
* Tax rate applied to the uplift amount, it's the percentage at which an individual or business is taxed.
|
|
1433
|
+
*/
|
|
1434
|
+
taxRate?: number;
|
|
1435
|
+
};
|
|
1436
|
+
discountedPrice?: CalculatedPriceWithDiscounts & {
|
|
1437
|
+
/**
|
|
1438
|
+
* The net value after applying discounts, calculated if `includesTax=false`.
|
|
1439
|
+
*/
|
|
1440
|
+
netValue?: number;
|
|
1441
|
+
/**
|
|
1442
|
+
* The gross value after applying discounts, calculated if `includesTax=true`.
|
|
1443
|
+
*/
|
|
1444
|
+
grossValue?: number;
|
|
1445
|
+
/**
|
|
1446
|
+
* The difference between `grossValue` and `netValue`.
|
|
1447
|
+
*/
|
|
1448
|
+
taxValue?: number;
|
|
1449
|
+
/**
|
|
1450
|
+
* Tax rate applied to the discounted price, it's the percentage at which an individual or business is taxed.
|
|
1451
|
+
*/
|
|
1452
|
+
taxRate?: number;
|
|
1453
|
+
/**
|
|
1454
|
+
* Tax code applied to the discounted price, a tax code is a country's set of tax rules.
|
|
1455
|
+
*/
|
|
1456
|
+
taxCode?: string;
|
|
1457
|
+
/**
|
|
1458
|
+
* A list of discounts applied to the line item.
|
|
1459
|
+
*/
|
|
1460
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1461
|
+
/**
|
|
1462
|
+
* Discount identifier.
|
|
1463
|
+
*/
|
|
1464
|
+
id?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Value of the discount that was applied.
|
|
1467
|
+
*/
|
|
1468
|
+
value?: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item.
|
|
1471
|
+
*/
|
|
1472
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1473
|
+
}>;
|
|
1474
|
+
};
|
|
1475
|
+
/**
|
|
1476
|
+
* A list of fees applied to the line item. If there are no fees on the item line, it's not returned in the response.
|
|
1477
|
+
*/
|
|
1478
|
+
fees?: Array<CalculatedFee & {
|
|
1479
|
+
/**
|
|
1480
|
+
* Fee identifier.
|
|
1481
|
+
*/
|
|
1482
|
+
id?: string;
|
|
1483
|
+
/**
|
|
1484
|
+
* PERCENT for fee percentage of the item's line `price.netValue` - unit price x quantity. ABSOLUTE for the absolute amount assigned to the item line. ABSOLUTE_MULTIPLY_ITEMQUANTITY for the monetary amount multiplied by the item quantity and assigned to the item line.
|
|
1485
|
+
*/
|
|
1486
|
+
type?: 'PERCENT' | 'ABSOLUTE' | 'ABSOLUTE_MULTIPLY_ITEMQUANTITY';
|
|
1487
|
+
/**
|
|
1488
|
+
* INTERNAL defined in commerce engine, EXTERNAL specified when an item is added to the order.
|
|
1489
|
+
*/
|
|
1490
|
+
origin?: 'INTERNAL' | 'EXTERNAL';
|
|
1491
|
+
/**
|
|
1492
|
+
* Fee name.
|
|
1493
|
+
*/
|
|
1494
|
+
name?: {
|
|
1495
|
+
[key: string]: unknown;
|
|
1496
|
+
};
|
|
1497
|
+
/**
|
|
1498
|
+
* The calculated price of the fee.
|
|
1499
|
+
*/
|
|
1500
|
+
price?: {
|
|
1501
|
+
/**
|
|
1502
|
+
* Monetary amount of the fee, depends on the fee type.
|
|
1503
|
+
*/
|
|
1504
|
+
netValue?: number;
|
|
1505
|
+
/**
|
|
1506
|
+
* Value calculated based on the `taxCode` and the `taxRate` if `taxable=true`.
|
|
1507
|
+
*/
|
|
1508
|
+
grossValue?: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* If a fee is defined with the attribute `taxable=true`, the tax rate is calculated based on the provided `taxCode` at the fee level. A taxable fee must have a defined `taxCode`.
|
|
1511
|
+
*/
|
|
1512
|
+
taxRate?: number;
|
|
1513
|
+
/**
|
|
1514
|
+
* Tax code defined on the fee level, for example STANDARD. The value should match the available tax codes in the system configuration.
|
|
1515
|
+
*/
|
|
1516
|
+
taxCode?: string;
|
|
1517
|
+
};
|
|
1518
|
+
discountedPrice?: CalculatedPriceWithDiscounts & {
|
|
1519
|
+
/**
|
|
1520
|
+
* The net value after applying discounts, calculated if `includesTax=false`.
|
|
1521
|
+
*/
|
|
1522
|
+
netValue?: number;
|
|
1523
|
+
/**
|
|
1524
|
+
* The gross value after applying discounts, calculated if `includesTax=true`.
|
|
1525
|
+
*/
|
|
1526
|
+
grossValue?: number;
|
|
1527
|
+
/**
|
|
1528
|
+
* The difference between `grossValue` and `netValue`.
|
|
1529
|
+
*/
|
|
1530
|
+
taxValue?: number;
|
|
1531
|
+
/**
|
|
1532
|
+
* Refers to `fees[].price.taxRate`.
|
|
1533
|
+
*/
|
|
1534
|
+
taxRate?: number;
|
|
1535
|
+
/**
|
|
1536
|
+
* Refers to `fees[].price.taxCode`.
|
|
1537
|
+
*/
|
|
1538
|
+
taxCode?: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* A list of discounts applied to the line item.
|
|
1541
|
+
*/
|
|
1542
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1543
|
+
/**
|
|
1544
|
+
* Discount identifier.
|
|
1545
|
+
*/
|
|
1546
|
+
id?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Monetary amount of the discount applied to the price for the given discount ID.
|
|
1549
|
+
*/
|
|
1550
|
+
value?: number;
|
|
1551
|
+
/**
|
|
1552
|
+
* PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item.
|
|
1553
|
+
*/
|
|
1554
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1555
|
+
}>;
|
|
1556
|
+
};
|
|
1557
|
+
}>;
|
|
1558
|
+
totalFee?: CalculatedPriceWithDiscounts & {
|
|
1559
|
+
/**
|
|
1560
|
+
* Net value of the price, price without tax.
|
|
1561
|
+
*/
|
|
1562
|
+
netValue?: number;
|
|
1563
|
+
/**
|
|
1564
|
+
* Gross value of the price, price with tax.
|
|
1565
|
+
*/
|
|
1566
|
+
grossValue?: number;
|
|
1567
|
+
/**
|
|
1568
|
+
* Tax value of the price, it's the actual amount of tax that has to be paid.
|
|
1569
|
+
*/
|
|
1570
|
+
taxValue?: number;
|
|
1571
|
+
/**
|
|
1572
|
+
* If all fees have the same `taxCode` defined, which results in the same `taxRate`, then the value is present. Otherwise, the field is not returned.
|
|
1573
|
+
*/
|
|
1574
|
+
taxRate?: number;
|
|
1575
|
+
/**
|
|
1576
|
+
* If all fees have the same `taxCode`, then the value is present. Otherwise, the field is not returned.
|
|
1577
|
+
*/
|
|
1578
|
+
taxCode?: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* A list of discounts applied to the line item.
|
|
1581
|
+
*/
|
|
1582
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1583
|
+
/**
|
|
1584
|
+
* Discount identifier.
|
|
1585
|
+
*/
|
|
1586
|
+
id?: string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Sum of all `fees[].discountedPrice.appliedDiscounts[].value` grouped by `discount.id`
|
|
1589
|
+
*/
|
|
1590
|
+
value?: number;
|
|
1591
|
+
/**
|
|
1592
|
+
* PERCENT for percentage discounts and ABSOLUTE for amount applied to the line item.
|
|
1593
|
+
*/
|
|
1594
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1595
|
+
}>;
|
|
1596
|
+
};
|
|
1597
|
+
totalDiscount?: CalculatedTotalDiscount & {
|
|
1598
|
+
/**
|
|
1599
|
+
* Indicates whether discounts were applied to net or gross values.
|
|
1600
|
+
*/
|
|
1601
|
+
calculationType?: 'ApplyDiscountBeforeTax' | 'ApplyDiscountAfterTax';
|
|
1602
|
+
/**
|
|
1603
|
+
* Aggregated sum of `lines[].calculatedPrice.totalDiscount.value` plus the sum of shipping discounts `totalShipping.appliedDiscounts[].value`.
|
|
1604
|
+
*/
|
|
1605
|
+
value?: number;
|
|
1606
|
+
/**
|
|
1607
|
+
* A list of the applied discounts.
|
|
1608
|
+
*/
|
|
1609
|
+
appliedDiscounts?: Array<CalculatedAppliedDiscount & {
|
|
1610
|
+
/**
|
|
1611
|
+
* Discount identifier.
|
|
1612
|
+
*/
|
|
1613
|
+
id?: string;
|
|
1614
|
+
/**
|
|
1615
|
+
* The sum of all `lines[].calculatedPrice.totalDiscount.value` plus `totalShipping.appliedDiscounts[].value` grouped by the discount ID.
|
|
1616
|
+
*/
|
|
1617
|
+
value?: number;
|
|
1618
|
+
/**
|
|
1619
|
+
* PERCENT for percentage discounts, ABSOLUTE for monetary amount and FREE_SHIPPING is shipping is fully discounted.
|
|
1620
|
+
*/
|
|
1621
|
+
discountType?: 'PERCENT' | 'ABSOLUTE' | 'FREE_SHIPPING';
|
|
1622
|
+
}>;
|
|
1623
|
+
};
|
|
1624
|
+
finalPrice: CalculatedPrice & {
|
|
1625
|
+
/**
|
|
1626
|
+
* The sum of line items, `discountedPrice.netValue` or `price.netValue`, and `totalFee.netValue`.
|
|
1627
|
+
*/
|
|
1628
|
+
netValue?: number;
|
|
1629
|
+
/**
|
|
1630
|
+
* The sum of line items, `discountedPrice.grossValue` or `price.grossValue`, and `totalFee.grossValue`.
|
|
1631
|
+
*/
|
|
1632
|
+
grossValue?: number;
|
|
1633
|
+
/**
|
|
1634
|
+
* The result of subtracting `netValue` and `grossValue`, which is equal to the sum of all `taxValues` from the prices.
|
|
1635
|
+
*/
|
|
1636
|
+
taxValue?: number;
|
|
1637
|
+
/**
|
|
1638
|
+
* If the tax code of the line item matches the tax code of all applied fees, the tax rate is populated with the value. Otherwise, it's not returned in the response.
|
|
1639
|
+
*/
|
|
1640
|
+
taxRate?: number;
|
|
1641
|
+
/**
|
|
1642
|
+
* The common tax code of the line item and all applicable fees. If at least one fee does not have a defined tax code, the common tax code cannot be determined, and the field is empty.
|
|
1643
|
+
*/
|
|
1644
|
+
taxCode?: string;
|
|
1645
|
+
};
|
|
1646
|
+
};
|
|
1647
|
+
/**
|
|
1648
|
+
* Type of the external discount.
|
|
1649
|
+
*/
|
|
1650
|
+
type ExternalDiscountType = 'PERCENT' | 'ABSOLUTE';
|
|
1651
|
+
/**
|
|
1652
|
+
* External discount that was applied to order items.
|
|
1653
|
+
*/
|
|
1654
|
+
type ExternalDiscount = {
|
|
1655
|
+
/**
|
|
1656
|
+
* Unique identifier of the external discount.
|
|
1657
|
+
*/
|
|
1658
|
+
id: string;
|
|
1659
|
+
discountType: ExternalDiscountType;
|
|
1660
|
+
/**
|
|
1661
|
+
* Value of the discount (percentage e.g 15.00 -> 15% or absolute amount e.g 10.00 -> 10 EUR depending on the discountType). For discountType=`PERCENT`, maximum is 100.0; for ABSOLUTE, there is no limit.
|
|
1662
|
+
*/
|
|
1663
|
+
value: number;
|
|
1664
|
+
/**
|
|
1665
|
+
* Flag indicating whether the discount is also applied to fees.
|
|
1666
|
+
*/
|
|
1667
|
+
includeFees?: boolean;
|
|
1668
|
+
/**
|
|
1669
|
+
* Sequence number determining the order in which discounts are applied. The lowest sequence number is applied first.
|
|
1670
|
+
*/
|
|
1671
|
+
sequence?: number;
|
|
1672
|
+
};
|
|
1673
|
+
type ExternalFee = {
|
|
1674
|
+
/**
|
|
1675
|
+
* Unique identifier of the fee.
|
|
1676
|
+
*/
|
|
1677
|
+
id?: string;
|
|
1678
|
+
/**
|
|
1679
|
+
* Fee name.
|
|
1680
|
+
*/
|
|
1681
|
+
name?: LocalizedValue;
|
|
1682
|
+
/**
|
|
1683
|
+
* Type of the fee.
|
|
1684
|
+
*/
|
|
1685
|
+
feeType: 'PERCENT' | 'ABSOLUTE' | 'ABSOLUTE_MULTIPLY_ITEMQUANTITY';
|
|
1686
|
+
/**
|
|
1687
|
+
* Value of the fee as percentage. It must be provided when feeType equals `PERCENT`.
|
|
1688
|
+
*/
|
|
1689
|
+
feePercentage?: number;
|
|
1690
|
+
/**
|
|
1691
|
+
* Value of the fee as absolute. It must be provided when feeType equals `ABSOLUTE` or `ABSOLUTE_MULTIPLY_ITEMQUANTITY`.
|
|
1692
|
+
*/
|
|
1693
|
+
feeAbsolute?: {
|
|
1694
|
+
/**
|
|
1695
|
+
* Currency of the fee absolute.
|
|
1696
|
+
*/
|
|
1697
|
+
currency: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* Value of the fee absolute.
|
|
1700
|
+
*/
|
|
1701
|
+
amount: number;
|
|
1702
|
+
};
|
|
1703
|
+
/**
|
|
1704
|
+
* It marks whether tax should be included to the fee or not. A taxable fee must have the `taxCode` attribute provided.
|
|
1705
|
+
*/
|
|
1706
|
+
taxable?: boolean;
|
|
1707
|
+
/**
|
|
1708
|
+
* Tax code of the fee.
|
|
1709
|
+
*/
|
|
1710
|
+
taxCode?: string;
|
|
1711
|
+
};
|
|
1712
|
+
/**
|
|
1713
|
+
* This model represents the price value retrieved from the price service
|
|
1714
|
+
*/
|
|
1715
|
+
type PriceMatchDetails = {
|
|
1716
|
+
/**
|
|
1717
|
+
* The net value of the matched price
|
|
1718
|
+
*/
|
|
1719
|
+
netValue?: number;
|
|
1720
|
+
/**
|
|
1721
|
+
* The gross value of the matched price
|
|
1722
|
+
*/
|
|
1723
|
+
grossValue?: number;
|
|
1724
|
+
/**
|
|
1725
|
+
* The calculated tax value
|
|
1726
|
+
*/
|
|
1727
|
+
taxValue?: number;
|
|
1728
|
+
/**
|
|
1729
|
+
* The applied tax code
|
|
1730
|
+
*/
|
|
1731
|
+
taxCode?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* The applied tax rate
|
|
1734
|
+
*/
|
|
1735
|
+
taxRate?: number;
|
|
1736
|
+
/**
|
|
1737
|
+
* The tax country for which the price was matched
|
|
1738
|
+
*/
|
|
1739
|
+
taxCountry?: string;
|
|
1740
|
+
};
|
|
101
1741
|
|
|
1742
|
+
/**
|
|
1743
|
+
* Salesorder PATCH body. The generated `orderUpdateDto` models a full order
|
|
1744
|
+
* (it requires `entries`/`customer`), but `PATCH /salesorders/{id}` accepts a
|
|
1745
|
+
* subset — so the SDK exposes a partial of it.
|
|
1746
|
+
*/
|
|
1747
|
+
type SalesOrderPatch = Partial<OrderUpdateDto>;
|
|
102
1748
|
/** Optional fields supported by the order-v2 list endpoint. */
|
|
103
1749
|
interface ListMyOrdersOptions {
|
|
104
1750
|
pageNumber?: number;
|
|
@@ -164,4 +1810,4 @@ declare class SalesOrdersService {
|
|
|
164
1810
|
update(orderId: string, patch: SalesOrderPatch, auth: AuthContext, opts?: UpdateSalesOrderOptions): Promise<Order>;
|
|
165
1811
|
}
|
|
166
1812
|
|
|
167
|
-
export { type GetOrderOptions, type ListMyOrdersOptions, type Order, type
|
|
1813
|
+
export { type GetOrderOptions, type ListMyOrdersOptions, type Order, type OrderEntry, type OrderStatus, type OrderTransitionOptions, OrdersService, type SalesOrder, type SalesOrderPatch, SalesOrdersService, type Transition, type UpdateSalesOrderOptions };
|