@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/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * 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.
7
7
  *
8
- * The version of the OpenAPI document: 1.24.1
8
+ * The version of the OpenAPI document: 1.25.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.GetOrdersDateFilterTypeEnum = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = exports.PaymentAttemptStatusEnum = exports.PaymentAttemptPaymentProviderEnum = exports.CustomsInformationPreRegistrationTypeEnum = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
25
+ exports.GetOrdersDateFilterTypeEnum = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.StockUnavailableErrorCodeEnum = exports.Status = exports.ProductUnavailableErrorAvailableQuantityEnum = exports.ProductUnavailableErrorCodeEnum = exports.PaymentAttemptStatusEnum = exports.PaymentAttemptPaymentProviderEnum = exports.CustomsInformationPreRegistrationTypeEnum = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -49,6 +49,15 @@ exports.PaymentAttemptStatusEnum = {
49
49
  Pending: 'pending',
50
50
  Cancelled: 'cancelled'
51
51
  };
52
+ exports.ProductUnavailableErrorCodeEnum = {
53
+ ProductUnavailable: 'PRODUCT_UNAVAILABLE'
54
+ };
55
+ exports.ProductUnavailableErrorAvailableQuantityEnum = {
56
+ NUMBER_0: 0
57
+ };
58
+ /**
59
+ * 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
60
+ */
52
61
  exports.Status = {
53
62
  New: 'new',
54
63
  Paid: 'paid',
@@ -58,6 +67,9 @@ exports.Status = {
58
67
  Quote: 'quote',
59
68
  Moderation: 'moderation'
60
69
  };
70
+ exports.StockUnavailableErrorCodeEnum = {
71
+ StockUnavailable: 'STOCK_UNAVAILABLE'
72
+ };
61
73
  /**
62
74
  * OrdersApi - axios parameter creator
63
75
  */
@@ -66,7 +78,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
66
78
  /**
67
79
  * Cancels an order if it has not yet started processing.
68
80
  * @summary Cancel order
69
- * @param {string} project What project it is
81
+ * @param {string} project The project identifier to scope the request to.
70
82
  * @param {string} orderId Unique identifier of an order
71
83
  * @param {string} [fields] Specifies which fields to return, separated by commas
72
84
  * @param {*} [options] Override http request option.
@@ -111,9 +123,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
111
123
  /**
112
124
  * Confirms an order, and submits it as ready to take payment and begin processing.
113
125
  * @summary Confirm order
114
- * @param {string} project What project it is
126
+ * @param {string} project The project identifier to scope the request to.
115
127
  * @param {string} orderId Unique identifier of an order
116
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
128
+ * @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.
117
129
  * @param {string} [fields] Specifies which fields to return, separated by commas
118
130
  * @param {*} [options] Override http request option.
119
131
  * @throws {RequiredError}
@@ -161,7 +173,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
161
173
  /**
162
174
  * 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.
163
175
  * @summary Create order
164
- * @param {string} project What project it is
176
+ * @param {string} project The project identifier to scope the request to.
165
177
  * @param {CreateOrder} createOrder Create Order schema
166
178
  * @param {string} [fields] Specifies which fields to return, separated by commas
167
179
  * @param {*} [options] Override http request option.
@@ -207,7 +219,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
207
219
  /**
208
220
  * Download an order invoice.
209
221
  * @summary Download order invoice
210
- * @param {string} project What project it is
222
+ * @param {string} project The project identifier to scope the request to.
211
223
  * @param {string} orderId Unique identifier of an order
212
224
  * @param {*} [options] Override http request option.
213
225
  * @throws {RequiredError}
@@ -248,9 +260,9 @@ const OrdersApiAxiosParamCreator = function (configuration) {
248
260
  /**
249
261
  * Export orders as a CSV file
250
262
  * @summary Export orders
251
- * @param {string} project What project it is
252
- * @param {string} start Start of date range to filter by when orders were placed
253
- * @param {string} [end] End of date range
263
+ * @param {string} project The project identifier to scope the request to.
264
+ * @param {string} start Start of the date range to filter by when orders were placed.
265
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
254
266
  * @param {string} [search] Search term to filter based on order reference, customer name and email
255
267
  * @param {*} [options] Override http request option.
256
268
  * @throws {RequiredError}
@@ -303,7 +315,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
303
315
  /**
304
316
  * Get an order by a given ID.
305
317
  * @summary Get order
306
- * @param {string} project What project it is
318
+ * @param {string} project The project identifier to scope the request to.
307
319
  * @param {string} orderId Unique identifier of an order
308
320
  * @param {string} [fields] Specifies which fields to return, separated by commas
309
321
  * @param {*} [options] Override http request option.
@@ -348,15 +360,15 @@ const OrdersApiAxiosParamCreator = function (configuration) {
348
360
  /**
349
361
  * Lists all orders placed on this project, paginated into configurable chunks.
350
362
  * @summary List orders
351
- * @param {string} project What project it is
363
+ * @param {string} project The project identifier to scope the request to.
352
364
  * @param {string} [fields] Specifies which fields to return, separated by commas
353
365
  * @param {number} [pageToken] Page reference token
354
366
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
355
367
  * @param {string} [search] Search term to filter based on order reference, customer name and email
356
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
357
- * @param {Array<Status>} [statuses] Filter by fulfillment status
358
- * @param {string} [start] Start of date range
359
- * @param {string} [end] End of date range
368
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
369
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
370
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
371
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
360
372
  * @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.
361
373
  * @param {*} [options] Override http request option.
362
374
  * @throws {RequiredError}
@@ -425,7 +437,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
425
437
  /**
426
438
  * Retries failed platform payment, so fulfillment can proceed.
427
439
  * @summary Retry
428
- * @param {string} project What project it is
440
+ * @param {string} project The project identifier to scope the request to.
429
441
  * @param {string} orderId Unique identifier of an order
430
442
  * @param {string} [fields] Specifies which fields to return, separated by commas
431
443
  * @param {*} [options] Override http request option.
@@ -479,7 +491,7 @@ const OrdersApiFp = function (configuration) {
479
491
  /**
480
492
  * Cancels an order if it has not yet started processing.
481
493
  * @summary Cancel order
482
- * @param {string} project What project it is
494
+ * @param {string} project The project identifier to scope the request to.
483
495
  * @param {string} orderId Unique identifier of an order
484
496
  * @param {string} [fields] Specifies which fields to return, separated by commas
485
497
  * @param {*} [options] Override http request option.
@@ -497,9 +509,9 @@ const OrdersApiFp = function (configuration) {
497
509
  /**
498
510
  * Confirms an order, and submits it as ready to take payment and begin processing.
499
511
  * @summary Confirm order
500
- * @param {string} project What project it is
512
+ * @param {string} project The project identifier to scope the request to.
501
513
  * @param {string} orderId Unique identifier of an order
502
- * @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
514
+ * @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.
503
515
  * @param {string} [fields] Specifies which fields to return, separated by commas
504
516
  * @param {*} [options] Override http request option.
505
517
  * @throws {RequiredError}
@@ -516,7 +528,7 @@ const OrdersApiFp = function (configuration) {
516
528
  /**
517
529
  * 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.
518
530
  * @summary Create order
519
- * @param {string} project What project it is
531
+ * @param {string} project The project identifier to scope the request to.
520
532
  * @param {CreateOrder} createOrder Create Order schema
521
533
  * @param {string} [fields] Specifies which fields to return, separated by commas
522
534
  * @param {*} [options] Override http request option.
@@ -534,7 +546,7 @@ const OrdersApiFp = function (configuration) {
534
546
  /**
535
547
  * Download an order invoice.
536
548
  * @summary Download order invoice
537
- * @param {string} project What project it is
549
+ * @param {string} project The project identifier to scope the request to.
538
550
  * @param {string} orderId Unique identifier of an order
539
551
  * @param {*} [options] Override http request option.
540
552
  * @throws {RequiredError}
@@ -551,9 +563,9 @@ const OrdersApiFp = function (configuration) {
551
563
  /**
552
564
  * Export orders as a CSV file
553
565
  * @summary Export orders
554
- * @param {string} project What project it is
555
- * @param {string} start Start of date range to filter by when orders were placed
556
- * @param {string} [end] End of date range
566
+ * @param {string} project The project identifier to scope the request to.
567
+ * @param {string} start Start of the date range to filter by when orders were placed.
568
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
557
569
  * @param {string} [search] Search term to filter based on order reference, customer name and email
558
570
  * @param {*} [options] Override http request option.
559
571
  * @throws {RequiredError}
@@ -570,7 +582,7 @@ const OrdersApiFp = function (configuration) {
570
582
  /**
571
583
  * Get an order by a given ID.
572
584
  * @summary Get order
573
- * @param {string} project What project it is
585
+ * @param {string} project The project identifier to scope the request to.
574
586
  * @param {string} orderId Unique identifier of an order
575
587
  * @param {string} [fields] Specifies which fields to return, separated by commas
576
588
  * @param {*} [options] Override http request option.
@@ -588,15 +600,15 @@ const OrdersApiFp = function (configuration) {
588
600
  /**
589
601
  * Lists all orders placed on this project, paginated into configurable chunks.
590
602
  * @summary List orders
591
- * @param {string} project What project it is
603
+ * @param {string} project The project identifier to scope the request to.
592
604
  * @param {string} [fields] Specifies which fields to return, separated by commas
593
605
  * @param {number} [pageToken] Page reference token
594
606
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
595
607
  * @param {string} [search] Search term to filter based on order reference, customer name and email
596
- * @param {Array<string>} [ids] Specify fulfillment IDs to list
597
- * @param {Array<Status>} [statuses] Filter by fulfillment status
598
- * @param {string} [start] Start of date range
599
- * @param {string} [end] End of date range
608
+ * @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
609
+ * @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
610
+ * @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
611
+ * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
600
612
  * @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.
601
613
  * @param {*} [options] Override http request option.
602
614
  * @throws {RequiredError}
@@ -613,7 +625,7 @@ const OrdersApiFp = function (configuration) {
613
625
  /**
614
626
  * Retries failed platform payment, so fulfillment can proceed.
615
627
  * @summary Retry
616
- * @param {string} project What project it is
628
+ * @param {string} project The project identifier to scope the request to.
617
629
  * @param {string} orderId Unique identifier of an order
618
630
  * @param {string} [fields] Specifies which fields to return, separated by commas
619
631
  * @param {*} [options] Override http request option.
package/dist/base.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.1
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).
package/dist/base.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * 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.
7
7
  *
8
- * The version of the OpenAPI document: 1.24.1
8
+ * The version of the OpenAPI document: 1.25.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.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.1
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).
package/dist/common.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * 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.
7
7
  *
8
- * The version of the OpenAPI document: 1.24.1
8
+ * The version of the OpenAPI document: 1.25.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.1
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).
@@ -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).