@teemill/orders 1.24.1 → 1.25.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 (60) hide show
  1. package/README.md +11 -8
  2. package/api.ts +448 -135
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +1 -1
  6. package/dist/api.d.ts +444 -135
  7. package/dist/api.js +44 -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 +444 -135
  15. package/dist/esm/api.js +43 -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/Order.md +17 -16
  45. package/docs/OrderItem.md +10 -9
  46. package/docs/OrderTracking.md +4 -3
  47. package/docs/OrdersApi.md +31 -31
  48. package/docs/Origin.md +3 -2
  49. package/docs/PaymentAttempt.md +4 -5
  50. package/docs/PaymentMethod.md +2 -1
  51. package/docs/Price.md +3 -3
  52. package/docs/ProductUnavailableError.md +35 -0
  53. package/docs/RecipientCost.md +23 -0
  54. package/docs/Shipment.md +21 -0
  55. package/docs/ShippingMethod.md +8 -7
  56. package/docs/Status.md +1 -0
  57. package/docs/StockConflictError.md +34 -0
  58. package/docs/StockUnavailableError.md +35 -0
  59. package/index.ts +1 -1
  60. 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.25.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,73 +272,103 @@ 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
  }
277
374
  export interface Option {
@@ -284,6 +381,9 @@ export interface Option {
284
381
  */
285
382
  'value': string;
286
383
  }
384
+ /**
385
+ * Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
386
+ */
287
387
  export interface Order {
288
388
  /**
289
389
  * Unique object identifier
@@ -293,44 +393,83 @@ export interface Order {
293
393
  * A reference to the resource location
294
394
  */
295
395
  'ref'?: string;
396
+ /**
397
+ * The current status of the order.
398
+ */
296
399
  'status'?: Status;
297
400
  'contactInformation': ContactInformation;
298
401
  'paymentMethod'?: PaymentMethod;
402
+ /**
403
+ * The address the order will be shipped to.
404
+ */
299
405
  'shippingAddress': Address;
300
406
  'customsInformation'?: CustomsInformation1;
301
407
  /**
302
- * ISO 8601 Timestamp
408
+ * When the order was created.
303
409
  */
304
410
  'createdAt'?: string;
305
411
  /**
306
- * ISO 8601 Timestamp
412
+ * When the order was last updated.
307
413
  */
308
414
  'updatedAt'?: string;
309
415
  /**
310
- * ISO 8601 Timestamp
416
+ * When the order status last changed.
311
417
  */
312
418
  'statusChangedAt'?: string;
313
419
  /**
314
- * A custom reference to the merchant\'s order.
420
+ * Your own reference for this order, such as an order number from your storefront.
315
421
  */
316
422
  'merchantReference'?: string | null;
423
+ /**
424
+ * The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately.
425
+ */
317
426
  'fulfillments'?: Array<Fulfillment>;
427
+ /**
428
+ * The line items included in this order.
429
+ */
318
430
  'items': Array<OrderItem>;
431
+ /**
432
+ * The total price of the order including tax and after discounts.
433
+ */
319
434
  'totalPrice'?: Price;
435
+ /**
436
+ * The total tax amount for the order.
437
+ */
320
438
  'taxPrice'?: Price;
439
+ /**
440
+ * The net items price excluding tax and before discounts.
441
+ */
321
442
  'subtotalPrice'?: Price;
443
+ /**
444
+ * The total discount amount applied to the order.
445
+ */
322
446
  'discountPrice'?: Price;
447
+ /**
448
+ * The coupon applied to the order, if any.
449
+ */
323
450
  'coupon'?: Coupon | null;
451
+ /**
452
+ * The total shipping cost for the order.
453
+ */
324
454
  'shippingPrice'?: Price;
325
455
  'origin'?: Origin;
456
+ /**
457
+ * A chronological list of status changes for this order.
458
+ */
326
459
  'statusHistory'?: Array<StatusHistoryItem>;
460
+ /**
461
+ * A list of payment attempts made for this order.
462
+ */
327
463
  'paymentAttempts'?: Array<PaymentAttempt>;
328
464
  }
329
465
 
330
466
 
467
+ /**
468
+ * A line item in an order, representing a specific product variant and quantity.
469
+ */
331
470
  export interface OrderItem {
332
471
  /**
333
- * Unique object identifier
472
+ * Unique identifier for this order item.
334
473
  */
335
474
  'id'?: string;
336
475
  /**
@@ -341,42 +480,54 @@ export interface OrderItem {
341
480
  * Options associated to an order item\'s variant, such as color and size.
342
481
  */
343
482
  'options'?: Array<Option>;
483
+ /**
484
+ * The number of units of this variant to order.
485
+ */
344
486
  'quantity': number;
345
487
  /**
346
- * The name of the product
488
+ * The display name of the product.
347
489
  */
348
490
  'name'?: string;
349
491
  /**
350
- * Images
492
+ * Product images associated with this item.
351
493
  */
352
494
  'images'?: Array<Image>;
495
+ /**
496
+ * The total price for this line item including tax and after discounts.
497
+ */
353
498
  'totalPrice'?: Price;
354
499
  /**
355
- * This is an estimate until the order has been confirmed
500
+ * The tax amount for this line item. This is an estimate until the order has been confirmed.
356
501
  */
357
502
  'taxPrice'?: Price;
503
+ /**
504
+ * The net price for this line item, excluding tax and before discounts.
505
+ */
358
506
  'subtotalPrice'?: Price;
507
+ /**
508
+ * The discount amount applied to this line item.
509
+ */
359
510
  'discountPrice'?: Price;
360
511
  /**
361
- * The price you charged the recipient for each item. It\'s highly recommended if you have international orders as it aids customs issues.
512
+ * The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations.
362
513
  */
363
514
  'recipientCost'?: Price;
364
515
  }
365
- export interface OrderItem1 {
516
+ /**
517
+ * Shipment tracking information. Available once the fulfillment has been dispatched.
518
+ */
519
+ export interface OrderTracking {
366
520
  /**
367
- * A reference to the variant being ordered
521
+ * The name of the courier service.
368
522
  */
369
- 'variantRef': string;
370
- 'quantity': number;
371
- 'recipientCost'?: OrderItem1RecipientCost;
372
- }
373
- export interface OrderItem1RecipientCost {
374
- 'amount': string;
375
- 'currencyCode': string;
376
- }
377
- export interface OrderTracking {
378
523
  'courier'?: string;
524
+ /**
525
+ * The tracking code provided by the courier.
526
+ */
379
527
  'code'?: string;
528
+ /**
529
+ * A URL to track the shipment on the courier\'s website.
530
+ */
380
531
  'url'?: string;
381
532
  }
382
533
  export interface OrdersResponse {
@@ -386,17 +537,35 @@ export interface OrdersResponse {
386
537
  */
387
538
  'nextPageToken'?: number | null;
388
539
  }
540
+ /**
541
+ * The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
542
+ */
389
543
  export interface Origin {
544
+ /**
545
+ * A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`.
546
+ */
390
547
  'code'?: string;
548
+ /**
549
+ * Whether this origin represents paid advertising traffic.
550
+ */
391
551
  'isPaid'?: boolean;
392
552
  }
393
- /**
394
- * List of payment attempts for this order
395
- */
396
553
  export interface PaymentAttempt {
554
+ /**
555
+ * The payment provider used.
556
+ */
397
557
  'paymentProvider'?: PaymentAttemptPaymentProviderEnum;
558
+ /**
559
+ * The outcome of the payment attempt.
560
+ */
398
561
  'status'?: PaymentAttemptStatusEnum;
562
+ /**
563
+ * The transaction ID from the payment provider.
564
+ */
399
565
  'transactionId'?: string | null;
566
+ /**
567
+ * A human-readable message describing the payment result.
568
+ */
400
569
  'message'?: string;
401
570
  /**
402
571
  * ISO 8601 Timestamp
@@ -420,35 +589,133 @@ export const PaymentAttemptStatusEnum = {
420
589
 
421
590
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
422
591
 
592
+ /**
593
+ * The payment method used for this order.
594
+ */
423
595
  export interface PaymentMethod {
596
+ /**
597
+ * The type of payment method used.
598
+ */
424
599
  'type'?: string | null;
425
600
  }
426
601
  /**
427
- * Standard price definition that defines the amount and currency.
602
+ * A monetary value with its currency.
428
603
  */
429
604
  export interface Price {
430
605
  /**
431
- * Price including tax in the specified currency.
606
+ * The monetary amount as a decimal string.
432
607
  */
433
608
  'amount'?: string;
434
609
  /**
435
- * Currency code for the currency the price is valued in.
610
+ * ISO 4217 currency code.
436
611
  */
437
612
  'currencyCode'?: string;
438
613
  }
439
- export interface ShippingMethod {
614
+ /**
615
+ * 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).
616
+ */
617
+ export interface ProductUnavailableError {
618
+ 'code': ProductUnavailableErrorCodeEnum;
619
+ /**
620
+ * Human-readable description including the product name.
621
+ */
622
+ 'message': string;
623
+ /**
624
+ * Display name of the product.
625
+ */
626
+ 'productTitle': string;
440
627
  /**
441
628
  * Unique object identifier
442
629
  */
630
+ 'variantId': string;
631
+ /**
632
+ * A reference to the variant being ordered
633
+ */
634
+ 'variantRef': string;
635
+ /**
636
+ * The quantity that was requested in the order.
637
+ */
638
+ 'requestedQuantity': number;
639
+ /**
640
+ * Always 0 for this error type.
641
+ */
642
+ 'availableQuantity': ProductUnavailableErrorAvailableQuantityEnum;
643
+ /**
644
+ * The full requested quantity, representing the total unfulfillable amount.
645
+ */
646
+ 'shortage': number;
647
+ }
648
+
649
+ export const ProductUnavailableErrorCodeEnum = {
650
+ ProductUnavailable: 'PRODUCT_UNAVAILABLE'
651
+ } as const;
652
+
653
+ export type ProductUnavailableErrorCodeEnum = typeof ProductUnavailableErrorCodeEnum[keyof typeof ProductUnavailableErrorCodeEnum];
654
+ export const ProductUnavailableErrorAvailableQuantityEnum = {
655
+ NUMBER_0: 0
656
+ } as const;
657
+
658
+ export type ProductUnavailableErrorAvailableQuantityEnum = typeof ProductUnavailableErrorAvailableQuantityEnum[keyof typeof ProductUnavailableErrorAvailableQuantityEnum];
659
+
660
+ /**
661
+ * The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
662
+ */
663
+ export interface RecipientCost {
664
+ /**
665
+ * The monetary amount as a decimal string.
666
+ */
667
+ 'amount': string;
668
+ /**
669
+ * ISO 4217 currency code.
670
+ */
671
+ 'currencyCode': string;
672
+ }
673
+ /**
674
+ * Your own shipping label details.
675
+ */
676
+ export interface Shipment {
677
+ /**
678
+ * A URL to the shipping label image or PDF.
679
+ */
680
+ 'image': string;
681
+ }
682
+ /**
683
+ * A shipping option available for a fulfillment, including delivery estimates and pricing.
684
+ */
685
+ export interface ShippingMethod {
686
+ /**
687
+ * Unique identifier for this shipping method. Use this when confirming a fulfillment.
688
+ */
443
689
  'id'?: string;
690
+ /**
691
+ * The display name of the shipping method.
692
+ */
444
693
  'name'?: string;
694
+ /**
695
+ * A brief description of the shipping method\'s service level.
696
+ */
445
697
  'description'?: string;
446
698
  'deliveryEstimates'?: DeliveryEstimates;
699
+ /**
700
+ * The total shipping cost including tax.
701
+ */
447
702
  'totalPrice'?: Price;
703
+ /**
704
+ * The tax portion of the shipping cost.
705
+ */
448
706
  'taxPrice'?: Price;
707
+ /**
708
+ * The net shipping cost, excluding tax and before discounts.
709
+ */
449
710
  'subtotalPrice'?: Price;
711
+ /**
712
+ * Any discount applied to the shipping cost.
713
+ */
450
714
  'discountPrice'?: Price;
451
715
  }
716
+ /**
717
+ * 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
718
+ */
452
719
 
453
720
  export const Status = {
454
721
  New: 'new',
@@ -472,6 +739,52 @@ export interface StatusHistoryItem {
472
739
  }
473
740
 
474
741
 
742
+ /**
743
+ * @type StockConflictError
744
+ */
745
+ export type StockConflictError = { code: 'PRODUCT_UNAVAILABLE' } & ProductUnavailableError | { code: 'STOCK_UNAVAILABLE' } & StockUnavailableError;
746
+
747
+ /**
748
+ * The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
749
+ */
750
+ export interface StockUnavailableError {
751
+ 'code': StockUnavailableErrorCodeEnum;
752
+ /**
753
+ * Human-readable description including the product name and available quantity.
754
+ */
755
+ 'message': string;
756
+ /**
757
+ * Display name of the product.
758
+ */
759
+ 'productTitle': string;
760
+ /**
761
+ * Unique object identifier
762
+ */
763
+ 'variantId': string;
764
+ /**
765
+ * A reference to the variant being ordered
766
+ */
767
+ 'variantRef': string;
768
+ /**
769
+ * The quantity that was requested in the order.
770
+ */
771
+ 'requestedQuantity': number;
772
+ /**
773
+ * The quantity currently available for fulfillment.
774
+ */
775
+ 'availableQuantity': number;
776
+ /**
777
+ * The difference between requested and available quantity (positive value indicating the deficit).
778
+ */
779
+ 'shortage': number;
780
+ }
781
+
782
+ export const StockUnavailableErrorCodeEnum = {
783
+ StockUnavailable: 'STOCK_UNAVAILABLE'
784
+ } as const;
785
+
786
+ export type StockUnavailableErrorCodeEnum = typeof StockUnavailableErrorCodeEnum[keyof typeof StockUnavailableErrorCodeEnum];
787
+
475
788
 
476
789
  /**
477
790
  * OrdersApi - axios parameter creator
@@ -481,7 +794,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
481
794
  /**
482
795
  * Cancels an order if it has not yet started processing.
483
796
  * @summary Cancel order
484
- * @param {string} project What project it is
797
+ * @param {string} project The project identifier to scope the request to.
485
798
  * @param {string} orderId Unique identifier of an order
486
799
  * @param {string} [fields] Specifies which fields to return, separated by commas
487
800
  * @param {*} [options] Override http request option.
@@ -534,9 +847,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
534
847
  /**
535
848
  * Confirms an order, and submits it as ready to take payment and begin processing.
536
849
  * @summary Confirm order
537
- * @param {string} project What project it is
850
+ * @param {string} project The project identifier to scope the request to.
538
851
  * @param {string} orderId Unique identifier of an order
539
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
852
+ * @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
853
  * @param {string} [fields] Specifies which fields to return, separated by commas
541
854
  * @param {*} [options] Override http request option.
542
855
  * @throws {RequiredError}
@@ -592,7 +905,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
592
905
  /**
593
906
  * 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
907
  * @summary Create order
595
- * @param {string} project What project it is
908
+ * @param {string} project The project identifier to scope the request to.
596
909
  * @param {CreateOrder} createOrder Create Order schema
597
910
  * @param {string} [fields] Specifies which fields to return, separated by commas
598
911
  * @param {*} [options] Override http request option.
@@ -646,7 +959,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
646
959
  /**
647
960
  * Download an order invoice.
648
961
  * @summary Download order invoice
649
- * @param {string} project What project it is
962
+ * @param {string} project The project identifier to scope the request to.
650
963
  * @param {string} orderId Unique identifier of an order
651
964
  * @param {*} [options] Override http request option.
652
965
  * @throws {RequiredError}
@@ -694,9 +1007,9 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
694
1007
  /**
695
1008
  * Export orders as a CSV file
696
1009
  * @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
1010
+ * @param {string} project The project identifier to scope the request to.
1011
+ * @param {string} start Start of the date range to filter by when orders were placed.
1012
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
700
1013
  * @param {string} [search] Search term to filter based on order reference, customer name and email
701
1014
  * @param {*} [options] Override http request option.
702
1015
  * @throws {RequiredError}
@@ -759,7 +1072,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
759
1072
  /**
760
1073
  * Get an order by a given ID.
761
1074
  * @summary Get order
762
- * @param {string} project What project it is
1075
+ * @param {string} project The project identifier to scope the request to.
763
1076
  * @param {string} orderId Unique identifier of an order
764
1077
  * @param {string} [fields] Specifies which fields to return, separated by commas
765
1078
  * @param {*} [options] Override http request option.
@@ -812,15 +1125,15 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
812
1125
  /**
813
1126
  * Lists all orders placed on this project, paginated into configurable chunks.
814
1127
  * @summary List orders
815
- * @param {string} project What project it is
1128
+ * @param {string} project The project identifier to scope the request to.
816
1129
  * @param {string} [fields] Specifies which fields to return, separated by commas
817
1130
  * @param {number} [pageToken] Page reference token
818
1131
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
819
1132
  * @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
1133
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
1134
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
1135
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1136
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
824
1137
  * @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
1138
  * @param {*} [options] Override http request option.
826
1139
  * @throws {RequiredError}
@@ -905,7 +1218,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
905
1218
  /**
906
1219
  * Retries failed platform payment, so fulfillment can proceed.
907
1220
  * @summary Retry
908
- * @param {string} project What project it is
1221
+ * @param {string} project The project identifier to scope the request to.
909
1222
  * @param {string} orderId Unique identifier of an order
910
1223
  * @param {string} [fields] Specifies which fields to return, separated by commas
911
1224
  * @param {*} [options] Override http request option.
@@ -967,7 +1280,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
967
1280
  /**
968
1281
  * Cancels an order if it has not yet started processing.
969
1282
  * @summary Cancel order
970
- * @param {string} project What project it is
1283
+ * @param {string} project The project identifier to scope the request to.
971
1284
  * @param {string} orderId Unique identifier of an order
972
1285
  * @param {string} [fields] Specifies which fields to return, separated by commas
973
1286
  * @param {*} [options] Override http request option.
@@ -982,9 +1295,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
982
1295
  /**
983
1296
  * Confirms an order, and submits it as ready to take payment and begin processing.
984
1297
  * @summary Confirm order
985
- * @param {string} project What project it is
1298
+ * @param {string} project The project identifier to scope the request to.
986
1299
  * @param {string} orderId Unique identifier of an order
987
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
1300
+ * @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
1301
  * @param {string} [fields] Specifies which fields to return, separated by commas
989
1302
  * @param {*} [options] Override http request option.
990
1303
  * @throws {RequiredError}
@@ -998,7 +1311,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
998
1311
  /**
999
1312
  * 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
1313
  * @summary Create order
1001
- * @param {string} project What project it is
1314
+ * @param {string} project The project identifier to scope the request to.
1002
1315
  * @param {CreateOrder} createOrder Create Order schema
1003
1316
  * @param {string} [fields] Specifies which fields to return, separated by commas
1004
1317
  * @param {*} [options] Override http request option.
@@ -1013,7 +1326,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1013
1326
  /**
1014
1327
  * Download an order invoice.
1015
1328
  * @summary Download order invoice
1016
- * @param {string} project What project it is
1329
+ * @param {string} project The project identifier to scope the request to.
1017
1330
  * @param {string} orderId Unique identifier of an order
1018
1331
  * @param {*} [options] Override http request option.
1019
1332
  * @throws {RequiredError}
@@ -1027,9 +1340,9 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1027
1340
  /**
1028
1341
  * Export orders as a CSV file
1029
1342
  * @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
1343
+ * @param {string} project The project identifier to scope the request to.
1344
+ * @param {string} start Start of the date range to filter by when orders were placed.
1345
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1033
1346
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1034
1347
  * @param {*} [options] Override http request option.
1035
1348
  * @throws {RequiredError}
@@ -1043,7 +1356,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1043
1356
  /**
1044
1357
  * Get an order by a given ID.
1045
1358
  * @summary Get order
1046
- * @param {string} project What project it is
1359
+ * @param {string} project The project identifier to scope the request to.
1047
1360
  * @param {string} orderId Unique identifier of an order
1048
1361
  * @param {string} [fields] Specifies which fields to return, separated by commas
1049
1362
  * @param {*} [options] Override http request option.
@@ -1058,15 +1371,15 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1058
1371
  /**
1059
1372
  * Lists all orders placed on this project, paginated into configurable chunks.
1060
1373
  * @summary List orders
1061
- * @param {string} project What project it is
1374
+ * @param {string} project The project identifier to scope the request to.
1062
1375
  * @param {string} [fields] Specifies which fields to return, separated by commas
1063
1376
  * @param {number} [pageToken] Page reference token
1064
1377
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1065
1378
  * @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
1379
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
1380
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
1381
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1382
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1070
1383
  * @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
1384
  * @param {*} [options] Override http request option.
1072
1385
  * @throws {RequiredError}
@@ -1080,7 +1393,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1080
1393
  /**
1081
1394
  * Retries failed platform payment, so fulfillment can proceed.
1082
1395
  * @summary Retry
1083
- * @param {string} project What project it is
1396
+ * @param {string} project The project identifier to scope the request to.
1084
1397
  * @param {string} orderId Unique identifier of an order
1085
1398
  * @param {string} [fields] Specifies which fields to return, separated by commas
1086
1399
  * @param {*} [options] Override http request option.
@@ -1189,7 +1502,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1189
1502
  */
1190
1503
  export interface OrdersApiCancelOrderRequest {
1191
1504
  /**
1192
- * What project it is
1505
+ * The project identifier to scope the request to.
1193
1506
  */
1194
1507
  readonly project: string
1195
1508
 
@@ -1209,7 +1522,7 @@ export interface OrdersApiCancelOrderRequest {
1209
1522
  */
1210
1523
  export interface OrdersApiConfirmOrderRequest {
1211
1524
  /**
1212
- * What project it is
1525
+ * The project identifier to scope the request to.
1213
1526
  */
1214
1527
  readonly project: string
1215
1528
 
@@ -1219,7 +1532,7 @@ export interface OrdersApiConfirmOrderRequest {
1219
1532
  readonly orderId: string
1220
1533
 
1221
1534
  /**
1222
- * ConfirmFulfillment schema
1535
+ * 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
1536
  */
1224
1537
  readonly confirmOrderRequest: ConfirmOrderRequest
1225
1538
 
@@ -1234,7 +1547,7 @@ export interface OrdersApiConfirmOrderRequest {
1234
1547
  */
1235
1548
  export interface OrdersApiCreateOrderRequest {
1236
1549
  /**
1237
- * What project it is
1550
+ * The project identifier to scope the request to.
1238
1551
  */
1239
1552
  readonly project: string
1240
1553
 
@@ -1254,7 +1567,7 @@ export interface OrdersApiCreateOrderRequest {
1254
1567
  */
1255
1568
  export interface OrdersApiDownloadInvoiceRequest {
1256
1569
  /**
1257
- * What project it is
1570
+ * The project identifier to scope the request to.
1258
1571
  */
1259
1572
  readonly project: string
1260
1573
 
@@ -1269,17 +1582,17 @@ export interface OrdersApiDownloadInvoiceRequest {
1269
1582
  */
1270
1583
  export interface OrdersApiExportOrdersRequest {
1271
1584
  /**
1272
- * What project it is
1585
+ * The project identifier to scope the request to.
1273
1586
  */
1274
1587
  readonly project: string
1275
1588
 
1276
1589
  /**
1277
- * Start of date range to filter by when orders were placed
1590
+ * Start of the date range to filter by when orders were placed.
1278
1591
  */
1279
1592
  readonly start: string
1280
1593
 
1281
1594
  /**
1282
- * End of date range
1595
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1283
1596
  */
1284
1597
  readonly end?: string
1285
1598
 
@@ -1294,7 +1607,7 @@ export interface OrdersApiExportOrdersRequest {
1294
1607
  */
1295
1608
  export interface OrdersApiGetOrderRequest {
1296
1609
  /**
1297
- * What project it is
1610
+ * The project identifier to scope the request to.
1298
1611
  */
1299
1612
  readonly project: string
1300
1613
 
@@ -1314,7 +1627,7 @@ export interface OrdersApiGetOrderRequest {
1314
1627
  */
1315
1628
  export interface OrdersApiGetOrdersRequest {
1316
1629
  /**
1317
- * What project it is
1630
+ * The project identifier to scope the request to.
1318
1631
  */
1319
1632
  readonly project: string
1320
1633
 
@@ -1339,22 +1652,22 @@ export interface OrdersApiGetOrdersRequest {
1339
1652
  readonly search?: string
1340
1653
 
1341
1654
  /**
1342
- * Specify fulfillment IDs to list
1655
+ * Filter to specific order IDs. Only orders matching these IDs will be returned.
1343
1656
  */
1344
1657
  readonly ids?: Array<string>
1345
1658
 
1346
1659
  /**
1347
- * Filter by fulfillment status
1660
+ * Filter by order status. Only orders matching one of the given statuses will be returned.
1348
1661
  */
1349
1662
  readonly statuses?: Array<Status>
1350
1663
 
1351
1664
  /**
1352
- * Start of date range
1665
+ * Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1353
1666
  */
1354
1667
  readonly start?: string
1355
1668
 
1356
1669
  /**
1357
- * End of date range
1670
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1358
1671
  */
1359
1672
  readonly end?: string
1360
1673
 
@@ -1369,7 +1682,7 @@ export interface OrdersApiGetOrdersRequest {
1369
1682
  */
1370
1683
  export interface OrdersApiRetryPlatformPaymentRequest {
1371
1684
  /**
1372
- * What project it is
1685
+ * The project identifier to scope the request to.
1373
1686
  */
1374
1687
  readonly project: string
1375
1688