@teemill/orders 1.25.0 → 1.26.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/orders@1.25.0
1
+ ## @teemill/orders@1.26.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). 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.25.0 --save
39
+ npm install @teemill/orders@1.26.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -58,6 +58,7 @@ Class | Method | HTTP request | Description
58
58
  *OrdersApi* | [**exportOrders**](docs/OrdersApi.md#exportorders) | **GET** /v1/orders/export | Export orders
59
59
  *OrdersApi* | [**getOrder**](docs/OrdersApi.md#getorder) | **GET** /v1/orders/{orderId} | Get order
60
60
  *OrdersApi* | [**getOrders**](docs/OrdersApi.md#getorders) | **GET** /v1/orders | List orders
61
+ *OrdersApi* | [**importOrders**](docs/OrdersApi.md#importorders) | **POST** /v1/orders/import | Import orders
61
62
  *OrdersApi* | [**retryPlatformPayment**](docs/OrdersApi.md#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry
62
63
 
63
64
 
@@ -84,14 +85,15 @@ Class | Method | HTTP request | Description
84
85
  - [Fulfillment](docs/Fulfillment.md)
85
86
  - [FulfillmentItem](docs/FulfillmentItem.md)
86
87
  - [Image](docs/Image.md)
88
+ - [ImportOrders202Response](docs/ImportOrders202Response.md)
87
89
  - [Option](docs/Option.md)
88
90
  - [Order](docs/Order.md)
89
91
  - [OrderItem](docs/OrderItem.md)
92
+ - [OrderPaymentMethod](docs/OrderPaymentMethod.md)
90
93
  - [OrderTracking](docs/OrderTracking.md)
91
94
  - [OrdersResponse](docs/OrdersResponse.md)
92
95
  - [Origin](docs/Origin.md)
93
96
  - [PaymentAttempt](docs/PaymentAttempt.md)
94
- - [PaymentMethod](docs/PaymentMethod.md)
95
97
  - [Price](docs/Price.md)
96
98
  - [ProductUnavailableError](docs/ProductUnavailableError.md)
97
99
  - [RecipientCost](docs/RecipientCost.md)
package/api.ts 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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -371,6 +371,12 @@ export interface Image {
371
371
  */
372
372
  'sortOrder'?: number;
373
373
  }
374
+ export interface ImportOrders202Response {
375
+ /**
376
+ * Id of the order import
377
+ */
378
+ 'importId'?: string;
379
+ }
374
380
  export interface Option {
375
381
  /**
376
382
  * Option name
@@ -398,7 +404,7 @@ export interface Order {
398
404
  */
399
405
  'status'?: Status;
400
406
  'contactInformation': ContactInformation;
401
- 'paymentMethod'?: PaymentMethod;
407
+ 'paymentMethod'?: OrderPaymentMethod;
402
408
  /**
403
409
  * The address the order will be shipped to.
404
410
  */
@@ -513,6 +519,15 @@ export interface OrderItem {
513
519
  */
514
520
  'recipientCost'?: Price;
515
521
  }
522
+ /**
523
+ * The payment method used for this order.
524
+ */
525
+ export interface OrderPaymentMethod {
526
+ /**
527
+ * The type of payment method used.
528
+ */
529
+ 'type'?: string | null;
530
+ }
516
531
  /**
517
532
  * Shipment tracking information. Available once the fulfillment has been dispatched.
518
533
  */
@@ -589,15 +604,6 @@ export const PaymentAttemptStatusEnum = {
589
604
 
590
605
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
591
606
 
592
- /**
593
- * The payment method used for this order.
594
- */
595
- export interface PaymentMethod {
596
- /**
597
- * The type of payment method used.
598
- */
599
- 'type'?: string | null;
600
- }
601
607
  /**
602
608
  * A monetary value with its currency.
603
609
  */
@@ -1215,6 +1221,60 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1215
1221
  options: localVarRequestOptions,
1216
1222
  };
1217
1223
  },
1224
+ /**
1225
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1226
+ * @summary Import orders
1227
+ * @param {string} project The project identifier to scope the request to.
1228
+ * @param {File} file CSV file containing order data
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ */
1232
+ importOrders: async (project: string, file: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1233
+ // verify required parameter 'project' is not null or undefined
1234
+ assertParamExists('importOrders', 'project', project)
1235
+ // verify required parameter 'file' is not null or undefined
1236
+ assertParamExists('importOrders', 'file', file)
1237
+ const localVarPath = `/v1/orders/import`;
1238
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1239
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1240
+ let baseOptions;
1241
+ if (configuration) {
1242
+ baseOptions = configuration.baseOptions;
1243
+ }
1244
+
1245
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1246
+ const localVarHeaderParameter = {} as any;
1247
+ const localVarQueryParameter = {} as any;
1248
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1249
+
1250
+ // authentication session-oauth required
1251
+ // oauth required
1252
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1253
+
1254
+ // authentication api-key required
1255
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1256
+
1257
+ if (project !== undefined) {
1258
+ localVarQueryParameter['project'] = project;
1259
+ }
1260
+
1261
+
1262
+ if (file !== undefined) {
1263
+ localVarFormParams.append('file', file as any);
1264
+ }
1265
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1266
+ localVarHeaderParameter['Accept'] = 'application/json';
1267
+
1268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1270
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1271
+ localVarRequestOptions.data = localVarFormParams;
1272
+
1273
+ return {
1274
+ url: toPathString(localVarUrlObj),
1275
+ options: localVarRequestOptions,
1276
+ };
1277
+ },
1218
1278
  /**
1219
1279
  * Retries failed platform payment, so fulfillment can proceed.
1220
1280
  * @summary Retry
@@ -1390,6 +1450,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1390
1450
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrders']?.[localVarOperationServerIndex]?.url;
1391
1451
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1392
1452
  },
1453
+ /**
1454
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1455
+ * @summary Import orders
1456
+ * @param {string} project The project identifier to scope the request to.
1457
+ * @param {File} file CSV file containing order data
1458
+ * @param {*} [options] Override http request option.
1459
+ * @throws {RequiredError}
1460
+ */
1461
+ async importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>> {
1462
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importOrders(project, file, options);
1463
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1464
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.importOrders']?.[localVarOperationServerIndex]?.url;
1465
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1466
+ },
1393
1467
  /**
1394
1468
  * Retries failed platform payment, so fulfillment can proceed.
1395
1469
  * @summary Retry
@@ -1484,6 +1558,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1484
1558
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse> {
1485
1559
  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));
1486
1560
  },
1561
+ /**
1562
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1563
+ * @summary Import orders
1564
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1565
+ * @param {*} [options] Override http request option.
1566
+ * @throws {RequiredError}
1567
+ */
1568
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response> {
1569
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
1570
+ },
1487
1571
  /**
1488
1572
  * Retries failed platform payment, so fulfillment can proceed.
1489
1573
  * @summary Retry
@@ -1677,6 +1761,21 @@ export interface OrdersApiGetOrdersRequest {
1677
1761
  readonly dateFilterType?: GetOrdersDateFilterTypeEnum
1678
1762
  }
1679
1763
 
1764
+ /**
1765
+ * Request parameters for importOrders operation in OrdersApi.
1766
+ */
1767
+ export interface OrdersApiImportOrdersRequest {
1768
+ /**
1769
+ * The project identifier to scope the request to.
1770
+ */
1771
+ readonly project: string
1772
+
1773
+ /**
1774
+ * CSV file containing order data
1775
+ */
1776
+ readonly file: File
1777
+ }
1778
+
1680
1779
  /**
1681
1780
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1682
1781
  */
@@ -1778,6 +1877,17 @@ export class OrdersApi extends BaseAPI {
1778
1877
  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));
1779
1878
  }
1780
1879
 
1880
+ /**
1881
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1882
+ * @summary Import orders
1883
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1884
+ * @param {*} [options] Override http request option.
1885
+ * @throws {RequiredError}
1886
+ */
1887
+ public importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig) {
1888
+ return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
1889
+ }
1890
+
1781
1891
  /**
1782
1892
  * Retries failed platform payment, so fulfillment can proceed.
1783
1893
  * @summary Retry
package/base.ts 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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts 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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -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.26.0
7
7
  *
8
8
  *
9
9
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/api.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.26.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -352,6 +352,12 @@ export interface Image {
352
352
  */
353
353
  'sortOrder'?: number;
354
354
  }
355
+ export interface ImportOrders202Response {
356
+ /**
357
+ * Id of the order import
358
+ */
359
+ 'importId'?: string;
360
+ }
355
361
  export interface Option {
356
362
  /**
357
363
  * Option name
@@ -379,7 +385,7 @@ export interface Order {
379
385
  */
380
386
  'status'?: Status;
381
387
  'contactInformation': ContactInformation;
382
- 'paymentMethod'?: PaymentMethod;
388
+ 'paymentMethod'?: OrderPaymentMethod;
383
389
  /**
384
390
  * The address the order will be shipped to.
385
391
  */
@@ -492,6 +498,15 @@ export interface OrderItem {
492
498
  */
493
499
  'recipientCost'?: Price;
494
500
  }
501
+ /**
502
+ * The payment method used for this order.
503
+ */
504
+ export interface OrderPaymentMethod {
505
+ /**
506
+ * The type of payment method used.
507
+ */
508
+ 'type'?: string | null;
509
+ }
495
510
  /**
496
511
  * Shipment tracking information. Available once the fulfillment has been dispatched.
497
512
  */
@@ -564,15 +579,6 @@ export declare const PaymentAttemptStatusEnum: {
564
579
  readonly Cancelled: "cancelled";
565
580
  };
566
581
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
567
- /**
568
- * The payment method used for this order.
569
- */
570
- export interface PaymentMethod {
571
- /**
572
- * The type of payment method used.
573
- */
574
- 'type'?: string | null;
575
- }
576
582
  /**
577
583
  * A monetary value with its currency.
578
584
  */
@@ -832,6 +838,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
832
838
  * @throws {RequiredError}
833
839
  */
834
840
  getOrders: (project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
841
+ /**
842
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
843
+ * @summary Import orders
844
+ * @param {string} project The project identifier to scope the request to.
845
+ * @param {File} file CSV file containing order data
846
+ * @param {*} [options] Override http request option.
847
+ * @throws {RequiredError}
848
+ */
849
+ importOrders: (project: string, file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
835
850
  /**
836
851
  * Retries failed platform payment, so fulfillment can proceed.
837
852
  * @summary Retry
@@ -925,6 +940,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
925
940
  * @throws {RequiredError}
926
941
  */
927
942
  getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>>;
943
+ /**
944
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
945
+ * @summary Import orders
946
+ * @param {string} project The project identifier to scope the request to.
947
+ * @param {File} file CSV file containing order data
948
+ * @param {*} [options] Override http request option.
949
+ * @throws {RequiredError}
950
+ */
951
+ importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>>;
928
952
  /**
929
953
  * Retries failed platform payment, so fulfillment can proceed.
930
954
  * @summary Retry
@@ -996,6 +1020,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
996
1020
  * @throws {RequiredError}
997
1021
  */
998
1022
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse>;
1023
+ /**
1024
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1025
+ * @summary Import orders
1026
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1027
+ * @param {*} [options] Override http request option.
1028
+ * @throws {RequiredError}
1029
+ */
1030
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response>;
999
1031
  /**
1000
1032
  * Retries failed platform payment, so fulfillment can proceed.
1001
1033
  * @summary Retry
@@ -1156,6 +1188,19 @@ export interface OrdersApiGetOrdersRequest {
1156
1188
  */
1157
1189
  readonly dateFilterType?: GetOrdersDateFilterTypeEnum;
1158
1190
  }
1191
+ /**
1192
+ * Request parameters for importOrders operation in OrdersApi.
1193
+ */
1194
+ export interface OrdersApiImportOrdersRequest {
1195
+ /**
1196
+ * The project identifier to scope the request to.
1197
+ */
1198
+ readonly project: string;
1199
+ /**
1200
+ * CSV file containing order data
1201
+ */
1202
+ readonly file: File;
1203
+ }
1159
1204
  /**
1160
1205
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1161
1206
  */
@@ -1233,6 +1278,14 @@ export declare class OrdersApi extends BaseAPI {
1233
1278
  * @throws {RequiredError}
1234
1279
  */
1235
1280
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersResponse, any, {}>>;
1281
+ /**
1282
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1283
+ * @summary Import orders
1284
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1285
+ * @param {*} [options] Override http request option.
1286
+ * @throws {RequiredError}
1287
+ */
1288
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportOrders202Response, any, {}>>;
1236
1289
  /**
1237
1290
  * Retries failed platform payment, so fulfillment can proceed.
1238
1291
  * @summary Retry
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
7
7
  *
8
- * The version of the OpenAPI document: 1.25.0
8
+ * The version of the OpenAPI document: 1.26.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -434,6 +434,52 @@ const OrdersApiAxiosParamCreator = function (configuration) {
434
434
  options: localVarRequestOptions,
435
435
  };
436
436
  }),
437
+ /**
438
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
439
+ * @summary Import orders
440
+ * @param {string} project The project identifier to scope the request to.
441
+ * @param {File} file CSV file containing order data
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ importOrders: (project_1, file_1, ...args_1) => __awaiter(this, [project_1, file_1, ...args_1], void 0, function* (project, file, options = {}) {
446
+ // verify required parameter 'project' is not null or undefined
447
+ (0, common_1.assertParamExists)('importOrders', 'project', project);
448
+ // verify required parameter 'file' is not null or undefined
449
+ (0, common_1.assertParamExists)('importOrders', 'file', file);
450
+ const localVarPath = `/v1/orders/import`;
451
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
452
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
453
+ let baseOptions;
454
+ if (configuration) {
455
+ baseOptions = configuration.baseOptions;
456
+ }
457
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
458
+ const localVarHeaderParameter = {};
459
+ const localVarQueryParameter = {};
460
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
461
+ // authentication session-oauth required
462
+ // oauth required
463
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
464
+ // authentication api-key required
465
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
466
+ if (project !== undefined) {
467
+ localVarQueryParameter['project'] = project;
468
+ }
469
+ if (file !== undefined) {
470
+ localVarFormParams.append('file', file);
471
+ }
472
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
473
+ localVarHeaderParameter['Accept'] = 'application/json';
474
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
475
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
476
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
477
+ localVarRequestOptions.data = localVarFormParams;
478
+ return {
479
+ url: (0, common_1.toPathString)(localVarUrlObj),
480
+ options: localVarRequestOptions,
481
+ };
482
+ }),
437
483
  /**
438
484
  * Retries failed platform payment, so fulfillment can proceed.
439
485
  * @summary Retry
@@ -622,6 +668,23 @@ const OrdersApiFp = function (configuration) {
622
668
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
623
669
  });
624
670
  },
671
+ /**
672
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
673
+ * @summary Import orders
674
+ * @param {string} project The project identifier to scope the request to.
675
+ * @param {File} file CSV file containing order data
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ importOrders(project, file, options) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ var _a, _b, _c;
682
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.importOrders(project, file, options);
683
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
684
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.importOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
685
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
686
+ });
687
+ },
625
688
  /**
626
689
  * Retries failed platform payment, so fulfillment can proceed.
627
690
  * @summary Retry
@@ -719,6 +782,16 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
719
782
  getOrders(requestParameters, options) {
720
783
  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));
721
784
  },
785
+ /**
786
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
787
+ * @summary Import orders
788
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ */
792
+ importOrders(requestParameters, options) {
793
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
794
+ },
722
795
  /**
723
796
  * Retries failed platform payment, so fulfillment can proceed.
724
797
  * @summary Retry
@@ -806,6 +879,16 @@ class OrdersApi extends base_1.BaseAPI {
806
879
  getOrders(requestParameters, options) {
807
880
  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));
808
881
  }
882
+ /**
883
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
884
+ * @summary Import orders
885
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
886
+ * @param {*} [options] Override http request option.
887
+ * @throws {RequiredError}
888
+ */
889
+ importOrders(requestParameters, options) {
890
+ return (0, exports.OrdersApiFp)(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
891
+ }
809
892
  /**
810
893
  * Retries failed platform payment, so fulfillment can proceed.
811
894
  * @summary Retry
package/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.26.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/base.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
7
7
  *
8
- * The version of the OpenAPI document: 1.25.0
8
+ * The version of the OpenAPI document: 1.26.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.26.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
7
7
  *
8
- * The version of the OpenAPI document: 1.25.0
8
+ * The version of the OpenAPI document: 1.26.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
4
4
  *
5
- * The version of the OpenAPI document: 1.25.0
5
+ * The version of the OpenAPI document: 1.26.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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/api.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.26.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -352,6 +352,12 @@ export interface Image {
352
352
  */
353
353
  'sortOrder'?: number;
354
354
  }
355
+ export interface ImportOrders202Response {
356
+ /**
357
+ * Id of the order import
358
+ */
359
+ 'importId'?: string;
360
+ }
355
361
  export interface Option {
356
362
  /**
357
363
  * Option name
@@ -379,7 +385,7 @@ export interface Order {
379
385
  */
380
386
  'status'?: Status;
381
387
  'contactInformation': ContactInformation;
382
- 'paymentMethod'?: PaymentMethod;
388
+ 'paymentMethod'?: OrderPaymentMethod;
383
389
  /**
384
390
  * The address the order will be shipped to.
385
391
  */
@@ -492,6 +498,15 @@ export interface OrderItem {
492
498
  */
493
499
  'recipientCost'?: Price;
494
500
  }
501
+ /**
502
+ * The payment method used for this order.
503
+ */
504
+ export interface OrderPaymentMethod {
505
+ /**
506
+ * The type of payment method used.
507
+ */
508
+ 'type'?: string | null;
509
+ }
495
510
  /**
496
511
  * Shipment tracking information. Available once the fulfillment has been dispatched.
497
512
  */
@@ -564,15 +579,6 @@ export declare const PaymentAttemptStatusEnum: {
564
579
  readonly Cancelled: "cancelled";
565
580
  };
566
581
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
567
- /**
568
- * The payment method used for this order.
569
- */
570
- export interface PaymentMethod {
571
- /**
572
- * The type of payment method used.
573
- */
574
- 'type'?: string | null;
575
- }
576
582
  /**
577
583
  * A monetary value with its currency.
578
584
  */
@@ -832,6 +838,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
832
838
  * @throws {RequiredError}
833
839
  */
834
840
  getOrders: (project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
841
+ /**
842
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
843
+ * @summary Import orders
844
+ * @param {string} project The project identifier to scope the request to.
845
+ * @param {File} file CSV file containing order data
846
+ * @param {*} [options] Override http request option.
847
+ * @throws {RequiredError}
848
+ */
849
+ importOrders: (project: string, file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
835
850
  /**
836
851
  * Retries failed platform payment, so fulfillment can proceed.
837
852
  * @summary Retry
@@ -925,6 +940,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
925
940
  * @throws {RequiredError}
926
941
  */
927
942
  getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, dateFilterType?: GetOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>>;
943
+ /**
944
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
945
+ * @summary Import orders
946
+ * @param {string} project The project identifier to scope the request to.
947
+ * @param {File} file CSV file containing order data
948
+ * @param {*} [options] Override http request option.
949
+ * @throws {RequiredError}
950
+ */
951
+ importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>>;
928
952
  /**
929
953
  * Retries failed platform payment, so fulfillment can proceed.
930
954
  * @summary Retry
@@ -996,6 +1020,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
996
1020
  * @throws {RequiredError}
997
1021
  */
998
1022
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse>;
1023
+ /**
1024
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1025
+ * @summary Import orders
1026
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1027
+ * @param {*} [options] Override http request option.
1028
+ * @throws {RequiredError}
1029
+ */
1030
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response>;
999
1031
  /**
1000
1032
  * Retries failed platform payment, so fulfillment can proceed.
1001
1033
  * @summary Retry
@@ -1156,6 +1188,19 @@ export interface OrdersApiGetOrdersRequest {
1156
1188
  */
1157
1189
  readonly dateFilterType?: GetOrdersDateFilterTypeEnum;
1158
1190
  }
1191
+ /**
1192
+ * Request parameters for importOrders operation in OrdersApi.
1193
+ */
1194
+ export interface OrdersApiImportOrdersRequest {
1195
+ /**
1196
+ * The project identifier to scope the request to.
1197
+ */
1198
+ readonly project: string;
1199
+ /**
1200
+ * CSV file containing order data
1201
+ */
1202
+ readonly file: File;
1203
+ }
1159
1204
  /**
1160
1205
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1161
1206
  */
@@ -1233,6 +1278,14 @@ export declare class OrdersApi extends BaseAPI {
1233
1278
  * @throws {RequiredError}
1234
1279
  */
1235
1280
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersResponse, any, {}>>;
1281
+ /**
1282
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
1283
+ * @summary Import orders
1284
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1285
+ * @param {*} [options] Override http request option.
1286
+ * @throws {RequiredError}
1287
+ */
1288
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportOrders202Response, any, {}>>;
1236
1289
  /**
1237
1290
  * Retries failed platform payment, so fulfillment can proceed.
1238
1291
  * @summary Retry
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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -431,6 +431,52 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
431
431
  options: localVarRequestOptions,
432
432
  };
433
433
  }),
434
+ /**
435
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
436
+ * @summary Import orders
437
+ * @param {string} project The project identifier to scope the request to.
438
+ * @param {File} file CSV file containing order data
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ importOrders: (project_1, file_1, ...args_1) => __awaiter(this, [project_1, file_1, ...args_1], void 0, function* (project, file, options = {}) {
443
+ // verify required parameter 'project' is not null or undefined
444
+ assertParamExists('importOrders', 'project', project);
445
+ // verify required parameter 'file' is not null or undefined
446
+ assertParamExists('importOrders', 'file', file);
447
+ const localVarPath = `/v1/orders/import`;
448
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
449
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
450
+ let baseOptions;
451
+ if (configuration) {
452
+ baseOptions = configuration.baseOptions;
453
+ }
454
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
455
+ const localVarHeaderParameter = {};
456
+ const localVarQueryParameter = {};
457
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
458
+ // authentication session-oauth required
459
+ // oauth required
460
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
461
+ // authentication api-key required
462
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
463
+ if (project !== undefined) {
464
+ localVarQueryParameter['project'] = project;
465
+ }
466
+ if (file !== undefined) {
467
+ localVarFormParams.append('file', file);
468
+ }
469
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
470
+ localVarHeaderParameter['Accept'] = 'application/json';
471
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
472
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
473
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
474
+ localVarRequestOptions.data = localVarFormParams;
475
+ return {
476
+ url: toPathString(localVarUrlObj),
477
+ options: localVarRequestOptions,
478
+ };
479
+ }),
434
480
  /**
435
481
  * Retries failed platform payment, so fulfillment can proceed.
436
482
  * @summary Retry
@@ -618,6 +664,23 @@ export const OrdersApiFp = function (configuration) {
618
664
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
619
665
  });
620
666
  },
667
+ /**
668
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
669
+ * @summary Import orders
670
+ * @param {string} project The project identifier to scope the request to.
671
+ * @param {File} file CSV file containing order data
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ */
675
+ importOrders(project, file, options) {
676
+ return __awaiter(this, void 0, void 0, function* () {
677
+ var _a, _b, _c;
678
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.importOrders(project, file, options);
679
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
680
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.importOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
681
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
682
+ });
683
+ },
621
684
  /**
622
685
  * Retries failed platform payment, so fulfillment can proceed.
623
686
  * @summary Retry
@@ -714,6 +777,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
714
777
  getOrders(requestParameters, options) {
715
778
  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
779
  },
780
+ /**
781
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
782
+ * @summary Import orders
783
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
784
+ * @param {*} [options] Override http request option.
785
+ * @throws {RequiredError}
786
+ */
787
+ importOrders(requestParameters, options) {
788
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
789
+ },
717
790
  /**
718
791
  * Retries failed platform payment, so fulfillment can proceed.
719
792
  * @summary Retry
@@ -800,6 +873,16 @@ export class OrdersApi extends BaseAPI {
800
873
  getOrders(requestParameters, options) {
801
874
  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
875
  }
876
+ /**
877
+ * Initiates an order import from a CSV file. The import is processed asynchronously.
878
+ * @summary Import orders
879
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
880
+ * @param {*} [options] Override http request option.
881
+ * @throws {RequiredError}
882
+ */
883
+ importOrders(requestParameters, options) {
884
+ return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
885
+ }
803
886
  /**
804
887
  * Retries failed platform payment, so fulfillment can proceed.
805
888
  * @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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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** | Id of the order import | [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,21 @@
1
+ # OrderPaymentMethod
2
+
3
+ The payment method used for this order.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **type** | **string** | The type of payment method used. | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { OrderPaymentMethod } from '@teemill/orders';
15
+
16
+ const instance: OrderPaymentMethod = {
17
+ type,
18
+ };
19
+ ```
20
+
21
+ [[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/OrdersApi.md CHANGED
@@ -11,6 +11,7 @@ All URIs are relative to *https://api.localhost:8080*
11
11
  |[**exportOrders**](#exportorders) | **GET** /v1/orders/export | Export orders|
12
12
  |[**getOrder**](#getorder) | **GET** /v1/orders/{orderId} | Get order|
13
13
  |[**getOrders**](#getorders) | **GET** /v1/orders | List orders|
14
+ |[**importOrders**](#importorders) | **POST** /v1/orders/import | Import orders|
14
15
  |[**retryPlatformPayment**](#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry|
15
16
 
16
17
  # **cancelOrder**
@@ -472,6 +473,65 @@ const { status, data } = await apiInstance.getOrders(
472
473
 
473
474
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
474
475
 
476
+ # **importOrders**
477
+ > ImportOrders202Response importOrders()
478
+
479
+ Initiates an order import from a CSV file. The import is processed asynchronously.
480
+
481
+ ### Example
482
+
483
+ ```typescript
484
+ import {
485
+ OrdersApi,
486
+ Configuration
487
+ } from '@teemill/orders';
488
+
489
+ const configuration = new Configuration();
490
+ const apiInstance = new OrdersApi(configuration);
491
+
492
+ let project: string; //The project identifier to scope the request to. (default to undefined)
493
+ let file: File; //CSV file containing order data (default to undefined)
494
+
495
+ const { status, data } = await apiInstance.importOrders(
496
+ project,
497
+ file
498
+ );
499
+ ```
500
+
501
+ ### Parameters
502
+
503
+ |Name | Type | Description | Notes|
504
+ |------------- | ------------- | ------------- | -------------|
505
+ | **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
506
+ | **file** | [**File**] | CSV file containing order data | defaults to undefined|
507
+
508
+
509
+ ### Return type
510
+
511
+ **ImportOrders202Response**
512
+
513
+ ### Authorization
514
+
515
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
516
+
517
+ ### HTTP request headers
518
+
519
+ - **Content-Type**: multipart/form-data
520
+ - **Accept**: application/json
521
+
522
+
523
+ ### HTTP response details
524
+ | Status code | Description | Response headers |
525
+ |-------------|-------------|------------------|
526
+ |**202** | CSV file was accepted; orders will be imported asynchronously. | - |
527
+ |**400** | Failed validation | - |
528
+ |**401** | Not authorised to access this resource | - |
529
+ |**403** | Refuse to authorize | - |
530
+ |**404** | Resource not found | - |
531
+ |**500** | Unknown server error | - |
532
+
533
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
534
+
475
535
  # **retryPlatformPayment**
476
536
  > Order retryPlatformPayment()
477
537
 
package/index.ts 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.26.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/orders",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "OpenAPI client for @teemill/orders",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {