@teemill/orders 1.10.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.10.0
5
+ * The version of the OpenAPI document: 1.13.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,7 +24,7 @@ export interface Address {
24
24
  * @type {string}
25
25
  * @memberof Address
26
26
  */
27
- 'contactName': string;
27
+ 'contactName'?: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -36,7 +36,7 @@ export interface Address {
36
36
  * @type {string}
37
37
  * @memberof Address
38
38
  */
39
- 'line1': string;
39
+ 'line1'?: string;
40
40
  /**
41
41
  * Second line of the address.
42
42
  * @type {string}
@@ -48,7 +48,7 @@ export interface Address {
48
48
  * @type {string}
49
49
  * @memberof Address
50
50
  */
51
- 'city': string;
51
+ 'city'?: string;
52
52
  /**
53
53
  * Postal code of the address.
54
54
  * @type {string}
@@ -62,7 +62,7 @@ export interface Address {
62
62
  */
63
63
  'country': string;
64
64
  /**
65
- * State of the address.
65
+ * State of the address. If the country is Canada, Australia, or the United States, this field is required.
66
66
  * @type {string}
67
67
  * @memberof Address
68
68
  */
@@ -164,12 +164,140 @@ export interface ContactInformation {
164
164
  */
165
165
  'phone'?: string | null;
166
166
  }
167
+ /**
168
+ * Create an order
169
+ * @export
170
+ * @interface CreateOrder
171
+ */
172
+ export interface CreateOrder {
173
+ /**
174
+ * A custom reference to the merchant\'s order.
175
+ * @type {string}
176
+ * @memberof CreateOrder
177
+ */
178
+ 'merchantReference'?: string | null;
179
+ /**
180
+ *
181
+ * @type {CreateOrderContactInformation}
182
+ * @memberof CreateOrder
183
+ */
184
+ 'contactInformation': CreateOrderContactInformation;
185
+ /**
186
+ *
187
+ * @type {Address}
188
+ * @memberof CreateOrder
189
+ */
190
+ 'shippingAddress': Address;
191
+ /**
192
+ *
193
+ * @type {CustomsInformation}
194
+ * @memberof CreateOrder
195
+ */
196
+ 'customsInformation'?: CustomsInformation;
197
+ /**
198
+ * Items to be ordered
199
+ * @type {Array<OrderItem1>}
200
+ * @memberof CreateOrder
201
+ */
202
+ 'items': Array<OrderItem1>;
203
+ }
204
+ /**
205
+ * Contact information for the order
206
+ * @export
207
+ * @interface CreateOrderContactInformation
208
+ */
209
+ export interface CreateOrderContactInformation {
210
+ /**
211
+ *
212
+ * @type {string}
213
+ * @memberof CreateOrderContactInformation
214
+ */
215
+ 'email': string;
216
+ /**
217
+ *
218
+ * @type {string}
219
+ * @memberof CreateOrderContactInformation
220
+ */
221
+ 'phone'?: string | null;
222
+ }
223
+ /**
224
+ *
225
+ * @export
226
+ * @interface CustomsInformation
227
+ */
228
+ export interface CustomsInformation {
229
+ /**
230
+ * Pre-registration type
231
+ * @type {string}
232
+ * @memberof CustomsInformation
233
+ */
234
+ 'preRegistrationType'?: CustomsInformationPreRegistrationTypeEnum;
235
+ /**
236
+ * Pre-registration number
237
+ * @type {string}
238
+ * @memberof CustomsInformation
239
+ */
240
+ 'preRegistrationNumber'?: string;
241
+ /**
242
+ * VAT number
243
+ * @type {string}
244
+ * @memberof CustomsInformation
245
+ */
246
+ 'vatNumber'?: string;
247
+ /**
248
+ * EORI number
249
+ * @type {string}
250
+ * @memberof CustomsInformation
251
+ */
252
+ 'eoriNumber'?: string;
253
+ }
254
+ export declare const CustomsInformationPreRegistrationTypeEnum: {
255
+ readonly Ioss: "IOSS";
256
+ };
257
+ export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
258
+ /**
259
+ *
260
+ * @export
261
+ * @interface CustomsInformation1
262
+ */
263
+ export interface CustomsInformation1 {
264
+ /**
265
+ *
266
+ * @type {string}
267
+ * @memberof CustomsInformation1
268
+ */
269
+ 'preRegistrationType'?: string;
270
+ /**
271
+ *
272
+ * @type {string}
273
+ * @memberof CustomsInformation1
274
+ */
275
+ 'preRegistrationNumber'?: string;
276
+ /**
277
+ *
278
+ * @type {string}
279
+ * @memberof CustomsInformation1
280
+ */
281
+ 'vatNumber'?: string;
282
+ /**
283
+ *
284
+ * @type {string}
285
+ * @memberof CustomsInformation1
286
+ */
287
+ 'eoriNumber'?: string;
288
+ }
167
289
  /**
168
290
  *
169
291
  * @export
170
292
  * @interface DeliveryEstimates
171
293
  */
172
294
  export interface DeliveryEstimates {
295
+ /**
296
+ * Whether this is a priority shipping method. Fulfillments with priority methods aim for same day dispatch when ordered before 1pm, and typically offer faster delivery times.
297
+ * @type {boolean}
298
+ * @memberof DeliveryEstimates
299
+ */
300
+ 'isPriority'?: boolean;
173
301
  /**
174
302
  * ISO 8601 Timestamp
175
303
  * @type {string}
@@ -400,6 +528,12 @@ export interface Order {
400
528
  * @memberof Order
401
529
  */
402
530
  'shippingAddress': Address;
531
+ /**
532
+ *
533
+ * @type {CustomsInformation1}
534
+ * @memberof Order
535
+ */
536
+ 'customsInformation'?: CustomsInformation1;
403
537
  /**
404
538
  * ISO 8601 Timestamp
405
539
  * @type {string}
@@ -413,7 +547,13 @@ export interface Order {
413
547
  */
414
548
  'updatedAt'?: string;
415
549
  /**
416
- * A custom reference to the merchant\'s order that will be displayed on the shipping label.
550
+ * ISO 8601 Timestamp
551
+ * @type {string}
552
+ * @memberof Order
553
+ */
554
+ 'statusChangedAt'?: string;
555
+ /**
556
+ * A custom reference to the merchant\'s order.
417
557
  * @type {string}
418
558
  * @memberof Order
419
559
  */
@@ -546,6 +686,50 @@ export interface OrderItem {
546
686
  */
547
687
  'recipientCost'?: Price;
548
688
  }
689
+ /**
690
+ *
691
+ * @export
692
+ * @interface OrderItem1
693
+ */
694
+ export interface OrderItem1 {
695
+ /**
696
+ * A reference to the resource location
697
+ * @type {string}
698
+ * @memberof OrderItem1
699
+ */
700
+ 'variantRef': string;
701
+ /**
702
+ *
703
+ * @type {number}
704
+ * @memberof OrderItem1
705
+ */
706
+ 'quantity': number;
707
+ /**
708
+ *
709
+ * @type {OrderItem1RecipientCost}
710
+ * @memberof OrderItem1
711
+ */
712
+ 'recipientCost'?: OrderItem1RecipientCost;
713
+ }
714
+ /**
715
+ *
716
+ * @export
717
+ * @interface OrderItem1RecipientCost
718
+ */
719
+ export interface OrderItem1RecipientCost {
720
+ /**
721
+ *
722
+ * @type {string}
723
+ * @memberof OrderItem1RecipientCost
724
+ */
725
+ 'amount': string;
726
+ /**
727
+ *
728
+ * @type {string}
729
+ * @memberof OrderItem1RecipientCost
730
+ */
731
+ 'currencyCode': string;
732
+ }
549
733
  /**
550
734
  *
551
735
  * @export
@@ -590,19 +774,6 @@ export interface OrdersResponse {
590
774
  */
591
775
  'nextPageToken'?: number;
592
776
  }
593
- /**
594
- *
595
- * @export
596
- * @interface OrdersStatusesResponse
597
- */
598
- export interface OrdersStatusesResponse {
599
- /**
600
- *
601
- * @type {Array<Status>}
602
- * @memberof OrdersStatusesResponse
603
- */
604
- 'statuses'?: Array<Status>;
605
- }
606
777
  /**
607
778
  *
608
779
  * @export
@@ -759,12 +930,12 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
759
930
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
760
931
  * @summary Create order
761
932
  * @param {string} project What project it is
762
- * @param {Order} order Order schema
933
+ * @param {CreateOrder} createOrder Create Order schema
763
934
  * @param {string} [fields] Specifies which fields to return, separated by commas
764
935
  * @param {*} [options] Override http request option.
765
936
  * @throws {RequiredError}
766
937
  */
767
- createOrder: (project: string, order: Order, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
938
+ createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
768
939
  /**
769
940
  * Export orders as a CSV file
770
941
  * @summary Export orders
@@ -798,18 +969,11 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
798
969
  * @param {Array<Status>} [statuses] Filter by fulfillment status
799
970
  * @param {string} [start] Start of date range to filter by when orders were placed
800
971
  * @param {string} [end] End of date range to filter by when orders were placed
972
+ * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
801
973
  * @param {*} [options] Override http request option.
802
974
  * @throws {RequiredError}
803
975
  */
804
- getOrders: (project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
805
- /**
806
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
807
- * @summary List orders\' statuses
808
- * @param {string} project What project it is
809
- * @param {*} [options] Override http request option.
810
- * @throws {RequiredError}
811
- */
812
- getStatuses: (project: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
976
+ 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>;
813
977
  };
814
978
  /**
815
979
  * OrdersApi - functional programming interface
@@ -841,12 +1005,12 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
841
1005
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
842
1006
  * @summary Create order
843
1007
  * @param {string} project What project it is
844
- * @param {Order} order Order schema
1008
+ * @param {CreateOrder} createOrder Create Order schema
845
1009
  * @param {string} [fields] Specifies which fields to return, separated by commas
846
1010
  * @param {*} [options] Override http request option.
847
1011
  * @throws {RequiredError}
848
1012
  */
849
- createOrder(project: string, order: Order, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
1013
+ createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
850
1014
  /**
851
1015
  * Export orders as a CSV file
852
1016
  * @summary Export orders
@@ -880,18 +1044,11 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
880
1044
  * @param {Array<Status>} [statuses] Filter by fulfillment status
881
1045
  * @param {string} [start] Start of date range to filter by when orders were placed
882
1046
  * @param {string} [end] End of date range to filter by when orders were placed
1047
+ * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
883
1048
  * @param {*} [options] Override http request option.
884
1049
  * @throws {RequiredError}
885
1050
  */
886
- getOrders(project: string, fields?: string, pageToken?: number, pageSize?: number, search?: string, ids?: Array<string>, statuses?: Array<Status>, start?: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersResponse>>;
887
- /**
888
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
889
- * @summary List orders\' statuses
890
- * @param {string} project What project it is
891
- * @param {*} [options] Override http request option.
892
- * @throws {RequiredError}
893
- */
894
- getStatuses(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrdersStatusesResponse>>;
1051
+ 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>>;
895
1052
  };
896
1053
  /**
897
1054
  * OrdersApi - factory interface
@@ -946,14 +1103,6 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
946
1103
  * @throws {RequiredError}
947
1104
  */
948
1105
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse>;
949
- /**
950
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
951
- * @summary List orders\' statuses
952
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
953
- * @param {*} [options] Override http request option.
954
- * @throws {RequiredError}
955
- */
956
- getStatuses(requestParameters: OrdersApiGetStatusesRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersStatusesResponse>;
957
1106
  };
958
1107
  /**
959
1108
  * Request parameters for cancelOrder operation in OrdersApi.
@@ -1024,11 +1173,11 @@ export interface OrdersApiCreateOrderRequest {
1024
1173
  */
1025
1174
  readonly project: string;
1026
1175
  /**
1027
- * Order schema
1028
- * @type {Order}
1176
+ * Create Order schema
1177
+ * @type {CreateOrder}
1029
1178
  * @memberof OrdersApiCreateOrder
1030
1179
  */
1031
- readonly order: Order;
1180
+ readonly createOrder: CreateOrder;
1032
1181
  /**
1033
1182
  * Specifies which fields to return, separated by commas
1034
1183
  * @type {string}
@@ -1152,19 +1301,12 @@ export interface OrdersApiGetOrdersRequest {
1152
1301
  * @memberof OrdersApiGetOrders
1153
1302
  */
1154
1303
  readonly end?: string;
1155
- }
1156
- /**
1157
- * Request parameters for getStatuses operation in OrdersApi.
1158
- * @export
1159
- * @interface OrdersApiGetStatusesRequest
1160
- */
1161
- export interface OrdersApiGetStatusesRequest {
1162
1304
  /**
1163
- * What project it is
1164
- * @type {string}
1165
- * @memberof OrdersApiGetStatuses
1305
+ * Filter by date range type
1306
+ * @type {'createdAt' | 'updatedAt' | 'statusChangedAt'}
1307
+ * @memberof OrdersApiGetOrders
1166
1308
  */
1167
- readonly project: string;
1309
+ readonly dateFilterType?: GetOrdersDateFilterTypeEnum;
1168
1310
  }
1169
1311
  /**
1170
1312
  * OrdersApi - object-oriented interface
@@ -1227,13 +1369,13 @@ export declare class OrdersApi extends BaseAPI {
1227
1369
  * @memberof OrdersApi
1228
1370
  */
1229
1371
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersResponse, any>>;
1230
- /**
1231
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
1232
- * @summary List orders\' statuses
1233
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
1234
- * @param {*} [options] Override http request option.
1235
- * @throws {RequiredError}
1236
- * @memberof OrdersApi
1237
- */
1238
- getStatuses(requestParameters: OrdersApiGetStatusesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersStatusesResponse, any>>;
1239
1372
  }
1373
+ /**
1374
+ * @export
1375
+ */
1376
+ export declare const GetOrdersDateFilterTypeEnum: {
1377
+ readonly CreatedAt: "createdAt";
1378
+ readonly UpdatedAt: "updatedAt";
1379
+ readonly StatusChangedAt: "statusChangedAt";
1380
+ };
1381
+ export type GetOrdersDateFilterTypeEnum = typeof GetOrdersDateFilterTypeEnum[keyof typeof GetOrdersDateFilterTypeEnum];
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Orders API
6
6
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
7
  *
8
- * The version of the OpenAPI document: 1.10.0
8
+ * The version of the OpenAPI document: 1.13.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
25
+ exports.GetOrdersDateFilterTypeEnum = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = exports.CustomsInformationPreRegistrationTypeEnum = exports.ConfirmOrderValidationErrorCodeEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -35,6 +35,9 @@ exports.ConfirmOrderValidationErrorCodeEnum = {
35
35
  Conflict: 'CONFLICT',
36
36
  ActionRequired: 'ACTION_REQUIRED'
37
37
  };
38
+ exports.CustomsInformationPreRegistrationTypeEnum = {
39
+ Ioss: 'IOSS'
40
+ };
38
41
  /**
39
42
  *
40
43
  * @export
@@ -151,16 +154,16 @@ const OrdersApiAxiosParamCreator = function (configuration) {
151
154
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
152
155
  * @summary Create order
153
156
  * @param {string} project What project it is
154
- * @param {Order} order Order schema
157
+ * @param {CreateOrder} createOrder Create Order schema
155
158
  * @param {string} [fields] Specifies which fields to return, separated by commas
156
159
  * @param {*} [options] Override http request option.
157
160
  * @throws {RequiredError}
158
161
  */
159
- createOrder: (project_1, order_1, fields_1, ...args_1) => __awaiter(this, [project_1, order_1, fields_1, ...args_1], void 0, function* (project, order, fields, options = {}) {
162
+ createOrder: (project_1, createOrder_1, fields_1, ...args_1) => __awaiter(this, [project_1, createOrder_1, fields_1, ...args_1], void 0, function* (project, createOrder, fields, options = {}) {
160
163
  // verify required parameter 'project' is not null or undefined
161
164
  (0, common_1.assertParamExists)('createOrder', 'project', project);
162
- // verify required parameter 'order' is not null or undefined
163
- (0, common_1.assertParamExists)('createOrder', 'order', order);
165
+ // verify required parameter 'createOrder' is not null or undefined
166
+ (0, common_1.assertParamExists)('createOrder', 'createOrder', createOrder);
164
167
  const localVarPath = `/v1/orders`;
165
168
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
169
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -186,7 +189,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
186
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
187
190
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
191
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(order, localVarRequestOptions, configuration);
192
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrder, localVarRequestOptions, configuration);
190
193
  return {
191
194
  url: (0, common_1.toPathString)(localVarUrlObj),
192
195
  options: localVarRequestOptions,
@@ -302,10 +305,11 @@ const OrdersApiAxiosParamCreator = function (configuration) {
302
305
  * @param {Array<Status>} [statuses] Filter by fulfillment status
303
306
  * @param {string} [start] Start of date range to filter by when orders were placed
304
307
  * @param {string} [end] End of date range to filter by when orders were placed
308
+ * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
305
309
  * @param {*} [options] Override http request option.
306
310
  * @throws {RequiredError}
307
311
  */
308
- getOrders: (project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1) => __awaiter(this, [project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, ...args_1], void 0, function* (project, fields, pageToken, pageSize, search, ids, statuses, start, end, options = {}) {
312
+ getOrders: (project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, dateFilterType_1, ...args_1) => __awaiter(this, [project_1, fields_1, pageToken_1, pageSize_1, search_1, ids_1, statuses_1, start_1, end_1, dateFilterType_1, ...args_1], void 0, function* (project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options = {}) {
309
313
  // verify required parameter 'project' is not null or undefined
310
314
  (0, common_1.assertParamExists)('getOrders', 'project', project);
311
315
  const localVarPath = `/v1/orders`;
@@ -354,41 +358,8 @@ const OrdersApiAxiosParamCreator = function (configuration) {
354
358
  end.toISOString() :
355
359
  end;
356
360
  }
357
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
358
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
359
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
360
- return {
361
- url: (0, common_1.toPathString)(localVarUrlObj),
362
- options: localVarRequestOptions,
363
- };
364
- }),
365
- /**
366
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
367
- * @summary List orders\' statuses
368
- * @param {string} project What project it is
369
- * @param {*} [options] Override http request option.
370
- * @throws {RequiredError}
371
- */
372
- getStatuses: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
373
- // verify required parameter 'project' is not null or undefined
374
- (0, common_1.assertParamExists)('getStatuses', 'project', project);
375
- const localVarPath = `/v1/orders/statuses`;
376
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
377
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
378
- let baseOptions;
379
- if (configuration) {
380
- baseOptions = configuration.baseOptions;
381
- }
382
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
383
- const localVarHeaderParameter = {};
384
- const localVarQueryParameter = {};
385
- // authentication session-oauth required
386
- // oauth required
387
- yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
388
- // authentication api-key required
389
- yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
390
- if (project !== undefined) {
391
- localVarQueryParameter['project'] = project;
361
+ if (dateFilterType !== undefined) {
362
+ localVarQueryParameter['dateFilterType'] = dateFilterType;
392
363
  }
393
364
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
394
365
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -449,15 +420,15 @@ const OrdersApiFp = function (configuration) {
449
420
  * Creates a new order for the provided variants. You can fetch details and references to the given project\'s variants from the Product Catalog API.
450
421
  * @summary Create order
451
422
  * @param {string} project What project it is
452
- * @param {Order} order Order schema
423
+ * @param {CreateOrder} createOrder Create Order schema
453
424
  * @param {string} [fields] Specifies which fields to return, separated by commas
454
425
  * @param {*} [options] Override http request option.
455
426
  * @throws {RequiredError}
456
427
  */
457
- createOrder(project, order, fields, options) {
428
+ createOrder(project, createOrder, fields, options) {
458
429
  return __awaiter(this, void 0, void 0, function* () {
459
430
  var _a, _b, _c;
460
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(project, order, fields, options);
431
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(project, createOrder, fields, options);
461
432
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
462
433
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
463
434
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -512,34 +483,19 @@ const OrdersApiFp = function (configuration) {
512
483
  * @param {Array<Status>} [statuses] Filter by fulfillment status
513
484
  * @param {string} [start] Start of date range to filter by when orders were placed
514
485
  * @param {string} [end] End of date range to filter by when orders were placed
486
+ * @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
515
487
  * @param {*} [options] Override http request option.
516
488
  * @throws {RequiredError}
517
489
  */
518
- getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options) {
490
+ getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options) {
519
491
  return __awaiter(this, void 0, void 0, function* () {
520
492
  var _a, _b, _c;
521
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, options);
493
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(project, fields, pageToken, pageSize, search, ids, statuses, start, end, dateFilterType, options);
522
494
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
523
495
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
524
496
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
525
497
  });
526
498
  },
527
- /**
528
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
529
- * @summary List orders\' statuses
530
- * @param {string} project What project it is
531
- * @param {*} [options] Override http request option.
532
- * @throws {RequiredError}
533
- */
534
- getStatuses(project, options) {
535
- return __awaiter(this, void 0, void 0, function* () {
536
- var _a, _b, _c;
537
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatuses(project, options);
538
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
539
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getStatuses']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
540
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
541
- });
542
- },
543
499
  };
544
500
  };
545
501
  exports.OrdersApiFp = OrdersApiFp;
@@ -578,7 +534,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
578
534
  * @throws {RequiredError}
579
535
  */
580
536
  createOrder(requestParameters, options) {
581
- return localVarFp.createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(axios, basePath));
537
+ return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
582
538
  },
583
539
  /**
584
540
  * Export orders as a CSV file
@@ -608,17 +564,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
608
564
  * @throws {RequiredError}
609
565
  */
610
566
  getOrders(requestParameters, options) {
611
- return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
612
- },
613
- /**
614
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
615
- * @summary List orders\' statuses
616
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
617
- * @param {*} [options] Override http request option.
618
- * @throws {RequiredError}
619
- */
620
- getStatuses(requestParameters, options) {
621
- return localVarFp.getStatuses(requestParameters.project, options).then((request) => request(axios, basePath));
567
+ return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
622
568
  },
623
569
  };
624
570
  };
@@ -661,7 +607,7 @@ class OrdersApi extends base_1.BaseAPI {
661
607
  * @memberof OrdersApi
662
608
  */
663
609
  createOrder(requestParameters, options) {
664
- return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.order, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
610
+ return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
665
611
  }
666
612
  /**
667
613
  * Export orders as a CSV file
@@ -694,18 +640,15 @@ class OrdersApi extends base_1.BaseAPI {
694
640
  * @memberof OrdersApi
695
641
  */
696
642
  getOrders(requestParameters, options) {
697
- return (0, exports.OrdersApiFp)(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
698
- }
699
- /**
700
- * Lists orders\' statuses and only include \'quote\' if at least one order has that status
701
- * @summary List orders\' statuses
702
- * @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
703
- * @param {*} [options] Override http request option.
704
- * @throws {RequiredError}
705
- * @memberof OrdersApi
706
- */
707
- getStatuses(requestParameters, options) {
708
- return (0, exports.OrdersApiFp)(this.configuration).getStatuses(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
643
+ return (0, exports.OrdersApiFp)(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(this.axios, this.basePath));
709
644
  }
710
645
  }
711
646
  exports.OrdersApi = OrdersApi;
647
+ /**
648
+ * @export
649
+ */
650
+ exports.GetOrdersDateFilterTypeEnum = {
651
+ CreatedAt: 'createdAt',
652
+ UpdatedAt: 'updatedAt',
653
+ StatusChangedAt: 'statusChangedAt'
654
+ };
package/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Orders API
3
3
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
4
  *
5
- * The version of the OpenAPI document: 1.10.0
5
+ * The version of the OpenAPI document: 1.13.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).