@teemill/orders 1.24.1 → 1.26.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.
Files changed (62) hide show
  1. package/README.md +14 -9
  2. package/api.ts +560 -137
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +1 -1
  6. package/dist/api.d.ts +499 -137
  7. package/dist/api.js +127 -32
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +1 -1
  14. package/dist/esm/api.d.ts +499 -137
  15. package/dist/esm/api.js +126 -31
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +1 -1
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/Address.md +9 -9
  27. package/docs/ApiError.md +3 -2
  28. package/docs/ConfirmOrderFulfillment.md +4 -3
  29. package/docs/ConfirmOrderFulfillmentWithShipment.md +3 -2
  30. package/docs/ConfirmOrderFulfillmentWithShippingMethod.md +3 -2
  31. package/docs/ConfirmOrderValidationError.md +2 -0
  32. package/docs/ContactInformation.md +2 -2
  33. package/docs/ContactInformation1.md +23 -0
  34. package/docs/CreateOrder.md +7 -7
  35. package/docs/CreateOrderItem.md +24 -0
  36. package/docs/CustomsInformation.md +4 -4
  37. package/docs/CustomsInformation1.md +5 -4
  38. package/docs/DeliveryEstimates.md +4 -3
  39. package/docs/Fulfiller.md +25 -0
  40. package/docs/FulfillerLocation.md +23 -0
  41. package/docs/Fulfillment.md +9 -8
  42. package/docs/FulfillmentItem.md +3 -3
  43. package/docs/Image.md +5 -5
  44. package/docs/ImportOrders202Response.md +20 -0
  45. package/docs/Order.md +18 -17
  46. package/docs/OrderItem.md +10 -9
  47. package/docs/OrderPaymentMethod.md +21 -0
  48. package/docs/OrderTracking.md +4 -3
  49. package/docs/OrdersApi.md +91 -31
  50. package/docs/Origin.md +3 -2
  51. package/docs/PaymentAttempt.md +4 -5
  52. package/docs/PaymentMethod.md +2 -1
  53. package/docs/Price.md +3 -3
  54. package/docs/ProductUnavailableError.md +35 -0
  55. package/docs/RecipientCost.md +23 -0
  56. package/docs/Shipment.md +21 -0
  57. package/docs/ShippingMethod.md +8 -7
  58. package/docs/Status.md +1 -0
  59. package/docs/StockConflictError.md +34 -0
  60. package/docs/StockUnavailableError.md +35 -0
  61. package/index.ts +1 -1
  62. package/package.json +1 -1
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.24.1
7
+ * The version of the OpenAPI document: 1.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,68 +24,81 @@ import type { RequestArgs } from './base';
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
26
  /**
27
- * A person\'s address.
27
+ * A postal address for shipping or billing.
28
28
  */
29
29
  export interface Address {
30
+ /**
31
+ * The full name of the recipient.
32
+ */
30
33
  'contactName'?: string;
34
+ /**
35
+ * The company name, if applicable.
36
+ */
31
37
  'company'?: string;
32
38
  /**
33
- * First line of the address.
39
+ * First line of the street address.
34
40
  */
35
41
  'line1'?: string;
36
42
  /**
37
- * Second line of the address.
43
+ * Second line of the street address (apartment, suite, etc.).
38
44
  */
39
45
  'line2'?: string;
40
46
  /**
41
- * City of the address.
47
+ * The city or town.
42
48
  */
43
49
  'city'?: string;
44
50
  /**
45
- * Postal code of the address.
51
+ * The postal or ZIP code.
46
52
  */
47
53
  'postalCode'?: string;
48
54
  /**
49
- * Country of the address (ISO 3166-1 alpha-2).
55
+ * Two-letter country code (ISO 3166-1 alpha-2).
50
56
  */
51
57
  'country': string;
52
58
  /**
53
- * State of the address. If the country is Canada, Australia, or the United States, this field is required.
59
+ * The state, province, or region. Required when the country is US, CA, or AU.
54
60
  */
55
61
  'state'?: string;
56
62
  }
63
+ /**
64
+ * A standard error response returned when a request fails.
65
+ */
57
66
  export interface ApiError {
67
+ /**
68
+ * A machine-readable error code.
69
+ */
58
70
  'code'?: string;
71
+ /**
72
+ * A human-readable description of what went wrong.
73
+ */
59
74
  'message': string;
60
75
  }
61
76
  /**
62
77
  * @type ConfirmOrderFulfillment
78
+ * Confirmation details for a single fulfillment. Provide either a `shippingMethodId` to use a PodOS shipping method, or a `shipment` object with your own shipping label.
63
79
  */
64
80
  export type ConfirmOrderFulfillment = ConfirmOrderFulfillmentWithShipment | ConfirmOrderFulfillmentWithShippingMethod;
65
81
 
82
+ /**
83
+ * Confirm a fulfillment using your own shipping label. Use this when you generate shipping labels outside of PodOS.
84
+ */
66
85
  export interface ConfirmOrderFulfillmentWithShipment {
67
86
  /**
68
- * Unique object identifier
87
+ * The ID of the fulfillment to confirm.
69
88
  */
70
89
  'fulfillmentId': string;
71
- 'shipment': ConfirmOrderFulfillmentWithShipmentShipment;
90
+ 'shipment': Shipment;
72
91
  }
73
92
  /**
74
- * This field is only required if you are using your own shipping label.
93
+ * Confirm a fulfillment using a PodOS shipping method. Choose from the `availableShippingMethods` returned on the fulfillment.
75
94
  */
76
- export interface ConfirmOrderFulfillmentWithShipmentShipment {
77
- /**
78
- * Only required if you are generating shipping labels outside of PodOS
79
- */
80
- 'image': string;
81
- }
82
95
  export interface ConfirmOrderFulfillmentWithShippingMethod {
83
96
  /**
84
- * Unique object identifier
97
+ * The ID of the fulfillment to confirm.
85
98
  */
86
99
  'fulfillmentId': string;
87
100
  /**
88
- * Unique object identifier
101
+ * The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`.
89
102
  */
90
103
  'shippingMethodId': string;
91
104
  }
@@ -95,6 +108,10 @@ export interface ConfirmOrderRequest {
95
108
  export interface ConfirmOrderValidationError {
96
109
  'code': ConfirmOrderValidationErrorCodeEnum;
97
110
  'message': string;
111
+ /**
112
+ * Present when one or more items cannot be fulfilled. Each entry describes a specific item and why it cannot be fulfilled, with a `code` that determines the error type. See `StockUnavailableError` and `ProductUnavailableError` schemas.
113
+ */
114
+ 'errors'?: Array<StockConflictError>;
98
115
  }
99
116
 
100
117
  export const ConfirmOrderValidationErrorCodeEnum = {
@@ -110,7 +127,26 @@ export type ConfirmOrderValidationErrorCodeEnum = typeof ConfirmOrderValidationE
110
127
  * Order recipient contact information, used only for courier tracking/updates.
111
128
  */
112
129
  export interface ContactInformation {
130
+ /**
131
+ * Email address for delivery notifications.
132
+ */
113
133
  'email': string;
134
+ /**
135
+ * Phone number for courier contact. Include the country code.
136
+ */
137
+ 'phone'?: string | null;
138
+ }
139
+ /**
140
+ * Contact details for the order recipient. Used for courier delivery notifications.
141
+ */
142
+ export interface ContactInformation1 {
143
+ /**
144
+ * Email address for delivery notifications.
145
+ */
146
+ 'email': string;
147
+ /**
148
+ * Phone number including country code. Used by couriers for delivery updates.
149
+ */
114
150
  'phone'?: string | null;
115
151
  }
116
152
  /**
@@ -128,47 +164,60 @@ export interface Coupon {
128
164
  'ref'?: string | null;
129
165
  }
130
166
  /**
131
- * Create an order
167
+ * The request body for creating a new print-on-demand order.
132
168
  */
133
169
  export interface CreateOrder {
134
170
  /**
135
- * A custom reference to the merchant\'s order.
171
+ * Your own reference for this order, such as an order number from your storefront. This is returned in subsequent responses and can be used for reconciliation.
136
172
  */
137
173
  'merchantReference'?: string | null;
138
- 'contactInformation': CreateOrderContactInformation;
174
+ 'contactInformation': ContactInformation1;
175
+ /**
176
+ * The address to ship the order to.
177
+ */
139
178
  'shippingAddress': Address;
179
+ /**
180
+ * Customs and tax registration details. Required for international shipments.
181
+ */
140
182
  'customsInformation'?: CustomsInformation;
141
183
  /**
142
- * Items to be ordered
184
+ * The items to include in the order. Each item references a product variant from the Product Catalog API.
185
+ */
186
+ 'items': Array<CreateOrderItem>;
187
+ /**
188
+ * An optional list of preferred fulfiller IDs. When provided, the system will attempt to route the order to one of these fulfillers.
143
189
  */
144
- 'items': Array<OrderItem1>;
145
190
  'preferredFulfillers'?: Array<string>;
146
191
  }
147
- /**
148
- * Contact information for the order
149
- */
150
- export interface CreateOrderContactInformation {
151
- 'email': string;
152
- 'phone'?: string | null;
192
+ export interface CreateOrderItem {
193
+ /**
194
+ * A reference to the variant being ordered
195
+ */
196
+ 'variantRef': string;
197
+ /**
198
+ * The number of units to order.
199
+ */
200
+ 'quantity': number;
201
+ 'recipientCost'?: RecipientCost;
153
202
  }
154
203
  /**
155
204
  * Customs information for the order. **Note:** Adding customs information to an order is only compatible with Shipmate at this time
156
205
  */
157
206
  export interface CustomsInformation {
158
207
  /**
159
- * Pre-registration type
208
+ * The type of tax pre-registration (e.g. IOSS for EU imports).
160
209
  */
161
210
  'preRegistrationType'?: CustomsInformationPreRegistrationTypeEnum;
162
211
  /**
163
- * Pre-registration number
212
+ * The pre-registration number associated with the registration type.
164
213
  */
165
214
  'preRegistrationNumber'?: string;
166
215
  /**
167
- * VAT number
216
+ * The shipper\'s VAT registration number.
168
217
  */
169
218
  'vatNumber'?: string;
170
219
  /**
171
- * EORI number
220
+ * The shipper\'s EORI number for customs declarations.
172
221
  */
173
222
  'eoriNumber'?: string;
174
223
  }
@@ -179,23 +228,41 @@ export const CustomsInformationPreRegistrationTypeEnum = {
179
228
 
180
229
  export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
181
230
 
231
+ /**
232
+ * Customs and tax registration details for international shipments.
233
+ */
182
234
  export interface CustomsInformation1 {
235
+ /**
236
+ * The type of tax pre-registration (e.g. IOSS for EU imports).
237
+ */
183
238
  'preRegistrationType'?: string;
239
+ /**
240
+ * The pre-registration number associated with the registration type.
241
+ */
184
242
  'preRegistrationNumber'?: string;
243
+ /**
244
+ * The shipper\'s VAT registration number.
245
+ */
185
246
  'vatNumber'?: string;
247
+ /**
248
+ * The shipper\'s EORI number for customs declarations.
249
+ */
186
250
  'eoriNumber'?: string;
187
251
  }
252
+ /**
253
+ * Estimated delivery window for this shipping method.
254
+ */
188
255
  export interface DeliveryEstimates {
189
256
  /**
190
- * Whether this is a priority shipping method. Fulfillments with priority methods aim for same day dispatch when ordered before 1pm, and typically offer faster delivery times.
257
+ * Whether this is a priority shipping method. Fulfillments with priority methods aim for same-day dispatch when ordered before 1pm, and typically offer faster delivery times.
191
258
  */
192
259
  'isPriority'?: boolean;
193
260
  /**
194
- * ISO 8601 Timestamp
261
+ * The earliest estimated delivery date.
195
262
  */
196
263
  'min'?: string;
197
264
  /**
198
- * ISO 8601 Timestamp
265
+ * The latest estimated delivery date.
199
266
  */
200
267
  'max'?: string;
201
268
  }
@@ -205,75 +272,111 @@ export interface ExportOrders202Response {
205
272
  */
206
273
  'message'?: string;
207
274
  }
275
+ /**
276
+ * The fulfiller that will produce and ship this package.
277
+ */
278
+ export interface Fulfiller {
279
+ /**
280
+ * Unique identifier of the fulfiller.
281
+ */
282
+ 'id'?: string;
283
+ 'location'?: FulfillerLocation;
284
+ /**
285
+ * Whether the fulfiller has the stock and capacity to begin processing immediately.
286
+ */
287
+ 'canFulfillImmediately'?: boolean | null;
288
+ }
289
+ /**
290
+ * The geographic location of the fulfiller.
291
+ */
292
+ export interface FulfillerLocation {
293
+ /**
294
+ * The city where the fulfiller is located.
295
+ */
296
+ 'city'?: string | null;
297
+ /**
298
+ * The country code where the fulfiller is located (ISO 3166-1 alpha-2).
299
+ */
300
+ 'country'?: string | null;
301
+ }
302
+ /**
303
+ * A fulfillment group within an order. Each fulfillment represents a package that will be shipped separately, potentially from a different fulfiller.
304
+ */
208
305
  export interface Fulfillment {
209
306
  /**
210
- * Unique fulfillment id
307
+ * Unique identifier for this fulfillment.
211
308
  */
212
309
  'id'?: string;
310
+ /**
311
+ * The current status of this fulfillment.
312
+ */
213
313
  'status'?: Status;
214
- 'fulfiller'?: FulfillmentFulfiller;
314
+ 'fulfiller'?: Fulfiller;
315
+ /**
316
+ * The items included in this fulfillment package.
317
+ */
215
318
  'items'?: Array<FulfillmentItem>;
216
319
  'tracking'?: OrderTracking | null;
217
320
  /**
218
- * Shipping method currently set
321
+ * The shipping method currently assigned to this fulfillment.
219
322
  */
220
323
  'shippingMethod'?: ShippingMethod;
221
324
  /**
222
- * Shipping methods available for this fulfillment. One of these should be used to confirm the fulfillment.
325
+ * Shipping methods available for this fulfillment. Use one of these IDs when confirming the order.
223
326
  */
224
327
  'availableShippingMethods'?: Array<ShippingMethod>;
225
328
  /**
226
- * Weight of the package being shipped in grams
329
+ * The estimated weight of the package in grams.
227
330
  */
228
331
  'packageWeight'?: number;
229
332
  /**
230
- * A reference to the resource location
333
+ * Reference to the source platform of this fulfillment.
231
334
  */
232
335
  'platformRef'?: string;
233
336
  }
234
337
 
235
338
 
236
- /**
237
- * The fulfiller that will be processing this order.
238
- */
239
- export interface FulfillmentFulfiller {
240
- /**
241
- * Unique object identifier
242
- */
243
- 'id'?: string;
244
- 'location'?: FulfillmentFulfillerLocation;
245
- 'canFulfillImmediately'?: boolean | null;
246
- }
247
- export interface FulfillmentFulfillerLocation {
248
- 'city'?: string | null;
249
- 'country'?: string | null;
250
- }
251
339
  export interface FulfillmentItem {
252
340
  /**
253
- * Unique fulfillment item id
341
+ * Unique identifier for this fulfillment item.
254
342
  */
255
343
  'id'?: string;
256
344
  /**
257
- * Id of the order item being fulfilled
345
+ * The ID of the order item being fulfilled.
258
346
  */
259
347
  'itemId'?: string;
260
348
  /**
261
- * Number of this item being fulfilled
349
+ * The number of units of this item included in the fulfillment.
262
350
  */
263
351
  'quantity'?: number;
264
352
  }
265
353
  /**
266
- * Image description
354
+ * A product image associated with an order item.
267
355
  */
268
356
  export interface Image {
269
357
  /**
270
- * Unique object identifier
358
+ * Unique identifier for this image.
271
359
  */
272
360
  'id'?: string;
361
+ /**
362
+ * The URL of the image.
363
+ */
273
364
  'src'?: string;
365
+ /**
366
+ * Alternative text describing the image content.
367
+ */
274
368
  'alt'?: string;
369
+ /**
370
+ * The display order of this image relative to other images for the same item.
371
+ */
275
372
  'sortOrder'?: number;
276
373
  }
374
+ export interface ImportOrders202Response {
375
+ /**
376
+ * Id of the order import
377
+ */
378
+ 'importId'?: string;
379
+ }
277
380
  export interface Option {
278
381
  /**
279
382
  * Option name
@@ -284,6 +387,9 @@ export interface Option {
284
387
  */
285
388
  'value': string;
286
389
  }
390
+ /**
391
+ * Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
392
+ */
287
393
  export interface Order {
288
394
  /**
289
395
  * Unique object identifier
@@ -293,44 +399,83 @@ export interface Order {
293
399
  * A reference to the resource location
294
400
  */
295
401
  'ref'?: string;
402
+ /**
403
+ * The current status of the order.
404
+ */
296
405
  'status'?: Status;
297
406
  'contactInformation': ContactInformation;
298
- 'paymentMethod'?: PaymentMethod;
407
+ 'paymentMethod'?: OrderPaymentMethod;
408
+ /**
409
+ * The address the order will be shipped to.
410
+ */
299
411
  'shippingAddress': Address;
300
412
  'customsInformation'?: CustomsInformation1;
301
413
  /**
302
- * ISO 8601 Timestamp
414
+ * When the order was created.
303
415
  */
304
416
  'createdAt'?: string;
305
417
  /**
306
- * ISO 8601 Timestamp
418
+ * When the order was last updated.
307
419
  */
308
420
  'updatedAt'?: string;
309
421
  /**
310
- * ISO 8601 Timestamp
422
+ * When the order status last changed.
311
423
  */
312
424
  'statusChangedAt'?: string;
313
425
  /**
314
- * A custom reference to the merchant\'s order.
426
+ * Your own reference for this order, such as an order number from your storefront.
315
427
  */
316
428
  'merchantReference'?: string | null;
429
+ /**
430
+ * The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately.
431
+ */
317
432
  'fulfillments'?: Array<Fulfillment>;
433
+ /**
434
+ * The line items included in this order.
435
+ */
318
436
  'items': Array<OrderItem>;
437
+ /**
438
+ * The total price of the order including tax and after discounts.
439
+ */
319
440
  'totalPrice'?: Price;
441
+ /**
442
+ * The total tax amount for the order.
443
+ */
320
444
  'taxPrice'?: Price;
445
+ /**
446
+ * The net items price excluding tax and before discounts.
447
+ */
321
448
  'subtotalPrice'?: Price;
449
+ /**
450
+ * The total discount amount applied to the order.
451
+ */
322
452
  'discountPrice'?: Price;
453
+ /**
454
+ * The coupon applied to the order, if any.
455
+ */
323
456
  'coupon'?: Coupon | null;
457
+ /**
458
+ * The total shipping cost for the order.
459
+ */
324
460
  'shippingPrice'?: Price;
325
461
  'origin'?: Origin;
462
+ /**
463
+ * A chronological list of status changes for this order.
464
+ */
326
465
  'statusHistory'?: Array<StatusHistoryItem>;
466
+ /**
467
+ * A list of payment attempts made for this order.
468
+ */
327
469
  'paymentAttempts'?: Array<PaymentAttempt>;
328
470
  }
329
471
 
330
472
 
473
+ /**
474
+ * A line item in an order, representing a specific product variant and quantity.
475
+ */
331
476
  export interface OrderItem {
332
477
  /**
333
- * Unique object identifier
478
+ * Unique identifier for this order item.
334
479
  */
335
480
  'id'?: string;
336
481
  /**
@@ -341,42 +486,63 @@ export interface OrderItem {
341
486
  * Options associated to an order item\'s variant, such as color and size.
342
487
  */
343
488
  'options'?: Array<Option>;
489
+ /**
490
+ * The number of units of this variant to order.
491
+ */
344
492
  'quantity': number;
345
493
  /**
346
- * The name of the product
494
+ * The display name of the product.
347
495
  */
348
496
  'name'?: string;
349
497
  /**
350
- * Images
498
+ * Product images associated with this item.
351
499
  */
352
500
  'images'?: Array<Image>;
501
+ /**
502
+ * The total price for this line item including tax and after discounts.
503
+ */
353
504
  'totalPrice'?: Price;
354
505
  /**
355
- * This is an estimate until the order has been confirmed
506
+ * The tax amount for this line item. This is an estimate until the order has been confirmed.
356
507
  */
357
508
  'taxPrice'?: Price;
509
+ /**
510
+ * The net price for this line item, excluding tax and before discounts.
511
+ */
358
512
  'subtotalPrice'?: Price;
513
+ /**
514
+ * The discount amount applied to this line item.
515
+ */
359
516
  'discountPrice'?: Price;
360
517
  /**
361
- * The price you charged the recipient for each item. It\'s highly recommended if you have international orders as it aids customs issues.
518
+ * The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations.
362
519
  */
363
520
  'recipientCost'?: Price;
364
521
  }
365
- export interface OrderItem1 {
522
+ /**
523
+ * The payment method used for this order.
524
+ */
525
+ export interface OrderPaymentMethod {
366
526
  /**
367
- * A reference to the variant being ordered
527
+ * The type of payment method used.
368
528
  */
369
- 'variantRef': string;
370
- 'quantity': number;
371
- 'recipientCost'?: OrderItem1RecipientCost;
372
- }
373
- export interface OrderItem1RecipientCost {
374
- 'amount': string;
375
- 'currencyCode': string;
529
+ 'type'?: string | null;
376
530
  }
531
+ /**
532
+ * Shipment tracking information. Available once the fulfillment has been dispatched.
533
+ */
377
534
  export interface OrderTracking {
535
+ /**
536
+ * The name of the courier service.
537
+ */
378
538
  'courier'?: string;
539
+ /**
540
+ * The tracking code provided by the courier.
541
+ */
379
542
  'code'?: string;
543
+ /**
544
+ * A URL to track the shipment on the courier\'s website.
545
+ */
380
546
  'url'?: string;
381
547
  }
382
548
  export interface OrdersResponse {
@@ -386,17 +552,35 @@ export interface OrdersResponse {
386
552
  */
387
553
  'nextPageToken'?: number | null;
388
554
  }
555
+ /**
556
+ * The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
557
+ */
389
558
  export interface Origin {
559
+ /**
560
+ * A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`.
561
+ */
390
562
  'code'?: string;
563
+ /**
564
+ * Whether this origin represents paid advertising traffic.
565
+ */
391
566
  'isPaid'?: boolean;
392
567
  }
393
- /**
394
- * List of payment attempts for this order
395
- */
396
568
  export interface PaymentAttempt {
569
+ /**
570
+ * The payment provider used.
571
+ */
397
572
  'paymentProvider'?: PaymentAttemptPaymentProviderEnum;
573
+ /**
574
+ * The outcome of the payment attempt.
575
+ */
398
576
  'status'?: PaymentAttemptStatusEnum;
577
+ /**
578
+ * The transaction ID from the payment provider.
579
+ */
399
580
  'transactionId'?: string | null;
581
+ /**
582
+ * A human-readable message describing the payment result.
583
+ */
400
584
  'message'?: string;
401
585
  /**
402
586
  * ISO 8601 Timestamp
@@ -420,35 +604,124 @@ export const PaymentAttemptStatusEnum = {
420
604
 
421
605
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
422
606
 
423
- export interface PaymentMethod {
424
- 'type'?: string | null;
425
- }
426
607
  /**
427
- * Standard price definition that defines the amount and currency.
608
+ * A monetary value with its currency.
428
609
  */
429
610
  export interface Price {
430
611
  /**
431
- * Price including tax in the specified currency.
612
+ * The monetary amount as a decimal string.
432
613
  */
433
614
  'amount'?: string;
434
615
  /**
435
- * Currency code for the currency the price is valued in.
616
+ * ISO 4217 currency code.
436
617
  */
437
618
  'currencyCode'?: string;
438
619
  }
439
- export interface ShippingMethod {
620
+ /**
621
+ * The item cannot be fulfilled at all — either it is out of stock entirely, or the assigned fulfiller cannot produce it (e.g. missing machinery or variant not configured).
622
+ */
623
+ export interface ProductUnavailableError {
624
+ 'code': ProductUnavailableErrorCodeEnum;
625
+ /**
626
+ * Human-readable description including the product name.
627
+ */
628
+ 'message': string;
629
+ /**
630
+ * Display name of the product.
631
+ */
632
+ 'productTitle': string;
440
633
  /**
441
634
  * Unique object identifier
442
635
  */
636
+ 'variantId': string;
637
+ /**
638
+ * A reference to the variant being ordered
639
+ */
640
+ 'variantRef': string;
641
+ /**
642
+ * The quantity that was requested in the order.
643
+ */
644
+ 'requestedQuantity': number;
645
+ /**
646
+ * Always 0 for this error type.
647
+ */
648
+ 'availableQuantity': ProductUnavailableErrorAvailableQuantityEnum;
649
+ /**
650
+ * The full requested quantity, representing the total unfulfillable amount.
651
+ */
652
+ 'shortage': number;
653
+ }
654
+
655
+ export const ProductUnavailableErrorCodeEnum = {
656
+ ProductUnavailable: 'PRODUCT_UNAVAILABLE'
657
+ } as const;
658
+
659
+ export type ProductUnavailableErrorCodeEnum = typeof ProductUnavailableErrorCodeEnum[keyof typeof ProductUnavailableErrorCodeEnum];
660
+ export const ProductUnavailableErrorAvailableQuantityEnum = {
661
+ NUMBER_0: 0
662
+ } as const;
663
+
664
+ export type ProductUnavailableErrorAvailableQuantityEnum = typeof ProductUnavailableErrorAvailableQuantityEnum[keyof typeof ProductUnavailableErrorAvailableQuantityEnum];
665
+
666
+ /**
667
+ * The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
668
+ */
669
+ export interface RecipientCost {
670
+ /**
671
+ * The monetary amount as a decimal string.
672
+ */
673
+ 'amount': string;
674
+ /**
675
+ * ISO 4217 currency code.
676
+ */
677
+ 'currencyCode': string;
678
+ }
679
+ /**
680
+ * Your own shipping label details.
681
+ */
682
+ export interface Shipment {
683
+ /**
684
+ * A URL to the shipping label image or PDF.
685
+ */
686
+ 'image': string;
687
+ }
688
+ /**
689
+ * A shipping option available for a fulfillment, including delivery estimates and pricing.
690
+ */
691
+ export interface ShippingMethod {
692
+ /**
693
+ * Unique identifier for this shipping method. Use this when confirming a fulfillment.
694
+ */
443
695
  'id'?: string;
696
+ /**
697
+ * The display name of the shipping method.
698
+ */
444
699
  'name'?: string;
700
+ /**
701
+ * A brief description of the shipping method\'s service level.
702
+ */
445
703
  'description'?: string;
446
704
  'deliveryEstimates'?: DeliveryEstimates;
705
+ /**
706
+ * The total shipping cost including tax.
707
+ */
447
708
  'totalPrice'?: Price;
709
+ /**
710
+ * The tax portion of the shipping cost.
711
+ */
448
712
  'taxPrice'?: Price;
713
+ /**
714
+ * The net shipping cost, excluding tax and before discounts.
715
+ */
449
716
  'subtotalPrice'?: Price;
717
+ /**
718
+ * Any discount applied to the shipping cost.
719
+ */
450
720
  'discountPrice'?: Price;
451
721
  }
722
+ /**
723
+ * The lifecycle status of an order or fulfillment: - `new` — Order has been created but not yet confirmed or paid - `paid` — Payment has been received, awaiting fulfillment - `processing` — Order is being produced or packed - `complete` — Order has been shipped - `refunded` — Order has been refunded - `quote` — Order is a draft quote, not yet submitted - `moderation` — Order is held for review
724
+ */
452
725
 
453
726
  export const Status = {
454
727
  New: 'new',
@@ -472,6 +745,52 @@ export interface StatusHistoryItem {
472
745
  }
473
746
 
474
747
 
748
+ /**
749
+ * @type StockConflictError
750
+ */
751
+ export type StockConflictError = { code: 'PRODUCT_UNAVAILABLE' } & ProductUnavailableError | { code: 'STOCK_UNAVAILABLE' } & StockUnavailableError;
752
+
753
+ /**
754
+ * The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
755
+ */
756
+ export interface StockUnavailableError {
757
+ 'code': StockUnavailableErrorCodeEnum;
758
+ /**
759
+ * Human-readable description including the product name and available quantity.
760
+ */
761
+ 'message': string;
762
+ /**
763
+ * Display name of the product.
764
+ */
765
+ 'productTitle': string;
766
+ /**
767
+ * Unique object identifier
768
+ */
769
+ 'variantId': string;
770
+ /**
771
+ * A reference to the variant being ordered
772
+ */
773
+ 'variantRef': string;
774
+ /**
775
+ * The quantity that was requested in the order.
776
+ */
777
+ 'requestedQuantity': number;
778
+ /**
779
+ * The quantity currently available for fulfillment.
780
+ */
781
+ 'availableQuantity': number;
782
+ /**
783
+ * The difference between requested and available quantity (positive value indicating the deficit).
784
+ */
785
+ 'shortage': number;
786
+ }
787
+
788
+ export const StockUnavailableErrorCodeEnum = {
789
+ StockUnavailable: 'STOCK_UNAVAILABLE'
790
+ } as const;
791
+
792
+ export type StockUnavailableErrorCodeEnum = typeof StockUnavailableErrorCodeEnum[keyof typeof StockUnavailableErrorCodeEnum];
793
+
475
794
 
476
795
  /**
477
796
  * OrdersApi - axios parameter creator
@@ -481,7 +800,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
481
800
  /**
482
801
  * Cancels an order if it has not yet started processing.
483
802
  * @summary Cancel order
484
- * @param {string} project What project it is
803
+ * @param {string} project The project identifier to scope the request to.
485
804
  * @param {string} orderId Unique identifier of an order
486
805
  * @param {string} [fields] Specifies which fields to return, separated by commas
487
806
  * @param {*} [options] Override http request option.
@@ -534,9 +853,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
534
853
  /**
535
854
  * Confirms an order, and submits it as ready to take payment and begin processing.
536
855
  * @summary Confirm order
537
- * @param {string} project What project it is
856
+ * @param {string} project The project identifier to scope the request to.
538
857
  * @param {string} orderId Unique identifier of an order
539
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
858
+ * @param {ConfirmOrderRequest} confirmOrderRequest Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
540
859
  * @param {string} [fields] Specifies which fields to return, separated by commas
541
860
  * @param {*} [options] Override http request option.
542
861
  * @throws {RequiredError}
@@ -592,7 +911,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
592
911
  /**
593
912
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
594
913
  * @summary Create order
595
- * @param {string} project What project it is
914
+ * @param {string} project The project identifier to scope the request to.
596
915
  * @param {CreateOrder} createOrder Create Order schema
597
916
  * @param {string} [fields] Specifies which fields to return, separated by commas
598
917
  * @param {*} [options] Override http request option.
@@ -646,7 +965,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
646
965
  /**
647
966
  * Download an order invoice.
648
967
  * @summary Download order invoice
649
- * @param {string} project What project it is
968
+ * @param {string} project The project identifier to scope the request to.
650
969
  * @param {string} orderId Unique identifier of an order
651
970
  * @param {*} [options] Override http request option.
652
971
  * @throws {RequiredError}
@@ -694,9 +1013,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
694
1013
  /**
695
1014
  * Export orders as a CSV file
696
1015
  * @summary Export orders
697
- * @param {string} project What project it is
698
- * @param {string} start Start of date range to filter by when orders were placed
699
- * @param {string} [end] End of date range
1016
+ * @param {string} project The project identifier to scope the request to.
1017
+ * @param {string} start Start of the date range to filter by when orders were placed.
1018
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
700
1019
  * @param {string} [search] Search term to filter based on order reference, customer name and email
701
1020
  * @param {*} [options] Override http request option.
702
1021
  * @throws {RequiredError}
@@ -759,7 +1078,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
759
1078
  /**
760
1079
  * Get an order by a given ID.
761
1080
  * @summary Get order
762
- * @param {string} project What project it is
1081
+ * @param {string} project The project identifier to scope the request to.
763
1082
  * @param {string} orderId Unique identifier of an order
764
1083
  * @param {string} [fields] Specifies which fields to return, separated by commas
765
1084
  * @param {*} [options] Override http request option.
@@ -812,15 +1131,15 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
812
1131
  /**
813
1132
  * Lists all orders placed on this project, paginated into configurable chunks.
814
1133
  * @summary List orders
815
- * @param {string} project What project it is
1134
+ * @param {string} project The project identifier to scope the request to.
816
1135
  * @param {string} [fields] Specifies which fields to return, separated by commas
817
1136
  * @param {number} [pageToken] Page reference token
818
1137
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
819
1138
  * @param {string} [search] Search term to filter based on order reference, customer name and email
820
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
821
- * @param {Array<Status>} [statuses] Filter by fulfillment status
822
- * @param {string} [start] Start of date range
823
- * @param {string} [end] End of date range
1139
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
1140
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
1141
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1142
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
824
1143
  * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the &#x60;start&#x60; and &#x60;end&#x60; fields should query.
825
1144
  * @param {*} [options] Override http request option.
826
1145
  * @throws {RequiredError}
@@ -902,10 +1221,64 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
902
1221
  options: localVarRequestOptions,
903
1222
  };
904
1223
  },
1224
+ /**
1225
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1226
+ * @summary Import orders
1227
+ * @param {string} project The project identifier to scope the request to.
1228
+ * @param {File} file CSV file containing order data
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ */
1232
+ importOrders: async (project: string, file: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1233
+ // verify required parameter 'project' is not null or undefined
1234
+ assertParamExists('importOrders', 'project', project)
1235
+ // verify required parameter 'file' is not null or undefined
1236
+ assertParamExists('importOrders', 'file', file)
1237
+ const localVarPath = `/v1/orders/import`;
1238
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1239
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1240
+ let baseOptions;
1241
+ if (configuration) {
1242
+ baseOptions = configuration.baseOptions;
1243
+ }
1244
+
1245
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1246
+ const localVarHeaderParameter = {} as any;
1247
+ const localVarQueryParameter = {} as any;
1248
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1249
+
1250
+ // authentication session-oauth required
1251
+ // oauth required
1252
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1253
+
1254
+ // authentication api-key required
1255
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1256
+
1257
+ if (project !== undefined) {
1258
+ localVarQueryParameter['project'] = project;
1259
+ }
1260
+
1261
+
1262
+ if (file !== undefined) {
1263
+ localVarFormParams.append('file', file as any);
1264
+ }
1265
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1266
+ localVarHeaderParameter['Accept'] = 'application/json';
1267
+
1268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1270
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1271
+ localVarRequestOptions.data = localVarFormParams;
1272
+
1273
+ return {
1274
+ url: toPathString(localVarUrlObj),
1275
+ options: localVarRequestOptions,
1276
+ };
1277
+ },
905
1278
  /**
906
1279
  * Retries failed platform payment, so fulfillment can proceed.
907
1280
  * @summary Retry
908
- * @param {string} project What project it is
1281
+ * @param {string} project The project identifier to scope the request to.
909
1282
  * @param {string} orderId Unique identifier of an order
910
1283
  * @param {string} [fields] Specifies which fields to return, separated by commas
911
1284
  * @param {*} [options] Override http request option.
@@ -967,7 +1340,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
967
1340
  /**
968
1341
  * Cancels an order if it has not yet started processing.
969
1342
  * @summary Cancel order
970
- * @param {string} project What project it is
1343
+ * @param {string} project The project identifier to scope the request to.
971
1344
  * @param {string} orderId Unique identifier of an order
972
1345
  * @param {string} [fields] Specifies which fields to return, separated by commas
973
1346
  * @param {*} [options] Override http request option.
@@ -982,9 +1355,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
982
1355
  /**
983
1356
  * Confirms an order, and submits it as ready to take payment and begin processing.
984
1357
  * @summary Confirm order
985
- * @param {string} project What project it is
1358
+ * @param {string} project The project identifier to scope the request to.
986
1359
  * @param {string} orderId Unique identifier of an order
987
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
1360
+ * @param {ConfirmOrderRequest} confirmOrderRequest Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
988
1361
  * @param {string} [fields] Specifies which fields to return, separated by commas
989
1362
  * @param {*} [options] Override http request option.
990
1363
  * @throws {RequiredError}
@@ -998,7 +1371,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
998
1371
  /**
999
1372
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
1000
1373
  * @summary Create order
1001
- * @param {string} project What project it is
1374
+ * @param {string} project The project identifier to scope the request to.
1002
1375
  * @param {CreateOrder} createOrder Create Order schema
1003
1376
  * @param {string} [fields] Specifies which fields to return, separated by commas
1004
1377
  * @param {*} [options] Override http request option.
@@ -1013,7 +1386,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1013
1386
  /**
1014
1387
  * Download an order invoice.
1015
1388
  * @summary Download order invoice
1016
- * @param {string} project What project it is
1389
+ * @param {string} project The project identifier to scope the request to.
1017
1390
  * @param {string} orderId Unique identifier of an order
1018
1391
  * @param {*} [options] Override http request option.
1019
1392
  * @throws {RequiredError}
@@ -1027,9 +1400,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1027
1400
  /**
1028
1401
  * Export orders as a CSV file
1029
1402
  * @summary Export orders
1030
- * @param {string} project What project it is
1031
- * @param {string} start Start of date range to filter by when orders were placed
1032
- * @param {string} [end] End of date range
1403
+ * @param {string} project The project identifier to scope the request to.
1404
+ * @param {string} start Start of the date range to filter by when orders were placed.
1405
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1033
1406
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1034
1407
  * @param {*} [options] Override http request option.
1035
1408
  * @throws {RequiredError}
@@ -1043,7 +1416,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1043
1416
  /**
1044
1417
  * Get an order by a given ID.
1045
1418
  * @summary Get order
1046
- * @param {string} project What project it is
1419
+ * @param {string} project The project identifier to scope the request to.
1047
1420
  * @param {string} orderId Unique identifier of an order
1048
1421
  * @param {string} [fields] Specifies which fields to return, separated by commas
1049
1422
  * @param {*} [options] Override http request option.
@@ -1058,15 +1431,15 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1058
1431
  /**
1059
1432
  * Lists all orders placed on this project, paginated into configurable chunks.
1060
1433
  * @summary List orders
1061
- * @param {string} project What project it is
1434
+ * @param {string} project The project identifier to scope the request to.
1062
1435
  * @param {string} [fields] Specifies which fields to return, separated by commas
1063
1436
  * @param {number} [pageToken] Page reference token
1064
1437
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1065
1438
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1066
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
1067
- * @param {Array<Status>} [statuses] Filter by fulfillment status
1068
- * @param {string} [start] Start of date range
1069
- * @param {string} [end] End of date range
1439
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
1440
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
1441
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1442
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1070
1443
  * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the &#x60;start&#x60; and &#x60;end&#x60; fields should query.
1071
1444
  * @param {*} [options] Override http request option.
1072
1445
  * @throws {RequiredError}
@@ -1077,10 +1450,24 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1077
1450
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrders']?.[localVarOperationServerIndex]?.url;
1078
1451
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1079
1452
  },
1453
+ /**
1454
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1455
+ * @summary Import orders
1456
+ * @param {string} project The project identifier to scope the request to.
1457
+ * @param {File} file CSV file containing order data
1458
+ * @param {*} [options] Override http request option.
1459
+ * @throws {RequiredError}
1460
+ */
1461
+ async importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>> {
1462
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importOrders(project, file, options);
1463
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1464
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.importOrders']?.[localVarOperationServerIndex]?.url;
1465
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1466
+ },
1080
1467
  /**
1081
1468
  * Retries failed platform payment, so fulfillment can proceed.
1082
1469
  * @summary Retry
1083
- * @param {string} project What project it is
1470
+ * @param {string} project The project identifier to scope the request to.
1084
1471
  * @param {string} orderId Unique identifier of an order
1085
1472
  * @param {string} [fields] Specifies which fields to return, separated by commas
1086
1473
  * @param {*} [options] Override http request option.
@@ -1171,6 +1558,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1171
1558
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse> {
1172
1559
  return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
1173
1560
  },
1561
+ /**
1562
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1563
+ * @summary Import orders
1564
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1565
+ * @param {*} [options] Override http request option.
1566
+ * @throws {RequiredError}
1567
+ */
1568
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response> {
1569
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
1570
+ },
1174
1571
  /**
1175
1572
  * Retries failed platform payment, so fulfillment can proceed.
1176
1573
  * @summary Retry
@@ -1189,7 +1586,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1189
1586
  */
1190
1587
  export interface OrdersApiCancelOrderRequest {
1191
1588
  /**
1192
- * What project it is
1589
+ * The project identifier to scope the request to.
1193
1590
  */
1194
1591
  readonly project: string
1195
1592
 
@@ -1209,7 +1606,7 @@ export interface OrdersApiCancelOrderRequest {
1209
1606
  */
1210
1607
  export interface OrdersApiConfirmOrderRequest {
1211
1608
  /**
1212
- * What project it is
1609
+ * The project identifier to scope the request to.
1213
1610
  */
1214
1611
  readonly project: string
1215
1612
 
@@ -1219,7 +1616,7 @@ export interface OrdersApiConfirmOrderRequest {
1219
1616
  readonly orderId: string
1220
1617
 
1221
1618
  /**
1222
- * ConfirmFulfillment schema
1619
+ * Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
1223
1620
  */
1224
1621
  readonly confirmOrderRequest: ConfirmOrderRequest
1225
1622
 
@@ -1234,7 +1631,7 @@ export interface OrdersApiConfirmOrderRequest {
1234
1631
  */
1235
1632
  export interface OrdersApiCreateOrderRequest {
1236
1633
  /**
1237
- * What project it is
1634
+ * The project identifier to scope the request to.
1238
1635
  */
1239
1636
  readonly project: string
1240
1637
 
@@ -1254,7 +1651,7 @@ export interface OrdersApiCreateOrderRequest {
1254
1651
  */
1255
1652
  export interface OrdersApiDownloadInvoiceRequest {
1256
1653
  /**
1257
- * What project it is
1654
+ * The project identifier to scope the request to.
1258
1655
  */
1259
1656
  readonly project: string
1260
1657
 
@@ -1269,17 +1666,17 @@ export interface OrdersApiDownloadInvoiceRequest {
1269
1666
  */
1270
1667
  export interface OrdersApiExportOrdersRequest {
1271
1668
  /**
1272
- * What project it is
1669
+ * The project identifier to scope the request to.
1273
1670
  */
1274
1671
  readonly project: string
1275
1672
 
1276
1673
  /**
1277
- * Start of date range to filter by when orders were placed
1674
+ * Start of the date range to filter by when orders were placed.
1278
1675
  */
1279
1676
  readonly start: string
1280
1677
 
1281
1678
  /**
1282
- * End of date range
1679
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1283
1680
  */
1284
1681
  readonly end?: string
1285
1682
 
@@ -1294,7 +1691,7 @@ export interface OrdersApiExportOrdersRequest {
1294
1691
  */
1295
1692
  export interface OrdersApiGetOrderRequest {
1296
1693
  /**
1297
- * What project it is
1694
+ * The project identifier to scope the request to.
1298
1695
  */
1299
1696
  readonly project: string
1300
1697
 
@@ -1314,7 +1711,7 @@ export interface OrdersApiGetOrderRequest {
1314
1711
  */
1315
1712
  export interface OrdersApiGetOrdersRequest {
1316
1713
  /**
1317
- * What project it is
1714
+ * The project identifier to scope the request to.
1318
1715
  */
1319
1716
  readonly project: string
1320
1717
 
@@ -1339,22 +1736,22 @@ export interface OrdersApiGetOrdersRequest {
1339
1736
  readonly search?: string
1340
1737
 
1341
1738
  /**
1342
- * Specify fulfillment IDs to list
1739
+ * Filter to specific order IDs. Only orders matching these IDs will be returned.
1343
1740
  */
1344
1741
  readonly ids?: Array<string>
1345
1742
 
1346
1743
  /**
1347
- * Filter by fulfillment status
1744
+ * Filter by order status. Only orders matching one of the given statuses will be returned.
1348
1745
  */
1349
1746
  readonly statuses?: Array<Status>
1350
1747
 
1351
1748
  /**
1352
- * Start of date range
1749
+ * Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1353
1750
  */
1354
1751
  readonly start?: string
1355
1752
 
1356
1753
  /**
1357
- * End of date range
1754
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1358
1755
  */
1359
1756
  readonly end?: string
1360
1757
 
@@ -1364,12 +1761,27 @@ export interface OrdersApiGetOrdersRequest {
1364
1761
  readonly dateFilterType?: GetOrdersDateFilterTypeEnum
1365
1762
  }
1366
1763
 
1764
+ /**
1765
+ * Request parameters for importOrders operation in OrdersApi.
1766
+ */
1767
+ export interface OrdersApiImportOrdersRequest {
1768
+ /**
1769
+ * The project identifier to scope the request to.
1770
+ */
1771
+ readonly project: string
1772
+
1773
+ /**
1774
+ * CSV file containing order data
1775
+ */
1776
+ readonly file: File
1777
+ }
1778
+
1367
1779
  /**
1368
1780
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1369
1781
  */
1370
1782
  export interface OrdersApiRetryPlatformPaymentRequest {
1371
1783
  /**
1372
- * What project it is
1784
+ * The project identifier to scope the request to.
1373
1785
  */
1374
1786
  readonly project: string
1375
1787
 
@@ -1465,6 +1877,17 @@ export class OrdersApi extends BaseAPI {
1465
1877
  return OrdersApiFp(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(this.axios, this.basePath));
1466
1878
  }
1467
1879
 
1880
+ /**
1881
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1882
+ * @summary Import orders
1883
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1884
+ * @param {*} [options] Override http request option.
1885
+ * @throws {RequiredError}
1886
+ */
1887
+ public importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig) {
1888
+ return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
1889
+ }
1890
+
1468
1891
  /**
1469
1892
  * Retries failed platform payment, so fulfillment can proceed.
1470
1893
  * @summary Retry