@teemill/orders 1.5.4 → 1.6.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 (69) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/README.md +2 -2
  3. package/dist/apis/OrdersApi.d.ts +16 -1
  4. package/dist/apis/OrdersApi.js +68 -1
  5. package/dist/models/Address.d.ts +1 -1
  6. package/dist/models/Address.js +25 -26
  7. package/dist/models/ApiError.d.ts +1 -1
  8. package/dist/models/ApiError.js +10 -14
  9. package/dist/models/ConfirmOrderFulfillment.d.ts +1 -1
  10. package/dist/models/ConfirmOrderFulfillment.js +11 -13
  11. package/dist/models/ConfirmOrderRequest.d.ts +1 -1
  12. package/dist/models/ConfirmOrderRequest.js +8 -11
  13. package/dist/models/ConfirmOrderValidationError.d.ts +1 -1
  14. package/dist/models/ConfirmOrderValidationError.js +11 -13
  15. package/dist/models/ContactInformation.d.ts +2 -2
  16. package/dist/models/ContactInformation.js +10 -14
  17. package/dist/models/DeliveryEstimates.d.ts +1 -1
  18. package/dist/models/DeliveryEstimates.js +9 -14
  19. package/dist/models/ExportOrders202Response.d.ts +1 -1
  20. package/dist/models/ExportOrders202Response.js +7 -12
  21. package/dist/models/Fulfillment.d.ts +4 -4
  22. package/dist/models/Fulfillment.js +19 -24
  23. package/dist/models/FulfillmentItem.d.ts +3 -3
  24. package/dist/models/FulfillmentItem.js +11 -16
  25. package/dist/models/Order.d.ts +2 -2
  26. package/dist/models/Order.js +41 -43
  27. package/dist/models/OrderItem.d.ts +3 -3
  28. package/dist/models/OrderItem.js +19 -22
  29. package/dist/models/OrderItemTaxPrice.d.ts +1 -1
  30. package/dist/models/OrderItemTaxPrice.js +9 -14
  31. package/dist/models/OrderTracking.d.ts +1 -1
  32. package/dist/models/OrderTracking.js +11 -16
  33. package/dist/models/OrdersResponse.d.ts +1 -1
  34. package/dist/models/OrdersResponse.js +9 -14
  35. package/dist/models/Origin.d.ts +1 -1
  36. package/dist/models/Origin.js +9 -14
  37. package/dist/models/Price.d.ts +1 -1
  38. package/dist/models/Price.js +9 -14
  39. package/dist/models/ShippingMethod.d.ts +1 -1
  40. package/dist/models/ShippingMethod.js +21 -26
  41. package/dist/models/Status.d.ts +1 -1
  42. package/dist/models/Status.js +1 -1
  43. package/dist/models/StatusHistoryItem.d.ts +1 -1
  44. package/dist/models/StatusHistoryItem.js +9 -14
  45. package/dist/runtime.d.ts +1 -1
  46. package/dist/runtime.js +1 -1
  47. package/package.json +1 -1
  48. package/src/apis/OrdersApi.ts +69 -1
  49. package/src/models/Address.ts +22 -27
  50. package/src/models/ApiError.ts +10 -15
  51. package/src/models/ConfirmOrderFulfillment.ts +10 -15
  52. package/src/models/ConfirmOrderRequest.ts +8 -13
  53. package/src/models/ConfirmOrderValidationError.ts +10 -15
  54. package/src/models/ContactInformation.ts +11 -16
  55. package/src/models/DeliveryEstimates.ts +10 -15
  56. package/src/models/ExportOrders202Response.ts +8 -13
  57. package/src/models/Fulfillment.ts +23 -28
  58. package/src/models/FulfillmentItem.ts +14 -19
  59. package/src/models/Order.ts +40 -45
  60. package/src/models/OrderItem.ts +20 -25
  61. package/src/models/OrderItemTaxPrice.ts +10 -15
  62. package/src/models/OrderTracking.ts +12 -17
  63. package/src/models/OrdersResponse.ts +10 -15
  64. package/src/models/Origin.ts +10 -15
  65. package/src/models/Price.ts +10 -15
  66. package/src/models/ShippingMethod.ts +22 -27
  67. package/src/models/Status.ts +1 -1
  68. package/src/models/StatusHistoryItem.ts +10 -15
  69. package/src/runtime.ts +1 -1
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrderTrackingToJSON = exports.OrderTrackingFromJSONTyped = exports.OrderTrackingFromJSON = exports.instanceOfOrderTracking = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the OrderTracking interface.
20
19
  */
21
20
  function instanceOfOrderTracking(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfOrderTracking = instanceOfOrderTracking;
26
24
  function OrderTrackingFromJSON(json) {
@@ -28,27 +26,24 @@ function OrderTrackingFromJSON(json) {
28
26
  }
29
27
  exports.OrderTrackingFromJSON = OrderTrackingFromJSON;
30
28
  function OrderTrackingFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'courier': !(0, runtime_1.exists)(json, 'courier') ? undefined : json['courier'],
36
- 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
37
- 'url': !(0, runtime_1.exists)(json, 'url') ? undefined : json['url'],
33
+ 'courier': json['courier'] == null ? undefined : json['courier'],
34
+ 'code': json['code'] == null ? undefined : json['code'],
35
+ 'url': json['url'] == null ? undefined : json['url'],
38
36
  };
39
37
  }
40
38
  exports.OrderTrackingFromJSONTyped = OrderTrackingFromJSONTyped;
41
39
  function OrderTrackingToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
40
+ if (value == null) {
41
+ return value;
47
42
  }
48
43
  return {
49
- 'courier': value.courier,
50
- 'code': value.code,
51
- 'url': value.url,
44
+ 'courier': value['courier'],
45
+ 'code': value['code'],
46
+ 'url': value['url'],
52
47
  };
53
48
  }
54
49
  exports.OrderTrackingToJSON = OrderTrackingToJSON;
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,14 +14,12 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OrdersResponseToJSON = exports.OrdersResponseFromJSONTyped = exports.OrdersResponseFromJSON = exports.instanceOfOrdersResponse = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var Order_1 = require("./Order");
19
18
  /**
20
19
  * Check if a given object implements the OrdersResponse interface.
21
20
  */
22
21
  function instanceOfOrdersResponse(value) {
23
- var isInstance = true;
24
- return isInstance;
22
+ return true;
25
23
  }
26
24
  exports.instanceOfOrdersResponse = instanceOfOrdersResponse;
27
25
  function OrdersResponseFromJSON(json) {
@@ -29,25 +27,22 @@ function OrdersResponseFromJSON(json) {
29
27
  }
30
28
  exports.OrdersResponseFromJSON = OrdersResponseFromJSON;
31
29
  function OrdersResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
30
+ if (json == null) {
33
31
  return json;
34
32
  }
35
33
  return {
36
- 'orders': !(0, runtime_1.exists)(json, 'orders') ? undefined : (json['orders'].map(Order_1.OrderFromJSON)),
37
- 'nextPageToken': !(0, runtime_1.exists)(json, 'nextPageToken') ? undefined : json['nextPageToken'],
34
+ 'orders': json['orders'] == null ? undefined : (json['orders'].map(Order_1.OrderFromJSON)),
35
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
38
36
  };
39
37
  }
40
38
  exports.OrdersResponseFromJSONTyped = OrdersResponseFromJSONTyped;
41
39
  function OrdersResponseToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
40
+ if (value == null) {
41
+ return value;
47
42
  }
48
43
  return {
49
- 'orders': value.orders === undefined ? undefined : (value.orders.map(Order_1.OrderToJSON)),
50
- 'nextPageToken': value.nextPageToken,
44
+ 'orders': value['orders'] == null ? undefined : (value['orders'].map(Order_1.OrderToJSON)),
45
+ 'nextPageToken': value['nextPageToken'],
51
46
  };
52
47
  }
53
48
  exports.OrdersResponseToJSON = OrdersResponseToJSON;
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OriginToJSON = exports.OriginFromJSONTyped = exports.OriginFromJSON = exports.instanceOfOrigin = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Origin interface.
20
19
  */
21
20
  function instanceOfOrigin(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfOrigin = instanceOfOrigin;
26
24
  function OriginFromJSON(json) {
@@ -28,25 +26,22 @@ function OriginFromJSON(json) {
28
26
  }
29
27
  exports.OriginFromJSON = OriginFromJSON;
30
28
  function OriginFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
36
- 'isPaid': !(0, runtime_1.exists)(json, 'isPaid') ? undefined : json['isPaid'],
33
+ 'code': json['code'] == null ? undefined : json['code'],
34
+ 'isPaid': json['isPaid'] == null ? undefined : json['isPaid'],
37
35
  };
38
36
  }
39
37
  exports.OriginFromJSONTyped = OriginFromJSONTyped;
40
38
  function OriginToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
39
+ if (value == null) {
40
+ return value;
46
41
  }
47
42
  return {
48
- 'code': value.code,
49
- 'isPaid': value.isPaid,
43
+ 'code': value['code'],
44
+ 'isPaid': value['isPaid'],
50
45
  };
51
46
  }
52
47
  exports.OriginToJSON = OriginToJSON;
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PriceToJSON = exports.PriceFromJSONTyped = exports.PriceFromJSON = exports.instanceOfPrice = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Price interface.
20
19
  */
21
20
  function instanceOfPrice(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfPrice = instanceOfPrice;
26
24
  function PriceFromJSON(json) {
@@ -28,25 +26,22 @@ function PriceFromJSON(json) {
28
26
  }
29
27
  exports.PriceFromJSON = PriceFromJSON;
30
28
  function PriceFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
36
- 'currencyCode': !(0, runtime_1.exists)(json, 'currencyCode') ? undefined : json['currencyCode'],
33
+ 'amount': json['amount'] == null ? undefined : json['amount'],
34
+ 'currencyCode': json['currencyCode'] == null ? undefined : json['currencyCode'],
37
35
  };
38
36
  }
39
37
  exports.PriceFromJSONTyped = PriceFromJSONTyped;
40
38
  function PriceToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
39
+ if (value == null) {
40
+ return value;
46
41
  }
47
42
  return {
48
- 'amount': value.amount,
49
- 'currencyCode': value.currencyCode,
43
+ 'amount': value['amount'],
44
+ 'currencyCode': value['currencyCode'],
50
45
  };
51
46
  }
52
47
  exports.PriceToJSON = PriceToJSON;
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,15 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ShippingMethodToJSON = exports.ShippingMethodFromJSONTyped = exports.ShippingMethodFromJSON = exports.instanceOfShippingMethod = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var DeliveryEstimates_1 = require("./DeliveryEstimates");
19
18
  var Price_1 = require("./Price");
20
19
  /**
21
20
  * Check if a given object implements the ShippingMethod interface.
22
21
  */
23
22
  function instanceOfShippingMethod(value) {
24
- var isInstance = true;
25
- return isInstance;
23
+ return true;
26
24
  }
27
25
  exports.instanceOfShippingMethod = instanceOfShippingMethod;
28
26
  function ShippingMethodFromJSON(json) {
@@ -30,37 +28,34 @@ function ShippingMethodFromJSON(json) {
30
28
  }
31
29
  exports.ShippingMethodFromJSON = ShippingMethodFromJSON;
32
30
  function ShippingMethodFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
34
32
  return json;
35
33
  }
36
34
  return {
37
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
38
- 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
39
- 'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
40
- 'deliveryEstimates': !(0, runtime_1.exists)(json, 'deliveryEstimates') ? undefined : (0, DeliveryEstimates_1.DeliveryEstimatesFromJSON)(json['deliveryEstimates']),
41
- 'totalPrice': !(0, runtime_1.exists)(json, 'totalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
42
- 'taxPrice': !(0, runtime_1.exists)(json, 'taxPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['taxPrice']),
43
- 'subtotalPrice': !(0, runtime_1.exists)(json, 'subtotalPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
44
- 'discountPrice': !(0, runtime_1.exists)(json, 'discountPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
35
+ 'id': json['id'] == null ? undefined : json['id'],
36
+ 'name': json['name'] == null ? undefined : json['name'],
37
+ 'description': json['description'] == null ? undefined : json['description'],
38
+ 'deliveryEstimates': json['deliveryEstimates'] == null ? undefined : (0, DeliveryEstimates_1.DeliveryEstimatesFromJSON)(json['deliveryEstimates']),
39
+ 'totalPrice': json['totalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['totalPrice']),
40
+ 'taxPrice': json['taxPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['taxPrice']),
41
+ 'subtotalPrice': json['subtotalPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['subtotalPrice']),
42
+ 'discountPrice': json['discountPrice'] == null ? undefined : (0, Price_1.PriceFromJSON)(json['discountPrice']),
45
43
  };
46
44
  }
47
45
  exports.ShippingMethodFromJSONTyped = ShippingMethodFromJSONTyped;
48
46
  function ShippingMethodToJSON(value) {
49
- if (value === undefined) {
50
- return undefined;
51
- }
52
- if (value === null) {
53
- return null;
47
+ if (value == null) {
48
+ return value;
54
49
  }
55
50
  return {
56
- 'id': value.id,
57
- 'name': value.name,
58
- 'description': value.description,
59
- 'deliveryEstimates': (0, DeliveryEstimates_1.DeliveryEstimatesToJSON)(value.deliveryEstimates),
60
- 'totalPrice': (0, Price_1.PriceToJSON)(value.totalPrice),
61
- 'taxPrice': (0, Price_1.PriceToJSON)(value.taxPrice),
62
- 'subtotalPrice': (0, Price_1.PriceToJSON)(value.subtotalPrice),
63
- 'discountPrice': (0, Price_1.PriceToJSON)(value.discountPrice),
51
+ 'id': value['id'],
52
+ 'name': value['name'],
53
+ 'description': value['description'],
54
+ 'deliveryEstimates': (0, DeliveryEstimates_1.DeliveryEstimatesToJSON)(value['deliveryEstimates']),
55
+ 'totalPrice': (0, Price_1.PriceToJSON)(value['totalPrice']),
56
+ 'taxPrice': (0, Price_1.PriceToJSON)(value['taxPrice']),
57
+ 'subtotalPrice': (0, Price_1.PriceToJSON)(value['subtotalPrice']),
58
+ 'discountPrice': (0, Price_1.PriceToJSON)(value['discountPrice']),
64
59
  };
65
60
  }
66
61
  exports.ShippingMethodToJSON = ShippingMethodToJSON;
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,14 +14,12 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.StatusHistoryItemToJSON = exports.StatusHistoryItemFromJSONTyped = exports.StatusHistoryItemFromJSON = exports.instanceOfStatusHistoryItem = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var Status_1 = require("./Status");
19
18
  /**
20
19
  * Check if a given object implements the StatusHistoryItem interface.
21
20
  */
22
21
  function instanceOfStatusHistoryItem(value) {
23
- var isInstance = true;
24
- return isInstance;
22
+ return true;
25
23
  }
26
24
  exports.instanceOfStatusHistoryItem = instanceOfStatusHistoryItem;
27
25
  function StatusHistoryItemFromJSON(json) {
@@ -29,25 +27,22 @@ function StatusHistoryItemFromJSON(json) {
29
27
  }
30
28
  exports.StatusHistoryItemFromJSON = StatusHistoryItemFromJSON;
31
29
  function StatusHistoryItemFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
30
+ if (json == null) {
33
31
  return json;
34
32
  }
35
33
  return {
36
- 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
37
- 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
34
+ 'status': json['status'] == null ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
35
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
38
36
  };
39
37
  }
40
38
  exports.StatusHistoryItemFromJSONTyped = StatusHistoryItemFromJSONTyped;
41
39
  function StatusHistoryItemToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
40
+ if (value == null) {
41
+ return value;
47
42
  }
48
43
  return {
49
- 'status': (0, Status_1.StatusToJSON)(value.status),
50
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
44
+ 'status': (0, Status_1.StatusToJSON)(value['status']),
45
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
51
46
  };
52
47
  }
53
48
  exports.StatusHistoryItemToJSON = StatusHistoryItemToJSON;
package/dist/runtime.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.5.4
5
+ * The version of the OpenAPI document: 1.6.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/runtime.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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.5.4
8
+ * The version of the OpenAPI document: 1.6.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/orders",
3
- "version": "1.5.4",
3
+ "version": "1.6.0",
4
4
  "description": "OpenAPI client for @teemill/orders",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
6
6
  *
7
- * The version of the OpenAPI document: 1.5.4
7
+ * The version of the OpenAPI document: 1.6.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -40,6 +40,12 @@ import {
40
40
  StatusToJSON,
41
41
  } from '../models/index';
42
42
 
43
+ export interface CancelOrderRequest {
44
+ project: string;
45
+ orderId: string;
46
+ fields?: string;
47
+ }
48
+
43
49
  export interface ConfirmOrderOperationRequest {
44
50
  project: string;
45
51
  orderId: string;
@@ -82,6 +88,68 @@ export interface GetOrdersRequest {
82
88
  */
83
89
  export class OrdersApi extends runtime.BaseAPI {
84
90
 
91
+ /**
92
+ * Cancels an order if it has not yet started processing.
93
+ * Cancel order
94
+ */
95
+ async cancelOrderRaw(requestParameters: CancelOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
96
+ if (requestParameters.project === null || requestParameters.project === undefined) {
97
+ throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling cancelOrder.');
98
+ }
99
+
100
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
101
+ throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling cancelOrder.');
102
+ }
103
+
104
+ const queryParameters: any = {};
105
+
106
+ if (requestParameters.project !== undefined) {
107
+ queryParameters['project'] = requestParameters.project;
108
+ }
109
+
110
+ if (requestParameters.fields !== undefined) {
111
+ queryParameters['fields'] = requestParameters.fields;
112
+ }
113
+
114
+ const headerParameters: runtime.HTTPHeaders = {};
115
+
116
+ if (this.configuration && this.configuration.accessToken) {
117
+ // oauth required
118
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
119
+ }
120
+
121
+ if (this.configuration && this.configuration.apiKey) {
122
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
123
+ }
124
+
125
+ const response = await this.request({
126
+ path: `/v1/orders/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))),
127
+ method: 'DELETE',
128
+ headers: headerParameters,
129
+ query: queryParameters,
130
+ }, initOverrides);
131
+
132
+ return new runtime.VoidApiResponse(response);
133
+ }
134
+
135
+ /**
136
+ * Cancels an order if it has not yet started processing.
137
+ * Cancel order
138
+ */
139
+ async cancelOrder(
140
+ project: string, orderId: string,
141
+ optionalParameters: runtime.OptionalOnly<CancelOrderRequest> = {},
142
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
143
+ ): Promise<void> {
144
+ await this.cancelOrderRaw(
145
+ {
146
+ project: project,orderId: orderId,
147
+ ...optionalParameters,
148
+ },
149
+ initOverrides
150
+ );
151
+ }
152
+
85
153
  /**
86
154
  * Confirms an order, and submits it as ready to take payment and begin processing.
87
155
  * Confirm order