@teemill/orders 1.19.2 → 1.20.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.19.2
1
+ ## @teemill/orders@1.20.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.19.2 --save
39
+ npm install @teemill/orders@1.20.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,7 @@ Class | Method | HTTP request | Description
54
54
  *OrdersApi* | [**cancelOrder**](docs/OrdersApi.md#cancelorder) | **DELETE** /v1/orders/{orderId} | Cancel order
55
55
  *OrdersApi* | [**confirmOrder**](docs/OrdersApi.md#confirmorder) | **POST** /v1/orders/{orderId}/confirm | Confirm order
56
56
  *OrdersApi* | [**createOrder**](docs/OrdersApi.md#createorder) | **POST** /v1/orders | Create order
57
+ *OrdersApi* | [**downloadInvoice**](docs/OrdersApi.md#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice
57
58
  *OrdersApi* | [**exportOrders**](docs/OrdersApi.md#exportorders) | **GET** /v1/orders/export | Export orders
58
59
  *OrdersApi* | [**getOrder**](docs/OrdersApi.md#getorder) | **GET** /v1/orders/{orderId} | Get order
59
60
  *OrdersApi* | [**getOrders**](docs/OrdersApi.md#getorders) | **GET** /v1/orders | List orders
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.19.2
7
+ * The version of the OpenAPI document: 1.20.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1216,6 +1216,54 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1216
1216
  options: localVarRequestOptions,
1217
1217
  };
1218
1218
  },
1219
+ /**
1220
+ * Download an order invoice.
1221
+ * @summary Download order invoice
1222
+ * @param {string} project What project it is
1223
+ * @param {string} orderId Unique identifier of an order
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ downloadInvoice: async (project: string, orderId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1228
+ // verify required parameter 'project' is not null or undefined
1229
+ assertParamExists('downloadInvoice', 'project', project)
1230
+ // verify required parameter 'orderId' is not null or undefined
1231
+ assertParamExists('downloadInvoice', 'orderId', orderId)
1232
+ const localVarPath = `/v1/orders/{orderId}/invoice`
1233
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
1234
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1235
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1236
+ let baseOptions;
1237
+ if (configuration) {
1238
+ baseOptions = configuration.baseOptions;
1239
+ }
1240
+
1241
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1242
+ const localVarHeaderParameter = {} as any;
1243
+ const localVarQueryParameter = {} as any;
1244
+
1245
+ // authentication session-oauth required
1246
+ // oauth required
1247
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1248
+
1249
+ // authentication api-key required
1250
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1251
+
1252
+ if (project !== undefined) {
1253
+ localVarQueryParameter['project'] = project;
1254
+ }
1255
+
1256
+
1257
+
1258
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1259
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1260
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1261
+
1262
+ return {
1263
+ url: toPathString(localVarUrlObj),
1264
+ options: localVarRequestOptions,
1265
+ };
1266
+ },
1219
1267
  /**
1220
1268
  * Export orders as a CSV file
1221
1269
  * @summary Export orders
@@ -1536,6 +1584,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1536
1584
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.createOrder']?.[localVarOperationServerIndex]?.url;
1537
1585
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1538
1586
  },
1587
+ /**
1588
+ * Download an order invoice.
1589
+ * @summary Download order invoice
1590
+ * @param {string} project What project it is
1591
+ * @param {string} orderId Unique identifier of an order
1592
+ * @param {*} [options] Override http request option.
1593
+ * @throws {RequiredError}
1594
+ */
1595
+ async downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
1596
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
1597
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1598
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.downloadInvoice']?.[localVarOperationServerIndex]?.url;
1599
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1600
+ },
1539
1601
  /**
1540
1602
  * Export orders as a CSV file
1541
1603
  * @summary Export orders
@@ -1644,6 +1706,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1644
1706
  createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order> {
1645
1707
  return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
1646
1708
  },
1709
+ /**
1710
+ * Download an order invoice.
1711
+ * @summary Download order invoice
1712
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
1713
+ * @param {*} [options] Override http request option.
1714
+ * @throws {RequiredError}
1715
+ */
1716
+ downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
1717
+ return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
1718
+ },
1647
1719
  /**
1648
1720
  * Export orders as a CSV file
1649
1721
  * @summary Export orders
@@ -1778,6 +1850,27 @@ export interface OrdersApiCreateOrderRequest {
1778
1850
  readonly fields?: string
1779
1851
  }
1780
1852
 
1853
+ /**
1854
+ * Request parameters for downloadInvoice operation in OrdersApi.
1855
+ * @export
1856
+ * @interface OrdersApiDownloadInvoiceRequest
1857
+ */
1858
+ export interface OrdersApiDownloadInvoiceRequest {
1859
+ /**
1860
+ * What project it is
1861
+ * @type {string}
1862
+ * @memberof OrdersApiDownloadInvoice
1863
+ */
1864
+ readonly project: string
1865
+
1866
+ /**
1867
+ * Unique identifier of an order
1868
+ * @type {string}
1869
+ * @memberof OrdersApiDownloadInvoice
1870
+ */
1871
+ readonly orderId: string
1872
+ }
1873
+
1781
1874
  /**
1782
1875
  * Request parameters for exportOrders operation in OrdersApi.
1783
1876
  * @export
@@ -1989,6 +2082,18 @@ export class OrdersApi extends BaseAPI {
1989
2082
  return OrdersApiFp(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
1990
2083
  }
1991
2084
 
2085
+ /**
2086
+ * Download an order invoice.
2087
+ * @summary Download order invoice
2088
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
2089
+ * @param {*} [options] Override http request option.
2090
+ * @throws {RequiredError}
2091
+ * @memberof OrdersApi
2092
+ */
2093
+ public downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig) {
2094
+ return OrdersApiFp(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
2095
+ }
2096
+
1992
2097
  /**
1993
2098
  * Export orders as a CSV file
1994
2099
  * @summary Export orders
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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2
7
+ * The version of the OpenAPI document: 1.20.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.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.19.2
7
+ * The version of the OpenAPI document: 1.20.0
8
8
  *
9
9
  *
10
10
  * 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.19.2
5
+ * The version of the OpenAPI document: 1.20.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1048,6 +1048,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
1048
1048
  * @throws {RequiredError}
1049
1049
  */
1050
1050
  createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1051
+ /**
1052
+ * Download an order invoice.
1053
+ * @summary Download order invoice
1054
+ * @param {string} project What project it is
1055
+ * @param {string} orderId Unique identifier of an order
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ */
1059
+ downloadInvoice: (project: string, orderId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1051
1060
  /**
1052
1061
  * Export orders as a CSV file
1053
1062
  * @summary Export orders
@@ -1133,6 +1142,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
1133
1142
  * @throws {RequiredError}
1134
1143
  */
1135
1144
  createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
1145
+ /**
1146
+ * Download an order invoice.
1147
+ * @summary Download order invoice
1148
+ * @param {string} project What project it is
1149
+ * @param {string} orderId Unique identifier of an order
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
1136
1154
  /**
1137
1155
  * Export orders as a CSV file
1138
1156
  * @summary Export orders
@@ -1211,6 +1229,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
1211
1229
  * @throws {RequiredError}
1212
1230
  */
1213
1231
  createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order>;
1232
+ /**
1233
+ * Download an order invoice.
1234
+ * @summary Download order invoice
1235
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
1214
1240
  /**
1215
1241
  * Export orders as a CSV file
1216
1242
  * @summary Export orders
@@ -1325,6 +1351,25 @@ export interface OrdersApiCreateOrderRequest {
1325
1351
  */
1326
1352
  readonly fields?: string;
1327
1353
  }
1354
+ /**
1355
+ * Request parameters for downloadInvoice operation in OrdersApi.
1356
+ * @export
1357
+ * @interface OrdersApiDownloadInvoiceRequest
1358
+ */
1359
+ export interface OrdersApiDownloadInvoiceRequest {
1360
+ /**
1361
+ * What project it is
1362
+ * @type {string}
1363
+ * @memberof OrdersApiDownloadInvoice
1364
+ */
1365
+ readonly project: string;
1366
+ /**
1367
+ * Unique identifier of an order
1368
+ * @type {string}
1369
+ * @memberof OrdersApiDownloadInvoice
1370
+ */
1371
+ readonly orderId: string;
1372
+ }
1328
1373
  /**
1329
1374
  * Request parameters for exportOrders operation in OrdersApi.
1330
1375
  * @export
@@ -1507,6 +1552,15 @@ export declare class OrdersApi extends BaseAPI {
1507
1552
  * @memberof OrdersApi
1508
1553
  */
1509
1554
  createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
1555
+ /**
1556
+ * Download an order invoice.
1557
+ * @summary Download order invoice
1558
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
1559
+ * @param {*} [options] Override http request option.
1560
+ * @throws {RequiredError}
1561
+ * @memberof OrdersApi
1562
+ */
1563
+ downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any>>;
1510
1564
  /**
1511
1565
  * Export orders as a CSV file
1512
1566
  * @summary Export orders
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.19.2
8
+ * The version of the OpenAPI document: 1.20.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -206,6 +206,46 @@ const OrdersApiAxiosParamCreator = function (configuration) {
206
206
  options: localVarRequestOptions,
207
207
  };
208
208
  }),
209
+ /**
210
+ * Download an order invoice.
211
+ * @summary Download order invoice
212
+ * @param {string} project What project it is
213
+ * @param {string} orderId Unique identifier of an order
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ downloadInvoice: (project_1, orderId_1, ...args_1) => __awaiter(this, [project_1, orderId_1, ...args_1], void 0, function* (project, orderId, options = {}) {
218
+ // verify required parameter 'project' is not null or undefined
219
+ (0, common_1.assertParamExists)('downloadInvoice', 'project', project);
220
+ // verify required parameter 'orderId' is not null or undefined
221
+ (0, common_1.assertParamExists)('downloadInvoice', 'orderId', orderId);
222
+ const localVarPath = `/v1/orders/{orderId}/invoice`
223
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
224
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
225
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
226
+ let baseOptions;
227
+ if (configuration) {
228
+ baseOptions = configuration.baseOptions;
229
+ }
230
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
231
+ const localVarHeaderParameter = {};
232
+ const localVarQueryParameter = {};
233
+ // authentication session-oauth required
234
+ // oauth required
235
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
236
+ // authentication api-key required
237
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
238
+ if (project !== undefined) {
239
+ localVarQueryParameter['project'] = project;
240
+ }
241
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
242
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
243
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
244
+ return {
245
+ url: (0, common_1.toPathString)(localVarUrlObj),
246
+ options: localVarRequestOptions,
247
+ };
248
+ }),
209
249
  /**
210
250
  * Export orders as a CSV file
211
251
  * @summary Export orders
@@ -489,6 +529,23 @@ const OrdersApiFp = function (configuration) {
489
529
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
490
530
  });
491
531
  },
532
+ /**
533
+ * Download an order invoice.
534
+ * @summary Download order invoice
535
+ * @param {string} project What project it is
536
+ * @param {string} orderId Unique identifier of an order
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ downloadInvoice(project, orderId, options) {
541
+ return __awaiter(this, void 0, void 0, function* () {
542
+ var _a, _b, _c;
543
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
544
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
545
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.downloadInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
546
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
547
+ });
548
+ },
492
549
  /**
493
550
  * Export orders as a CSV file
494
551
  * @summary Export orders
@@ -609,6 +666,16 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
609
666
  createOrder(requestParameters, options) {
610
667
  return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
611
668
  },
669
+ /**
670
+ * Download an order invoice.
671
+ * @summary Download order invoice
672
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ downloadInvoice(requestParameters, options) {
677
+ return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
678
+ },
612
679
  /**
613
680
  * Export orders as a CSV file
614
681
  * @summary Export orders
@@ -692,6 +759,17 @@ class OrdersApi extends base_1.BaseAPI {
692
759
  createOrder(requestParameters, options) {
693
760
  return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
694
761
  }
762
+ /**
763
+ * Download an order invoice.
764
+ * @summary Download order invoice
765
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ * @memberof OrdersApi
769
+ */
770
+ downloadInvoice(requestParameters, options) {
771
+ return (0, exports.OrdersApiFp)(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
772
+ }
695
773
  /**
696
774
  * Export orders as a CSV file
697
775
  * @summary Export orders
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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
8
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
8
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
7
7
  *
8
- * The version of the OpenAPI document: 1.19.2
8
+ * The version of the OpenAPI document: 1.20.0
9
9
  *
10
10
  *
11
11
  * 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.19.2
5
+ * The version of the OpenAPI document: 1.20.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1048,6 +1048,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
1048
1048
  * @throws {RequiredError}
1049
1049
  */
1050
1050
  createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1051
+ /**
1052
+ * Download an order invoice.
1053
+ * @summary Download order invoice
1054
+ * @param {string} project What project it is
1055
+ * @param {string} orderId Unique identifier of an order
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ */
1059
+ downloadInvoice: (project: string, orderId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1051
1060
  /**
1052
1061
  * Export orders as a CSV file
1053
1062
  * @summary Export orders
@@ -1133,6 +1142,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
1133
1142
  * @throws {RequiredError}
1134
1143
  */
1135
1144
  createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
1145
+ /**
1146
+ * Download an order invoice.
1147
+ * @summary Download order invoice
1148
+ * @param {string} project What project it is
1149
+ * @param {string} orderId Unique identifier of an order
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
1136
1154
  /**
1137
1155
  * Export orders as a CSV file
1138
1156
  * @summary Export orders
@@ -1211,6 +1229,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
1211
1229
  * @throws {RequiredError}
1212
1230
  */
1213
1231
  createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order>;
1232
+ /**
1233
+ * Download an order invoice.
1234
+ * @summary Download order invoice
1235
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
1214
1240
  /**
1215
1241
  * Export orders as a CSV file
1216
1242
  * @summary Export orders
@@ -1325,6 +1351,25 @@ export interface OrdersApiCreateOrderRequest {
1325
1351
  */
1326
1352
  readonly fields?: string;
1327
1353
  }
1354
+ /**
1355
+ * Request parameters for downloadInvoice operation in OrdersApi.
1356
+ * @export
1357
+ * @interface OrdersApiDownloadInvoiceRequest
1358
+ */
1359
+ export interface OrdersApiDownloadInvoiceRequest {
1360
+ /**
1361
+ * What project it is
1362
+ * @type {string}
1363
+ * @memberof OrdersApiDownloadInvoice
1364
+ */
1365
+ readonly project: string;
1366
+ /**
1367
+ * Unique identifier of an order
1368
+ * @type {string}
1369
+ * @memberof OrdersApiDownloadInvoice
1370
+ */
1371
+ readonly orderId: string;
1372
+ }
1328
1373
  /**
1329
1374
  * Request parameters for exportOrders operation in OrdersApi.
1330
1375
  * @export
@@ -1507,6 +1552,15 @@ export declare class OrdersApi extends BaseAPI {
1507
1552
  * @memberof OrdersApi
1508
1553
  */
1509
1554
  createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
1555
+ /**
1556
+ * Download an order invoice.
1557
+ * @summary Download order invoice
1558
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
1559
+ * @param {*} [options] Override http request option.
1560
+ * @throws {RequiredError}
1561
+ * @memberof OrdersApi
1562
+ */
1563
+ downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any>>;
1510
1564
  /**
1511
1565
  * Export orders as a CSV file
1512
1566
  * @summary Export orders
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.19.2
7
+ * The version of the OpenAPI document: 1.20.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -203,6 +203,46 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
203
203
  options: localVarRequestOptions,
204
204
  };
205
205
  }),
206
+ /**
207
+ * Download an order invoice.
208
+ * @summary Download order invoice
209
+ * @param {string} project What project it is
210
+ * @param {string} orderId Unique identifier of an order
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ downloadInvoice: (project_1, orderId_1, ...args_1) => __awaiter(this, [project_1, orderId_1, ...args_1], void 0, function* (project, orderId, options = {}) {
215
+ // verify required parameter 'project' is not null or undefined
216
+ assertParamExists('downloadInvoice', 'project', project);
217
+ // verify required parameter 'orderId' is not null or undefined
218
+ assertParamExists('downloadInvoice', 'orderId', orderId);
219
+ const localVarPath = `/v1/orders/{orderId}/invoice`
220
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
221
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
222
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
223
+ let baseOptions;
224
+ if (configuration) {
225
+ baseOptions = configuration.baseOptions;
226
+ }
227
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
228
+ const localVarHeaderParameter = {};
229
+ const localVarQueryParameter = {};
230
+ // authentication session-oauth required
231
+ // oauth required
232
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
233
+ // authentication api-key required
234
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
235
+ if (project !== undefined) {
236
+ localVarQueryParameter['project'] = project;
237
+ }
238
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
239
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
240
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
241
+ return {
242
+ url: toPathString(localVarUrlObj),
243
+ options: localVarRequestOptions,
244
+ };
245
+ }),
206
246
  /**
207
247
  * Export orders as a CSV file
208
248
  * @summary Export orders
@@ -485,6 +525,23 @@ export const OrdersApiFp = function (configuration) {
485
525
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
486
526
  });
487
527
  },
528
+ /**
529
+ * Download an order invoice.
530
+ * @summary Download order invoice
531
+ * @param {string} project What project it is
532
+ * @param {string} orderId Unique identifier of an order
533
+ * @param {*} [options] Override http request option.
534
+ * @throws {RequiredError}
535
+ */
536
+ downloadInvoice(project, orderId, options) {
537
+ return __awaiter(this, void 0, void 0, function* () {
538
+ var _a, _b, _c;
539
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
540
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
541
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.downloadInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
542
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
543
+ });
544
+ },
488
545
  /**
489
546
  * Export orders as a CSV file
490
547
  * @summary Export orders
@@ -604,6 +661,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
604
661
  createOrder(requestParameters, options) {
605
662
  return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
606
663
  },
664
+ /**
665
+ * Download an order invoice.
666
+ * @summary Download order invoice
667
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ */
671
+ downloadInvoice(requestParameters, options) {
672
+ return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
673
+ },
607
674
  /**
608
675
  * Export orders as a CSV file
609
676
  * @summary Export orders
@@ -686,6 +753,17 @@ export class OrdersApi extends BaseAPI {
686
753
  createOrder(requestParameters, options) {
687
754
  return OrdersApiFp(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
688
755
  }
756
+ /**
757
+ * Download an order invoice.
758
+ * @summary Download order invoice
759
+ * @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
760
+ * @param {*} [options] Override http request option.
761
+ * @throws {RequiredError}
762
+ * @memberof OrdersApi
763
+ */
764
+ downloadInvoice(requestParameters, options) {
765
+ return OrdersApiFp(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
766
+ }
689
767
  /**
690
768
  * Export orders as a CSV file
691
769
  * @summary Export orders
@@ -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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2
5
+ * The version of the OpenAPI document: 1.20.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.19.2
8
+ * The version of the OpenAPI document: 1.20.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/docs/OrdersApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.localhost:8080*
7
7
  |[**cancelOrder**](#cancelorder) | **DELETE** /v1/orders/{orderId} | Cancel order|
8
8
  |[**confirmOrder**](#confirmorder) | **POST** /v1/orders/{orderId}/confirm | Confirm order|
9
9
  |[**createOrder**](#createorder) | **POST** /v1/orders | Create order|
10
+ |[**downloadInvoice**](#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice|
10
11
  |[**exportOrders**](#exportorders) | **GET** /v1/orders/export | Export orders|
11
12
  |[**getOrder**](#getorder) | **GET** /v1/orders/{orderId} | Get order|
12
13
  |[**getOrders**](#getorders) | **GET** /v1/orders | List orders|
@@ -202,6 +203,65 @@ const { status, data } = await apiInstance.createOrder(
202
203
 
203
204
  [[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)
204
205
 
206
+ # **downloadInvoice**
207
+ > File downloadInvoice()
208
+
209
+ Download an order invoice.
210
+
211
+ ### Example
212
+
213
+ ```typescript
214
+ import {
215
+ OrdersApi,
216
+ Configuration
217
+ } from '@teemill/orders';
218
+
219
+ const configuration = new Configuration();
220
+ const apiInstance = new OrdersApi(configuration);
221
+
222
+ let project: string; //What project it is (default to undefined)
223
+ let orderId: string; //Unique identifier of an order (default to undefined)
224
+
225
+ const { status, data } = await apiInstance.downloadInvoice(
226
+ project,
227
+ orderId
228
+ );
229
+ ```
230
+
231
+ ### Parameters
232
+
233
+ |Name | Type | Description | Notes|
234
+ |------------- | ------------- | ------------- | -------------|
235
+ | **project** | [**string**] | What project it is | defaults to undefined|
236
+ | **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
237
+
238
+
239
+ ### Return type
240
+
241
+ **File**
242
+
243
+ ### Authorization
244
+
245
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
246
+
247
+ ### HTTP request headers
248
+
249
+ - **Content-Type**: Not defined
250
+ - **Accept**: application/pdf, application/json
251
+
252
+
253
+ ### HTTP response details
254
+ | Status code | Description | Response headers |
255
+ |-------------|-------------|------------------|
256
+ |**200** | The invoice PDF | - |
257
+ |**400** | Failed validation | - |
258
+ |**401** | Not authorised to access this resource | - |
259
+ |**403** | Refuse to authorize | - |
260
+ |**404** | Resource not found | - |
261
+ |**500** | Unknown server error | - |
262
+
263
+ [[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)
264
+
205
265
  # **exportOrders**
206
266
  > File exportOrders()
207
267
 
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.19.2
7
+ * The version of the OpenAPI document: 1.20.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.19.2",
3
+ "version": "1.20.0",
4
4
  "description": "OpenAPI client for @teemill/orders",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {