@teemill/orders 1.11.0 → 1.13.1

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.
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. 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.11.0
8
+ * The version of the OpenAPI document: 1.13.1
9
9
  * Contact: hello@teemill.com
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.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
25
+ exports.GetOrdersDateFilterTypeEnum = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = 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
@@ -35,6 +35,9 @@ exports.ConfirmOrderValidationErrorCodeEnum = {
35
35
  Conflict: 'CONFLICT',
36
36
  ActionRequired: 'ACTION_REQUIRED'
37
37
  };
38
+ exports.CustomsInformationPreRegistrationTypeEnum = {
39
+ Ioss: 'IOSS'
40
+ };
38
41
  /**
39
42
  *
40
43
  * @export
@@ -151,16 +154,16 @@ const OrdersApiAxiosParamCreator = function (configuration) {
151
154
  * 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.
152
155
  * @summary Create order
153
156
  * @param {string} project What project it is
154
- * @param {Order} order Order schema
157
+ * @param {CreateOrder} createOrder Create Order schema
155
158
  * @param {string} [fields] Specifies which fields to return, separated by commas
156
159
  * @param {*} [options] Override http request option.
157
160
  * @throws {RequiredError}
158
161
  */
159
- createOrder: (project_1, order_1, fields_1, ...args_1) => __awaiter(this, [project_1, order_1, fields_1, ...args_1], void 0, function* (project, order, fields, options = {}) {
162
+ createOrder: (project_1, createOrder_1, fields_1, ...args_1) => __awaiter(this, [project_1, createOrder_1, fields_1, ...args_1], void 0, function* (project, createOrder, fields, options = {}) {
160
163
  // verify required parameter 'project' is not null or undefined
161
164
  (0, common_1.assertParamExists)('createOrder', 'project', project);
162
- // verify required parameter 'order' is not null or undefined
163
- (0, common_1.assertParamExists)('createOrder', 'order', order);
165
+ // verify required parameter 'createOrder' is not null or undefined
166
+ (0, common_1.assertParamExists)('createOrder', 'createOrder', createOrder);
164
167
  const localVarPath = `/v1/orders`;
165
168
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
169
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -186,7 +189,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
186
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
187
190
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
191
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(order, localVarRequestOptions, configuration);
192
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrder, localVarRequestOptions, configuration);
190
193
  return {
191
194
  url: (0, common_1.toPathString)(localVarUrlObj),
192
195
  options: localVarRequestOptions,
@@ -197,7 +200,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
197
200
  * @summary Export orders
198
201
  * @param {string} project What project it is
199
202
  * @param {string} start Start of date range to filter by when orders were placed
200
- * @param {string} [end] End of date range to filter by when orders were placed
203
+ * @param {string} [end] End of date range
201
204
  * @param {string} [search] Search term to filter based on order reference, customer name and email
202
205
  * @param {*} [options] Override http request option.
203
206
  * @throws {RequiredError}
@@ -300,12 +303,13 @@ const OrdersApiAxiosParamCreator = function (configuration) {
300
303
  * @param {string} [search] Search term to filter based on order reference, customer name and email
301
304
  * @param {Array<string>} [ids] Specify fulfillment IDs to list
302
305
  * @param {Array<Status>} [statuses] Filter by fulfillment status
303
- * @param {string} [start] Start of date range to filter by when orders were placed
304
- * @param {string} [end] End of date range to filter by when orders were placed
306
+ * @param {string} [start] Start of date range
307
+ * @param {string} [end] End of date range
308
+ * @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.
305
309
  * @param {*} [options] Override http request option.
306
310
  * @throws {RequiredError}
307
311
  */
308
- getOrders: (project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1], void 0, function* (project, fields, pageToken, pageSize, search, ids, statuses, start, end, options = {}) {
312
+ getOrders: (project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, dateFilterType_1, ...args_1) => __awaiter(this, [project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, dateFilterType_1, ...args_1], void 0, function* (project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options = {}) {
309
313
  // verify required parameter 'project' is not null or undefined
310
314
  (0, common_1.assertParamExists)('getOrders', 'project', project);
311
315
  const localVarPath = `/v1/orders`;
@@ -354,41 +358,8 @@ const OrdersApiAxiosParamCreator = function (configuration) {
354
358
  end.toISOString() :
355
359
  end;
356
360
  }
357
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
358
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
359
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
360
- return {
361
- url: (0, common_1.toPathString)(localVarUrlObj),
362
- options: localVarRequestOptions,
363
- };
364
- }),
365
- /**
366
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
367
- * @summary List orders\' statuses
368
- * @param {string} project What project it is
369
- * @param {*} [options] Override http request option.
370
- * @throws {RequiredError}
371
- */
372
- getStatuses: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
373
- // verify required parameter 'project' is not null or undefined
374
- (0, common_1.assertParamExists)('getStatuses', 'project', project);
375
- const localVarPath = `/v1/orders/statuses`;
376
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
377
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
378
- let baseOptions;
379
- if (configuration) {
380
- baseOptions = configuration.baseOptions;
381
- }
382
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
383
- const localVarHeaderParameter = {};
384
- const localVarQueryParameter = {};
385
- // authentication session-oauth required
386
- // oauth required
387
- yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
388
- // authentication api-key required
389
- yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
390
- if (project !== undefined) {
391
- localVarQueryParameter['project'] = project;
361
+ if (dateFilterType !== undefined) {
362
+ localVarQueryParameter['dateFilterType'] = dateFilterType;
392
363
  }
393
364
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
394
365
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -449,15 +420,15 @@ const OrdersApiFp = function (configuration) {
449
420
  * 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.
450
421
  * @summary Create order
451
422
  * @param {string} project What project it is
452
- * @param {Order} order Order schema
423
+ * @param {CreateOrder} createOrder Create Order schema
453
424
  * @param {string} [fields] Specifies which fields to return, separated by commas
454
425
  * @param {*} [options] Override http request option.
455
426
  * @throws {RequiredError}
456
427
  */
457
- createOrder(project, order, fields, options) {
428
+ createOrder(project, createOrder, fields, options) {
458
429
  return __awaiter(this, void 0, void 0, function* () {
459
430
  var _a, _b, _c;
460
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(project, order, fields, options);
431
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(project, createOrder, fields, options);
461
432
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
462
433
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
463
434
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -468,7 +439,7 @@ const OrdersApiFp = function (configuration) {
468
439
  * @summary Export orders
469
440
  * @param {string} project What project it is
470
441
  * @param {string} start Start of date range to filter by when orders were placed
471
- * @param {string} [end] End of date range to filter by when orders were placed
442
+ * @param {string} [end] End of date range
472
443
  * @param {string} [search] Search term to filter based on order reference, customer name and email
473
444
  * @param {*} [options] Override http request option.
474
445
  * @throws {RequiredError}
@@ -510,36 +481,21 @@ const OrdersApiFp = function (configuration) {
510
481
  * @param {string} [search] Search term to filter based on order reference, customer name and email
511
482
  * @param {Array<string>} [ids] Specify fulfillment IDs to list
512
483
  * @param {Array<Status>} [statuses] Filter by fulfillment status
513
- * @param {string} [start] Start of date range to filter by when orders were placed
514
- * @param {string} [end] End of date range to filter by when orders were placed
484
+ * @param {string} [start] Start of date range
485
+ * @param {string} [end] End of date range
486
+ * @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.
515
487
  * @param {*} [options] Override http request option.
516
488
  * @throws {RequiredError}
517
489
  */
518
- getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options) {
490
+ getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options) {
519
491
  return __awaiter(this, void 0, void 0, function* () {
520
492
  var _a, _b, _c;
521
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options);
493
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options);
522
494
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
523
495
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
524
496
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
525
497
  });
526
498
  },
527
- /**
528
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
529
- * @summary List orders\' statuses
530
- * @param {string} project What project it is
531
- * @param {*} [options] Override http request option.
532
- * @throws {RequiredError}
533
- */
534
- getStatuses(project, options) {
535
- return __awaiter(this, void 0, void 0, function* () {
536
- var _a, _b, _c;
537
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatuses(project, options);
538
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
539
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getStatuses']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
540
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
541
- });
542
- },
543
499
  };
544
500
  };
545
501
  exports.OrdersApiFp = OrdersApiFp;
@@ -578,7 +534,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
578
534
  * @throws {RequiredError}
579
535
  */
580
536
  createOrder(requestParameters, options) {
581
- return localVarFp.createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(axios, basePath));
537
+ return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
582
538
  },
583
539
  /**
584
540
  * Export orders as a CSV file
@@ -608,17 +564,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
608
564
  * @throws {RequiredError}
609
565
  */
610
566
  getOrders(requestParameters, options) {
611
- return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
612
- },
613
- /**
614
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
615
- * @summary List orders\' statuses
616
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
617
- * @param {*} [options] Override http request option.
618
- * @throws {RequiredError}
619
- */
620
- getStatuses(requestParameters, options) {
621
- return localVarFp.getStatuses(requestParameters.project, options).then((request) => request(axios, basePath));
567
+ return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
622
568
  },
623
569
  };
624
570
  };
@@ -661,7 +607,7 @@ class OrdersApi extends base_1.BaseAPI {
661
607
  * @memberof OrdersApi
662
608
  */
663
609
  createOrder(requestParameters, options) {
664
- return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
610
+ return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
665
611
  }
666
612
  /**
667
613
  * Export orders as a CSV file
@@ -694,18 +640,15 @@ class OrdersApi extends base_1.BaseAPI {
694
640
  * @memberof OrdersApi
695
641
  */
696
642
  getOrders(requestParameters, options) {
697
- return (0, exports.OrdersApiFp)(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
698
- }
699
- /**
700
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
701
- * @summary List orders\' statuses
702
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
703
- * @param {*} [options] Override http request option.
704
- * @throws {RequiredError}
705
- * @memberof OrdersApi
706
- */
707
- getStatuses(requestParameters, options) {
708
- return (0, exports.OrdersApiFp)(this.configuration).getStatuses(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
643
+ return (0, exports.OrdersApiFp)(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(this.axios, this.basePath));
709
644
  }
710
645
  }
711
646
  exports.OrdersApi = OrdersApi;
647
+ /**
648
+ * @export
649
+ */
650
+ exports.GetOrdersDateFilterTypeEnum = {
651
+ CreatedAt: 'createdAt',
652
+ UpdatedAt: 'updatedAt',
653
+ StatusChangedAt: 'statusChangedAt'
654
+ };
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. 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.11.0
5
+ * The version of the OpenAPI document: 1.13.1
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/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. 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.11.0
8
+ * The version of the OpenAPI document: 1.13.1
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/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. 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.11.0
5
+ * The version of the OpenAPI document: 1.13.1
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/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. 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.11.0
8
+ * The version of the OpenAPI document: 1.13.1
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.11.0
5
+ * The version of the OpenAPI document: 1.13.1
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.11.0
8
+ * The version of the OpenAPI document: 1.13.1
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).