@teemill/orders 1.25.0 → 1.27.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.
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.25.0
7
+ * The version of the OpenAPI document: 1.27.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -35,6 +35,37 @@ export const ConfirmOrderValidationErrorCodeEnum = {
35
35
  export const CustomsInformationPreRegistrationTypeEnum = {
36
36
  Ioss: 'IOSS'
37
37
  };
38
+ /**
39
+ * Machine-readable error code identifying the type of import failure: - `VARIANT_NOT_FOUND` — The SKU does not match any variant in the project\'s catalog - `MISSING_SKU` — A required SKU field was empty or missing - `SHIPPING_METHOD_UNAVAILABLE` — No shipping methods are available for the fulfillment - `TRANSIENT_SYSTEM_ERROR` — A temporary system issue occurred; the import may succeed on retry - `IMPORT_FAILED` — A general import failure that does not match a more specific code
40
+ */
41
+ export const OrderImportErrorCode = {
42
+ VariantNotFound: 'VARIANT_NOT_FOUND',
43
+ MissingSku: 'MISSING_SKU',
44
+ ShippingMethodUnavailable: 'SHIPPING_METHOD_UNAVAILABLE',
45
+ TransientSystemError: 'TRANSIENT_SYSTEM_ERROR',
46
+ ImportFailed: 'IMPORT_FAILED'
47
+ };
48
+ /**
49
+ * The lifecycle status of a single group (order) within an import: - `pending` — Group is queued and has not started processing - `processing` — Group is currently being processed - `success` — Order was created and confirmed successfully - `failed` — Order creation or confirmation failed - `cancelled` — Group was cancelled (e.g. parent import was cancelled)
50
+ */
51
+ export const OrderImportGroupStatus = {
52
+ Pending: 'pending',
53
+ Processing: 'processing',
54
+ Success: 'success',
55
+ Failed: 'failed',
56
+ Cancelled: 'cancelled'
57
+ };
58
+ /**
59
+ * The lifecycle status of an order import: - `queued` — Import has been accepted but no groups have started processing yet - `processing` — One or more groups are currently being processed - `completedSuccess` — All groups were imported successfully - `completedPartial` — Some groups succeeded but others failed or were cancelled - `completedFailed` — All groups failed or were cancelled, with none succeeding - `cancelled` — The entire import was cancelled before completion
60
+ */
61
+ export const OrderImportStatus = {
62
+ Queued: 'queued',
63
+ Processing: 'processing',
64
+ CompletedSuccess: 'completedSuccess',
65
+ CompletedPartial: 'completedPartial',
66
+ CompletedFailed: 'completedFailed',
67
+ Cancelled: 'cancelled'
68
+ };
38
69
  export const PaymentAttemptPaymentProviderEnum = {
39
70
  Stripe: 'stripe',
40
71
  Paypal: 'paypal',
@@ -354,6 +385,47 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
354
385
  options: localVarRequestOptions,
355
386
  };
356
387
  }),
388
+ /**
389
+ * Gets the latest status and summary for an order import.
390
+ * @summary Get order import
391
+ * @param {string} project The project identifier to scope the request to.
392
+ * @param {string} importId Unique identifier of an order import
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ getOrderImport: (project_1, importId_1, ...args_1) => __awaiter(this, [project_1, importId_1, ...args_1], void 0, function* (project, importId, options = {}) {
397
+ // verify required parameter 'project' is not null or undefined
398
+ assertParamExists('getOrderImport', 'project', project);
399
+ // verify required parameter 'importId' is not null or undefined
400
+ assertParamExists('getOrderImport', 'importId', importId);
401
+ const localVarPath = `/v1/orders/imports/{importId}`
402
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
404
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
405
+ let baseOptions;
406
+ if (configuration) {
407
+ baseOptions = configuration.baseOptions;
408
+ }
409
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
410
+ const localVarHeaderParameter = {};
411
+ const localVarQueryParameter = {};
412
+ // authentication session-oauth required
413
+ // oauth required
414
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
415
+ // authentication api-key required
416
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
417
+ if (project !== undefined) {
418
+ localVarQueryParameter['project'] = project;
419
+ }
420
+ localVarHeaderParameter['Accept'] = 'application/json';
421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
423
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
424
+ return {
425
+ url: toPathString(localVarUrlObj),
426
+ options: localVarRequestOptions,
427
+ };
428
+ }),
357
429
  /**
358
430
  * Lists all orders placed on this project, paginated into configurable chunks.
359
431
  * @summary List orders
@@ -431,6 +503,146 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
431
503
  options: localVarRequestOptions,
432
504
  };
433
505
  }),
506
+ /**
507
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
508
+ * @summary Import orders
509
+ * @param {string} project The project identifier to scope the request to.
510
+ * @param {File} file CSV file containing order data
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ importOrders: (project_1, file_1, ...args_1) => __awaiter(this, [project_1, file_1, ...args_1], void 0, function* (project, file, options = {}) {
515
+ // verify required parameter 'project' is not null or undefined
516
+ assertParamExists('importOrders', 'project', project);
517
+ // verify required parameter 'file' is not null or undefined
518
+ assertParamExists('importOrders', 'file', file);
519
+ const localVarPath = `/v1/orders/imports`;
520
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
521
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
522
+ let baseOptions;
523
+ if (configuration) {
524
+ baseOptions = configuration.baseOptions;
525
+ }
526
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
527
+ const localVarHeaderParameter = {};
528
+ const localVarQueryParameter = {};
529
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
530
+ // authentication session-oauth required
531
+ // oauth required
532
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
533
+ // authentication api-key required
534
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
535
+ if (project !== undefined) {
536
+ localVarQueryParameter['project'] = project;
537
+ }
538
+ if (file !== undefined) {
539
+ localVarFormParams.append('file', file);
540
+ }
541
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
542
+ localVarHeaderParameter['Accept'] = 'application/json';
543
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
544
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
545
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
546
+ localVarRequestOptions.data = localVarFormParams;
547
+ return {
548
+ url: toPathString(localVarUrlObj),
549
+ options: localVarRequestOptions,
550
+ };
551
+ }),
552
+ /**
553
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
554
+ * @summary List order import groups
555
+ * @param {string} project The project identifier to scope the request to.
556
+ * @param {string} importId Unique identifier of an order import
557
+ * @param {number} [pageToken] Page reference token
558
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ listOrderImportGroups: (project_1, importId_1, pageToken_1, pageSize_1, ...args_1) => __awaiter(this, [project_1, importId_1, pageToken_1, pageSize_1, ...args_1], void 0, function* (project, importId, pageToken, pageSize, options = {}) {
563
+ // verify required parameter 'project' is not null or undefined
564
+ assertParamExists('listOrderImportGroups', 'project', project);
565
+ // verify required parameter 'importId' is not null or undefined
566
+ assertParamExists('listOrderImportGroups', 'importId', importId);
567
+ const localVarPath = `/v1/orders/imports/{importId}/groups`
568
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
569
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
570
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
571
+ let baseOptions;
572
+ if (configuration) {
573
+ baseOptions = configuration.baseOptions;
574
+ }
575
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
576
+ const localVarHeaderParameter = {};
577
+ const localVarQueryParameter = {};
578
+ // authentication session-oauth required
579
+ // oauth required
580
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
581
+ // authentication api-key required
582
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
583
+ if (project !== undefined) {
584
+ localVarQueryParameter['project'] = project;
585
+ }
586
+ if (pageToken !== undefined) {
587
+ localVarQueryParameter['pageToken'] = pageToken;
588
+ }
589
+ if (pageSize !== undefined) {
590
+ localVarQueryParameter['pageSize'] = pageSize;
591
+ }
592
+ localVarHeaderParameter['Accept'] = 'application/json';
593
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
594
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
595
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
596
+ return {
597
+ url: toPathString(localVarUrlObj),
598
+ options: localVarRequestOptions,
599
+ };
600
+ }),
601
+ /**
602
+ * Lists recent order imports for this project, ordered by most recent first.
603
+ * @summary List order imports
604
+ * @param {string} project The project identifier to scope the request to.
605
+ * @param {number} [pageToken] Page reference token
606
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ */
610
+ listOrderImports: (project_1, pageToken_1, pageSize_1, ...args_1) => __awaiter(this, [project_1, pageToken_1, pageSize_1, ...args_1], void 0, function* (project, pageToken, pageSize, options = {}) {
611
+ // verify required parameter 'project' is not null or undefined
612
+ assertParamExists('listOrderImports', 'project', project);
613
+ const localVarPath = `/v1/orders/imports`;
614
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
615
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
616
+ let baseOptions;
617
+ if (configuration) {
618
+ baseOptions = configuration.baseOptions;
619
+ }
620
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
621
+ const localVarHeaderParameter = {};
622
+ const localVarQueryParameter = {};
623
+ // authentication session-oauth required
624
+ // oauth required
625
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
626
+ // authentication api-key required
627
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
628
+ if (project !== undefined) {
629
+ localVarQueryParameter['project'] = project;
630
+ }
631
+ if (pageToken !== undefined) {
632
+ localVarQueryParameter['pageToken'] = pageToken;
633
+ }
634
+ if (pageSize !== undefined) {
635
+ localVarQueryParameter['pageSize'] = pageSize;
636
+ }
637
+ localVarHeaderParameter['Accept'] = 'application/json';
638
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
639
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
640
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
641
+ return {
642
+ url: toPathString(localVarUrlObj),
643
+ options: localVarRequestOptions,
644
+ };
645
+ }),
434
646
  /**
435
647
  * Retries failed platform payment, so fulfillment can proceed.
436
648
  * @summary Retry
@@ -593,6 +805,23 @@ export const OrdersApiFp = function (configuration) {
593
805
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
594
806
  });
595
807
  },
808
+ /**
809
+ * Gets the latest status and summary for an order import.
810
+ * @summary Get order import
811
+ * @param {string} project The project identifier to scope the request to.
812
+ * @param {string} importId Unique identifier of an order import
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ */
816
+ getOrderImport(project, importId, options) {
817
+ return __awaiter(this, void 0, void 0, function* () {
818
+ var _a, _b, _c;
819
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderImport(project, importId, options);
820
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
821
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.getOrderImport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
822
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
823
+ });
824
+ },
596
825
  /**
597
826
  * Lists all orders placed on this project, paginated into configurable chunks.
598
827
  * @summary List orders
@@ -618,6 +847,60 @@ export const OrdersApiFp = function (configuration) {
618
847
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
619
848
  });
620
849
  },
850
+ /**
851
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
852
+ * @summary Import orders
853
+ * @param {string} project The project identifier to scope the request to.
854
+ * @param {File} file CSV file containing order data
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ */
858
+ importOrders(project, file, options) {
859
+ return __awaiter(this, void 0, void 0, function* () {
860
+ var _a, _b, _c;
861
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.importOrders(project, file, options);
862
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
863
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.importOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
864
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
865
+ });
866
+ },
867
+ /**
868
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
869
+ * @summary List order import groups
870
+ * @param {string} project The project identifier to scope the request to.
871
+ * @param {string} importId Unique identifier of an order import
872
+ * @param {number} [pageToken] Page reference token
873
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ */
877
+ listOrderImportGroups(project, importId, pageToken, pageSize, options) {
878
+ return __awaiter(this, void 0, void 0, function* () {
879
+ var _a, _b, _c;
880
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrderImportGroups(project, importId, pageToken, pageSize, options);
881
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
882
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.listOrderImportGroups']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
883
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
884
+ });
885
+ },
886
+ /**
887
+ * Lists recent order imports for this project, ordered by most recent first.
888
+ * @summary List order imports
889
+ * @param {string} project The project identifier to scope the request to.
890
+ * @param {number} [pageToken] Page reference token
891
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ listOrderImports(project, pageToken, pageSize, options) {
896
+ return __awaiter(this, void 0, void 0, function* () {
897
+ var _a, _b, _c;
898
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrderImports(project, pageToken, pageSize, options);
899
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
900
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.listOrderImports']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
901
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
902
+ });
903
+ },
621
904
  /**
622
905
  * Retries failed platform payment, so fulfillment can proceed.
623
906
  * @summary Retry
@@ -704,6 +987,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
704
987
  getOrder(requestParameters, options) {
705
988
  return localVarFp.getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
706
989
  },
990
+ /**
991
+ * Gets the latest status and summary for an order import.
992
+ * @summary Get order import
993
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
994
+ * @param {*} [options] Override http request option.
995
+ * @throws {RequiredError}
996
+ */
997
+ getOrderImport(requestParameters, options) {
998
+ return localVarFp.getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(axios, basePath));
999
+ },
707
1000
  /**
708
1001
  * Lists all orders placed on this project, paginated into configurable chunks.
709
1002
  * @summary List orders
@@ -714,6 +1007,36 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
714
1007
  getOrders(requestParameters, options) {
715
1008
  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));
716
1009
  },
1010
+ /**
1011
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1012
+ * @summary Import orders
1013
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ importOrders(requestParameters, options) {
1018
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
1019
+ },
1020
+ /**
1021
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1022
+ * @summary List order import groups
1023
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
1024
+ * @param {*} [options] Override http request option.
1025
+ * @throws {RequiredError}
1026
+ */
1027
+ listOrderImportGroups(requestParameters, options) {
1028
+ return localVarFp.listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1029
+ },
1030
+ /**
1031
+ * Lists recent order imports for this project, ordered by most recent first.
1032
+ * @summary List order imports
1033
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ */
1037
+ listOrderImports(requestParameters, options) {
1038
+ return localVarFp.listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1039
+ },
717
1040
  /**
718
1041
  * Retries failed platform payment, so fulfillment can proceed.
719
1042
  * @summary Retry
@@ -790,6 +1113,16 @@ export class OrdersApi extends BaseAPI {
790
1113
  getOrder(requestParameters, options) {
791
1114
  return OrdersApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
792
1115
  }
1116
+ /**
1117
+ * Gets the latest status and summary for an order import.
1118
+ * @summary Get order import
1119
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
1120
+ * @param {*} [options] Override http request option.
1121
+ * @throws {RequiredError}
1122
+ */
1123
+ getOrderImport(requestParameters, options) {
1124
+ return OrdersApiFp(this.configuration).getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(this.axios, this.basePath));
1125
+ }
793
1126
  /**
794
1127
  * Lists all orders placed on this project, paginated into configurable chunks.
795
1128
  * @summary List orders
@@ -800,6 +1133,36 @@ export class OrdersApi extends BaseAPI {
800
1133
  getOrders(requestParameters, options) {
801
1134
  return 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));
802
1135
  }
1136
+ /**
1137
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1138
+ * @summary Import orders
1139
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1140
+ * @param {*} [options] Override http request option.
1141
+ * @throws {RequiredError}
1142
+ */
1143
+ importOrders(requestParameters, options) {
1144
+ return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
1145
+ }
1146
+ /**
1147
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1148
+ * @summary List order import groups
1149
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ listOrderImportGroups(requestParameters, options) {
1154
+ return OrdersApiFp(this.configuration).listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1155
+ }
1156
+ /**
1157
+ * Lists recent order imports for this project, ordered by most recent first.
1158
+ * @summary List order imports
1159
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
1160
+ * @param {*} [options] Override http request option.
1161
+ * @throws {RequiredError}
1162
+ */
1163
+ listOrderImports(requestParameters, options) {
1164
+ return OrdersApiFp(this.configuration).listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1165
+ }
803
1166
  /**
804
1167
  * Retries failed platform payment, so fulfillment can proceed.
805
1168
  * @summary Retry
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.27.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.25.0
7
+ * The version of the OpenAPI document: 1.27.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.27.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.25.0
7
+ * The version of the OpenAPI document: 1.27.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.27.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3,7 +3,7 @@
3
3
  * Orders API
4
4
  * 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.
5
5
  *
6
- * The version of the OpenAPI document: 1.25.0
6
+ * The version of the OpenAPI document: 1.27.0
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.27.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.25.0
7
+ * The version of the OpenAPI document: 1.27.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.27.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
7
7
  *
8
- * The version of the OpenAPI document: 1.25.0
8
+ * The version of the OpenAPI document: 1.27.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,20 @@
1
+ # ImportOrders202Response
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **importId** | **string** | Unique object identifier | [optional] [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { ImportOrders202Response } from '@teemill/orders';
14
+
15
+ const instance: ImportOrders202Response = {
16
+ importId,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/docs/Order.md CHANGED
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
10
10
  **ref** | **string** | A reference to the resource location | [optional] [default to undefined]
11
11
  **status** | [**Status**](Status.md) | The current status of the order. | [optional] [default to undefined]
12
12
  **contactInformation** | [**ContactInformation**](ContactInformation.md) | | [default to undefined]
13
- **paymentMethod** | [**PaymentMethod**](PaymentMethod.md) | | [optional] [default to undefined]
13
+ **paymentMethod** | [**OrderPaymentMethod**](OrderPaymentMethod.md) | | [optional] [default to undefined]
14
14
  **shippingAddress** | [**Address**](Address.md) | The address the order will be shipped to. | [default to undefined]
15
15
  **customsInformation** | [**CustomsInformation1**](CustomsInformation1.md) | | [optional] [default to undefined]
16
16
  **createdAt** | **string** | When the order was created. | [optional] [default to undefined]
@@ -0,0 +1,32 @@
1
+ # OrderImport
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **importId** | **string** | Unique object identifier | [default to undefined]
9
+ **status** | [**OrderImportStatus**](OrderImportStatus.md) | | [default to undefined]
10
+ **counts** | [**OrderImportCounts**](OrderImportCounts.md) | | [default to undefined]
11
+ **createdAt** | **string** | ISO 8601 Timestamp | [default to undefined]
12
+ **cancelledAt** | **string** | | [optional] [default to undefined]
13
+ **startedAt** | **string** | | [optional] [default to undefined]
14
+ **finishedAt** | **string** | | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { OrderImport } from '@teemill/orders';
20
+
21
+ const instance: OrderImport = {
22
+ importId,
23
+ status,
24
+ counts,
25
+ createdAt,
26
+ cancelledAt,
27
+ startedAt,
28
+ finishedAt,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,32 @@
1
+ # OrderImportCounts
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **total** | **number** | | [default to undefined]
9
+ **pending** | **number** | | [default to undefined]
10
+ **processing** | **number** | | [default to undefined]
11
+ **success** | **number** | | [default to undefined]
12
+ **failed** | **number** | | [default to undefined]
13
+ **cancelled** | **number** | | [default to undefined]
14
+ **completed** | **number** | | [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { OrderImportCounts } from '@teemill/orders';
20
+
21
+ const instance: OrderImportCounts = {
22
+ total,
23
+ pending,
24
+ processing,
25
+ success,
26
+ failed,
27
+ cancelled,
28
+ completed,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)