@medusajs/types 1.12.0-snapshot-20240802122417 → 1.12.0-snapshot-20240807192059
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cart/workflows.d.ts +0 -3
- package/dist/cart/workflows.d.ts.map +1 -1
- package/dist/http/claim/admin/payloads.d.ts +3 -3
- package/dist/http/claim/admin/payloads.d.ts.map +1 -1
- package/dist/http/claim/common.d.ts +3 -3
- package/dist/http/claim/common.d.ts.map +1 -1
- package/dist/http/common/additional_data.d.ts +8 -0
- package/dist/http/common/additional_data.d.ts.map +1 -0
- package/dist/http/common/additional_data.js +3 -0
- package/dist/http/common/additional_data.js.map +1 -0
- package/dist/http/common/index.d.ts +1 -0
- package/dist/http/common/index.d.ts.map +1 -1
- package/dist/http/common/index.js +1 -0
- package/dist/http/common/index.js.map +1 -1
- package/dist/http/fulfillment-set/admin/entities.d.ts +3 -0
- package/dist/http/fulfillment-set/admin/entities.d.ts.map +1 -1
- package/dist/http/order/admin.d.ts +14 -1
- package/dist/http/order/admin.d.ts.map +1 -1
- package/dist/http/order/common.d.ts +183 -1
- package/dist/http/order/common.d.ts.map +1 -1
- package/dist/http/payment/admin.d.ts +17 -1
- package/dist/http/payment/admin.d.ts.map +1 -1
- package/dist/http/payment/common.d.ts +38 -0
- package/dist/http/payment/common.d.ts.map +1 -1
- package/dist/http/return/admin.d.ts +2 -2
- package/dist/http/return/admin.d.ts.map +1 -1
- package/dist/order/common.d.ts +755 -65
- package/dist/order/common.d.ts.map +1 -1
- package/dist/order/mutations.d.ts +1268 -3
- package/dist/order/mutations.d.ts.map +1 -1
- package/dist/order/service.d.ts +3202 -657
- package/dist/order/service.d.ts.map +1 -1
- package/dist/payment/common.d.ts +44 -0
- package/dist/payment/common.d.ts.map +1 -1
- package/dist/payment/mutations.d.ts +40 -0
- package/dist/payment/mutations.d.ts.map +1 -1
- package/dist/payment/service.d.ts +157 -2
- package/dist/payment/service.d.ts.map +1 -1
- package/dist/product/common.d.ts +4 -0
- package/dist/product/common.d.ts.map +1 -1
- package/dist/workflow/order/create-fulfillment.d.ts +2 -0
- package/dist/workflow/order/create-fulfillment.d.ts.map +1 -1
- package/dist/workflow/order/items.d.ts +1 -1
- package/dist/workflow/order/items.d.ts.map +1 -1
- package/package.json +1 -1
@@ -1,500 +1,1765 @@
|
|
1
1
|
import { BigNumberInput } from "../totals";
|
2
2
|
import { ChangeActionType, OrderClaimDTO, OrderExchangeDTO, OrderItemDTO, OrderLineItemDTO, OrderReturnReasonDTO, OrderTransactionDTO, ReturnDTO } from "./common";
|
3
3
|
/** ADDRESS START */
|
4
|
+
/**
|
5
|
+
* The data to create or update in the address.
|
6
|
+
*/
|
4
7
|
export interface UpsertOrderAddressDTO {
|
8
|
+
/**
|
9
|
+
* The associated customer's ID.
|
10
|
+
*/
|
5
11
|
customer_id?: string;
|
12
|
+
/**
|
13
|
+
* The company name.
|
14
|
+
*/
|
6
15
|
company?: string;
|
16
|
+
/**
|
17
|
+
* The first name of the customer.
|
18
|
+
*/
|
7
19
|
first_name?: string;
|
20
|
+
/**
|
21
|
+
* The last name of the customer.
|
22
|
+
*/
|
8
23
|
last_name?: string;
|
24
|
+
/**
|
25
|
+
* The address 1 of the address.
|
26
|
+
*/
|
9
27
|
address_1?: string;
|
28
|
+
/**
|
29
|
+
* The address 2 of the address.
|
30
|
+
*/
|
10
31
|
address_2?: string;
|
32
|
+
/**
|
33
|
+
* The city of the address.
|
34
|
+
*/
|
11
35
|
city?: string;
|
36
|
+
/**
|
37
|
+
* The country code of the address.
|
38
|
+
*/
|
12
39
|
country_code?: string;
|
40
|
+
/**
|
41
|
+
* The province of the address.
|
42
|
+
*/
|
13
43
|
province?: string;
|
44
|
+
/**
|
45
|
+
* The postal code of the address.
|
46
|
+
*/
|
14
47
|
postal_code?: string;
|
48
|
+
/**
|
49
|
+
* The phone of the address.
|
50
|
+
*/
|
15
51
|
phone?: string;
|
52
|
+
/**
|
53
|
+
* Holds custom data in key-value pairs.
|
54
|
+
*/
|
16
55
|
metadata?: Record<string, unknown> | null;
|
17
56
|
}
|
57
|
+
/**
|
58
|
+
* The attributes to update in the address.
|
59
|
+
*/
|
18
60
|
export interface UpdateOrderAddressDTO extends UpsertOrderAddressDTO {
|
61
|
+
/**
|
62
|
+
* The ID of the address.
|
63
|
+
*/
|
19
64
|
id: string;
|
20
65
|
}
|
66
|
+
/**
|
67
|
+
* The address to be created.
|
68
|
+
*/
|
21
69
|
export interface CreateOrderAddressDTO extends UpsertOrderAddressDTO {
|
22
70
|
}
|
23
71
|
/** ADDRESS END */
|
24
72
|
/** ORDER START */
|
73
|
+
/**
|
74
|
+
* The data of the order to be created.
|
75
|
+
*/
|
25
76
|
export interface CreateOrderDTO {
|
77
|
+
/**
|
78
|
+
* The associated region's ID.
|
79
|
+
*/
|
26
80
|
region_id?: string;
|
81
|
+
/**
|
82
|
+
* The associated customer's ID.
|
83
|
+
*/
|
27
84
|
customer_id?: string;
|
85
|
+
/**
|
86
|
+
* The associated sales channel's ID.
|
87
|
+
*/
|
28
88
|
sales_channel_id?: string;
|
89
|
+
/**
|
90
|
+
* The status of the order.
|
91
|
+
*/
|
29
92
|
status?: string;
|
93
|
+
/**
|
94
|
+
* The email of the customer that placed the order.
|
95
|
+
*/
|
30
96
|
email?: string;
|
97
|
+
/**
|
98
|
+
* The currency code of the order.
|
99
|
+
*/
|
31
100
|
currency_code?: string;
|
101
|
+
/**
|
102
|
+
* The associated shipping address's ID.
|
103
|
+
*/
|
32
104
|
shipping_address_id?: string;
|
105
|
+
/**
|
106
|
+
* The associated billing address's ID.
|
107
|
+
*/
|
33
108
|
billing_address_id?: string;
|
109
|
+
/**
|
110
|
+
* The shipping address of the order.
|
111
|
+
*/
|
34
112
|
shipping_address?: CreateOrderAddressDTO | UpdateOrderAddressDTO;
|
113
|
+
/**
|
114
|
+
* The billing address of the order.
|
115
|
+
*/
|
35
116
|
billing_address?: CreateOrderAddressDTO | UpdateOrderAddressDTO;
|
117
|
+
/**
|
118
|
+
* Whether the customer should receive notifications about
|
119
|
+
* order updates.
|
120
|
+
*/
|
36
121
|
no_notification?: boolean;
|
122
|
+
/**
|
123
|
+
* The items of the order.
|
124
|
+
*/
|
37
125
|
items?: CreateOrderLineItemDTO[];
|
126
|
+
/**
|
127
|
+
* The shipping methods of the order.
|
128
|
+
*/
|
38
129
|
shipping_methods?: Omit<CreateOrderShippingMethodDTO, "order_id">[];
|
130
|
+
/**
|
131
|
+
* The transactions of the order.
|
132
|
+
*/
|
39
133
|
transactions?: Omit<CreateOrderTransactionDTO, "order_id">[];
|
134
|
+
/**
|
135
|
+
* Holds custom data in key-value pairs.
|
136
|
+
*/
|
40
137
|
metadata?: Record<string, unknown> | null;
|
138
|
+
/**
|
139
|
+
* The promo codes of the order.
|
140
|
+
*/
|
41
141
|
promo_codes?: string[];
|
42
142
|
}
|
143
|
+
/**
|
144
|
+
* The attributes to update in the order.
|
145
|
+
*/
|
43
146
|
export interface UpdateOrderDTO {
|
147
|
+
/**
|
148
|
+
* The ID of the order.
|
149
|
+
*/
|
44
150
|
id?: string;
|
151
|
+
/**
|
152
|
+
* The version of the order.
|
153
|
+
*/
|
45
154
|
version?: number;
|
155
|
+
/**
|
156
|
+
* The associated region's ID.
|
157
|
+
*/
|
46
158
|
region_id?: string;
|
159
|
+
/**
|
160
|
+
* The associated customer's ID.
|
161
|
+
*/
|
47
162
|
customer_id?: string;
|
163
|
+
/**
|
164
|
+
* The associated sales channel's ID.
|
165
|
+
*/
|
48
166
|
sales_channel_id?: string;
|
167
|
+
/**
|
168
|
+
* The items of the order.
|
169
|
+
*/
|
49
170
|
items?: CreateOrderLineItemDTO[];
|
171
|
+
/**
|
172
|
+
* The shipping address of the order.
|
173
|
+
*/
|
50
174
|
shipping_address?: CreateOrderAddressDTO | UpdateOrderAddressDTO;
|
175
|
+
/**
|
176
|
+
* The billing address of the order.
|
177
|
+
*/
|
51
178
|
billing_address?: CreateOrderAddressDTO | UpdateOrderAddressDTO;
|
179
|
+
/**
|
180
|
+
* The email of the customer that placed the order.
|
181
|
+
*/
|
52
182
|
email?: string;
|
183
|
+
/**
|
184
|
+
* Whether the customer should receive notifications
|
185
|
+
* about order updates.
|
186
|
+
*/
|
53
187
|
no_notification?: boolean;
|
188
|
+
/**
|
189
|
+
* Holds custom data in key-value pairs.
|
190
|
+
*/
|
54
191
|
metadata?: Record<string, unknown> | null;
|
55
192
|
}
|
56
193
|
/** ORDER END */
|
57
194
|
/** ADJUSTMENT START */
|
195
|
+
/**
|
196
|
+
* The data of the order adjustment to be created.
|
197
|
+
*/
|
58
198
|
export interface CreateOrderAdjustmentDTO {
|
199
|
+
/**
|
200
|
+
* The code of the adjustment.
|
201
|
+
*/
|
59
202
|
code?: string;
|
203
|
+
/**
|
204
|
+
* The amount of the adjustment.
|
205
|
+
*/
|
60
206
|
amount: BigNumberInput;
|
207
|
+
/**
|
208
|
+
* The description of the adjustment.
|
209
|
+
*/
|
61
210
|
description?: string;
|
211
|
+
/**
|
212
|
+
* The associated promotion's ID.
|
213
|
+
*/
|
62
214
|
promotion_id?: string;
|
215
|
+
/**
|
216
|
+
* The associated provider's ID.
|
217
|
+
*/
|
63
218
|
provider_id?: string;
|
64
219
|
}
|
220
|
+
/**
|
221
|
+
* The attributes to update in the adjustment.
|
222
|
+
*/
|
65
223
|
export interface UpdateOrderAdjustmentDTO {
|
224
|
+
/**
|
225
|
+
* The ID of the adjustment.
|
226
|
+
*/
|
66
227
|
id: string;
|
228
|
+
/**
|
229
|
+
* The code of the adjustment.
|
230
|
+
*/
|
67
231
|
code?: string;
|
232
|
+
/**
|
233
|
+
* The amount of the adjustment.
|
234
|
+
*/
|
68
235
|
amount: BigNumberInput;
|
236
|
+
/**
|
237
|
+
* The description of the adjustment.
|
238
|
+
*/
|
69
239
|
description?: string;
|
240
|
+
/**
|
241
|
+
* The associated promotion's ID.
|
242
|
+
*/
|
70
243
|
promotion_id?: string;
|
244
|
+
/**
|
245
|
+
* The associated provider's ID.
|
246
|
+
*/
|
71
247
|
provider_id?: string;
|
72
248
|
}
|
249
|
+
/**
|
250
|
+
* The line item adjustment to be created.
|
251
|
+
*/
|
73
252
|
export interface CreateOrderLineItemAdjustmentDTO extends CreateOrderAdjustmentDTO {
|
253
|
+
/**
|
254
|
+
* The associated item's ID.
|
255
|
+
*/
|
74
256
|
item_id: string;
|
75
257
|
}
|
258
|
+
/**
|
259
|
+
* The attributes to update in the line item adjustment.
|
260
|
+
*/
|
76
261
|
export interface UpdateOrderLineItemAdjustmentDTO extends UpdateOrderAdjustmentDTO {
|
262
|
+
/**
|
263
|
+
* The associated item's ID.
|
264
|
+
*/
|
77
265
|
item_id: string;
|
78
266
|
}
|
267
|
+
/**
|
268
|
+
* The attributes in the line item adjustment to be created or updated.
|
269
|
+
*/
|
79
270
|
export interface UpsertOrderLineItemAdjustmentDTO {
|
271
|
+
/**
|
272
|
+
* The ID of the line item adjustment.
|
273
|
+
*/
|
80
274
|
id?: string;
|
275
|
+
/**
|
276
|
+
* The associated item's ID.
|
277
|
+
*/
|
81
278
|
item_id: string;
|
279
|
+
/**
|
280
|
+
* The code of the line item adjustment.
|
281
|
+
*/
|
82
282
|
code?: string;
|
283
|
+
/**
|
284
|
+
* The amount of the line item adjustment.
|
285
|
+
*/
|
83
286
|
amount?: BigNumberInput;
|
287
|
+
/**
|
288
|
+
* The description of the line item adjustment.
|
289
|
+
*/
|
84
290
|
description?: string;
|
291
|
+
/**
|
292
|
+
* The associated promotion's ID.
|
293
|
+
*/
|
85
294
|
promotion_id?: string;
|
295
|
+
/**
|
296
|
+
* The associated provider's ID.
|
297
|
+
*/
|
86
298
|
provider_id?: string;
|
87
299
|
}
|
88
300
|
/** ADJUSTMENTS END */
|
89
301
|
/** TAX LINES START */
|
302
|
+
/**
|
303
|
+
* The dat of the tax line to be created.
|
304
|
+
*/
|
90
305
|
export interface CreateOrderTaxLineDTO {
|
306
|
+
/**
|
307
|
+
* The description of the tax line.
|
308
|
+
*/
|
91
309
|
description?: string;
|
310
|
+
/**
|
311
|
+
* The associated tax rate's ID.
|
312
|
+
*/
|
92
313
|
tax_rate_id?: string;
|
314
|
+
/**
|
315
|
+
* The code of the tax line.
|
316
|
+
*/
|
93
317
|
code: string;
|
318
|
+
/**
|
319
|
+
* The rate of the tax line.
|
320
|
+
*/
|
94
321
|
rate: BigNumberInput;
|
322
|
+
/**
|
323
|
+
* The associated provider's ID.
|
324
|
+
*/
|
95
325
|
provider_id?: string;
|
96
326
|
}
|
327
|
+
/**
|
328
|
+
* The attributes to update in the tax line.
|
329
|
+
*/
|
97
330
|
export interface UpdateOrderTaxLineDTO {
|
331
|
+
/**
|
332
|
+
* The ID of the tax line.
|
333
|
+
*/
|
98
334
|
id: string;
|
335
|
+
/**
|
336
|
+
* The description of the tax line.
|
337
|
+
*/
|
99
338
|
description?: string;
|
339
|
+
/**
|
340
|
+
* The associated tax rate's ID.
|
341
|
+
*/
|
100
342
|
tax_rate_id?: string;
|
343
|
+
/**
|
344
|
+
* The code of the tax line.
|
345
|
+
*/
|
101
346
|
code?: string;
|
347
|
+
/**
|
348
|
+
* The rate of the tax line.
|
349
|
+
*/
|
102
350
|
rate?: BigNumberInput;
|
351
|
+
/**
|
352
|
+
* The associated provider's ID.
|
353
|
+
*/
|
103
354
|
provider_id?: string;
|
104
355
|
}
|
356
|
+
/**
|
357
|
+
* The shipping method tax line to be created.
|
358
|
+
*/
|
105
359
|
export interface CreateOrderShippingMethodTaxLineDTO extends CreateOrderTaxLineDTO {
|
106
360
|
}
|
361
|
+
/**
|
362
|
+
* The attributes to update in the shipping method tax line.
|
363
|
+
*/
|
107
364
|
export interface UpdateOrderShippingMethodTaxLineDTO extends UpdateOrderTaxLineDTO {
|
108
365
|
}
|
366
|
+
/**
|
367
|
+
* The line item tax line to be created.
|
368
|
+
*/
|
109
369
|
export interface CreateOrderLineItemTaxLineDTO extends CreateOrderTaxLineDTO {
|
110
370
|
}
|
371
|
+
/**
|
372
|
+
* The attributes to update in the line item tax line.
|
373
|
+
*/
|
111
374
|
export interface UpdateOrderLineItemTaxLineDTO extends UpdateOrderTaxLineDTO {
|
112
375
|
}
|
113
376
|
/** TAX LINES END */
|
114
377
|
/** LINE ITEMS START */
|
378
|
+
/**
|
379
|
+
* The data of the line item to create.
|
380
|
+
*/
|
115
381
|
export interface CreateOrderLineItemDTO {
|
382
|
+
/**
|
383
|
+
* The title of the line item.
|
384
|
+
*/
|
116
385
|
title: string;
|
386
|
+
/**
|
387
|
+
* The subtitle of the line item.
|
388
|
+
*/
|
117
389
|
subtitle?: string;
|
390
|
+
/**
|
391
|
+
* The thumbnail of the line item.
|
392
|
+
*/
|
118
393
|
thumbnail?: string;
|
394
|
+
/**
|
395
|
+
* The associated order's ID.
|
396
|
+
*/
|
119
397
|
order_id?: string;
|
398
|
+
/**
|
399
|
+
* The quantity of the line item.
|
400
|
+
*/
|
120
401
|
quantity: BigNumberInput;
|
402
|
+
/**
|
403
|
+
* The associated product's ID.
|
404
|
+
*/
|
121
405
|
product_id?: string;
|
406
|
+
/**
|
407
|
+
* The product title of the line item.
|
408
|
+
*/
|
122
409
|
product_title?: string;
|
410
|
+
/**
|
411
|
+
* The product description of the line item.
|
412
|
+
*/
|
123
413
|
product_description?: string;
|
414
|
+
/**
|
415
|
+
* The product subtitle of the line item.
|
416
|
+
*/
|
124
417
|
product_subtitle?: string;
|
418
|
+
/**
|
419
|
+
* The product type of the line item.
|
420
|
+
*/
|
125
421
|
product_type?: string;
|
422
|
+
/**
|
423
|
+
* The product collection of the line item.
|
424
|
+
*/
|
126
425
|
product_collection?: string;
|
426
|
+
/**
|
427
|
+
* The product handle of the line item.
|
428
|
+
*/
|
127
429
|
product_handle?: string;
|
430
|
+
/**
|
431
|
+
* The associated variant's ID.
|
432
|
+
*/
|
128
433
|
variant_id?: string;
|
434
|
+
/**
|
435
|
+
* The variant sku of the line item.
|
436
|
+
*/
|
129
437
|
variant_sku?: string;
|
438
|
+
/**
|
439
|
+
* The variant barcode of the line item.
|
440
|
+
*/
|
130
441
|
variant_barcode?: string;
|
442
|
+
/**
|
443
|
+
* The variant title of the line item.
|
444
|
+
*/
|
131
445
|
variant_title?: string;
|
446
|
+
/**
|
447
|
+
* The variant option values of the line item.
|
448
|
+
*/
|
132
449
|
variant_option_values?: Record<string, unknown>;
|
450
|
+
/**
|
451
|
+
* Whether the line item requires shipping.
|
452
|
+
*/
|
133
453
|
requires_shipping?: boolean;
|
454
|
+
/**
|
455
|
+
* Whether the line item is discountable.
|
456
|
+
*/
|
134
457
|
is_discountable?: boolean;
|
458
|
+
/**
|
459
|
+
* Whether the line item is tax inclusive.
|
460
|
+
*/
|
135
461
|
is_tax_inclusive?: boolean;
|
462
|
+
/**
|
463
|
+
* The compare-at unit price of the line item.
|
464
|
+
*/
|
136
465
|
compare_at_unit_price?: BigNumberInput;
|
466
|
+
/**
|
467
|
+
* The unit price of the line item.
|
468
|
+
*/
|
137
469
|
unit_price: BigNumberInput;
|
470
|
+
/**
|
471
|
+
* The tax lines of the line item.
|
472
|
+
*/
|
138
473
|
tax_lines?: CreateOrderTaxLineDTO[];
|
474
|
+
/**
|
475
|
+
* The adjustments of the line item.
|
476
|
+
*/
|
139
477
|
adjustments?: CreateOrderAdjustmentDTO[];
|
478
|
+
/**
|
479
|
+
* Holds custom data in key-value pairs.
|
480
|
+
*/
|
140
481
|
metadata?: Record<string, unknown> | null;
|
141
482
|
}
|
483
|
+
/**
|
484
|
+
* The line item to be created.
|
485
|
+
*/
|
142
486
|
export interface CreateOrderLineItemForOrderDTO extends CreateOrderLineItemDTO {
|
487
|
+
/**
|
488
|
+
* The associated order's ID.
|
489
|
+
*/
|
143
490
|
order_id: string;
|
144
491
|
}
|
492
|
+
/**
|
493
|
+
* The attributes to update in the line item with selector.
|
494
|
+
*/
|
145
495
|
export interface UpdateOrderLineItemWithSelectorDTO {
|
496
|
+
/**
|
497
|
+
* The selector of the line item with selector.
|
498
|
+
*/
|
146
499
|
selector: Partial<OrderLineItemDTO>;
|
500
|
+
/**
|
501
|
+
* The data of the line item with selector.
|
502
|
+
*/
|
147
503
|
data: Partial<UpdateOrderLineItemDTO>;
|
148
504
|
}
|
505
|
+
/**
|
506
|
+
* The attributes to update in the line item.
|
507
|
+
*/
|
149
508
|
export interface UpdateOrderLineItemDTO extends Omit<CreateOrderLineItemDTO, "tax_lines" | "adjustments" | "title" | "quantity" | "unit_price"> {
|
509
|
+
/**
|
510
|
+
* The ID of the line item.
|
511
|
+
*/
|
150
512
|
id: string;
|
513
|
+
/**
|
514
|
+
* The title of the line item.
|
515
|
+
*/
|
151
516
|
title?: string;
|
517
|
+
/**
|
518
|
+
* The quantity of the line item.
|
519
|
+
*/
|
152
520
|
quantity?: BigNumberInput;
|
521
|
+
/**
|
522
|
+
* The unit price of the line item.
|
523
|
+
*/
|
153
524
|
unit_price?: BigNumberInput;
|
525
|
+
/**
|
526
|
+
* The tax lines of the line item.
|
527
|
+
*/
|
154
528
|
tax_lines?: UpdateOrderTaxLineDTO[] | CreateOrderTaxLineDTO[];
|
529
|
+
/**
|
530
|
+
* The adjustments of the line item.
|
531
|
+
*/
|
155
532
|
adjustments?: UpdateOrderAdjustmentDTO[] | CreateOrderAdjustmentDTO[];
|
156
533
|
}
|
157
534
|
/** LINE ITEMS END */
|
158
535
|
/** SHIPPING METHODS START */
|
536
|
+
/**
|
537
|
+
* The data of the shipping method to be created.
|
538
|
+
*/
|
159
539
|
export interface CreateOrderShippingMethodDTO {
|
540
|
+
/**
|
541
|
+
* The name of the shipping method.
|
542
|
+
*/
|
160
543
|
name: string;
|
544
|
+
/**
|
545
|
+
* The associated order's ID.
|
546
|
+
*/
|
161
547
|
order_id: string;
|
548
|
+
/**
|
549
|
+
* The associated return's ID.
|
550
|
+
*/
|
162
551
|
return_id?: string;
|
552
|
+
/**
|
553
|
+
* The associated claim's ID.
|
554
|
+
*/
|
163
555
|
claim_id?: string;
|
556
|
+
/**
|
557
|
+
* The associated exchange's ID.
|
558
|
+
*/
|
164
559
|
exchange_id?: string;
|
560
|
+
/**
|
561
|
+
* The version of the shipping method.
|
562
|
+
*/
|
165
563
|
version?: number;
|
564
|
+
/**
|
565
|
+
* The amount of the shipping method.
|
566
|
+
*/
|
166
567
|
amount: BigNumberInput;
|
568
|
+
/**
|
569
|
+
* Whether the shipping method is tax inclusive.
|
570
|
+
*/
|
167
571
|
is_tax_inclusive?: boolean;
|
572
|
+
/**
|
573
|
+
* The associated shipping option's ID.
|
574
|
+
*/
|
168
575
|
shipping_option_id?: string;
|
576
|
+
/**
|
577
|
+
* The data of the shipping method.
|
578
|
+
*/
|
169
579
|
data?: Record<string, unknown>;
|
580
|
+
/**
|
581
|
+
* The tax lines of the shipping method.
|
582
|
+
*/
|
170
583
|
tax_lines?: CreateOrderTaxLineDTO[];
|
584
|
+
/**
|
585
|
+
* The adjustments of the shipping method.
|
586
|
+
*/
|
171
587
|
adjustments?: CreateOrderAdjustmentDTO[];
|
172
588
|
}
|
589
|
+
/**
|
590
|
+
* The attributes to update in the shipping method.
|
591
|
+
*/
|
173
592
|
export interface UpdateOrderShippingMethodDTO {
|
593
|
+
/**
|
594
|
+
* The ID of the shipping method.
|
595
|
+
*/
|
174
596
|
id: string;
|
597
|
+
/**
|
598
|
+
* The name of the shipping method.
|
599
|
+
*/
|
175
600
|
name?: string;
|
601
|
+
/**
|
602
|
+
* The associated shipping option's ID.
|
603
|
+
*/
|
176
604
|
shipping_option_id?: string;
|
605
|
+
/**
|
606
|
+
* The amount of the shipping method.
|
607
|
+
*/
|
177
608
|
amount?: BigNumberInput;
|
609
|
+
/**
|
610
|
+
* The data of the shipping method.
|
611
|
+
*/
|
178
612
|
data?: Record<string, unknown>;
|
613
|
+
/**
|
614
|
+
* The tax lines of the shipping method.
|
615
|
+
*/
|
179
616
|
tax_lines?: UpdateOrderTaxLineDTO[] | CreateOrderTaxLineDTO[];
|
617
|
+
/**
|
618
|
+
* The adjustments of the shipping method.
|
619
|
+
*/
|
180
620
|
adjustments?: CreateOrderAdjustmentDTO[] | UpdateOrderAdjustmentDTO[];
|
181
621
|
}
|
622
|
+
/**
|
623
|
+
* The shipping method adjustment to be created.
|
624
|
+
*/
|
182
625
|
export interface CreateOrderShippingMethodAdjustmentDTO {
|
626
|
+
/**
|
627
|
+
* The associated shipping method's ID.
|
628
|
+
*/
|
183
629
|
shipping_method_id: string;
|
630
|
+
/**
|
631
|
+
* The code of the adjustment.
|
632
|
+
*/
|
184
633
|
code: string;
|
634
|
+
/**
|
635
|
+
* The amount of the adjustment.
|
636
|
+
*/
|
185
637
|
amount: BigNumberInput;
|
638
|
+
/**
|
639
|
+
* The description of the adjustment.
|
640
|
+
*/
|
186
641
|
description?: string;
|
642
|
+
/**
|
643
|
+
* The associated promotion's ID.
|
644
|
+
*/
|
187
645
|
promotion_id?: string;
|
646
|
+
/**
|
647
|
+
* The associated provider's ID.
|
648
|
+
*/
|
188
649
|
provider_id?: string;
|
189
650
|
}
|
651
|
+
/**
|
652
|
+
* The attributes to update in the shipping method adjustment.
|
653
|
+
*/
|
190
654
|
export interface UpdateOrderShippingMethodAdjustmentDTO {
|
655
|
+
/**
|
656
|
+
* The ID of the shipping method adjustment.
|
657
|
+
*/
|
191
658
|
id: string;
|
659
|
+
/**
|
660
|
+
* The code of the adjustment.
|
661
|
+
*/
|
192
662
|
code?: string;
|
663
|
+
/**
|
664
|
+
* The amount of the adjustment.
|
665
|
+
*/
|
193
666
|
amount?: BigNumberInput;
|
667
|
+
/**
|
668
|
+
* The description of the adjustment.
|
669
|
+
*/
|
194
670
|
description?: string;
|
671
|
+
/**
|
672
|
+
* The associated promotion's ID.
|
673
|
+
*/
|
195
674
|
promotion_id?: string;
|
675
|
+
/**
|
676
|
+
* The associated provider's ID.
|
677
|
+
*/
|
196
678
|
provider_id?: string;
|
197
679
|
}
|
198
680
|
/** SHIPPING METHODS END */
|
199
681
|
/** ORDER CHANGE START */
|
682
|
+
/**
|
683
|
+
* The data of the order change to be created.
|
684
|
+
*/
|
200
685
|
export interface CreateOrderChangeDTO {
|
686
|
+
/**
|
687
|
+
* The associated order's ID.
|
688
|
+
*/
|
201
689
|
order_id: string;
|
690
|
+
/**
|
691
|
+
* The associated return's ID.
|
692
|
+
*/
|
202
693
|
return_id?: string;
|
694
|
+
/**
|
695
|
+
* The associated claim's ID.
|
696
|
+
*/
|
203
697
|
claim_id?: string;
|
698
|
+
/**
|
699
|
+
* The associated exchange's ID.
|
700
|
+
*/
|
204
701
|
exchange_id?: string;
|
702
|
+
/**
|
703
|
+
* The type of the order change.
|
704
|
+
*/
|
205
705
|
change_type?: "return_request" | "return_receive" | "exchange" | "claim" | "edit";
|
706
|
+
/**
|
707
|
+
* The description of the order change.
|
708
|
+
*/
|
206
709
|
description?: string;
|
710
|
+
/**
|
711
|
+
* The internal note of the order change.
|
712
|
+
*/
|
207
713
|
internal_note?: string | null;
|
714
|
+
/**
|
715
|
+
* The user or customer that requested the order change.
|
716
|
+
*/
|
208
717
|
requested_by?: string;
|
718
|
+
/**
|
719
|
+
* The date that the order change was requested.
|
720
|
+
*/
|
209
721
|
requested_at?: Date;
|
722
|
+
/**
|
723
|
+
* The user that created the order change.
|
724
|
+
*/
|
210
725
|
created_by?: string;
|
726
|
+
/**
|
727
|
+
* Holds custom data in key-value pairs.
|
728
|
+
*/
|
211
729
|
metadata?: Record<string, unknown> | null;
|
730
|
+
/**
|
731
|
+
* The actions of the order change.
|
732
|
+
*/
|
212
733
|
actions?: CreateOrderChangeActionDTO[];
|
213
734
|
}
|
735
|
+
/**
|
736
|
+
* The attributes to update in the order change.
|
737
|
+
*/
|
214
738
|
export interface UpdateOrderChangeDTO {
|
739
|
+
/**
|
740
|
+
* The ID of the order change.
|
741
|
+
*/
|
215
742
|
id: string;
|
743
|
+
/**
|
744
|
+
* The status of the order change.
|
745
|
+
*/
|
216
746
|
status?: string;
|
747
|
+
/**
|
748
|
+
* The description of the order change.
|
749
|
+
*/
|
217
750
|
description?: string;
|
751
|
+
/**
|
752
|
+
* The internal note of the order change.
|
753
|
+
*/
|
218
754
|
internal_note?: string | null;
|
755
|
+
/**
|
756
|
+
* The user or customer that requested the
|
757
|
+
* order change.
|
758
|
+
*/
|
219
759
|
requested_by?: string | null;
|
760
|
+
/**
|
761
|
+
* The date the order change was requested.
|
762
|
+
*/
|
220
763
|
requested_at?: Date | null;
|
764
|
+
/**
|
765
|
+
* The user or customer that confirmed the
|
766
|
+
* order change.
|
767
|
+
*/
|
221
768
|
confirmed_by?: string | null;
|
769
|
+
/**
|
770
|
+
* The date the order change was confirmed.
|
771
|
+
*/
|
222
772
|
confirmed_at?: Date | null;
|
773
|
+
/**
|
774
|
+
* The user or customer that declined
|
775
|
+
* the order change.
|
776
|
+
*/
|
223
777
|
declined_by?: string | null;
|
778
|
+
/**
|
779
|
+
* The reason that the order change was declined.
|
780
|
+
*/
|
224
781
|
declined_reason?: string | null;
|
782
|
+
/**
|
783
|
+
* The date that the order change was declined.
|
784
|
+
*/
|
225
785
|
declined_at?: Date | null;
|
786
|
+
/**
|
787
|
+
* The user or customer that canceled the
|
788
|
+
* order change.
|
789
|
+
*/
|
226
790
|
canceled_by?: string | null;
|
791
|
+
/**
|
792
|
+
* The date that the order change was canceled.
|
793
|
+
*/
|
227
794
|
canceled_at?: Date | null;
|
795
|
+
/**
|
796
|
+
* Holds custom data in key-value pairs.
|
797
|
+
*/
|
228
798
|
metadata?: Record<string, unknown> | null;
|
229
799
|
}
|
800
|
+
/**
|
801
|
+
* The details of the order change cancelation.
|
802
|
+
*/
|
230
803
|
export interface CancelOrderChangeDTO {
|
804
|
+
/**
|
805
|
+
* The ID of the order change.
|
806
|
+
*/
|
231
807
|
id: string;
|
808
|
+
/**
|
809
|
+
* The user or customer that canceled the order change.
|
810
|
+
*/
|
232
811
|
canceled_by?: string;
|
812
|
+
/**
|
813
|
+
* Holds custom data in key-value pairs.
|
814
|
+
*/
|
233
815
|
metadata?: Record<string, unknown> | null;
|
234
816
|
}
|
817
|
+
/**
|
818
|
+
* The details of declining the order change.
|
819
|
+
*/
|
235
820
|
export interface DeclineOrderChangeDTO {
|
821
|
+
/**
|
822
|
+
* The ID of the order change.
|
823
|
+
*/
|
236
824
|
id: string;
|
825
|
+
/**
|
826
|
+
* The user or customer who declined the order change.
|
827
|
+
*/
|
237
828
|
declined_by?: string;
|
829
|
+
/**
|
830
|
+
* Holds custom data in key-value pairs.
|
831
|
+
*/
|
238
832
|
metadata?: Record<string, unknown> | null;
|
239
833
|
}
|
834
|
+
/**
|
835
|
+
* The details of the order change confirmation.
|
836
|
+
*/
|
240
837
|
export interface ConfirmOrderChangeDTO {
|
838
|
+
/**
|
839
|
+
* The ID of the order change.
|
840
|
+
*/
|
241
841
|
id: string;
|
842
|
+
/**
|
843
|
+
* The user or customer that confirmed the
|
844
|
+
* order change.
|
845
|
+
*/
|
242
846
|
confirmed_by?: string;
|
847
|
+
/**
|
848
|
+
* Holds custom data in key-value pairs.
|
849
|
+
*/
|
243
850
|
metadata?: Record<string, unknown> | null;
|
244
851
|
}
|
245
852
|
/** ORDER CHANGE END */
|
246
853
|
/** ORDER CHANGE ACTION START */
|
854
|
+
/**
|
855
|
+
* The data of the order change action to be created.
|
856
|
+
*/
|
247
857
|
export interface CreateOrderChangeActionDTO {
|
858
|
+
/**
|
859
|
+
* The associated order change's ID.
|
860
|
+
*/
|
248
861
|
order_change_id?: string;
|
862
|
+
/**
|
863
|
+
* The associated order's ID.
|
864
|
+
*/
|
249
865
|
order_id?: string;
|
866
|
+
/**
|
867
|
+
* The associated return's ID.
|
868
|
+
*/
|
250
869
|
return_id?: string;
|
870
|
+
/**
|
871
|
+
* The associated claim's ID.
|
872
|
+
*/
|
251
873
|
claim_id?: string;
|
874
|
+
/**
|
875
|
+
* The associated exchange's ID.
|
876
|
+
*/
|
252
877
|
exchange_id?: string;
|
878
|
+
/**
|
879
|
+
* The version of the order change action.
|
880
|
+
* Once the order change action is confirmed, this
|
881
|
+
* becomes the order's version.
|
882
|
+
*/
|
253
883
|
version?: number;
|
884
|
+
/**
|
885
|
+
* The name of the data model that this action
|
886
|
+
* references. For example, `return`.
|
887
|
+
*/
|
254
888
|
reference?: string;
|
889
|
+
/**
|
890
|
+
* The ID of the record references of the data model
|
891
|
+
* specified in {@link reference}.
|
892
|
+
*
|
893
|
+
* For example, if `reference` is `return`, the `reference_id`
|
894
|
+
* is the ID of the return.
|
895
|
+
*/
|
255
896
|
reference_id?: string;
|
897
|
+
/**
|
898
|
+
* The type of action.
|
899
|
+
*/
|
256
900
|
action: ChangeActionType;
|
901
|
+
/**
|
902
|
+
* The internal note of the order change action.
|
903
|
+
*/
|
257
904
|
internal_note?: string | null;
|
905
|
+
/**
|
906
|
+
* The amount of the order change action.
|
907
|
+
*/
|
258
908
|
amount?: BigNumberInput;
|
909
|
+
/**
|
910
|
+
* The details of the order change action.
|
911
|
+
*
|
912
|
+
* This could include the returned items or their changed
|
913
|
+
* quantity, based on the type of this action.
|
914
|
+
*/
|
259
915
|
details?: Record<string, unknown>;
|
260
916
|
}
|
917
|
+
/**
|
918
|
+
* The attributes to update in the order change action.
|
919
|
+
*/
|
261
920
|
export interface UpdateOrderChangeActionDTO {
|
921
|
+
/**
|
922
|
+
* The ID of the order change action.
|
923
|
+
*/
|
262
924
|
id: string;
|
925
|
+
/**
|
926
|
+
* The internal note of the order change action.
|
927
|
+
*/
|
263
928
|
internal_note?: string | null;
|
264
929
|
}
|
265
930
|
/** ORDER TRANSACTION START */
|
931
|
+
/**
|
932
|
+
* The data of the transaction to be created.
|
933
|
+
*/
|
266
934
|
export interface CreateOrderTransactionDTO {
|
935
|
+
/**
|
936
|
+
* The associated order's ID.
|
937
|
+
*/
|
267
938
|
order_id: string;
|
939
|
+
/**
|
940
|
+
* The description of the transaction.
|
941
|
+
*/
|
268
942
|
description?: string;
|
943
|
+
/**
|
944
|
+
* The data model this transaction references.
|
945
|
+
* For example, `payment`.
|
946
|
+
*/
|
269
947
|
reference?: string;
|
948
|
+
/**
|
949
|
+
* The ID of the data model's record referenced.
|
950
|
+
* For example, `pay_132`.
|
951
|
+
*/
|
270
952
|
reference_id?: string;
|
953
|
+
/**
|
954
|
+
* The internal note of the transaction.
|
955
|
+
*/
|
271
956
|
internal_note?: string | null;
|
957
|
+
/**
|
958
|
+
* The user or customer that created this
|
959
|
+
* transaction.
|
960
|
+
*/
|
272
961
|
created_by?: string;
|
962
|
+
/**
|
963
|
+
* The amount of the transaction.
|
964
|
+
*/
|
273
965
|
amount: BigNumberInput;
|
966
|
+
/**
|
967
|
+
* The currency code of the transaction.
|
968
|
+
*/
|
274
969
|
currency_code: string;
|
970
|
+
/**
|
971
|
+
* Holds custom data in key-value pairs.
|
972
|
+
*/
|
275
973
|
metadata?: Record<string, unknown> | null;
|
276
974
|
}
|
975
|
+
/**
|
976
|
+
* The attributes to update in the transaction.
|
977
|
+
*/
|
277
978
|
export interface UpdateOrderTransactionDTO {
|
979
|
+
/**
|
980
|
+
* The ID of the transaction.
|
981
|
+
*/
|
278
982
|
id: string;
|
983
|
+
/**
|
984
|
+
* The amount of the transaction.
|
985
|
+
*/
|
279
986
|
amount?: BigNumberInput;
|
987
|
+
/**
|
988
|
+
* The currency code of the transaction.
|
989
|
+
*/
|
280
990
|
currency_code?: string;
|
991
|
+
/**
|
992
|
+
* The description of the transaction.
|
993
|
+
*/
|
281
994
|
description?: string;
|
995
|
+
/**
|
996
|
+
* The internal note of the transaction.
|
997
|
+
*/
|
282
998
|
internal_note?: string | null;
|
999
|
+
/**
|
1000
|
+
* The data model this transaction references.
|
1001
|
+
* For example, `payment`.
|
1002
|
+
*/
|
283
1003
|
reference?: string;
|
1004
|
+
/**
|
1005
|
+
* The ID of the data model's record referenced.
|
1006
|
+
* For example, `pay_132`.
|
1007
|
+
*/
|
284
1008
|
reference_id?: string;
|
1009
|
+
/**
|
1010
|
+
* Holds custom data in key-value pairs.
|
1011
|
+
*/
|
285
1012
|
metadata?: Record<string, unknown> | null;
|
286
1013
|
}
|
1014
|
+
/**
|
1015
|
+
* The attributes to update in the transaction with filters
|
1016
|
+
* specifying which transactions to update.
|
1017
|
+
*/
|
287
1018
|
export interface UpdateOrderTransactionWithSelectorDTO {
|
1019
|
+
/**
|
1020
|
+
* The filters specifying which transactions to update.
|
1021
|
+
*/
|
288
1022
|
selector: Partial<OrderTransactionDTO>;
|
1023
|
+
/**
|
1024
|
+
* The data of the transaction to update.
|
1025
|
+
*/
|
289
1026
|
data: Partial<UpdateOrderTransactionDTO>;
|
290
1027
|
}
|
291
1028
|
/** ORDER TRANSACTION END */
|
292
1029
|
/** ORDER DETAIL START */
|
1030
|
+
/**
|
1031
|
+
* The data to update in the order items.
|
1032
|
+
*/
|
293
1033
|
export interface UpdateOrderItemDTO {
|
1034
|
+
/**
|
1035
|
+
* The ID of the item.
|
1036
|
+
*/
|
294
1037
|
id: string;
|
1038
|
+
/**
|
1039
|
+
* The associated order's ID.
|
1040
|
+
*/
|
295
1041
|
order_id?: string;
|
1042
|
+
/**
|
1043
|
+
* The version of the item.
|
1044
|
+
*/
|
296
1045
|
version?: number;
|
1046
|
+
/**
|
1047
|
+
* The associated item's ID.
|
1048
|
+
*/
|
297
1049
|
item_id?: string;
|
1050
|
+
/**
|
1051
|
+
* The quantity of the item.
|
1052
|
+
*/
|
298
1053
|
quantity?: BigNumberInput;
|
1054
|
+
/**
|
1055
|
+
* The fulfilled quantity of the item.
|
1056
|
+
*/
|
299
1057
|
fulfilled_quantity?: BigNumberInput;
|
1058
|
+
/**
|
1059
|
+
* The requested quantity of the item to be returned.
|
1060
|
+
*/
|
300
1061
|
return_requested_quantity?: BigNumberInput;
|
1062
|
+
/**
|
1063
|
+
* The quantity of the item received through a return.
|
1064
|
+
*/
|
301
1065
|
return_received_quantity?: BigNumberInput;
|
1066
|
+
/**
|
1067
|
+
* The dismissed quantity of the item through a return.
|
1068
|
+
*/
|
302
1069
|
return_dismissed_quantity?: BigNumberInput;
|
1070
|
+
/**
|
1071
|
+
* The quantity written off of the item due to
|
1072
|
+
* an order change.
|
1073
|
+
*/
|
303
1074
|
written_off_quantity?: BigNumberInput;
|
1075
|
+
/**
|
1076
|
+
* Holds custom data in key-value pairs.
|
1077
|
+
*/
|
304
1078
|
metadata?: Record<string, unknown> | null;
|
305
1079
|
}
|
1080
|
+
/**
|
1081
|
+
* The attributes to update in the item with filters specifying
|
1082
|
+
* which items to update.
|
1083
|
+
*/
|
306
1084
|
export interface UpdateOrderItemWithSelectorDTO {
|
1085
|
+
/**
|
1086
|
+
* The filters specifying which items to update.
|
1087
|
+
*/
|
307
1088
|
selector: Partial<OrderItemDTO>;
|
1089
|
+
/**
|
1090
|
+
* The data of the item to update.
|
1091
|
+
*/
|
308
1092
|
data: Partial<UpdateOrderItemDTO>;
|
309
1093
|
}
|
310
1094
|
/** ORDER DETAIL END */
|
311
1095
|
/** ORDER bundled action flows */
|
1096
|
+
/**
|
1097
|
+
* The details of an item used in a change action
|
1098
|
+
* performed on an order.
|
1099
|
+
*/
|
312
1100
|
interface BaseOrderBundledItemActionsDTO {
|
1101
|
+
/**
|
1102
|
+
* The ID of the item.
|
1103
|
+
*/
|
313
1104
|
id: string;
|
1105
|
+
/**
|
1106
|
+
* The quantity of the item.
|
1107
|
+
*/
|
314
1108
|
quantity: BigNumberInput;
|
1109
|
+
/**
|
1110
|
+
* The internal note of the item.
|
1111
|
+
*/
|
315
1112
|
internal_note?: string;
|
1113
|
+
/**
|
1114
|
+
* The note of the item.
|
1115
|
+
*/
|
316
1116
|
note?: string | null;
|
1117
|
+
/**
|
1118
|
+
* Holds custom data in key-value pairs.
|
1119
|
+
*/
|
317
1120
|
metadata?: Record<string, unknown> | null;
|
1121
|
+
/**
|
1122
|
+
* Other details related to the item.
|
1123
|
+
*/
|
318
1124
|
[key: string]: any;
|
319
1125
|
}
|
1126
|
+
/**
|
1127
|
+
* The details of the action performed on an order,
|
1128
|
+
* return, claim, or exchange.
|
1129
|
+
*/
|
320
1130
|
interface BaseOrderBundledActionsDTO {
|
1131
|
+
/**
|
1132
|
+
* The associated order's ID.
|
1133
|
+
*/
|
321
1134
|
order_id: string;
|
1135
|
+
/**
|
1136
|
+
* The associated return's ID.
|
1137
|
+
*/
|
322
1138
|
return_id?: string;
|
1139
|
+
/**
|
1140
|
+
* The associated claim's ID.
|
1141
|
+
*/
|
323
1142
|
claim_id?: string;
|
1143
|
+
/**
|
1144
|
+
* The associated exchange's ID.
|
1145
|
+
*/
|
324
1146
|
exchange_id?: string;
|
1147
|
+
/**
|
1148
|
+
* The description of the action.
|
1149
|
+
*/
|
325
1150
|
description?: string;
|
1151
|
+
/**
|
1152
|
+
* The internal note of the action.
|
1153
|
+
*/
|
326
1154
|
internal_note?: string;
|
1155
|
+
/**
|
1156
|
+
* The name of the data model the action
|
1157
|
+
* references. For example, `return`.
|
1158
|
+
*/
|
327
1159
|
reference?: string;
|
1160
|
+
/**
|
1161
|
+
* The ID of the record of the data model
|
1162
|
+
* specified in {@link reference}.
|
1163
|
+
*
|
1164
|
+
* For example, if `reference` is `return`, the
|
1165
|
+
* value is `return_123`.
|
1166
|
+
*/
|
328
1167
|
reference_id?: string;
|
1168
|
+
/**
|
1169
|
+
* The user or customer that created this action.
|
1170
|
+
*/
|
329
1171
|
created_by?: string | null;
|
1172
|
+
/**
|
1173
|
+
* Holds custom data in key-value pairs.
|
1174
|
+
*/
|
330
1175
|
metadata?: Record<string, unknown> | null;
|
331
1176
|
}
|
1177
|
+
/**
|
1178
|
+
* The details to register a fulfillment of an order, return,
|
1179
|
+
* exchange, or claim.
|
1180
|
+
*/
|
332
1181
|
export interface RegisterOrderFulfillmentDTO extends BaseOrderBundledActionsDTO {
|
1182
|
+
/**
|
1183
|
+
* The items of the fulfillment.
|
1184
|
+
*/
|
333
1185
|
items: BaseOrderBundledItemActionsDTO[];
|
334
1186
|
}
|
1187
|
+
/**
|
1188
|
+
* The details to cancel a fulfillment of an order, return,
|
1189
|
+
* exchange, or claim.
|
1190
|
+
*/
|
335
1191
|
export interface CancelOrderFulfillmentDTO extends BaseOrderBundledActionsDTO {
|
1192
|
+
/**
|
1193
|
+
* The items whose fulfillment is canceled.
|
1194
|
+
*/
|
336
1195
|
items: BaseOrderBundledItemActionsDTO[];
|
337
1196
|
}
|
1197
|
+
/**
|
1198
|
+
* The details to register a shipment of an order, return, exchange,
|
1199
|
+
* or claim.
|
1200
|
+
*/
|
338
1201
|
export interface RegisterOrderShipmentDTO extends BaseOrderBundledActionsDTO {
|
1202
|
+
/**
|
1203
|
+
* The items of the shipment.
|
1204
|
+
*/
|
339
1205
|
items?: BaseOrderBundledItemActionsDTO[];
|
1206
|
+
/**
|
1207
|
+
* Whether the customer should receive notifications about the shipment.
|
1208
|
+
*/
|
340
1209
|
no_notification?: boolean;
|
341
1210
|
}
|
1211
|
+
/**
|
1212
|
+
* The return to be created.
|
1213
|
+
*/
|
342
1214
|
export interface CreateOrderReturnDTO extends BaseOrderBundledActionsDTO {
|
1215
|
+
/**
|
1216
|
+
* The ID of the location to return the items to.
|
1217
|
+
*/
|
343
1218
|
location_id?: string;
|
1219
|
+
/**
|
1220
|
+
* The items of the return.
|
1221
|
+
*/
|
344
1222
|
items?: {
|
1223
|
+
/**
|
1224
|
+
* The ID of the item.
|
1225
|
+
*/
|
345
1226
|
id: string;
|
1227
|
+
/**
|
1228
|
+
* The quantity of the item.
|
1229
|
+
*/
|
346
1230
|
quantity: BigNumberInput;
|
1231
|
+
/**
|
1232
|
+
* The internal note of the item.
|
1233
|
+
*/
|
347
1234
|
internal_note?: string | null;
|
1235
|
+
/**
|
1236
|
+
* The note of the item.
|
1237
|
+
*/
|
348
1238
|
note?: string | null;
|
1239
|
+
/**
|
1240
|
+
* The associated reason's ID.
|
1241
|
+
*/
|
349
1242
|
reason_id?: string | null;
|
1243
|
+
/**
|
1244
|
+
* Holds custom data in key-value pairs.
|
1245
|
+
*/
|
350
1246
|
metadata?: Record<string, unknown> | null;
|
351
1247
|
}[];
|
1248
|
+
/**
|
1249
|
+
* The shipping method of the return.
|
1250
|
+
*/
|
352
1251
|
shipping_method?: Omit<CreateOrderShippingMethodDTO, "order_id"> | string;
|
1252
|
+
/**
|
1253
|
+
* The refund amount of the return.
|
1254
|
+
*/
|
353
1255
|
refund_amount?: BigNumberInput;
|
1256
|
+
/**
|
1257
|
+
* Whether the customer should receive notifications related to
|
1258
|
+
* updates on the return.
|
1259
|
+
*/
|
354
1260
|
no_notification?: boolean;
|
1261
|
+
/**
|
1262
|
+
* The associated claim's ID.
|
1263
|
+
*/
|
355
1264
|
claim_id?: string;
|
1265
|
+
/**
|
1266
|
+
* The associated exchange's ID.
|
1267
|
+
*/
|
356
1268
|
exchange_id?: string;
|
357
1269
|
}
|
1270
|
+
/**
|
1271
|
+
* A return's status.
|
1272
|
+
*/
|
358
1273
|
export type ReturnStatus = "open" | "requested" | "received" | "partially_received" | "canceled";
|
1274
|
+
/**
|
1275
|
+
* The attributes to update in the return.
|
1276
|
+
*/
|
359
1277
|
export interface UpdateReturnDTO {
|
1278
|
+
/**
|
1279
|
+
* The ID of the return.
|
1280
|
+
*/
|
360
1281
|
id: string;
|
1282
|
+
/**
|
1283
|
+
* The ID of the location to return the items to.
|
1284
|
+
*/
|
361
1285
|
location_id?: string;
|
1286
|
+
/**
|
1287
|
+
* The refund amount of the return.
|
1288
|
+
*/
|
362
1289
|
refund_amount?: BigNumberInput;
|
1290
|
+
/**
|
1291
|
+
* Whether the customer should receive notifications related
|
1292
|
+
* to updates on the return.
|
1293
|
+
*/
|
363
1294
|
no_notification?: boolean;
|
1295
|
+
/**
|
1296
|
+
* The associated claim's ID.
|
1297
|
+
*/
|
364
1298
|
claim_id?: string;
|
1299
|
+
/**
|
1300
|
+
* The associated exchange's ID.
|
1301
|
+
*/
|
365
1302
|
exchange_id?: string;
|
1303
|
+
/**
|
1304
|
+
* Holds custom data in key-value pairs.
|
1305
|
+
*/
|
366
1306
|
metadata?: Record<string, unknown> | null;
|
1307
|
+
/**
|
1308
|
+
* The items of the return.
|
1309
|
+
*/
|
367
1310
|
items?: {
|
1311
|
+
/**
|
1312
|
+
* The quantity of the item.
|
1313
|
+
*/
|
368
1314
|
quantity: BigNumberInput;
|
1315
|
+
/**
|
1316
|
+
* The internal note of the item.
|
1317
|
+
*/
|
369
1318
|
internal_note?: string | null;
|
1319
|
+
/**
|
1320
|
+
* The note of the item.
|
1321
|
+
*/
|
370
1322
|
note?: string | null;
|
1323
|
+
/**
|
1324
|
+
* The associated reason's ID.
|
1325
|
+
*/
|
371
1326
|
reason_id?: string | null;
|
1327
|
+
/**
|
1328
|
+
* The associated return's ID.
|
1329
|
+
*/
|
372
1330
|
return_id?: string | null;
|
1331
|
+
/**
|
1332
|
+
* Holds custom data in key-value pairs.
|
1333
|
+
*/
|
373
1334
|
metadata?: Record<string, unknown> | null;
|
374
1335
|
}[];
|
375
1336
|
status?: ReturnStatus;
|
376
1337
|
requested_at?: Date;
|
377
1338
|
}
|
1339
|
+
/**
|
1340
|
+
* The attributes to update in the claim.
|
1341
|
+
*/
|
378
1342
|
export interface UpdateOrderClaimDTO {
|
1343
|
+
/**
|
1344
|
+
* The ID of the claim.
|
1345
|
+
*/
|
379
1346
|
id: string;
|
1347
|
+
/**
|
1348
|
+
* The refund amount of the claim.
|
1349
|
+
*/
|
380
1350
|
refund_amount?: BigNumberInput;
|
1351
|
+
/**
|
1352
|
+
* Whether the customer should receive notifications
|
1353
|
+
* about updates related to the claim.
|
1354
|
+
*/
|
381
1355
|
no_notification?: boolean;
|
1356
|
+
/**
|
1357
|
+
* The associated return's ID, if the
|
1358
|
+
* claim's {@link type} is `replace`.
|
1359
|
+
*/
|
382
1360
|
return_id?: string;
|
1361
|
+
/**
|
1362
|
+
* The type of the claim.
|
1363
|
+
*/
|
383
1364
|
type?: OrderClaimType;
|
1365
|
+
/**
|
1366
|
+
* Holds custom data in key-value pairs.
|
1367
|
+
*/
|
384
1368
|
metadata?: Record<string, unknown> | null;
|
385
1369
|
}
|
1370
|
+
/**
|
1371
|
+
* The attributes to update in the exchange.
|
1372
|
+
*/
|
386
1373
|
export interface UpdateOrderExchangeDTO {
|
1374
|
+
/**
|
1375
|
+
* The ID of the exchange.
|
1376
|
+
*/
|
387
1377
|
id: string;
|
1378
|
+
/**
|
1379
|
+
* The difference due of the exchange.
|
1380
|
+
*
|
1381
|
+
* - If less than `0`, the merchant owes the customer this amount.
|
1382
|
+
* - If greater than `0`, the customer owes the merchange this amount.
|
1383
|
+
* - If equal to `0`, no payment is required by either sides.
|
1384
|
+
*/
|
388
1385
|
difference_due?: BigNumberInput;
|
1386
|
+
/**
|
1387
|
+
* Whether the customer should receive notifications related
|
1388
|
+
* to updates on the exchange.
|
1389
|
+
*/
|
389
1390
|
no_notification?: boolean;
|
1391
|
+
/**
|
1392
|
+
* The associated return's ID.
|
1393
|
+
*/
|
390
1394
|
return_id?: string;
|
1395
|
+
/**
|
1396
|
+
* Whether backorders are allowed on the exchange's items.
|
1397
|
+
*/
|
391
1398
|
allow_backorder?: boolean;
|
1399
|
+
/**
|
1400
|
+
* Holds custom data in key-value pairs.
|
1401
|
+
*/
|
392
1402
|
metadata?: Record<string, unknown> | null;
|
393
1403
|
}
|
1404
|
+
/**
|
1405
|
+
* The order return item to be created.
|
1406
|
+
*/
|
394
1407
|
export interface CreateOrderReturnItemDTO {
|
1408
|
+
/**
|
1409
|
+
* The ID of the associated return.
|
1410
|
+
*/
|
395
1411
|
return_id: string;
|
1412
|
+
/**
|
1413
|
+
* The ID of the associated line item.
|
1414
|
+
*/
|
396
1415
|
item_id: string;
|
1416
|
+
/**
|
1417
|
+
* The quantity to return.
|
1418
|
+
*/
|
397
1419
|
quantity?: BigNumberInput;
|
1420
|
+
/**
|
1421
|
+
* The ID of the associated return reason.
|
1422
|
+
*/
|
398
1423
|
reason_id?: string;
|
1424
|
+
/**
|
1425
|
+
* The note of the return.
|
1426
|
+
*/
|
399
1427
|
note?: string;
|
1428
|
+
/**
|
1429
|
+
* Holds custom data in key-value pairs.
|
1430
|
+
*/
|
400
1431
|
metadata?: Record<string, unknown> | null;
|
401
1432
|
}
|
1433
|
+
/**
|
1434
|
+
* The order claim item to be created.
|
1435
|
+
*/
|
402
1436
|
export interface CreateOrderClaimItemDTO {
|
1437
|
+
/**
|
1438
|
+
* The associated claim's ID.
|
1439
|
+
*/
|
403
1440
|
claim_id: string;
|
1441
|
+
/**
|
1442
|
+
* The associated item's ID.
|
1443
|
+
*/
|
404
1444
|
item_id: string;
|
1445
|
+
/**
|
1446
|
+
* The reason of the order claim item
|
1447
|
+
*/
|
405
1448
|
reason?: ClaimReason;
|
1449
|
+
/**
|
1450
|
+
* Whether the order claim item is an additional item sent
|
1451
|
+
* as a replacement to the customer.
|
1452
|
+
*/
|
406
1453
|
is_additional_item?: boolean;
|
1454
|
+
/**
|
1455
|
+
* The quantity of the order claim item
|
1456
|
+
*/
|
407
1457
|
quantity?: BigNumberInput;
|
1458
|
+
/**
|
1459
|
+
* The note of the order claim item
|
1460
|
+
*/
|
408
1461
|
note?: string;
|
1462
|
+
/**
|
1463
|
+
* Holds custom data in key-value pairs.
|
1464
|
+
*/
|
409
1465
|
metadata?: Record<string, unknown> | null;
|
410
1466
|
}
|
1467
|
+
/**
|
1468
|
+
* The order exchange item to be created.
|
1469
|
+
*/
|
411
1470
|
export interface CreateOrderExchangeItemDTO {
|
1471
|
+
/**
|
1472
|
+
* The associated exchange's ID.
|
1473
|
+
*/
|
412
1474
|
exchange_id: string;
|
1475
|
+
/**
|
1476
|
+
* The associated item's ID.
|
1477
|
+
*/
|
413
1478
|
item_id: string;
|
1479
|
+
/**
|
1480
|
+
* The quantity of the order exchange item
|
1481
|
+
*/
|
414
1482
|
quantity?: BigNumberInput;
|
1483
|
+
/**
|
1484
|
+
* The note of the order exchange item
|
1485
|
+
*/
|
415
1486
|
note?: string;
|
1487
|
+
/**
|
1488
|
+
* Holds custom data in key-value pairs.
|
1489
|
+
*/
|
416
1490
|
metadata?: Record<string, unknown> | null;
|
417
1491
|
}
|
1492
|
+
/**
|
1493
|
+
* The order exchange item to be created.
|
1494
|
+
*/
|
418
1495
|
export interface CreateOrderExchangeItemDTO {
|
1496
|
+
/**
|
1497
|
+
* The associated exchange's ID.
|
1498
|
+
*/
|
419
1499
|
exchange_id: string;
|
1500
|
+
/**
|
1501
|
+
* The associated item's ID.
|
1502
|
+
*/
|
420
1503
|
item_id: string;
|
1504
|
+
/**
|
1505
|
+
* The quantity of the order exchange item
|
1506
|
+
*/
|
421
1507
|
quantity?: BigNumberInput;
|
1508
|
+
/**
|
1509
|
+
* The note of the order exchange item
|
1510
|
+
*/
|
422
1511
|
note?: string;
|
1512
|
+
/**
|
1513
|
+
* Holds custom data in key-value pairs.
|
1514
|
+
*/
|
423
1515
|
metadata?: Record<string, unknown> | null;
|
424
1516
|
}
|
1517
|
+
/**
|
1518
|
+
* The attributes to update in the return with filters specifying
|
1519
|
+
* which returns to update.
|
1520
|
+
*/
|
425
1521
|
export interface UpdateOrderReturnWithSelectorDTO {
|
1522
|
+
/**
|
1523
|
+
* The filters specifying which returns to update.
|
1524
|
+
*/
|
426
1525
|
selector: Partial<ReturnDTO>;
|
1526
|
+
/**
|
1527
|
+
* The data of the return to update.
|
1528
|
+
*/
|
427
1529
|
data: Partial<UpdateReturnDTO>;
|
428
1530
|
}
|
1531
|
+
/**
|
1532
|
+
* The attributes to update in the claim with filters specifying
|
1533
|
+
* which claims to update.
|
1534
|
+
*/
|
429
1535
|
export interface UpdateOrderClaimWithSelectorDTO {
|
1536
|
+
/**
|
1537
|
+
* The filters specifying which claims to update.
|
1538
|
+
*/
|
430
1539
|
selector: Partial<OrderClaimDTO>;
|
1540
|
+
/**
|
1541
|
+
* The data of the claim to update.
|
1542
|
+
*/
|
431
1543
|
data: Partial<UpdateOrderClaimDTO>;
|
432
1544
|
}
|
1545
|
+
/**
|
1546
|
+
* The attributes to update in the exchange with filters specifying
|
1547
|
+
* which exchanges to update.
|
1548
|
+
*/
|
433
1549
|
export interface UpdateOrderExchangeWithSelectorDTO {
|
1550
|
+
/**
|
1551
|
+
* The filters specifying which exchanges to update.
|
1552
|
+
*/
|
434
1553
|
selector: Partial<OrderExchangeDTO>;
|
1554
|
+
/**
|
1555
|
+
* The data of the exchange to update.
|
1556
|
+
*/
|
435
1557
|
data: Partial<UpdateOrderExchangeDTO>;
|
436
1558
|
}
|
437
|
-
export interface CancelOrderReturnDTO extends
|
1559
|
+
export interface CancelOrderReturnDTO extends BaseOrderBundledActionsDTO {
|
438
1560
|
return_id: string;
|
439
1561
|
}
|
1562
|
+
/**
|
1563
|
+
* A claim's type.
|
1564
|
+
*/
|
440
1565
|
export type OrderClaimType = "refund" | "replace";
|
1566
|
+
/**
|
1567
|
+
* A claim's reason.
|
1568
|
+
*/
|
441
1569
|
export type ClaimReason = "missing_item" | "wrong_item" | "production_failure" | "other";
|
1570
|
+
/**
|
1571
|
+
* The claim to be created.
|
1572
|
+
*/
|
442
1573
|
export interface CreateOrderClaimDTO extends BaseOrderBundledActionsDTO {
|
1574
|
+
/**
|
1575
|
+
* The type of the claim.
|
1576
|
+
*/
|
443
1577
|
type: OrderClaimType;
|
1578
|
+
/**
|
1579
|
+
* The items of the claim.
|
1580
|
+
*/
|
444
1581
|
claim_items?: (BaseOrderBundledItemActionsDTO & {
|
1582
|
+
/**
|
1583
|
+
* The reason the item is claimed.
|
1584
|
+
*/
|
445
1585
|
reason?: ClaimReason;
|
1586
|
+
/**
|
1587
|
+
* Images of the item explaining why it's claimed.
|
1588
|
+
*/
|
446
1589
|
images?: {
|
1590
|
+
/**
|
1591
|
+
* The image's URL.
|
1592
|
+
*/
|
447
1593
|
url: string;
|
1594
|
+
/**
|
1595
|
+
* Holds custom data in key-value pairs.
|
1596
|
+
*/
|
448
1597
|
metadata?: Record<string, unknown> | null;
|
449
1598
|
}[];
|
450
1599
|
})[];
|
1600
|
+
/**
|
1601
|
+
* The items to be sent to the customer in replacement, if the
|
1602
|
+
* claim's type is `replace`.
|
1603
|
+
*/
|
451
1604
|
additional_items?: BaseOrderBundledItemActionsDTO[];
|
1605
|
+
/**
|
1606
|
+
* The shipping methods used to send the additional items to the customer,
|
1607
|
+
* if the claim's type is `replace`.
|
1608
|
+
*/
|
452
1609
|
shipping_methods?: Omit<CreateOrderShippingMethodDTO, "order_id">[] | string[];
|
1610
|
+
/**
|
1611
|
+
* The shipping methods used to send the items to be returned from the customer,
|
1612
|
+
* if the claim's type is `replace`.
|
1613
|
+
*/
|
453
1614
|
return_shipping?: Omit<CreateOrderShippingMethodDTO, "order_id"> | string;
|
1615
|
+
/**
|
1616
|
+
* The amount to be refunded.
|
1617
|
+
*/
|
454
1618
|
refund_amount?: BigNumberInput;
|
1619
|
+
/**
|
1620
|
+
* Whether the customer should receive notifications related to updates
|
1621
|
+
* on the claim.
|
1622
|
+
*/
|
455
1623
|
no_notification?: boolean;
|
456
1624
|
}
|
457
|
-
export interface CancelOrderClaimDTO extends
|
1625
|
+
export interface CancelOrderClaimDTO extends BaseOrderBundledActionsDTO {
|
458
1626
|
claim_id: string;
|
459
1627
|
}
|
1628
|
+
/**
|
1629
|
+
* The exchange to be created.
|
1630
|
+
*/
|
460
1631
|
export interface CreateOrderExchangeDTO extends BaseOrderBundledActionsDTO {
|
1632
|
+
/**
|
1633
|
+
* The items to be sent to the customer.
|
1634
|
+
*/
|
461
1635
|
additional_items?: BaseOrderBundledItemActionsDTO[];
|
1636
|
+
/**
|
1637
|
+
* The shipping methods used to send the additional items
|
1638
|
+
* to the customer.
|
1639
|
+
*/
|
462
1640
|
shipping_methods?: Omit<CreateOrderShippingMethodDTO, "order_id">[] | string[];
|
1641
|
+
/**
|
1642
|
+
* The shipping methods used to return items from the customer.
|
1643
|
+
*/
|
463
1644
|
return_shipping?: Omit<CreateOrderShippingMethodDTO, "order_id"> | string;
|
1645
|
+
/**
|
1646
|
+
* The difference due of the exchange.
|
1647
|
+
*
|
1648
|
+
* - If less than `0`, the merchant owes the customer this amount.
|
1649
|
+
* - If greater than `0`, the customer owes the merchange this amount.
|
1650
|
+
* - If equal to `0`, no payment is required by either sides.
|
1651
|
+
*/
|
464
1652
|
difference_due?: BigNumberInput;
|
1653
|
+
/**
|
1654
|
+
* Whether backorder is allowed for the exchange's items.
|
1655
|
+
*/
|
465
1656
|
allow_backorder?: boolean;
|
1657
|
+
/**
|
1658
|
+
* Whether the customer should receive notifications related to
|
1659
|
+
* updates on the exchange.
|
1660
|
+
*/
|
466
1661
|
no_notification?: boolean;
|
467
1662
|
}
|
468
|
-
export interface CancelOrderExchangeDTO extends
|
1663
|
+
export interface CancelOrderExchangeDTO extends BaseOrderBundledActionsDTO {
|
469
1664
|
exchange_id: string;
|
470
1665
|
}
|
1666
|
+
/**
|
1667
|
+
* The details of return receival.
|
1668
|
+
*/
|
471
1669
|
export interface ReceiveOrderReturnDTO extends Omit<BaseOrderBundledActionsDTO, "order_id"> {
|
1670
|
+
/**
|
1671
|
+
* The items received.
|
1672
|
+
*/
|
472
1673
|
items: BaseOrderBundledItemActionsDTO[];
|
1674
|
+
/**
|
1675
|
+
* The return's ID.
|
1676
|
+
*/
|
473
1677
|
return_id: string;
|
474
1678
|
}
|
475
1679
|
/** ORDER bundled action flows */
|
1680
|
+
/**
|
1681
|
+
* The return reason to be created.
|
1682
|
+
*/
|
476
1683
|
export interface CreateOrderReturnReasonDTO {
|
1684
|
+
/**
|
1685
|
+
* The unique value of the return reason.
|
1686
|
+
*/
|
477
1687
|
value: string;
|
1688
|
+
/**
|
1689
|
+
* The label of the return reason.
|
1690
|
+
*/
|
478
1691
|
label: string;
|
1692
|
+
/**
|
1693
|
+
* The description of the return reason.
|
1694
|
+
*/
|
479
1695
|
description?: string;
|
1696
|
+
/**
|
1697
|
+
* The associated parent return reason's ID.
|
1698
|
+
*/
|
480
1699
|
parent_return_reason_id?: string;
|
1700
|
+
/**
|
1701
|
+
* Holds custom data in key-value pairs.
|
1702
|
+
*/
|
481
1703
|
metadata?: Record<string, unknown> | null;
|
482
1704
|
}
|
1705
|
+
/**
|
1706
|
+
* The attributes to update in the return reason.
|
1707
|
+
*/
|
483
1708
|
export interface UpdateOrderReturnReasonDTO {
|
1709
|
+
/**
|
1710
|
+
* The ID of the return reason.
|
1711
|
+
*/
|
484
1712
|
id?: string;
|
1713
|
+
/**
|
1714
|
+
* The label of the return reason.
|
1715
|
+
*/
|
485
1716
|
label?: string;
|
1717
|
+
/**
|
1718
|
+
* The unique value of the return reason.
|
1719
|
+
*/
|
486
1720
|
value?: string;
|
1721
|
+
/**
|
1722
|
+
* The description of the return reason.
|
1723
|
+
*/
|
487
1724
|
description?: string;
|
1725
|
+
/**
|
1726
|
+
* Holds custom data in key-value pairs.
|
1727
|
+
*/
|
488
1728
|
metadata?: Record<string, unknown> | null;
|
489
1729
|
}
|
1730
|
+
/**
|
1731
|
+
* The attributes to update in the return reason
|
1732
|
+
*/
|
490
1733
|
export interface ReturnReasonUpdatableFields {
|
1734
|
+
/**
|
1735
|
+
* he unique value of the return reason.
|
1736
|
+
*/
|
491
1737
|
value?: string;
|
1738
|
+
/**
|
1739
|
+
* The label of the return reason.
|
1740
|
+
*/
|
492
1741
|
label?: string;
|
1742
|
+
/**
|
1743
|
+
* The description of the return reason.
|
1744
|
+
*/
|
493
1745
|
description?: string;
|
1746
|
+
/**
|
1747
|
+
* Holds custom data in key-value pairs.
|
1748
|
+
*/
|
494
1749
|
metadata?: Record<string, unknown> | null;
|
495
1750
|
}
|
1751
|
+
/**
|
1752
|
+
* The attributes to update in the return reason with filters
|
1753
|
+
* specifying which return reasons to update.
|
1754
|
+
*/
|
496
1755
|
export interface UpdateOrderReturnReasonWithSelectorDTO {
|
1756
|
+
/**
|
1757
|
+
* The filters specifying which return reasons to update.
|
1758
|
+
*/
|
497
1759
|
selector: Partial<OrderReturnReasonDTO>;
|
1760
|
+
/**
|
1761
|
+
* The data of the return reasons to update.
|
1762
|
+
*/
|
498
1763
|
data: Partial<UpdateOrderReturnReasonDTO>;
|
499
1764
|
}
|
500
1765
|
export {};
|