@teemill/orders 1.2.0 → 1.3.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 (66) hide show
  1. package/.openapi-generator/FILES +0 -1
  2. package/README.md +2 -2
  3. package/dist/apis/OrdersApi.d.ts +5 -5
  4. package/dist/apis/OrdersApi.js +24 -9
  5. package/dist/models/Address.d.ts +1 -1
  6. package/dist/models/Address.js +1 -1
  7. package/dist/models/ApiError.d.ts +1 -1
  8. package/dist/models/ApiError.js +1 -1
  9. package/dist/models/ConfirmOrderFulfillment.d.ts +1 -1
  10. package/dist/models/ConfirmOrderFulfillment.js +1 -1
  11. package/dist/models/ConfirmOrderRequest.d.ts +1 -1
  12. package/dist/models/ConfirmOrderRequest.js +1 -1
  13. package/dist/models/ConfirmOrderValidationError.d.ts +1 -1
  14. package/dist/models/ConfirmOrderValidationError.js +1 -1
  15. package/dist/models/ContactInformation.d.ts +1 -1
  16. package/dist/models/ContactInformation.js +1 -1
  17. package/dist/models/DeliveryEstimates.d.ts +1 -1
  18. package/dist/models/DeliveryEstimates.js +1 -1
  19. package/dist/models/Fulfillment.d.ts +1 -1
  20. package/dist/models/Fulfillment.js +1 -1
  21. package/dist/models/FulfillmentItem.d.ts +1 -1
  22. package/dist/models/FulfillmentItem.js +1 -1
  23. package/dist/models/Order.d.ts +1 -1
  24. package/dist/models/Order.js +1 -1
  25. package/dist/models/OrderItem.d.ts +1 -1
  26. package/dist/models/OrderItem.js +1 -1
  27. package/dist/models/OrderItemTaxPrice.d.ts +1 -1
  28. package/dist/models/OrderItemTaxPrice.js +1 -1
  29. package/dist/models/OrderTracking.d.ts +1 -1
  30. package/dist/models/OrderTracking.js +1 -1
  31. package/dist/models/OrdersResponse.d.ts +1 -1
  32. package/dist/models/OrdersResponse.js +1 -1
  33. package/dist/models/Origin.d.ts +1 -1
  34. package/dist/models/Origin.js +1 -1
  35. package/dist/models/Price.d.ts +1 -1
  36. package/dist/models/Price.js +1 -1
  37. package/dist/models/ShippingMethod.d.ts +1 -1
  38. package/dist/models/ShippingMethod.js +1 -1
  39. package/dist/models/Status.d.ts +1 -1
  40. package/dist/models/Status.js +1 -1
  41. package/dist/models/StatusHistoryItem.d.ts +1 -1
  42. package/dist/models/StatusHistoryItem.js +1 -1
  43. package/dist/runtime.d.ts +6 -1
  44. package/dist/runtime.js +6 -3
  45. package/package.json +1 -1
  46. package/src/apis/OrdersApi.ts +57 -9
  47. package/src/models/Address.ts +1 -1
  48. package/src/models/ApiError.ts +1 -1
  49. package/src/models/ConfirmOrderFulfillment.ts +1 -1
  50. package/src/models/ConfirmOrderRequest.ts +1 -1
  51. package/src/models/ConfirmOrderValidationError.ts +1 -1
  52. package/src/models/ContactInformation.ts +1 -1
  53. package/src/models/DeliveryEstimates.ts +1 -1
  54. package/src/models/Fulfillment.ts +1 -1
  55. package/src/models/FulfillmentItem.ts +1 -1
  56. package/src/models/Order.ts +1 -1
  57. package/src/models/OrderItem.ts +1 -1
  58. package/src/models/OrderItemTaxPrice.ts +1 -1
  59. package/src/models/OrderTracking.ts +1 -1
  60. package/src/models/OrdersResponse.ts +1 -1
  61. package/src/models/Origin.ts +1 -1
  62. package/src/models/Price.ts +1 -1
  63. package/src/models/ShippingMethod.ts +1 -1
  64. package/src/models/Status.ts +1 -1
  65. package/src/models/StatusHistoryItem.ts +1 -1
  66. package/src/runtime.ts +13 -3
@@ -1,6 +1,5 @@
1
1
  .gitignore
2
2
  .npmignore
3
- .openapi-generator-ignore
4
3
  README.md
5
4
  package.json
6
5
  src/apis/OrdersApi.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/orders@1.2.0
1
+ ## @teemill/orders@1.3.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/orders@1.2.0 --save
39
+ npm install @teemill/orders@1.3.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -51,7 +51,7 @@ export declare class OrdersApi extends runtime.BaseAPI {
51
51
  * Confirms and order, and submits it as ready to take payment and begin processing.
52
52
  * Confirm order
53
53
  */
54
- confirmOrder(project: string, orderId: string, confirmOrderRequest: ConfirmOrderRequest, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
54
+ confirmOrder(project: string, orderId: string, confirmOrderRequest: ConfirmOrderRequest, optionalParameters?: runtime.OptionalOnly<ConfirmOrderOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
55
55
  /**
56
56
  * Creates a new order for the provided variants.
57
57
  * Create order
@@ -61,7 +61,7 @@ export declare class OrdersApi extends runtime.BaseAPI {
61
61
  * Creates a new order for the provided variants.
62
62
  * Create order
63
63
  */
64
- createOrder(project: string, order: Order, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
64
+ createOrder(project: string, order: Order, optionalParameters?: runtime.OptionalOnly<CreateOrderRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
65
65
  /**
66
66
  * Get an order
67
67
  * Get order
@@ -71,7 +71,7 @@ export declare class OrdersApi extends runtime.BaseAPI {
71
71
  * Get an order
72
72
  * Get order
73
73
  */
74
- getOrder(project: string, orderId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
74
+ getOrder(project: string, orderId: string, optionalParameters?: runtime.OptionalOnly<GetOrderRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
75
75
  /**
76
76
  * Lists all orders available paginated into chunks
77
77
  * List orders
@@ -81,5 +81,5 @@ export declare class OrdersApi extends runtime.BaseAPI {
81
81
  * Lists all orders available paginated into chunks
82
82
  * List orders
83
83
  */
84
- getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: Date, end?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrdersResponse>;
84
+ getOrders(project: string, optionalParameters?: runtime.OptionalOnly<GetOrdersRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrdersResponse>;
85
85
  }
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,6 +27,17 @@ var __extends = (this && this.__extends) || (function () {
27
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
28
  };
29
29
  })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
30
41
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
42
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
43
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -134,12 +145,13 @@ var OrdersApi = /** @class */ (function (_super) {
134
145
  * Confirms and order, and submits it as ready to take payment and begin processing.
135
146
  * Confirm order
136
147
  */
137
- OrdersApi.prototype.confirmOrder = function (project, orderId, confirmOrderRequest, fields, initOverrides) {
148
+ OrdersApi.prototype.confirmOrder = function (project, orderId, confirmOrderRequest, optionalParameters, initOverrides) {
149
+ if (optionalParameters === void 0) { optionalParameters = {}; }
138
150
  return __awaiter(this, void 0, void 0, function () {
139
151
  var response;
140
152
  return __generator(this, function (_a) {
141
153
  switch (_a.label) {
142
- case 0: return [4 /*yield*/, this.confirmOrderRaw({ project: project, orderId: orderId, confirmOrderRequest: confirmOrderRequest, fields: fields }, initOverrides)];
154
+ case 0: return [4 /*yield*/, this.confirmOrderRaw(__assign({ project: project, orderId: orderId, confirmOrderRequest: confirmOrderRequest }, optionalParameters), initOverrides)];
143
155
  case 1:
144
156
  response = _a.sent();
145
157
  return [4 /*yield*/, response.value()];
@@ -204,12 +216,13 @@ var OrdersApi = /** @class */ (function (_super) {
204
216
  * Creates a new order for the provided variants.
205
217
  * Create order
206
218
  */
207
- OrdersApi.prototype.createOrder = function (project, order, fields, initOverrides) {
219
+ OrdersApi.prototype.createOrder = function (project, order, optionalParameters, initOverrides) {
220
+ if (optionalParameters === void 0) { optionalParameters = {}; }
208
221
  return __awaiter(this, void 0, void 0, function () {
209
222
  var response;
210
223
  return __generator(this, function (_a) {
211
224
  switch (_a.label) {
212
- case 0: return [4 /*yield*/, this.createOrderRaw({ project: project, order: order, fields: fields }, initOverrides)];
225
+ case 0: return [4 /*yield*/, this.createOrderRaw(__assign({ project: project, order: order }, optionalParameters), initOverrides)];
213
226
  case 1:
214
227
  response = _a.sent();
215
228
  return [4 /*yield*/, response.value()];
@@ -272,12 +285,13 @@ var OrdersApi = /** @class */ (function (_super) {
272
285
  * Get an order
273
286
  * Get order
274
287
  */
275
- OrdersApi.prototype.getOrder = function (project, orderId, fields, initOverrides) {
288
+ OrdersApi.prototype.getOrder = function (project, orderId, optionalParameters, initOverrides) {
289
+ if (optionalParameters === void 0) { optionalParameters = {}; }
276
290
  return __awaiter(this, void 0, void 0, function () {
277
291
  var response;
278
292
  return __generator(this, function (_a) {
279
293
  switch (_a.label) {
280
- case 0: return [4 /*yield*/, this.getOrderRaw({ project: project, orderId: orderId, fields: fields }, initOverrides)];
294
+ case 0: return [4 /*yield*/, this.getOrderRaw(__assign({ project: project, orderId: orderId }, optionalParameters), initOverrides)];
281
295
  case 1:
282
296
  response = _a.sent();
283
297
  return [4 /*yield*/, response.value()];
@@ -358,12 +372,13 @@ var OrdersApi = /** @class */ (function (_super) {
358
372
  * Lists all orders available paginated into chunks
359
373
  * List orders
360
374
  */
361
- OrdersApi.prototype.getOrders = function (project, fields, pageToken, pageSize, search, ids, statuses, start, end, initOverrides) {
375
+ OrdersApi.prototype.getOrders = function (project, optionalParameters, initOverrides) {
376
+ if (optionalParameters === void 0) { optionalParameters = {}; }
362
377
  return __awaiter(this, void 0, void 0, function () {
363
378
  var response;
364
379
  return __generator(this, function (_a) {
365
380
  switch (_a.label) {
366
- case 0: return [4 /*yield*/, this.getOrdersRaw({ project: project, fields: fields, pageToken: pageToken, pageSize: pageSize, search: search, ids: ids, statuses: statuses, start: start, end: end }, initOverrides)];
381
+ case 0: return [4 /*yield*/, this.getOrdersRaw(__assign({ project: project }, optionalParameters), initOverrides)];
367
382
  case 1:
368
383
  response = _a.sent();
369
384
  return [4 /*yield*/, response.value()];
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.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/dist/runtime.d.ts CHANGED
@@ -2,13 +2,17 @@
2
2
  * Orders API
3
3
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.2.0
5
+ * The version of the OpenAPI document: 1.3.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ export type OptionalProperties<T> = {
13
+ [K in keyof T]-?: undefined extends T[K] ? K : never;
14
+ }[keyof T];
15
+ export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
12
16
  export declare const BASE_PATH: string;
13
17
  export interface ConfigurationParameters {
14
18
  basePath?: string;
@@ -46,6 +50,7 @@ export declare class BaseAPI {
46
50
  private static readonly jsonRegex;
47
51
  private middleware;
48
52
  constructor(configuration?: Configuration);
53
+ isResponseError(error: any): error is ResponseError;
49
54
  withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
50
55
  withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
51
56
  withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
package/dist/runtime.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.2.0
8
+ * The version of the OpenAPI document: 1.3.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -266,6 +266,9 @@ var BaseAPI = /** @class */ (function () {
266
266
  }); };
267
267
  this.middleware = configuration.middleware;
268
268
  }
269
+ BaseAPI.prototype.isResponseError = function (error) {
270
+ return error instanceof Error && error.name === 'ResponseError';
271
+ };
269
272
  BaseAPI.prototype.withMiddleware = function () {
270
273
  var _a;
271
274
  var middlewares = [];
@@ -456,8 +459,8 @@ function querystringSingleKey(key, value, keyPrefix) {
456
459
  var fullKey = keyPrefix + (keyPrefix.length ? "[".concat(key, "]") : key);
457
460
  if (value instanceof Array) {
458
461
  var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
459
- .join("&".concat(encodeURIComponent(fullKey), "="));
460
- return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
462
+ .join("&".concat(encodeURIComponent(fullKey), "[]="));
463
+ return "".concat(encodeURIComponent(fullKey), "[]=").concat(multiValue);
461
464
  }
462
465
  if (value instanceof Set) {
463
466
  var valueAsArray = Array.from(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/orders",
3
- "version": "1.2.0",
3
+ "version": "1.3.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
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -128,8 +128,21 @@ export class OrdersApi extends runtime.BaseAPI {
128
128
  * Confirms and order, and submits it as ready to take payment and begin processing.
129
129
  * Confirm order
130
130
  */
131
- async confirmOrder(project: string, orderId: string, confirmOrderRequest: ConfirmOrderRequest, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order> {
132
- const response = await this.confirmOrderRaw({ project: project, orderId: orderId, confirmOrderRequest: confirmOrderRequest, fields: fields }, initOverrides);
131
+ async confirmOrder(
132
+ project: string, orderId: string, confirmOrderRequest: ConfirmOrderRequest,
133
+ optionalParameters: runtime.OptionalOnly<ConfirmOrderOperationRequest> = {},
134
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
135
+ ): Promise<Order> {
136
+ const response = await this.confirmOrderRaw(
137
+ {
138
+ project: project,
139
+ orderId: orderId,
140
+ confirmOrderRequest: confirmOrderRequest,
141
+ ...optionalParameters,
142
+ },
143
+ initOverrides
144
+ );
145
+
133
146
  return await response.value();
134
147
  }
135
148
 
@@ -184,8 +197,20 @@ export class OrdersApi extends runtime.BaseAPI {
184
197
  * Creates a new order for the provided variants.
185
198
  * Create order
186
199
  */
187
- async createOrder(project: string, order: Order, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order> {
188
- const response = await this.createOrderRaw({ project: project, order: order, fields: fields }, initOverrides);
200
+ async createOrder(
201
+ project: string, order: Order,
202
+ optionalParameters: runtime.OptionalOnly<CreateOrderRequest> = {},
203
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
204
+ ): Promise<Order> {
205
+ const response = await this.createOrderRaw(
206
+ {
207
+ project: project,
208
+ order: order,
209
+ ...optionalParameters,
210
+ },
211
+ initOverrides
212
+ );
213
+
189
214
  return await response.value();
190
215
  }
191
216
 
@@ -237,8 +262,20 @@ export class OrdersApi extends runtime.BaseAPI {
237
262
  * Get an order
238
263
  * Get order
239
264
  */
240
- async getOrder(project: string, orderId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order> {
241
- const response = await this.getOrderRaw({ project: project, orderId: orderId, fields: fields }, initOverrides);
265
+ async getOrder(
266
+ project: string, orderId: string,
267
+ optionalParameters: runtime.OptionalOnly<GetOrderRequest> = {},
268
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
269
+ ): Promise<Order> {
270
+ const response = await this.getOrderRaw(
271
+ {
272
+ project: project,
273
+ orderId: orderId,
274
+ ...optionalParameters,
275
+ },
276
+ initOverrides
277
+ );
278
+
242
279
  return await response.value();
243
280
  }
244
281
 
@@ -314,8 +351,19 @@ export class OrdersApi extends runtime.BaseAPI {
314
351
  * Lists all orders available paginated into chunks
315
352
  * List orders
316
353
  */
317
- async getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: Date, end?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrdersResponse> {
318
- const response = await this.getOrdersRaw({ project: project, fields: fields, pageToken: pageToken, pageSize: pageSize, search: search, ids: ids, statuses: statuses, start: start, end: end }, initOverrides);
354
+ async getOrders(
355
+ project: string,
356
+ optionalParameters: runtime.OptionalOnly<GetOrdersRequest> = {},
357
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
358
+ ): Promise<OrdersResponse> {
359
+ const response = await this.getOrdersRaw(
360
+ {
361
+ project: project,
362
+ ...optionalParameters,
363
+ },
364
+ initOverrides
365
+ );
366
+
319
367
  return await response.value();
320
368
  }
321
369
 
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/src/runtime.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,6 +13,12 @@
13
13
  */
14
14
 
15
15
 
16
+ export type OptionalProperties<T> = {
17
+ [K in keyof T]-?: undefined extends T[K] ? K : never
18
+ }[keyof T];
19
+
20
+ export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
21
+
16
22
  export const BASE_PATH = "https://api.localhost:8080".replace(/\/+$/, "");
17
23
 
18
24
  export interface ConfigurationParameters {
@@ -98,6 +104,10 @@ export class BaseAPI {
98
104
  this.middleware = configuration.middleware;
99
105
  }
100
106
 
107
+ isResponseError(error: any): error is ResponseError {
108
+ return error instanceof Error && error.name === 'ResponseError';
109
+ }
110
+
101
111
  withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
102
112
  const next = this.clone<T>();
103
113
  next.middleware = next.middleware.concat(...middlewares);
@@ -326,8 +336,8 @@ function querystringSingleKey(key: string, value: string | number | null | undef
326
336
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
327
337
  if (value instanceof Array) {
328
338
  const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
329
- .join(`&${encodeURIComponent(fullKey)}=`);
330
- return `${encodeURIComponent(fullKey)}=${multiValue}`;
339
+ .join(`&${encodeURIComponent(fullKey)}[]=`);
340
+ return `${encodeURIComponent(fullKey)}[]=${multiValue}`;
331
341
  }
332
342
  if (value instanceof Set) {
333
343
  const valueAsArray = Array.from(value);