@teemill/orders 1.24.0 → 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 +457 -146
  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 +52 -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 +51 -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 +2 -2
package/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * 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.
4
4
  *
5
- * The version of the OpenAPI document: 1.24.0
5
+ * The version of the OpenAPI document: 1.25.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,67 +14,80 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import type { RequestArgs } from './base';
15
15
  import { BaseAPI } from './base';
16
16
  /**
17
- * A person\'s address.
17
+ * A postal address for shipping or billing.
18
18
  */
19
19
  export interface Address {
20
+ /**
21
+ * The full name of the recipient.
22
+ */
20
23
  'contactName'?: string;
24
+ /**
25
+ * The company name, if applicable.
26
+ */
21
27
  'company'?: string;
22
28
  /**
23
- * First line of the address.
29
+ * First line of the street address.
24
30
  */
25
31
  'line1'?: string;
26
32
  /**
27
- * Second line of the address.
33
+ * Second line of the street address (apartment, suite, etc.).
28
34
  */
29
35
  'line2'?: string;
30
36
  /**
31
- * City of the address.
37
+ * The city or town.
32
38
  */
33
39
  'city'?: string;
34
40
  /**
35
- * Postal code of the address.
41
+ * The postal or ZIP code.
36
42
  */
37
43
  'postalCode'?: string;
38
44
  /**
39
- * Country of the address (ISO 3166-1 alpha-2).
45
+ * Two-letter country code (ISO 3166-1 alpha-2).
40
46
  */
41
47
  'country': string;
42
48
  /**
43
- * State of the address. If the country is Canada, Australia, or the United States, this field is required.
49
+ * The state, province, or region. Required when the country is US, CA, or AU.
44
50
  */
45
51
  'state'?: string;
46
52
  }
53
+ /**
54
+ * A standard error response returned when a request fails.
55
+ */
47
56
  export interface ApiError {
57
+ /**
58
+ * A machine-readable error code.
59
+ */
48
60
  'code'?: string;
61
+ /**
62
+ * A human-readable description of what went wrong.
63
+ */
49
64
  'message': string;
50
65
  }
51
66
  /**
52
67
  * @type ConfirmOrderFulfillment
68
+ * 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.
53
69
  */
54
70
  export type ConfirmOrderFulfillment = ConfirmOrderFulfillmentWithShipment | ConfirmOrderFulfillmentWithShippingMethod;
71
+ /**
72
+ * Confirm a fulfillment using your own shipping label. Use this when you generate shipping labels outside of PodOS.
73
+ */
55
74
  export interface ConfirmOrderFulfillmentWithShipment {
56
75
  /**
57
- * Unique object identifier
76
+ * The ID of the fulfillment to confirm.
58
77
  */
59
78
  'fulfillmentId': string;
60
- 'shipment': ConfirmOrderFulfillmentWithShipmentShipment;
79
+ 'shipment': Shipment;
61
80
  }
62
81
  /**
63
- * This field is only required if you are using your own shipping label.
82
+ * Confirm a fulfillment using a PodOS shipping method. Choose from the `availableShippingMethods` returned on the fulfillment.
64
83
  */
65
- export interface ConfirmOrderFulfillmentWithShipmentShipment {
66
- /**
67
- * Only required if you are generating shipping labels outside of PodOS
68
- */
69
- 'image': string;
70
- }
71
84
  export interface ConfirmOrderFulfillmentWithShippingMethod {
72
85
  /**
73
- * Unique object identifier
86
+ * The ID of the fulfillment to confirm.
74
87
  */
75
88
  'fulfillmentId': string;
76
89
  /**
77
- * Unique object identifier
90
+ * The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`.
78
91
  */
79
92
  'shippingMethodId': string;
80
93
  }
@@ -84,6 +97,10 @@ export interface ConfirmOrderRequest {
84
97
  export interface ConfirmOrderValidationError {
85
98
  'code': ConfirmOrderValidationErrorCodeEnum;
86
99
  'message': string;
100
+ /**
101
+ * 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.
102
+ */
103
+ 'errors'?: Array<StockConflictError>;
87
104
  }
88
105
  export declare const ConfirmOrderValidationErrorCodeEnum: {
89
106
  readonly BadRequest: "BAD_REQUEST";
@@ -96,7 +113,26 @@ export type ConfirmOrderValidationErrorCodeEnum = typeof ConfirmOrderValidationE
96
113
  * Order recipient contact information, used only for courier tracking/updates.
97
114
  */
98
115
  export interface ContactInformation {
116
+ /**
117
+ * Email address for delivery notifications.
118
+ */
119
+ 'email': string;
120
+ /**
121
+ * Phone number for courier contact. Include the country code.
122
+ */
123
+ 'phone'?: string | null;
124
+ }
125
+ /**
126
+ * Contact details for the order recipient. Used for courier delivery notifications.
127
+ */
128
+ export interface ContactInformation1 {
129
+ /**
130
+ * Email address for delivery notifications.
131
+ */
99
132
  'email': string;
133
+ /**
134
+ * Phone number including country code. Used by couriers for delivery updates.
135
+ */
100
136
  'phone'?: string | null;
101
137
  }
102
138
  /**
@@ -114,47 +150,60 @@ export interface Coupon {
114
150
  'ref'?: string | null;
115
151
  }
116
152
  /**
117
- * Create an order
153
+ * The request body for creating a new print-on-demand order.
118
154
  */
119
155
  export interface CreateOrder {
120
156
  /**
121
- * A custom reference to the merchant\'s order.
157
+ * 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.
122
158
  */
123
159
  'merchantReference'?: string | null;
124
- 'contactInformation': CreateOrderContactInformation;
160
+ 'contactInformation': ContactInformation1;
161
+ /**
162
+ * The address to ship the order to.
163
+ */
125
164
  'shippingAddress': Address;
165
+ /**
166
+ * Customs and tax registration details. Required for international shipments.
167
+ */
126
168
  'customsInformation'?: CustomsInformation;
127
169
  /**
128
- * Items to be ordered
170
+ * The items to include in the order. Each item references a product variant from the Product Catalog API.
171
+ */
172
+ 'items': Array<CreateOrderItem>;
173
+ /**
174
+ * An optional list of preferred fulfiller IDs. When provided, the system will attempt to route the order to one of these fulfillers.
129
175
  */
130
- 'items': Array<OrderItem1>;
131
176
  'preferredFulfillers'?: Array<string>;
132
177
  }
133
- /**
134
- * Contact information for the order
135
- */
136
- export interface CreateOrderContactInformation {
137
- 'email': string;
138
- 'phone'?: string | null;
178
+ export interface CreateOrderItem {
179
+ /**
180
+ * A reference to the variant being ordered
181
+ */
182
+ 'variantRef': string;
183
+ /**
184
+ * The number of units to order.
185
+ */
186
+ 'quantity': number;
187
+ 'recipientCost'?: RecipientCost;
139
188
  }
140
189
  /**
141
190
  * Customs information for the order. **Note:** Adding customs information to an order is only compatible with Shipmate at this time
142
191
  */
143
192
  export interface CustomsInformation {
144
193
  /**
145
- * Pre-registration type
194
+ * The type of tax pre-registration (e.g. IOSS for EU imports).
146
195
  */
147
196
  'preRegistrationType'?: CustomsInformationPreRegistrationTypeEnum;
148
197
  /**
149
- * Pre-registration number
198
+ * The pre-registration number associated with the registration type.
150
199
  */
151
200
  'preRegistrationNumber'?: string;
152
201
  /**
153
- * VAT number
202
+ * The shipper\'s VAT registration number.
154
203
  */
155
204
  'vatNumber'?: string;
156
205
  /**
157
- * EORI number
206
+ * The shipper\'s EORI number for customs declarations.
158
207
  */
159
208
  'eoriNumber'?: string;
160
209
  }
@@ -162,23 +211,41 @@ export declare const CustomsInformationPreRegistrationTypeEnum: {
162
211
  readonly Ioss: "IOSS";
163
212
  };
164
213
  export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
214
+ /**
215
+ * Customs and tax registration details for international shipments.
216
+ */
165
217
  export interface CustomsInformation1 {
218
+ /**
219
+ * The type of tax pre-registration (e.g. IOSS for EU imports).
220
+ */
166
221
  'preRegistrationType'?: string;
222
+ /**
223
+ * The pre-registration number associated with the registration type.
224
+ */
167
225
  'preRegistrationNumber'?: string;
226
+ /**
227
+ * The shipper\'s VAT registration number.
228
+ */
168
229
  'vatNumber'?: string;
230
+ /**
231
+ * The shipper\'s EORI number for customs declarations.
232
+ */
169
233
  'eoriNumber'?: string;
170
234
  }
235
+ /**
236
+ * Estimated delivery window for this shipping method.
237
+ */
171
238
  export interface DeliveryEstimates {
172
239
  /**
173
- * 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.
240
+ * 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.
174
241
  */
175
242
  'isPriority'?: boolean;
176
243
  /**
177
- * ISO 8601 Timestamp
244
+ * The earliest estimated delivery date.
178
245
  */
179
246
  'min'?: string;
180
247
  /**
181
- * ISO 8601 Timestamp
248
+ * The latest estimated delivery date.
182
249
  */
183
250
  'max'?: string;
184
251
  }
@@ -188,71 +255,101 @@ export interface ExportOrders202Response {
188
255
  */
189
256
  'message'?: string;
190
257
  }
258
+ /**
259
+ * The fulfiller that will produce and ship this package.
260
+ */
261
+ export interface Fulfiller {
262
+ /**
263
+ * Unique identifier of the fulfiller.
264
+ */
265
+ 'id'?: string;
266
+ 'location'?: FulfillerLocation;
267
+ /**
268
+ * Whether the fulfiller has the stock and capacity to begin processing immediately.
269
+ */
270
+ 'canFulfillImmediately'?: boolean | null;
271
+ }
272
+ /**
273
+ * The geographic location of the fulfiller.
274
+ */
275
+ export interface FulfillerLocation {
276
+ /**
277
+ * The city where the fulfiller is located.
278
+ */
279
+ 'city'?: string | null;
280
+ /**
281
+ * The country code where the fulfiller is located (ISO 3166-1 alpha-2).
282
+ */
283
+ 'country'?: string | null;
284
+ }
285
+ /**
286
+ * A fulfillment group within an order. Each fulfillment represents a package that will be shipped separately, potentially from a different fulfiller.
287
+ */
191
288
  export interface Fulfillment {
192
289
  /**
193
- * Unique fulfillment id
290
+ * Unique identifier for this fulfillment.
194
291
  */
195
292
  'id'?: string;
293
+ /**
294
+ * The current status of this fulfillment.
295
+ */
196
296
  'status'?: Status;
197
- 'fulfiller'?: FulfillmentFulfiller;
297
+ 'fulfiller'?: Fulfiller;
298
+ /**
299
+ * The items included in this fulfillment package.
300
+ */
198
301
  'items'?: Array<FulfillmentItem>;
199
302
  'tracking'?: OrderTracking | null;
200
303
  /**
201
- * Shipping method currently set
304
+ * The shipping method currently assigned to this fulfillment.
202
305
  */
203
306
  'shippingMethod'?: ShippingMethod;
204
307
  /**
205
- * Shipping methods available for this fulfillment. One of these should be used to confirm the fulfillment.
308
+ * Shipping methods available for this fulfillment. Use one of these IDs when confirming the order.
206
309
  */
207
310
  'availableShippingMethods'?: Array<ShippingMethod>;
208
311
  /**
209
- * Weight of the package being shipped in grams
312
+ * The estimated weight of the package in grams.
210
313
  */
211
314
  'packageWeight'?: number;
212
315
  /**
213
- * A reference to the resource location
316
+ * Reference to the source platform of this fulfillment.
214
317
  */
215
318
  'platformRef'?: string;
216
319
  }
217
- /**
218
- * The fulfiller that will be processing this order.
219
- */
220
- export interface FulfillmentFulfiller {
221
- /**
222
- * Unique object identifier
223
- */
224
- 'id'?: string;
225
- 'location'?: FulfillmentFulfillerLocation;
226
- 'canFulfillImmediately'?: boolean | null;
227
- }
228
- export interface FulfillmentFulfillerLocation {
229
- 'city'?: string | null;
230
- 'country'?: string | null;
231
- }
232
320
  export interface FulfillmentItem {
233
321
  /**
234
- * Unique fulfillment item id
322
+ * Unique identifier for this fulfillment item.
235
323
  */
236
324
  'id'?: string;
237
325
  /**
238
- * Id of the order item being fulfilled
326
+ * The ID of the order item being fulfilled.
239
327
  */
240
328
  'itemId'?: string;
241
329
  /**
242
- * Number of this item being fulfilled
330
+ * The number of units of this item included in the fulfillment.
243
331
  */
244
332
  'quantity'?: number;
245
333
  }
246
334
  /**
247
- * Image description
335
+ * A product image associated with an order item.
248
336
  */
249
337
  export interface Image {
250
338
  /**
251
- * Unique object identifier
339
+ * Unique identifier for this image.
252
340
  */
253
341
  'id'?: string;
342
+ /**
343
+ * The URL of the image.
344
+ */
254
345
  'src'?: string;
346
+ /**
347
+ * Alternative text describing the image content.
348
+ */
255
349
  'alt'?: string;
350
+ /**
351
+ * The display order of this image relative to other images for the same item.
352
+ */
256
353
  'sortOrder'?: number;
257
354
  }
258
355
  export interface Option {
@@ -265,6 +362,9 @@ export interface Option {
265
362
  */
266
363
  'value': string;
267
364
  }
365
+ /**
366
+ * Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
367
+ */
268
368
  export interface Order {
269
369
  /**
270
370
  * Unique object identifier
@@ -274,42 +374,81 @@ export interface Order {
274
374
  * A reference to the resource location
275
375
  */
276
376
  'ref'?: string;
377
+ /**
378
+ * The current status of the order.
379
+ */
277
380
  'status'?: Status;
278
381
  'contactInformation': ContactInformation;
279
382
  'paymentMethod'?: PaymentMethod;
383
+ /**
384
+ * The address the order will be shipped to.
385
+ */
280
386
  'shippingAddress': Address;
281
387
  'customsInformation'?: CustomsInformation1;
282
388
  /**
283
- * ISO 8601 Timestamp
389
+ * When the order was created.
284
390
  */
285
391
  'createdAt'?: string;
286
392
  /**
287
- * ISO 8601 Timestamp
393
+ * When the order was last updated.
288
394
  */
289
395
  'updatedAt'?: string;
290
396
  /**
291
- * ISO 8601 Timestamp
397
+ * When the order status last changed.
292
398
  */
293
399
  'statusChangedAt'?: string;
294
400
  /**
295
- * A custom reference to the merchant\'s order.
401
+ * Your own reference for this order, such as an order number from your storefront.
296
402
  */
297
403
  'merchantReference'?: string | null;
404
+ /**
405
+ * The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately.
406
+ */
298
407
  'fulfillments'?: Array<Fulfillment>;
408
+ /**
409
+ * The line items included in this order.
410
+ */
299
411
  'items': Array<OrderItem>;
412
+ /**
413
+ * The total price of the order including tax and after discounts.
414
+ */
300
415
  'totalPrice'?: Price;
416
+ /**
417
+ * The total tax amount for the order.
418
+ */
301
419
  'taxPrice'?: Price;
420
+ /**
421
+ * The net items price excluding tax and before discounts.
422
+ */
302
423
  'subtotalPrice'?: Price;
424
+ /**
425
+ * The total discount amount applied to the order.
426
+ */
303
427
  'discountPrice'?: Price;
428
+ /**
429
+ * The coupon applied to the order, if any.
430
+ */
304
431
  'coupon'?: Coupon | null;
432
+ /**
433
+ * The total shipping cost for the order.
434
+ */
305
435
  'shippingPrice'?: Price;
306
436
  'origin'?: Origin;
437
+ /**
438
+ * A chronological list of status changes for this order.
439
+ */
307
440
  'statusHistory'?: Array<StatusHistoryItem>;
441
+ /**
442
+ * A list of payment attempts made for this order.
443
+ */
308
444
  'paymentAttempts'?: Array<PaymentAttempt>;
309
445
  }
446
+ /**
447
+ * A line item in an order, representing a specific product variant and quantity.
448
+ */
310
449
  export interface OrderItem {
311
450
  /**
312
- * Unique object identifier
451
+ * Unique identifier for this order item.
313
452
  */
314
453
  'id'?: string;
315
454
  /**
@@ -320,42 +459,54 @@ export interface OrderItem {
320
459
  * Options associated to an order item\'s variant, such as color and size.
321
460
  */
322
461
  'options'?: Array<Option>;
462
+ /**
463
+ * The number of units of this variant to order.
464
+ */
323
465
  'quantity': number;
324
466
  /**
325
- * The name of the product
467
+ * The display name of the product.
326
468
  */
327
469
  'name'?: string;
328
470
  /**
329
- * Images
471
+ * Product images associated with this item.
330
472
  */
331
473
  'images'?: Array<Image>;
474
+ /**
475
+ * The total price for this line item including tax and after discounts.
476
+ */
332
477
  'totalPrice'?: Price;
333
478
  /**
334
- * This is an estimate until the order has been confirmed
479
+ * The tax amount for this line item. This is an estimate until the order has been confirmed.
335
480
  */
336
481
  'taxPrice'?: Price;
482
+ /**
483
+ * The net price for this line item, excluding tax and before discounts.
484
+ */
337
485
  'subtotalPrice'?: Price;
486
+ /**
487
+ * The discount amount applied to this line item.
488
+ */
338
489
  'discountPrice'?: Price;
339
490
  /**
340
- * The price you charged the recipient for each item. It\'s highly recommended if you have international orders as it aids customs issues.
491
+ * The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations.
341
492
  */
342
493
  'recipientCost'?: Price;
343
494
  }
344
- export interface OrderItem1 {
495
+ /**
496
+ * Shipment tracking information. Available once the fulfillment has been dispatched.
497
+ */
498
+ export interface OrderTracking {
345
499
  /**
346
- * A reference to the variant being ordered
500
+ * The name of the courier service.
347
501
  */
348
- 'variantRef': string;
349
- 'quantity': number;
350
- 'recipientCost'?: OrderItem1RecipientCost;
351
- }
352
- export interface OrderItem1RecipientCost {
353
- 'amount': string;
354
- 'currencyCode': string;
355
- }
356
- export interface OrderTracking {
357
502
  'courier'?: string;
503
+ /**
504
+ * The tracking code provided by the courier.
505
+ */
358
506
  'code'?: string;
507
+ /**
508
+ * A URL to track the shipment on the courier\'s website.
509
+ */
359
510
  'url'?: string;
360
511
  }
361
512
  export interface OrdersResponse {
@@ -365,17 +516,35 @@ export interface OrdersResponse {
365
516
  */
366
517
  'nextPageToken'?: number | null;
367
518
  }
519
+ /**
520
+ * The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
521
+ */
368
522
  export interface Origin {
523
+ /**
524
+ * A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`.
525
+ */
369
526
  'code'?: string;
527
+ /**
528
+ * Whether this origin represents paid advertising traffic.
529
+ */
370
530
  'isPaid'?: boolean;
371
531
  }
372
- /**
373
- * List of payment attempts for this order
374
- */
375
532
  export interface PaymentAttempt {
533
+ /**
534
+ * The payment provider used.
535
+ */
376
536
  'paymentProvider'?: PaymentAttemptPaymentProviderEnum;
537
+ /**
538
+ * The outcome of the payment attempt.
539
+ */
377
540
  'status'?: PaymentAttemptStatusEnum;
541
+ /**
542
+ * The transaction ID from the payment provider.
543
+ */
378
544
  'transactionId'?: string | null;
545
+ /**
546
+ * A human-readable message describing the payment result.
547
+ */
379
548
  'message'?: string;
380
549
  /**
381
550
  * ISO 8601 Timestamp
@@ -395,35 +564,129 @@ export declare const PaymentAttemptStatusEnum: {
395
564
  readonly Cancelled: "cancelled";
396
565
  };
397
566
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
567
+ /**
568
+ * The payment method used for this order.
569
+ */
398
570
  export interface PaymentMethod {
571
+ /**
572
+ * The type of payment method used.
573
+ */
399
574
  'type'?: string | null;
400
575
  }
401
576
  /**
402
- * Standard price definition that defines the amount and currency.
577
+ * A monetary value with its currency.
403
578
  */
404
579
  export interface Price {
405
580
  /**
406
- * Price including tax in the specified currency.
581
+ * The monetary amount as a decimal string.
407
582
  */
408
583
  'amount'?: string;
409
584
  /**
410
- * Currency code for the currency the price is valued in.
585
+ * ISO 4217 currency code.
411
586
  */
412
587
  'currencyCode'?: string;
413
588
  }
414
- export interface ShippingMethod {
589
+ /**
590
+ * 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).
591
+ */
592
+ export interface ProductUnavailableError {
593
+ 'code': ProductUnavailableErrorCodeEnum;
594
+ /**
595
+ * Human-readable description including the product name.
596
+ */
597
+ 'message': string;
598
+ /**
599
+ * Display name of the product.
600
+ */
601
+ 'productTitle': string;
415
602
  /**
416
603
  * Unique object identifier
417
604
  */
605
+ 'variantId': string;
606
+ /**
607
+ * A reference to the variant being ordered
608
+ */
609
+ 'variantRef': string;
610
+ /**
611
+ * The quantity that was requested in the order.
612
+ */
613
+ 'requestedQuantity': number;
614
+ /**
615
+ * Always 0 for this error type.
616
+ */
617
+ 'availableQuantity': ProductUnavailableErrorAvailableQuantityEnum;
618
+ /**
619
+ * The full requested quantity, representing the total unfulfillable amount.
620
+ */
621
+ 'shortage': number;
622
+ }
623
+ export declare const ProductUnavailableErrorCodeEnum: {
624
+ readonly ProductUnavailable: "PRODUCT_UNAVAILABLE";
625
+ };
626
+ export type ProductUnavailableErrorCodeEnum = typeof ProductUnavailableErrorCodeEnum[keyof typeof ProductUnavailableErrorCodeEnum];
627
+ export declare const ProductUnavailableErrorAvailableQuantityEnum: {
628
+ readonly NUMBER_0: 0;
629
+ };
630
+ export type ProductUnavailableErrorAvailableQuantityEnum = typeof ProductUnavailableErrorAvailableQuantityEnum[keyof typeof ProductUnavailableErrorAvailableQuantityEnum];
631
+ /**
632
+ * The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
633
+ */
634
+ export interface RecipientCost {
635
+ /**
636
+ * The monetary amount as a decimal string.
637
+ */
638
+ 'amount': string;
639
+ /**
640
+ * ISO 4217 currency code.
641
+ */
642
+ 'currencyCode': string;
643
+ }
644
+ /**
645
+ * Your own shipping label details.
646
+ */
647
+ export interface Shipment {
648
+ /**
649
+ * A URL to the shipping label image or PDF.
650
+ */
651
+ 'image': string;
652
+ }
653
+ /**
654
+ * A shipping option available for a fulfillment, including delivery estimates and pricing.
655
+ */
656
+ export interface ShippingMethod {
657
+ /**
658
+ * Unique identifier for this shipping method. Use this when confirming a fulfillment.
659
+ */
418
660
  'id'?: string;
661
+ /**
662
+ * The display name of the shipping method.
663
+ */
419
664
  'name'?: string;
665
+ /**
666
+ * A brief description of the shipping method\'s service level.
667
+ */
420
668
  'description'?: string;
421
669
  'deliveryEstimates'?: DeliveryEstimates;
670
+ /**
671
+ * The total shipping cost including tax.
672
+ */
422
673
  'totalPrice'?: Price;
674
+ /**
675
+ * The tax portion of the shipping cost.
676
+ */
423
677
  'taxPrice'?: Price;
678
+ /**
679
+ * The net shipping cost, excluding tax and before discounts.
680
+ */
424
681
  'subtotalPrice'?: Price;
682
+ /**
683
+ * Any discount applied to the shipping cost.
684
+ */
425
685
  'discountPrice'?: Price;
426
686
  }
687
+ /**
688
+ * 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
689
+ */
427
690
  export declare const Status: {
428
691
  readonly New: "new";
429
692
  readonly Paid: "paid";
@@ -441,6 +704,52 @@ export interface StatusHistoryItem {
441
704
  */
442
705
  'createdAt'?: string;
443
706
  }
707
+ /**
708
+ * @type StockConflictError
709
+ */
710
+ export type StockConflictError = {
711
+ code: 'PRODUCT_UNAVAILABLE';
712
+ } & ProductUnavailableError | {
713
+ code: 'STOCK_UNAVAILABLE';
714
+ } & StockUnavailableError;
715
+ /**
716
+ * The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
717
+ */
718
+ export interface StockUnavailableError {
719
+ 'code': StockUnavailableErrorCodeEnum;
720
+ /**
721
+ * Human-readable description including the product name and available quantity.
722
+ */
723
+ 'message': string;
724
+ /**
725
+ * Display name of the product.
726
+ */
727
+ 'productTitle': string;
728
+ /**
729
+ * Unique object identifier
730
+ */
731
+ 'variantId': string;
732
+ /**
733
+ * A reference to the variant being ordered
734
+ */
735
+ 'variantRef': string;
736
+ /**
737
+ * The quantity that was requested in the order.
738
+ */
739
+ 'requestedQuantity': number;
740
+ /**
741
+ * The quantity currently available for fulfillment.
742
+ */
743
+ 'availableQuantity': number;
744
+ /**
745
+ * The difference between requested and available quantity (positive value indicating the deficit).
746
+ */
747
+ 'shortage': number;
748
+ }
749
+ export declare const StockUnavailableErrorCodeEnum: {
750
+ readonly StockUnavailable: "STOCK_UNAVAILABLE";
751
+ };
752
+ export type StockUnavailableErrorCodeEnum = typeof StockUnavailableErrorCodeEnum[keyof typeof StockUnavailableErrorCodeEnum];
444
753
  /**
445
754
  * OrdersApi - axios parameter creator
446
755
  */
@@ -448,7 +757,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
448
757
  /**
449
758
  * Cancels an order if it has not yet started processing.
450
759
  * @summary Cancel order
451
- * @param {string} project What project it is
760
+ * @param {string} project The project identifier to scope the request to.
452
761
  * @param {string} orderId Unique identifier of an order
453
762
  * @param {string} [fields] Specifies which fields to return, separated by commas
454
763
  * @param {*} [options] Override http request option.
@@ -458,9 +767,9 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
458
767
  /**
459
768
  * Confirms an order, and submits it as ready to take payment and begin processing.
460
769
  * @summary Confirm order
461
- * @param {string} project What project it is
770
+ * @param {string} project The project identifier to scope the request to.
462
771
  * @param {string} orderId Unique identifier of an order
463
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
772
+ * @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.
464
773
  * @param {string} [fields] Specifies which fields to return, separated by commas
465
774
  * @param {*} [options] Override http request option.
466
775
  * @throws {RequiredError}
@@ -469,7 +778,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
469
778
  /**
470
779
  * 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.
471
780
  * @summary Create order
472
- * @param {string} project What project it is
781
+ * @param {string} project The project identifier to scope the request to.
473
782
  * @param {CreateOrder} createOrder Create Order schema
474
783
  * @param {string} [fields] Specifies which fields to return, separated by commas
475
784
  * @param {*} [options] Override http request option.
@@ -479,7 +788,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
479
788
  /**
480
789
  * Download an order invoice.
481
790
  * @summary Download order invoice
482
- * @param {string} project What project it is
791
+ * @param {string} project The project identifier to scope the request to.
483
792
  * @param {string} orderId Unique identifier of an order
484
793
  * @param {*} [options] Override http request option.
485
794
  * @throws {RequiredError}
@@ -488,9 +797,9 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
488
797
  /**
489
798
  * Export orders as a CSV file
490
799
  * @summary Export orders
491
- * @param {string} project What project it is
492
- * @param {string} start Start of date range to filter by when orders were placed
493
- * @param {string} [end] End of date range
800
+ * @param {string} project The project identifier to scope the request to.
801
+ * @param {string} start Start of the date range to filter by when orders were placed.
802
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
494
803
  * @param {string} [search] Search term to filter based on order reference, customer name and email
495
804
  * @param {*} [options] Override http request option.
496
805
  * @throws {RequiredError}
@@ -499,7 +808,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
499
808
  /**
500
809
  * Get an order by a given ID.
501
810
  * @summary Get order
502
- * @param {string} project What project it is
811
+ * @param {string} project The project identifier to scope the request to.
503
812
  * @param {string} orderId Unique identifier of an order
504
813
  * @param {string} [fields] Specifies which fields to return, separated by commas
505
814
  * @param {*} [options] Override http request option.
@@ -509,15 +818,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
509
818
  /**
510
819
  * Lists all orders placed on this project, paginated into configurable chunks.
511
820
  * @summary List orders
512
- * @param {string} project What project it is
821
+ * @param {string} project The project identifier to scope the request to.
513
822
  * @param {string} [fields] Specifies which fields to return, separated by commas
514
823
  * @param {number} [pageToken] Page reference token
515
824
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
516
825
  * @param {string} [search] Search term to filter based on order reference, customer name and email
517
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
518
- * @param {Array<Status>} [statuses] Filter by fulfillment status
519
- * @param {string} [start] Start of date range
520
- * @param {string} [end] End of date range
826
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
827
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
828
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
829
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
521
830
  * @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.
522
831
  * @param {*} [options] Override http request option.
523
832
  * @throws {RequiredError}
@@ -526,7 +835,7 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
526
835
  /**
527
836
  * Retries failed platform payment, so fulfillment can proceed.
528
837
  * @summary Retry
529
- * @param {string} project What project it is
838
+ * @param {string} project The project identifier to scope the request to.
530
839
  * @param {string} orderId Unique identifier of an order
531
840
  * @param {string} [fields] Specifies which fields to return, separated by commas
532
841
  * @param {*} [options] Override http request option.
@@ -541,7 +850,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
541
850
  /**
542
851
  * Cancels an order if it has not yet started processing.
543
852
  * @summary Cancel order
544
- * @param {string} project What project it is
853
+ * @param {string} project The project identifier to scope the request to.
545
854
  * @param {string} orderId Unique identifier of an order
546
855
  * @param {string} [fields] Specifies which fields to return, separated by commas
547
856
  * @param {*} [options] Override http request option.
@@ -551,9 +860,9 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
551
860
  /**
552
861
  * Confirms an order, and submits it as ready to take payment and begin processing.
553
862
  * @summary Confirm order
554
- * @param {string} project What project it is
863
+ * @param {string} project The project identifier to scope the request to.
555
864
  * @param {string} orderId Unique identifier of an order
556
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
865
+ * @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.
557
866
  * @param {string} [fields] Specifies which fields to return, separated by commas
558
867
  * @param {*} [options] Override http request option.
559
868
  * @throws {RequiredError}
@@ -562,7 +871,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
562
871
  /**
563
872
  * 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.
564
873
  * @summary Create order
565
- * @param {string} project What project it is
874
+ * @param {string} project The project identifier to scope the request to.
566
875
  * @param {CreateOrder} createOrder Create Order schema
567
876
  * @param {string} [fields] Specifies which fields to return, separated by commas
568
877
  * @param {*} [options] Override http request option.
@@ -572,7 +881,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
572
881
  /**
573
882
  * Download an order invoice.
574
883
  * @summary Download order invoice
575
- * @param {string} project What project it is
884
+ * @param {string} project The project identifier to scope the request to.
576
885
  * @param {string} orderId Unique identifier of an order
577
886
  * @param {*} [options] Override http request option.
578
887
  * @throws {RequiredError}
@@ -581,9 +890,9 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
581
890
  /**
582
891
  * Export orders as a CSV file
583
892
  * @summary Export orders
584
- * @param {string} project What project it is
585
- * @param {string} start Start of date range to filter by when orders were placed
586
- * @param {string} [end] End of date range
893
+ * @param {string} project The project identifier to scope the request to.
894
+ * @param {string} start Start of the date range to filter by when orders were placed.
895
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
587
896
  * @param {string} [search] Search term to filter based on order reference, customer name and email
588
897
  * @param {*} [options] Override http request option.
589
898
  * @throws {RequiredError}
@@ -592,7 +901,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
592
901
  /**
593
902
  * Get an order by a given ID.
594
903
  * @summary Get order
595
- * @param {string} project What project it is
904
+ * @param {string} project The project identifier to scope the request to.
596
905
  * @param {string} orderId Unique identifier of an order
597
906
  * @param {string} [fields] Specifies which fields to return, separated by commas
598
907
  * @param {*} [options] Override http request option.
@@ -602,15 +911,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
602
911
  /**
603
912
  * Lists all orders placed on this project, paginated into configurable chunks.
604
913
  * @summary List orders
605
- * @param {string} project What project it is
914
+ * @param {string} project The project identifier to scope the request to.
606
915
  * @param {string} [fields] Specifies which fields to return, separated by commas
607
916
  * @param {number} [pageToken] Page reference token
608
917
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
609
918
  * @param {string} [search] Search term to filter based on order reference, customer name and email
610
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
611
- * @param {Array<Status>} [statuses] Filter by fulfillment status
612
- * @param {string} [start] Start of date range
613
- * @param {string} [end] End of date range
919
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
920
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
921
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
922
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
614
923
  * @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.
615
924
  * @param {*} [options] Override http request option.
616
925
  * @throws {RequiredError}
@@ -619,7 +928,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
619
928
  /**
620
929
  * Retries failed platform payment, so fulfillment can proceed.
621
930
  * @summary Retry
622
- * @param {string} project What project it is
931
+ * @param {string} project The project identifier to scope the request to.
623
932
  * @param {string} orderId Unique identifier of an order
624
933
  * @param {string} [fields] Specifies which fields to return, separated by commas
625
934
  * @param {*} [options] Override http request option.
@@ -701,7 +1010,7 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
701
1010
  */
702
1011
  export interface OrdersApiCancelOrderRequest {
703
1012
  /**
704
- * What project it is
1013
+ * The project identifier to scope the request to.
705
1014
  */
706
1015
  readonly project: string;
707
1016
  /**
@@ -718,7 +1027,7 @@ export interface OrdersApiCancelOrderRequest {
718
1027
  */
719
1028
  export interface OrdersApiConfirmOrderRequest {
720
1029
  /**
721
- * What project it is
1030
+ * The project identifier to scope the request to.
722
1031
  */
723
1032
  readonly project: string;
724
1033
  /**
@@ -726,7 +1035,7 @@ export interface OrdersApiConfirmOrderRequest {
726
1035
  */
727
1036
  readonly orderId: string;
728
1037
  /**
729
- * ConfirmFulfillment schema
1038
+ * 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.
730
1039
  */
731
1040
  readonly confirmOrderRequest: ConfirmOrderRequest;
732
1041
  /**
@@ -739,7 +1048,7 @@ export interface OrdersApiConfirmOrderRequest {
739
1048
  */
740
1049
  export interface OrdersApiCreateOrderRequest {
741
1050
  /**
742
- * What project it is
1051
+ * The project identifier to scope the request to.
743
1052
  */
744
1053
  readonly project: string;
745
1054
  /**
@@ -756,7 +1065,7 @@ export interface OrdersApiCreateOrderRequest {
756
1065
  */
757
1066
  export interface OrdersApiDownloadInvoiceRequest {
758
1067
  /**
759
- * What project it is
1068
+ * The project identifier to scope the request to.
760
1069
  */
761
1070
  readonly project: string;
762
1071
  /**
@@ -769,15 +1078,15 @@ export interface OrdersApiDownloadInvoiceRequest {
769
1078
  */
770
1079
  export interface OrdersApiExportOrdersRequest {
771
1080
  /**
772
- * What project it is
1081
+ * The project identifier to scope the request to.
773
1082
  */
774
1083
  readonly project: string;
775
1084
  /**
776
- * Start of date range to filter by when orders were placed
1085
+ * Start of the date range to filter by when orders were placed.
777
1086
  */
778
1087
  readonly start: string;
779
1088
  /**
780
- * End of date range
1089
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
781
1090
  */
782
1091
  readonly end?: string;
783
1092
  /**
@@ -790,7 +1099,7 @@ export interface OrdersApiExportOrdersRequest {
790
1099
  */
791
1100
  export interface OrdersApiGetOrderRequest {
792
1101
  /**
793
- * What project it is
1102
+ * The project identifier to scope the request to.
794
1103
  */
795
1104
  readonly project: string;
796
1105
  /**
@@ -807,7 +1116,7 @@ export interface OrdersApiGetOrderRequest {
807
1116
  */
808
1117
  export interface OrdersApiGetOrdersRequest {
809
1118
  /**
810
- * What project it is
1119
+ * The project identifier to scope the request to.
811
1120
  */
812
1121
  readonly project: string;
813
1122
  /**
@@ -827,19 +1136,19 @@ export interface OrdersApiGetOrdersRequest {
827
1136
  */
828
1137
  readonly search?: string;
829
1138
  /**
830
- * Specify fulfillment IDs to list
1139
+ * Filter to specific order IDs. Only orders matching these IDs will be returned.
831
1140
  */
832
1141
  readonly ids?: Array<string>;
833
1142
  /**
834
- * Filter by fulfillment status
1143
+ * Filter by order status. Only orders matching one of the given statuses will be returned.
835
1144
  */
836
1145
  readonly statuses?: Array<Status>;
837
1146
  /**
838
- * Start of date range
1147
+ * Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
839
1148
  */
840
1149
  readonly start?: string;
841
1150
  /**
842
- * End of date range
1151
+ * End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
843
1152
  */
844
1153
  readonly end?: string;
845
1154
  /**
@@ -852,7 +1161,7 @@ export interface OrdersApiGetOrdersRequest {
852
1161
  */
853
1162
  export interface OrdersApiRetryPlatformPaymentRequest {
854
1163
  /**
855
- * What project it is
1164
+ * The project identifier to scope the request to.
856
1165
  */
857
1166
  readonly project: string;
858
1167
  /**