@teemill/orders 1.11.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/README.md +2 -2
- package/api.ts +222 -125
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +208 -72
- package/dist/api.js +32 -89
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +208 -72
- package/dist/esm/api.js +31 -88
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
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.
|
|
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'
|
|
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'
|
|
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'
|
|
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,6 +164,128 @@ 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
|
|
@@ -406,6 +528,12 @@ export interface Order {
|
|
|
406
528
|
* @memberof Order
|
|
407
529
|
*/
|
|
408
530
|
'shippingAddress': Address;
|
|
531
|
+
/**
|
|
532
|
+
*
|
|
533
|
+
* @type {CustomsInformation1}
|
|
534
|
+
* @memberof Order
|
|
535
|
+
*/
|
|
536
|
+
'customsInformation'?: CustomsInformation1;
|
|
409
537
|
/**
|
|
410
538
|
* ISO 8601 Timestamp
|
|
411
539
|
* @type {string}
|
|
@@ -419,7 +547,13 @@ export interface Order {
|
|
|
419
547
|
*/
|
|
420
548
|
'updatedAt'?: string;
|
|
421
549
|
/**
|
|
422
|
-
*
|
|
550
|
+
* ISO 8601 Timestamp
|
|
551
|
+
* @type {string}
|
|
552
|
+
* @memberof Order
|
|
553
|
+
*/
|
|
554
|
+
'statusChangedAt'?: string;
|
|
555
|
+
/**
|
|
556
|
+
* A custom reference to the merchant\'s order.
|
|
423
557
|
* @type {string}
|
|
424
558
|
* @memberof Order
|
|
425
559
|
*/
|
|
@@ -552,6 +686,50 @@ export interface OrderItem {
|
|
|
552
686
|
*/
|
|
553
687
|
'recipientCost'?: Price;
|
|
554
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
|
+
}
|
|
555
733
|
/**
|
|
556
734
|
*
|
|
557
735
|
* @export
|
|
@@ -596,19 +774,6 @@ export interface OrdersResponse {
|
|
|
596
774
|
*/
|
|
597
775
|
'nextPageToken'?: number;
|
|
598
776
|
}
|
|
599
|
-
/**
|
|
600
|
-
*
|
|
601
|
-
* @export
|
|
602
|
-
* @interface OrdersStatusesResponse
|
|
603
|
-
*/
|
|
604
|
-
export interface OrdersStatusesResponse {
|
|
605
|
-
/**
|
|
606
|
-
*
|
|
607
|
-
* @type {Array<Status>}
|
|
608
|
-
* @memberof OrdersStatusesResponse
|
|
609
|
-
*/
|
|
610
|
-
'statuses'?: Array<Status>;
|
|
611
|
-
}
|
|
612
777
|
/**
|
|
613
778
|
*
|
|
614
779
|
* @export
|
|
@@ -765,12 +930,12 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
765
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.
|
|
766
931
|
* @summary Create order
|
|
767
932
|
* @param {string} project What project it is
|
|
768
|
-
* @param {
|
|
933
|
+
* @param {CreateOrder} createOrder Create Order schema
|
|
769
934
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
770
935
|
* @param {*} [options] Override http request option.
|
|
771
936
|
* @throws {RequiredError}
|
|
772
937
|
*/
|
|
773
|
-
createOrder: (project: string,
|
|
938
|
+
createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
774
939
|
/**
|
|
775
940
|
* Export orders as a CSV file
|
|
776
941
|
* @summary Export orders
|
|
@@ -804,18 +969,11 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
804
969
|
* @param {Array<Status>} [statuses] Filter by fulfillment status
|
|
805
970
|
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
806
971
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
972
|
+
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
|
|
807
973
|
* @param {*} [options] Override http request option.
|
|
808
974
|
* @throws {RequiredError}
|
|
809
975
|
*/
|
|
810
|
-
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>;
|
|
811
|
-
/**
|
|
812
|
-
* Lists orders\' statuses and only include \'quote\' if at least one order has that status
|
|
813
|
-
* @summary List orders\' statuses
|
|
814
|
-
* @param {string} project What project it is
|
|
815
|
-
* @param {*} [options] Override http request option.
|
|
816
|
-
* @throws {RequiredError}
|
|
817
|
-
*/
|
|
818
|
-
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>;
|
|
819
977
|
};
|
|
820
978
|
/**
|
|
821
979
|
* OrdersApi - functional programming interface
|
|
@@ -847,12 +1005,12 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
847
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.
|
|
848
1006
|
* @summary Create order
|
|
849
1007
|
* @param {string} project What project it is
|
|
850
|
-
* @param {
|
|
1008
|
+
* @param {CreateOrder} createOrder Create Order schema
|
|
851
1009
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
852
1010
|
* @param {*} [options] Override http request option.
|
|
853
1011
|
* @throws {RequiredError}
|
|
854
1012
|
*/
|
|
855
|
-
createOrder(project: string,
|
|
1013
|
+
createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
|
|
856
1014
|
/**
|
|
857
1015
|
* Export orders as a CSV file
|
|
858
1016
|
* @summary Export orders
|
|
@@ -886,18 +1044,11 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
886
1044
|
* @param {Array<Status>} [statuses] Filter by fulfillment status
|
|
887
1045
|
* @param {string} [start] Start of date range to filter by when orders were placed
|
|
888
1046
|
* @param {string} [end] End of date range to filter by when orders were placed
|
|
1047
|
+
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Filter by date range type
|
|
889
1048
|
* @param {*} [options] Override http request option.
|
|
890
1049
|
* @throws {RequiredError}
|
|
891
1050
|
*/
|
|
892
|
-
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>>;
|
|
893
|
-
/**
|
|
894
|
-
* Lists orders\' statuses and only include \'quote\' if at least one order has that status
|
|
895
|
-
* @summary List orders\' statuses
|
|
896
|
-
* @param {string} project What project it is
|
|
897
|
-
* @param {*} [options] Override http request option.
|
|
898
|
-
* @throws {RequiredError}
|
|
899
|
-
*/
|
|
900
|
-
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>>;
|
|
901
1052
|
};
|
|
902
1053
|
/**
|
|
903
1054
|
* OrdersApi - factory interface
|
|
@@ -952,14 +1103,6 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
952
1103
|
* @throws {RequiredError}
|
|
953
1104
|
*/
|
|
954
1105
|
getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse>;
|
|
955
|
-
/**
|
|
956
|
-
* Lists orders\' statuses and only include \'quote\' if at least one order has that status
|
|
957
|
-
* @summary List orders\' statuses
|
|
958
|
-
* @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
|
|
959
|
-
* @param {*} [options] Override http request option.
|
|
960
|
-
* @throws {RequiredError}
|
|
961
|
-
*/
|
|
962
|
-
getStatuses(requestParameters: OrdersApiGetStatusesRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersStatusesResponse>;
|
|
963
1106
|
};
|
|
964
1107
|
/**
|
|
965
1108
|
* Request parameters for cancelOrder operation in OrdersApi.
|
|
@@ -1030,11 +1173,11 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
1030
1173
|
*/
|
|
1031
1174
|
readonly project: string;
|
|
1032
1175
|
/**
|
|
1033
|
-
* Order schema
|
|
1034
|
-
* @type {
|
|
1176
|
+
* Create Order schema
|
|
1177
|
+
* @type {CreateOrder}
|
|
1035
1178
|
* @memberof OrdersApiCreateOrder
|
|
1036
1179
|
*/
|
|
1037
|
-
readonly
|
|
1180
|
+
readonly createOrder: CreateOrder;
|
|
1038
1181
|
/**
|
|
1039
1182
|
* Specifies which fields to return, separated by commas
|
|
1040
1183
|
* @type {string}
|
|
@@ -1158,19 +1301,12 @@ export interface OrdersApiGetOrdersRequest {
|
|
|
1158
1301
|
* @memberof OrdersApiGetOrders
|
|
1159
1302
|
*/
|
|
1160
1303
|
readonly end?: string;
|
|
1161
|
-
}
|
|
1162
|
-
/**
|
|
1163
|
-
* Request parameters for getStatuses operation in OrdersApi.
|
|
1164
|
-
* @export
|
|
1165
|
-
* @interface OrdersApiGetStatusesRequest
|
|
1166
|
-
*/
|
|
1167
|
-
export interface OrdersApiGetStatusesRequest {
|
|
1168
1304
|
/**
|
|
1169
|
-
*
|
|
1170
|
-
* @type {
|
|
1171
|
-
* @memberof
|
|
1305
|
+
* Filter by date range type
|
|
1306
|
+
* @type {'createdAt' | 'updatedAt' | 'statusChangedAt'}
|
|
1307
|
+
* @memberof OrdersApiGetOrders
|
|
1172
1308
|
*/
|
|
1173
|
-
readonly
|
|
1309
|
+
readonly dateFilterType?: GetOrdersDateFilterTypeEnum;
|
|
1174
1310
|
}
|
|
1175
1311
|
/**
|
|
1176
1312
|
* OrdersApi - object-oriented interface
|
|
@@ -1233,13 +1369,13 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
1233
1369
|
* @memberof OrdersApi
|
|
1234
1370
|
*/
|
|
1235
1371
|
getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersResponse, any>>;
|
|
1236
|
-
/**
|
|
1237
|
-
* Lists orders\' statuses and only include \'quote\' if at least one order has that status
|
|
1238
|
-
* @summary List orders\' statuses
|
|
1239
|
-
* @param {OrdersApiGetStatusesRequest} requestParameters Request parameters.
|
|
1240
|
-
* @param {*} [options] Override http request option.
|
|
1241
|
-
* @throws {RequiredError}
|
|
1242
|
-
* @memberof OrdersApi
|
|
1243
|
-
*/
|
|
1244
|
-
getStatuses(requestParameters: OrdersApiGetStatusesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrdersStatusesResponse, any>>;
|
|
1245
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.
|
|
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 {
|
|
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,
|
|
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 '
|
|
163
|
-
(0, common_1.assertParamExists)('createOrder', '
|
|
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)(
|
|
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
|
-
(
|
|
358
|
-
|
|
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 {
|
|
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,
|
|
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,
|
|
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.
|
|
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.
|
|
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.
|
|
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).
|
package/dist/base.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
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).
|