@medusajs/types 1.12.0-snapshot-20241016151300 → 2.0.0-preview-20241022094107
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api-key/common/api-key.d.ts +8 -0
- package/dist/api-key/common/api-key.d.ts.map +1 -1
- package/dist/common/index.d.ts +3 -3
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +3 -3
- package/dist/common/index.js.map +1 -1
- package/dist/http/api-key/admin/responses.d.ts +2 -0
- package/dist/http/api-key/admin/responses.d.ts.map +1 -1
- package/dist/http/campaign/admin/responses.d.ts +3 -0
- package/dist/http/campaign/admin/responses.d.ts.map +1 -1
- package/dist/http/cart/store/entities.d.ts +39 -0
- package/dist/http/cart/store/entities.d.ts.map +1 -1
- package/dist/http/cart/store/payloads.d.ts +74 -0
- package/dist/http/cart/store/payloads.d.ts.map +1 -1
- package/dist/http/cart/store/responses.d.ts +28 -0
- package/dist/http/cart/store/responses.d.ts.map +1 -1
- package/dist/http/collection/common.d.ts +44 -2
- package/dist/http/collection/common.d.ts.map +1 -1
- package/dist/http/collection/store/entities.d.ts +3 -0
- package/dist/http/collection/store/entities.d.ts.map +1 -1
- package/dist/http/collection/store/queries.d.ts +0 -2
- package/dist/http/collection/store/queries.d.ts.map +1 -1
- package/dist/http/collection/store/responses.d.ts +6 -0
- package/dist/http/collection/store/responses.d.ts.map +1 -1
- package/dist/http/common/request.d.ts +17 -0
- package/dist/http/common/request.d.ts.map +1 -1
- package/dist/http/common/response.d.ts +9 -0
- package/dist/http/common/response.d.ts.map +1 -1
- package/dist/http/customer/common.d.ts +240 -0
- package/dist/http/customer/common.d.ts.map +1 -1
- package/dist/http/customer/store/entities.d.ts +3 -0
- package/dist/http/customer/store/entities.d.ts.map +1 -1
- package/dist/http/customer/store/responses.d.ts +9 -0
- package/dist/http/customer/store/responses.d.ts.map +1 -1
- package/dist/http/exchange/admin/payloads.d.ts +0 -4
- package/dist/http/exchange/admin/payloads.d.ts.map +1 -1
- package/dist/http/fulfillment/store/index.d.ts +54 -1
- package/dist/http/fulfillment/store/index.d.ts.map +1 -1
- package/dist/http/order/admin/entities.d.ts +24 -0
- package/dist/http/order/admin/entities.d.ts.map +1 -1
- package/dist/http/order/admin/queries.d.ts +12 -0
- package/dist/http/order/admin/queries.d.ts.map +1 -1
- package/dist/http/order/admin/responses.d.ts +4 -1
- package/dist/http/order/admin/responses.d.ts.map +1 -1
- package/dist/http/order/common.d.ts +630 -0
- package/dist/http/order/common.d.ts.map +1 -1
- package/dist/http/order/store/entities.d.ts +39 -0
- package/dist/http/order/store/entities.d.ts.map +1 -1
- package/dist/http/order/store/queries.d.ts +6 -0
- package/dist/http/order/store/queries.d.ts.map +1 -1
- package/dist/http/order/store/responses.d.ts +6 -0
- package/dist/http/order/store/responses.d.ts.map +1 -1
- package/dist/http/payment/common.d.ts +3 -0
- package/dist/http/payment/common.d.ts.map +1 -1
- package/dist/http/payment/store/entities.d.ts +9 -0
- package/dist/http/payment/store/entities.d.ts.map +1 -1
- package/dist/http/payment/store/payloads.d.ts +18 -0
- package/dist/http/payment/store/payloads.d.ts.map +1 -1
- package/dist/http/payment/store/queries.d.ts +3 -0
- package/dist/http/payment/store/queries.d.ts.map +1 -1
- package/dist/http/payment/store/responses.d.ts +6 -0
- package/dist/http/payment/store/responses.d.ts.map +1 -1
- package/dist/http/product/admin/payloads.d.ts +3 -1
- package/dist/http/product/admin/payloads.d.ts.map +1 -1
- package/dist/http/product/common.d.ts +268 -0
- package/dist/http/product/common.d.ts.map +1 -1
- package/dist/http/product/store/entitites.d.ts +36 -0
- package/dist/http/product/store/entitites.d.ts.map +1 -1
- package/dist/http/product/store/queries.d.ts +19 -1
- package/dist/http/product/store/queries.d.ts.map +1 -1
- package/dist/http/product/store/responses.d.ts +6 -0
- package/dist/http/product/store/responses.d.ts.map +1 -1
- package/dist/http/product-category/common.d.ts +94 -0
- package/dist/http/product-category/common.d.ts.map +1 -1
- package/dist/http/product-category/store/entities.d.ts +9 -0
- package/dist/http/product-category/store/entities.d.ts.map +1 -1
- package/dist/http/product-category/store/queries.d.ts +1 -1
- package/dist/http/product-category/store/queries.d.ts.map +1 -1
- package/dist/http/product-category/store/responses.d.ts +6 -0
- package/dist/http/product-category/store/responses.d.ts.map +1 -1
- package/dist/http/promotion/common.d.ts +3 -0
- package/dist/http/promotion/common.d.ts.map +1 -1
- package/dist/http/region/common.d.ts +69 -0
- package/dist/http/region/common.d.ts.map +1 -1
- package/dist/http/region/store/responses.d.ts +6 -0
- package/dist/http/region/store/responses.d.ts.map +1 -1
- package/dist/http/shipping-option/store/queries.d.ts +8 -0
- package/dist/http/shipping-option/store/queries.d.ts.map +1 -1
- package/dist/http/shipping-option/store/responses.d.ts +2 -2
- package/dist/http/shipping-option/store/responses.d.ts.map +1 -1
- package/dist/index-data/common.d.ts +1 -1
- package/dist/inventory/service.d.ts +41 -9
- package/dist/inventory/service.d.ts.map +1 -1
- package/dist/modules-sdk/index.d.ts +0 -1
- package/dist/modules-sdk/index.d.ts.map +1 -1
- package/dist/modules-sdk/module-provider.d.ts +1 -1
- package/dist/modules-sdk/module-provider.d.ts.map +1 -1
- package/dist/notification/common.d.ts +19 -0
- package/dist/notification/common.d.ts.map +1 -1
- package/dist/notification/mutations.d.ts +5 -0
- package/dist/notification/mutations.d.ts.map +1 -1
- package/dist/notification/provider.d.ts +5 -1
- package/dist/notification/provider.d.ts.map +1 -1
- package/dist/order/common.d.ts +0 -49
- package/dist/order/common.d.ts.map +1 -1
- package/dist/product/common.d.ts +8 -0
- package/dist/product/common.d.ts.map +1 -1
- package/dist/tax/mutations.d.ts +17 -0
- package/dist/tax/mutations.d.ts.map +1 -1
- package/dist/tax/service.d.ts +34 -1
- package/dist/tax/service.d.ts.map +1 -1
- package/package.json +1 -1
@@ -7,241 +7,871 @@ import { BasePaymentCollection } from "../payment/common";
|
|
7
7
|
import { BaseProduct, BaseProductVariant } from "../product/common";
|
8
8
|
import { BaseReturn } from "../return/common";
|
9
9
|
export interface BaseOrderSummary {
|
10
|
+
/**
|
11
|
+
* The total of the order including taxes and promotions.
|
12
|
+
*/
|
10
13
|
total: number;
|
14
|
+
/**
|
15
|
+
* The total of the order excluding taxes, including promotions.
|
16
|
+
*/
|
11
17
|
subtotal: number;
|
18
|
+
/**
|
19
|
+
* The tax totals of the order including promotions.
|
20
|
+
*/
|
12
21
|
total_tax: number;
|
22
|
+
/**
|
23
|
+
* The total ordered amount.
|
24
|
+
*/
|
13
25
|
ordered_total: number;
|
26
|
+
/**
|
27
|
+
* The total fulfilled amount.
|
28
|
+
*/
|
14
29
|
fulfilled_total: number;
|
30
|
+
/**
|
31
|
+
* The total amount of returned items.
|
32
|
+
*/
|
15
33
|
returned_total: number;
|
34
|
+
/**
|
35
|
+
* The total amount of the items requested to be returned.
|
36
|
+
*/
|
16
37
|
return_request_total: number;
|
38
|
+
/**
|
39
|
+
* The total amount of the items removed from the order.
|
40
|
+
*/
|
17
41
|
write_off_total: number;
|
42
|
+
/**
|
43
|
+
* The total amount paid.
|
44
|
+
*/
|
18
45
|
paid_total: number;
|
46
|
+
/**
|
47
|
+
* The total amount refunded
|
48
|
+
*/
|
19
49
|
refunded_total: number;
|
20
50
|
}
|
21
51
|
export interface BaseOrderAdjustmentLine {
|
52
|
+
/**
|
53
|
+
* The adjustment line's ID.
|
54
|
+
*/
|
22
55
|
id: string;
|
56
|
+
/**
|
57
|
+
* The adjustment's promotion code.
|
58
|
+
*/
|
23
59
|
code?: string;
|
60
|
+
/**
|
61
|
+
* The adjustment's amount.
|
62
|
+
*/
|
24
63
|
amount: number;
|
64
|
+
/**
|
65
|
+
* The ID of the order this adjustment line belongs to.
|
66
|
+
*/
|
25
67
|
order_id: string;
|
68
|
+
/**
|
69
|
+
* The adjustment's description.
|
70
|
+
*/
|
26
71
|
description?: string;
|
72
|
+
/**
|
73
|
+
* The ID of the applied promotion.
|
74
|
+
*/
|
27
75
|
promotion_id?: string;
|
76
|
+
/**
|
77
|
+
* The ID of the associated provider.
|
78
|
+
*/
|
28
79
|
provider_id?: string;
|
80
|
+
/**
|
81
|
+
* The date the adjustment was created.
|
82
|
+
*/
|
29
83
|
created_at: Date | string;
|
84
|
+
/**
|
85
|
+
* The date the adjustment was updated.
|
86
|
+
*/
|
30
87
|
updated_at: Date | string;
|
31
88
|
}
|
32
89
|
export interface BaseOrderShippingMethodAdjustment extends BaseOrderAdjustmentLine {
|
90
|
+
/**
|
91
|
+
* The associated shipping method's details.
|
92
|
+
*/
|
33
93
|
shipping_method: BaseOrderShippingMethod;
|
94
|
+
/**
|
95
|
+
* The associated shipping method's ID.
|
96
|
+
*/
|
34
97
|
shipping_method_id: string;
|
35
98
|
}
|
36
99
|
export interface BaseOrderLineItemAdjustment extends BaseOrderAdjustmentLine {
|
100
|
+
/**
|
101
|
+
* The associated item's details.
|
102
|
+
*/
|
37
103
|
item: BaseOrderLineItem;
|
104
|
+
/**
|
105
|
+
* The associated item's ID.
|
106
|
+
*/
|
38
107
|
item_id: string;
|
39
108
|
}
|
40
109
|
export interface BaseOrderTaxLine {
|
110
|
+
/**
|
111
|
+
* The ID of thet ax line.
|
112
|
+
*/
|
41
113
|
id: string;
|
114
|
+
/**
|
115
|
+
* The tax rate's description.
|
116
|
+
*/
|
42
117
|
description?: string;
|
118
|
+
/**
|
119
|
+
* The ID of the associated tax rate.
|
120
|
+
*/
|
43
121
|
tax_rate_id?: string;
|
122
|
+
/**
|
123
|
+
* The associated tax rate's code.
|
124
|
+
*/
|
44
125
|
code: string;
|
126
|
+
/**
|
127
|
+
* The rate charged.
|
128
|
+
*/
|
45
129
|
rate: number;
|
130
|
+
/**
|
131
|
+
* The ID of the tax provider used.
|
132
|
+
*/
|
46
133
|
provider_id?: string;
|
134
|
+
/**
|
135
|
+
* The date the tax line was created.
|
136
|
+
*/
|
47
137
|
created_at: Date | string;
|
138
|
+
/**
|
139
|
+
* The date the tax line was updated.
|
140
|
+
*/
|
48
141
|
updated_at: Date | string;
|
49
142
|
}
|
50
143
|
export interface BaseOrderShippingMethodTaxLine extends BaseOrderTaxLine {
|
144
|
+
/**
|
145
|
+
* The shipping method's details.
|
146
|
+
*/
|
51
147
|
shipping_method: BaseOrderShippingMethod;
|
148
|
+
/**
|
149
|
+
* The shipping method's ID.
|
150
|
+
*/
|
52
151
|
shipping_method_id: string;
|
152
|
+
/**
|
153
|
+
* The shipping method's total including taxes and promotions.
|
154
|
+
*/
|
53
155
|
total: number;
|
156
|
+
/**
|
157
|
+
* The shipping method's total excluding taxes, including promotions.
|
158
|
+
*/
|
54
159
|
subtotal: number;
|
55
160
|
}
|
56
161
|
export interface BaseOrderLineItemTaxLine extends BaseOrderTaxLine {
|
162
|
+
/**
|
163
|
+
* The item's details.
|
164
|
+
*/
|
57
165
|
item: BaseOrderLineItem;
|
166
|
+
/**
|
167
|
+
* The item's ID.
|
168
|
+
*/
|
58
169
|
item_id: string;
|
170
|
+
/**
|
171
|
+
* The item's total including taxes and promotions.
|
172
|
+
*/
|
59
173
|
total: number;
|
174
|
+
/**
|
175
|
+
* The item's total excluding taxes, including promotions.
|
176
|
+
*/
|
60
177
|
subtotal: number;
|
61
178
|
}
|
62
179
|
export interface BaseOrderAddress {
|
180
|
+
/**
|
181
|
+
* The address's ID.
|
182
|
+
*/
|
63
183
|
id: string;
|
184
|
+
/**
|
185
|
+
* The ID of the customer this address belongs to.
|
186
|
+
*/
|
64
187
|
customer_id?: string;
|
188
|
+
/**
|
189
|
+
* The address's first name.
|
190
|
+
*/
|
65
191
|
first_name?: string;
|
192
|
+
/**
|
193
|
+
* The address's last name.
|
194
|
+
*/
|
66
195
|
last_name?: string;
|
196
|
+
/**
|
197
|
+
* The address's phone.
|
198
|
+
*/
|
67
199
|
phone?: string;
|
200
|
+
/**
|
201
|
+
* The address's company.
|
202
|
+
*/
|
68
203
|
company?: string;
|
204
|
+
/**
|
205
|
+
* The address's first line.
|
206
|
+
*/
|
69
207
|
address_1?: string;
|
208
|
+
/**
|
209
|
+
* The address's second line.
|
210
|
+
*/
|
70
211
|
address_2?: string;
|
212
|
+
/**
|
213
|
+
* The address's city.
|
214
|
+
*/
|
71
215
|
city?: string;
|
216
|
+
/**
|
217
|
+
* The address's country code.
|
218
|
+
*
|
219
|
+
* @example us
|
220
|
+
*/
|
72
221
|
country_code?: string;
|
222
|
+
/**
|
223
|
+
* The address's province.
|
224
|
+
*/
|
73
225
|
province?: string;
|
226
|
+
/**
|
227
|
+
* The address's postal code.
|
228
|
+
*/
|
74
229
|
postal_code?: string;
|
230
|
+
/**
|
231
|
+
* Key-value pairs of custom data.
|
232
|
+
*/
|
75
233
|
metadata: Record<string, unknown> | null;
|
234
|
+
/**
|
235
|
+
* The date the address was created.
|
236
|
+
*/
|
76
237
|
created_at: Date | string;
|
238
|
+
/**
|
239
|
+
* The date the address was updated.
|
240
|
+
*/
|
77
241
|
updated_at: Date | string;
|
78
242
|
}
|
79
243
|
export interface BaseOrderShippingMethod {
|
244
|
+
/**
|
245
|
+
* The shipping method's ID.
|
246
|
+
*/
|
80
247
|
id: string;
|
248
|
+
/**
|
249
|
+
* The ID of the order this shipping method belongs to.
|
250
|
+
*/
|
81
251
|
order_id: string;
|
252
|
+
/**
|
253
|
+
* The shipping method's name.
|
254
|
+
*/
|
82
255
|
name: string;
|
256
|
+
/**
|
257
|
+
* The shipping method's description.
|
258
|
+
*/
|
83
259
|
description?: string;
|
260
|
+
/**
|
261
|
+
* The shipping method's amount.
|
262
|
+
*/
|
84
263
|
amount: number;
|
264
|
+
/**
|
265
|
+
* Whether the shipping method's amount includes taxes.
|
266
|
+
*/
|
85
267
|
is_tax_inclusive: boolean;
|
268
|
+
/**
|
269
|
+
* The ID of the shipping option this method was created from.
|
270
|
+
*/
|
86
271
|
shipping_option_id: string | null;
|
272
|
+
/**
|
273
|
+
* Data relevant for the fulfillment provider handling the shipping.
|
274
|
+
*
|
275
|
+
* Learn more in [this guide](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).
|
276
|
+
*/
|
87
277
|
data: Record<string, unknown> | null;
|
278
|
+
/**
|
279
|
+
* Key-value pairs of custom data.
|
280
|
+
*/
|
88
281
|
metadata: Record<string, unknown> | null;
|
282
|
+
/**
|
283
|
+
* The shipping method's tax lines.
|
284
|
+
*/
|
89
285
|
tax_lines?: BaseOrderShippingMethodTaxLine[];
|
286
|
+
/**
|
287
|
+
* The shipping method's adjustments.
|
288
|
+
*/
|
90
289
|
adjustments?: BaseOrderShippingMethodAdjustment[];
|
290
|
+
/**
|
291
|
+
* The total of the shipping method including taxes, excluding promotions.
|
292
|
+
*/
|
91
293
|
original_total: number;
|
294
|
+
/**
|
295
|
+
* The total of the shipping method excluding taxes, including promotions.
|
296
|
+
*/
|
92
297
|
original_subtotal: number;
|
298
|
+
/**
|
299
|
+
* The tax total of the shipping method excluding promotions.
|
300
|
+
*/
|
93
301
|
original_tax_total: number;
|
302
|
+
/**
|
303
|
+
* The total of the shipping method including taxes and promotions.
|
304
|
+
*/
|
94
305
|
total: number;
|
306
|
+
/**
|
307
|
+
* The shipping method's action details.
|
308
|
+
*/
|
95
309
|
detail?: BaseOrderShippingDetail;
|
310
|
+
/**
|
311
|
+
* The total of the shipping method excluding taxes, including promotions.
|
312
|
+
*/
|
96
313
|
subtotal: number;
|
314
|
+
/**
|
315
|
+
* The tax total of the shipping method including promotions.
|
316
|
+
*/
|
97
317
|
tax_total: number;
|
318
|
+
/**
|
319
|
+
* The total discounted amount.
|
320
|
+
*/
|
98
321
|
discount_total: number;
|
322
|
+
/**
|
323
|
+
* The tax total of the shipping method's discounted amount.
|
324
|
+
*/
|
99
325
|
discount_tax_total: number;
|
326
|
+
/**
|
327
|
+
* The date the shipping method was created.
|
328
|
+
*/
|
100
329
|
created_at: Date | string;
|
330
|
+
/**
|
331
|
+
* The date the shipping method was updated.
|
332
|
+
*/
|
101
333
|
updated_at: Date | string;
|
102
334
|
}
|
103
335
|
export interface BaseOrderLineItem {
|
336
|
+
/**
|
337
|
+
* The item's ID.
|
338
|
+
*/
|
104
339
|
id: string;
|
340
|
+
/**
|
341
|
+
* The item's title.
|
342
|
+
*/
|
105
343
|
title: string;
|
344
|
+
/**
|
345
|
+
* The item's subtitle.
|
346
|
+
*/
|
106
347
|
subtitle: string | null;
|
348
|
+
/**
|
349
|
+
* The URL of the item's thumbnail.
|
350
|
+
*/
|
107
351
|
thumbnail: string | null;
|
352
|
+
/**
|
353
|
+
* The item's associated variant.
|
354
|
+
*/
|
108
355
|
variant?: BaseProductVariant | null;
|
356
|
+
/**
|
357
|
+
* The ID of the associated variant.
|
358
|
+
*/
|
109
359
|
variant_id: string | null;
|
360
|
+
/**
|
361
|
+
* The item's associated product..
|
362
|
+
*/
|
110
363
|
product?: BaseProduct;
|
364
|
+
/**
|
365
|
+
* The ID of the associated product.
|
366
|
+
*/
|
111
367
|
product_id: string | null;
|
368
|
+
/**
|
369
|
+
* The associated product's title.
|
370
|
+
*/
|
112
371
|
product_title: string | null;
|
372
|
+
/**
|
373
|
+
* The associated product's description.
|
374
|
+
*/
|
113
375
|
product_description: string | null;
|
376
|
+
/**
|
377
|
+
* The associated product's subtitle.
|
378
|
+
*/
|
114
379
|
product_subtitle: string | null;
|
380
|
+
/**
|
381
|
+
* The ID of the associated product's type.
|
382
|
+
*/
|
115
383
|
product_type: string | null;
|
384
|
+
/**
|
385
|
+
* The ID of the associated product's collection.
|
386
|
+
*/
|
116
387
|
product_collection: string | null;
|
388
|
+
/**
|
389
|
+
* The associated product's handle.
|
390
|
+
*/
|
117
391
|
product_handle: string | null;
|
392
|
+
/**
|
393
|
+
* The associated variant's SKU.
|
394
|
+
*/
|
118
395
|
variant_sku: string | null;
|
396
|
+
/**
|
397
|
+
* The associated variant's barcode.
|
398
|
+
*/
|
119
399
|
variant_barcode: string | null;
|
400
|
+
/**
|
401
|
+
* The associated variant's title.
|
402
|
+
*/
|
120
403
|
variant_title: string | null;
|
404
|
+
/**
|
405
|
+
* The associated variant's values for the product's options.
|
406
|
+
*/
|
121
407
|
variant_option_values: Record<string, unknown> | null;
|
408
|
+
/**
|
409
|
+
* Whether the item requires shipping.
|
410
|
+
*/
|
122
411
|
requires_shipping: boolean;
|
412
|
+
/**
|
413
|
+
* Whether discounts can be applied on the item.
|
414
|
+
*/
|
123
415
|
is_discountable: boolean;
|
416
|
+
/**
|
417
|
+
* Whether the item's price includes taxes.
|
418
|
+
*/
|
124
419
|
is_tax_inclusive: boolean;
|
420
|
+
/**
|
421
|
+
* The original price of the item before a promotion or sale.
|
422
|
+
*/
|
125
423
|
compare_at_unit_price?: number;
|
424
|
+
/**
|
425
|
+
* The price of a single quantity of the item.
|
426
|
+
*/
|
126
427
|
unit_price: number;
|
428
|
+
/**
|
429
|
+
* The item's quantity.
|
430
|
+
*/
|
127
431
|
quantity: number;
|
432
|
+
/**
|
433
|
+
* The item's tax lines.
|
434
|
+
*/
|
128
435
|
tax_lines?: BaseOrderLineItemTaxLine[];
|
436
|
+
/**
|
437
|
+
* The item's adjustments.
|
438
|
+
*/
|
129
439
|
adjustments?: BaseOrderLineItemAdjustment[];
|
440
|
+
/**
|
441
|
+
* The item's action details.
|
442
|
+
*/
|
130
443
|
detail: BaseOrderItemDetail;
|
444
|
+
/**
|
445
|
+
* The date the item was created.
|
446
|
+
*/
|
131
447
|
created_at: Date;
|
448
|
+
/**
|
449
|
+
* The date the item was updated.
|
450
|
+
*/
|
132
451
|
updated_at: Date;
|
452
|
+
/**
|
453
|
+
* Key-value pairs of custom data.
|
454
|
+
*/
|
133
455
|
metadata: Record<string, unknown> | null;
|
456
|
+
/**
|
457
|
+
* The total of the item including taxes, excluding promotions.
|
458
|
+
*/
|
134
459
|
original_total: number;
|
460
|
+
/**
|
461
|
+
* The total of the item excluding taxes, including promotions.
|
462
|
+
*/
|
135
463
|
original_subtotal: number;
|
464
|
+
/**
|
465
|
+
* The total taxes applied on the item, excluding promotions.
|
466
|
+
*/
|
136
467
|
original_tax_total: number;
|
468
|
+
/**
|
469
|
+
* The total of a single quantity of the the item including taxes and promotions.
|
470
|
+
*/
|
137
471
|
item_total: number;
|
472
|
+
/**
|
473
|
+
* The total of a single quantity of the the item excluding taxes, including promotions.
|
474
|
+
*/
|
138
475
|
item_subtotal: number;
|
476
|
+
/**
|
477
|
+
* The total taxes applied on a single quantity of the item, including promotions.
|
478
|
+
*/
|
139
479
|
item_tax_total: number;
|
480
|
+
/**
|
481
|
+
* The total of the item including taxes and promotions.
|
482
|
+
*/
|
140
483
|
total: number;
|
484
|
+
/**
|
485
|
+
* The total of the item excluding taxes, including promotions.
|
486
|
+
*/
|
141
487
|
subtotal: number;
|
488
|
+
/**
|
489
|
+
* The total taxes of the item, including promotions.
|
490
|
+
*/
|
142
491
|
tax_total: number;
|
492
|
+
/**
|
493
|
+
* The total discount applied on the item.
|
494
|
+
*/
|
143
495
|
discount_total: number;
|
496
|
+
/**
|
497
|
+
* The total taxes applied on the discounted amount.
|
498
|
+
*/
|
144
499
|
discount_tax_total: number;
|
500
|
+
/**
|
501
|
+
* The total amount that can be refunded.
|
502
|
+
*/
|
145
503
|
refundable_total: number;
|
504
|
+
/**
|
505
|
+
* The total amount that can be refunded for a single quantity.
|
506
|
+
*/
|
146
507
|
refundable_total_per_unit: number;
|
147
508
|
}
|
148
509
|
export interface BaseOrderItemDetail {
|
510
|
+
/**
|
511
|
+
* The item detail's ID.
|
512
|
+
*/
|
149
513
|
id: string;
|
514
|
+
/**
|
515
|
+
* The ID of the associated item.
|
516
|
+
*/
|
150
517
|
item_id: string;
|
518
|
+
/**
|
519
|
+
* The associated item.
|
520
|
+
*/
|
151
521
|
item: BaseOrderLineItem;
|
522
|
+
/**
|
523
|
+
* The item's total quantity.
|
524
|
+
*/
|
152
525
|
quantity: number;
|
526
|
+
/**
|
527
|
+
* The item's fulfilled quantity.
|
528
|
+
*/
|
153
529
|
fulfilled_quantity: number;
|
530
|
+
/**
|
531
|
+
* The item's delivered quantity.
|
532
|
+
*/
|
154
533
|
delivered_quantity: number;
|
534
|
+
/**
|
535
|
+
* The item's shipped quantity.
|
536
|
+
*/
|
155
537
|
shipped_quantity: number;
|
538
|
+
/**
|
539
|
+
* The item's quantity that's requested to be returned.
|
540
|
+
*/
|
156
541
|
return_requested_quantity: number;
|
542
|
+
/**
|
543
|
+
* The item's quantity that's received by a return.
|
544
|
+
*/
|
157
545
|
return_received_quantity: number;
|
546
|
+
/**
|
547
|
+
* The item's quantity that's returned but dismissed due to damages or other reasons.
|
548
|
+
*/
|
158
549
|
return_dismissed_quantity: number;
|
550
|
+
/**
|
551
|
+
* The item's quantity removed from the order.
|
552
|
+
*/
|
159
553
|
written_off_quantity: number;
|
554
|
+
/**
|
555
|
+
* Key-value pairs of custom data.
|
556
|
+
*/
|
160
557
|
metadata: Record<string, unknown> | null;
|
558
|
+
/**
|
559
|
+
* The date the detail was created.
|
560
|
+
*/
|
161
561
|
created_at: Date;
|
562
|
+
/**
|
563
|
+
* The date the detail was deleted.
|
564
|
+
*/
|
162
565
|
updated_at: Date;
|
163
566
|
}
|
164
567
|
export interface BaseOrderShippingDetail {
|
568
|
+
/**
|
569
|
+
* The shipping details' ID.
|
570
|
+
*/
|
165
571
|
id: string;
|
572
|
+
/**
|
573
|
+
* The ID of the shipping method it belongs to.
|
574
|
+
*/
|
166
575
|
shipping_method_id: string;
|
576
|
+
/**
|
577
|
+
* The shipping method it belongs to.
|
578
|
+
*/
|
167
579
|
shipping_method: BaseOrderShippingMethod;
|
580
|
+
/**
|
581
|
+
* The ID of the associated claim.
|
582
|
+
*/
|
168
583
|
claim_id?: string;
|
584
|
+
/**
|
585
|
+
* The ID of the associated exchange.
|
586
|
+
*/
|
169
587
|
exchange_id?: string;
|
588
|
+
/**
|
589
|
+
* The ID of the associated return.
|
590
|
+
*/
|
170
591
|
return_id?: string;
|
592
|
+
/**
|
593
|
+
* The date the detail was created.
|
594
|
+
*/
|
171
595
|
created_at: Date;
|
596
|
+
/**
|
597
|
+
* The date the detail was updated.
|
598
|
+
*/
|
172
599
|
updated_at: Date;
|
173
600
|
}
|
174
601
|
export interface BaseOrderTransaction {
|
602
|
+
/**
|
603
|
+
* The transaction's ID.
|
604
|
+
*/
|
175
605
|
id: string;
|
606
|
+
/**
|
607
|
+
* The ID of the order this transaction belongs to.
|
608
|
+
*/
|
176
609
|
order_id: string;
|
610
|
+
/**
|
611
|
+
* The transaction's amount.
|
612
|
+
*/
|
177
613
|
amount: number;
|
614
|
+
/**
|
615
|
+
* The transaction's currency code.
|
616
|
+
*
|
617
|
+
* @example
|
618
|
+
* usd
|
619
|
+
*/
|
178
620
|
currency_code: string;
|
621
|
+
/**
|
622
|
+
* Whether the transaction references a capture or refund.
|
623
|
+
*/
|
179
624
|
reference: "capture" | "refund";
|
625
|
+
/**
|
626
|
+
* The ID of the capture or refund, depending on the value of {@link reference}.
|
627
|
+
*/
|
180
628
|
reference_id: string;
|
629
|
+
/**
|
630
|
+
* Key-value pairs of custom data.
|
631
|
+
*/
|
181
632
|
metadata: Record<string, unknown> | null;
|
633
|
+
/**
|
634
|
+
* The date the transaction was created.
|
635
|
+
*/
|
182
636
|
created_at: Date | string;
|
637
|
+
/**
|
638
|
+
* The date the transaction was updated.
|
639
|
+
*/
|
183
640
|
updated_at: Date | string;
|
184
641
|
}
|
185
642
|
export interface BaseOrderFulfillment {
|
643
|
+
/**
|
644
|
+
* The fulfillment's ID.
|
645
|
+
*/
|
186
646
|
id: string;
|
647
|
+
/**
|
648
|
+
* The ID of the location the items are fulfilled from.
|
649
|
+
*/
|
187
650
|
location_id: string;
|
651
|
+
/**
|
652
|
+
* The date the fulfillment was packed.
|
653
|
+
*/
|
188
654
|
packed_at: Date | null;
|
655
|
+
/**
|
656
|
+
* The date the fulfillment was shipped.
|
657
|
+
*/
|
189
658
|
shipped_at: Date | null;
|
659
|
+
/**
|
660
|
+
* The date the fulfillment was delivered.
|
661
|
+
*/
|
190
662
|
delivered_at: Date | null;
|
663
|
+
/**
|
664
|
+
* The date the fulfillment was canceled.
|
665
|
+
*/
|
191
666
|
canceled_at: Date | null;
|
667
|
+
/**
|
668
|
+
* Whether the fulfillment requires shipping.
|
669
|
+
*/
|
192
670
|
requires_shipping: boolean;
|
671
|
+
/**
|
672
|
+
* Data necessary for the provider handling the fulfillment.
|
673
|
+
*
|
674
|
+
* Learn more in [this guide](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).
|
675
|
+
*/
|
193
676
|
data: Record<string, unknown> | null;
|
677
|
+
/**
|
678
|
+
* The ID of the fulfillment provider handling this fulfillment.
|
679
|
+
*/
|
194
680
|
provider_id: string;
|
681
|
+
/**
|
682
|
+
* The ID of the associated shipping option.
|
683
|
+
*/
|
195
684
|
shipping_option_id: string | null;
|
685
|
+
/**
|
686
|
+
* Key-value pairs of custom data.
|
687
|
+
*/
|
196
688
|
metadata: Record<string, unknown> | null;
|
689
|
+
/**
|
690
|
+
* The date the fulfillment was created.
|
691
|
+
*/
|
197
692
|
created_at: Date;
|
693
|
+
/**
|
694
|
+
* The date the fulfillment was updated.
|
695
|
+
*/
|
198
696
|
updated_at: Date;
|
199
697
|
}
|
200
698
|
type PaymentStatus = "not_paid" | "awaiting" | "authorized" | "partially_authorized" | "captured" | "partially_captured" | "partially_refunded" | "refunded" | "canceled" | "requires_action";
|
201
699
|
type FulfillmentStatus = "not_fulfilled" | "partially_fulfilled" | "fulfilled" | "partially_shipped" | "shipped" | "partially_delivered" | "delivered" | "canceled";
|
202
700
|
export interface BaseOrder {
|
701
|
+
/**
|
702
|
+
* The order's ID.
|
703
|
+
*/
|
203
704
|
id: string;
|
705
|
+
/**
|
706
|
+
* The order's version.
|
707
|
+
*/
|
204
708
|
version: number;
|
709
|
+
/**
|
710
|
+
* The ID of the associated region.
|
711
|
+
*/
|
205
712
|
region_id: string | null;
|
713
|
+
/**
|
714
|
+
* The ID of the customer that placed the order.
|
715
|
+
*/
|
206
716
|
customer_id: string | null;
|
717
|
+
/**
|
718
|
+
* The ID of the sales channel the order was placed in.
|
719
|
+
*/
|
207
720
|
sales_channel_id: string | null;
|
721
|
+
/**
|
722
|
+
* The email of the customer that placed the order.
|
723
|
+
*/
|
208
724
|
email: string | null;
|
725
|
+
/**
|
726
|
+
* The order's currency code.
|
727
|
+
*
|
728
|
+
* @example
|
729
|
+
* usd
|
730
|
+
*/
|
209
731
|
currency_code: string;
|
732
|
+
/**
|
733
|
+
* The order's display ID.
|
734
|
+
*/
|
210
735
|
display_id?: number;
|
736
|
+
/**
|
737
|
+
* The order's shipping address.
|
738
|
+
*/
|
211
739
|
shipping_address?: BaseOrderAddress | null;
|
740
|
+
/**
|
741
|
+
* The order's billing address.
|
742
|
+
*/
|
212
743
|
billing_address?: BaseOrderAddress | null;
|
744
|
+
/**
|
745
|
+
* The order's items.
|
746
|
+
*/
|
213
747
|
items: BaseOrderLineItem[] | null;
|
748
|
+
/**
|
749
|
+
* The order's shipping methods.
|
750
|
+
*/
|
214
751
|
shipping_methods: BaseOrderShippingMethod[] | null;
|
752
|
+
/**
|
753
|
+
* The order's payment collections.
|
754
|
+
*/
|
215
755
|
payment_collections?: BasePaymentCollection[];
|
756
|
+
/**
|
757
|
+
* The order's payment status.
|
758
|
+
*/
|
216
759
|
payment_status: PaymentStatus;
|
760
|
+
/**
|
761
|
+
* The order's fulfillments.
|
762
|
+
*/
|
217
763
|
fulfillments?: BaseOrderFulfillment[];
|
764
|
+
/**
|
765
|
+
* The order's fulfillment status.
|
766
|
+
*/
|
218
767
|
fulfillment_status: FulfillmentStatus;
|
768
|
+
/**
|
769
|
+
* The order's transactions.
|
770
|
+
*/
|
219
771
|
transactions?: BaseOrderTransaction[];
|
772
|
+
/**
|
773
|
+
* The order's summary.
|
774
|
+
*/
|
220
775
|
summary: BaseOrderSummary;
|
776
|
+
/**
|
777
|
+
* Key-value pairs of custom data.
|
778
|
+
*/
|
221
779
|
metadata?: Record<string, unknown> | null;
|
780
|
+
/**
|
781
|
+
* The date the order was created.
|
782
|
+
*/
|
222
783
|
created_at: string | Date;
|
784
|
+
/**
|
785
|
+
* The date the order was updated.
|
786
|
+
*/
|
223
787
|
updated_at: string | Date;
|
788
|
+
/**
|
789
|
+
* The total of the order's items including taxes, excluding promotions.
|
790
|
+
*/
|
224
791
|
original_item_total: number;
|
792
|
+
/**
|
793
|
+
* The total of the order's items excluding taxes, including promotions.
|
794
|
+
*/
|
225
795
|
original_item_subtotal: number;
|
796
|
+
/**
|
797
|
+
* The tax total applied on the order's items, excluding promotions.
|
798
|
+
*/
|
226
799
|
original_item_tax_total: number;
|
800
|
+
/**
|
801
|
+
* The total of the order's items including taxes and promotions.
|
802
|
+
*/
|
227
803
|
item_total: number;
|
804
|
+
/**
|
805
|
+
* The total of the order's items excluding taxes, including promotions.
|
806
|
+
*/
|
228
807
|
item_subtotal: number;
|
808
|
+
/**
|
809
|
+
* The tax total applied on the order's items, including promotions.
|
810
|
+
*/
|
229
811
|
item_tax_total: number;
|
812
|
+
/**
|
813
|
+
* The total of the order including taxes, excluding promotions.
|
814
|
+
*/
|
230
815
|
original_total: number;
|
816
|
+
/**
|
817
|
+
* The total of the order excluding taxes, including promotions.
|
818
|
+
*/
|
231
819
|
original_subtotal: number;
|
820
|
+
/**
|
821
|
+
* The tax total applied on the order's items, excluding promotions.
|
822
|
+
*/
|
232
823
|
original_tax_total: number;
|
824
|
+
/**
|
825
|
+
* The total of the order including taxes and promotions.
|
826
|
+
*/
|
233
827
|
total: number;
|
828
|
+
/**
|
829
|
+
* The total of the order excluding taxes, including promotions.
|
830
|
+
*/
|
234
831
|
subtotal: number;
|
832
|
+
/**
|
833
|
+
* The tax total applied on the order's items, including promotions.
|
834
|
+
*/
|
235
835
|
tax_total: number;
|
836
|
+
/**
|
837
|
+
* The total amount discounted.
|
838
|
+
*/
|
236
839
|
discount_total: number;
|
840
|
+
/**
|
841
|
+
* The tax total applied on the order's discounted amount.
|
842
|
+
*/
|
237
843
|
discount_tax_total: number;
|
844
|
+
/**
|
845
|
+
* The total gift card amount.
|
846
|
+
*/
|
238
847
|
gift_card_total: number;
|
848
|
+
/**
|
849
|
+
* The tax total applied on the order's gift card amount.
|
850
|
+
*/
|
239
851
|
gift_card_tax_total: number;
|
852
|
+
/**
|
853
|
+
* The total of the order's shipping methods including taxes and promotions.
|
854
|
+
*/
|
240
855
|
shipping_total: number;
|
856
|
+
/**
|
857
|
+
* The total of the order's shipping methods excluding taxes, including promotions.
|
858
|
+
*/
|
241
859
|
shipping_subtotal: number;
|
860
|
+
/**
|
861
|
+
* The tax total applied on the order's shipping methods, including promotions.
|
862
|
+
*/
|
242
863
|
shipping_tax_total: number;
|
864
|
+
/**
|
865
|
+
* The total of the order's shipping methods including taxes, excluding promotions.
|
866
|
+
*/
|
243
867
|
original_shipping_total: number;
|
868
|
+
/**
|
869
|
+
* The total of the order's shipping methods excluding taxes, including promotions.
|
870
|
+
*/
|
244
871
|
original_shipping_subtotal: number;
|
872
|
+
/**
|
873
|
+
* The tax total applied on the order's shipping methods, excluding promotions.
|
874
|
+
*/
|
245
875
|
original_shipping_tax_total: number;
|
246
876
|
}
|
247
877
|
export interface BaseOrderFilters extends FindParams, BaseFilterable<BaseOrderFilters> {
|