@teemill/orders 1.24.1 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -9
- package/api.ts +560 -137
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +499 -137
- package/dist/api.js +127 -32
- 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 +499 -137
- package/dist/esm/api.js +126 -31
- 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/docs/Address.md +9 -9
- package/docs/ApiError.md +3 -2
- package/docs/ConfirmOrderFulfillment.md +4 -3
- package/docs/ConfirmOrderFulfillmentWithShipment.md +3 -2
- package/docs/ConfirmOrderFulfillmentWithShippingMethod.md +3 -2
- package/docs/ConfirmOrderValidationError.md +2 -0
- package/docs/ContactInformation.md +2 -2
- package/docs/ContactInformation1.md +23 -0
- package/docs/CreateOrder.md +7 -7
- package/docs/CreateOrderItem.md +24 -0
- package/docs/CustomsInformation.md +4 -4
- package/docs/CustomsInformation1.md +5 -4
- package/docs/DeliveryEstimates.md +4 -3
- package/docs/Fulfiller.md +25 -0
- package/docs/FulfillerLocation.md +23 -0
- package/docs/Fulfillment.md +9 -8
- package/docs/FulfillmentItem.md +3 -3
- package/docs/Image.md +5 -5
- package/docs/ImportOrders202Response.md +20 -0
- package/docs/Order.md +18 -17
- package/docs/OrderItem.md +10 -9
- package/docs/OrderPaymentMethod.md +21 -0
- package/docs/OrderTracking.md +4 -3
- package/docs/OrdersApi.md +91 -31
- package/docs/Origin.md +3 -2
- package/docs/PaymentAttempt.md +4 -5
- package/docs/PaymentMethod.md +2 -1
- package/docs/Price.md +3 -3
- package/docs/ProductUnavailableError.md +35 -0
- package/docs/RecipientCost.md +23 -0
- package/docs/Shipment.md +21 -0
- package/docs/ShippingMethod.md +8 -7
- package/docs/Status.md +1 -0
- package/docs/StockConflictError.md +34 -0
- package/docs/StockUnavailableError.md +35 -0
- package/index.ts +1 -1
- package/package.json +1 -1
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.
|
|
7
|
+
* The version of the OpenAPI document: 1.26.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -46,6 +46,15 @@ export const PaymentAttemptStatusEnum = {
|
|
|
46
46
|
Pending: 'pending',
|
|
47
47
|
Cancelled: 'cancelled'
|
|
48
48
|
};
|
|
49
|
+
export const ProductUnavailableErrorCodeEnum = {
|
|
50
|
+
ProductUnavailable: 'PRODUCT_UNAVAILABLE'
|
|
51
|
+
};
|
|
52
|
+
export const ProductUnavailableErrorAvailableQuantityEnum = {
|
|
53
|
+
NUMBER_0: 0
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The lifecycle status of an order or fulfillment: - `new` — Order has been created but not yet confirmed or paid - `paid` — Payment has been received, awaiting fulfillment - `processing` — Order is being produced or packed - `complete` — Order has been shipped - `refunded` — Order has been refunded - `quote` — Order is a draft quote, not yet submitted - `moderation` — Order is held for review
|
|
57
|
+
*/
|
|
49
58
|
export const Status = {
|
|
50
59
|
New: 'new',
|
|
51
60
|
Paid: 'paid',
|
|
@@ -55,6 +64,9 @@ export const Status = {
|
|
|
55
64
|
Quote: 'quote',
|
|
56
65
|
Moderation: 'moderation'
|
|
57
66
|
};
|
|
67
|
+
export const StockUnavailableErrorCodeEnum = {
|
|
68
|
+
StockUnavailable: 'STOCK_UNAVAILABLE'
|
|
69
|
+
};
|
|
58
70
|
/**
|
|
59
71
|
* OrdersApi - axios parameter creator
|
|
60
72
|
*/
|
|
@@ -63,7 +75,7 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
63
75
|
/**
|
|
64
76
|
* Cancels an order if it has not yet started processing.
|
|
65
77
|
* @summary Cancel order
|
|
66
|
-
* @param {string} project
|
|
78
|
+
* @param {string} project The project identifier to scope the request to.
|
|
67
79
|
* @param {string} orderId Unique identifier of an order
|
|
68
80
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
69
81
|
* @param {*} [options] Override http request option.
|
|
@@ -108,9 +120,9 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
108
120
|
/**
|
|
109
121
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
110
122
|
* @summary Confirm order
|
|
111
|
-
* @param {string} project
|
|
123
|
+
* @param {string} project The project identifier to scope the request to.
|
|
112
124
|
* @param {string} orderId Unique identifier of an order
|
|
113
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
125
|
+
* @param {ConfirmOrderRequest} confirmOrderRequest Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
|
|
114
126
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
115
127
|
* @param {*} [options] Override http request option.
|
|
116
128
|
* @throws {RequiredError}
|
|
@@ -158,7 +170,7 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
158
170
|
/**
|
|
159
171
|
* 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.
|
|
160
172
|
* @summary Create order
|
|
161
|
-
* @param {string} project
|
|
173
|
+
* @param {string} project The project identifier to scope the request to.
|
|
162
174
|
* @param {CreateOrder} createOrder Create Order schema
|
|
163
175
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
164
176
|
* @param {*} [options] Override http request option.
|
|
@@ -204,7 +216,7 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
204
216
|
/**
|
|
205
217
|
* Download an order invoice.
|
|
206
218
|
* @summary Download order invoice
|
|
207
|
-
* @param {string} project
|
|
219
|
+
* @param {string} project The project identifier to scope the request to.
|
|
208
220
|
* @param {string} orderId Unique identifier of an order
|
|
209
221
|
* @param {*} [options] Override http request option.
|
|
210
222
|
* @throws {RequiredError}
|
|
@@ -245,9 +257,9 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
245
257
|
/**
|
|
246
258
|
* Export orders as a CSV file
|
|
247
259
|
* @summary Export orders
|
|
248
|
-
* @param {string} project
|
|
249
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
250
|
-
* @param {string} [end] End of date range
|
|
260
|
+
* @param {string} project The project identifier to scope the request to.
|
|
261
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
262
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
251
263
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
252
264
|
* @param {*} [options] Override http request option.
|
|
253
265
|
* @throws {RequiredError}
|
|
@@ -300,7 +312,7 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
300
312
|
/**
|
|
301
313
|
* Get an order by a given ID.
|
|
302
314
|
* @summary Get order
|
|
303
|
-
* @param {string} project
|
|
315
|
+
* @param {string} project The project identifier to scope the request to.
|
|
304
316
|
* @param {string} orderId Unique identifier of an order
|
|
305
317
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
306
318
|
* @param {*} [options] Override http request option.
|
|
@@ -345,15 +357,15 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
345
357
|
/**
|
|
346
358
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
347
359
|
* @summary List orders
|
|
348
|
-
* @param {string} project
|
|
360
|
+
* @param {string} project The project identifier to scope the request to.
|
|
349
361
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
350
362
|
* @param {number} [pageToken] Page reference token
|
|
351
363
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
352
364
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
353
|
-
* @param {Array<string>} [ids]
|
|
354
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
355
|
-
* @param {string} [start] Start of date range
|
|
356
|
-
* @param {string} [end] End of date range
|
|
365
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
366
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
367
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
368
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
357
369
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
358
370
|
* @param {*} [options] Override http request option.
|
|
359
371
|
* @throws {RequiredError}
|
|
@@ -419,10 +431,56 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
419
431
|
options: localVarRequestOptions,
|
|
420
432
|
};
|
|
421
433
|
}),
|
|
434
|
+
/**
|
|
435
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
436
|
+
* @summary Import orders
|
|
437
|
+
* @param {string} project The project identifier to scope the request to.
|
|
438
|
+
* @param {File} file CSV file containing order data
|
|
439
|
+
* @param {*} [options] Override http request option.
|
|
440
|
+
* @throws {RequiredError}
|
|
441
|
+
*/
|
|
442
|
+
importOrders: (project_1, file_1, ...args_1) => __awaiter(this, [project_1, file_1, ...args_1], void 0, function* (project, file, options = {}) {
|
|
443
|
+
// verify required parameter 'project' is not null or undefined
|
|
444
|
+
assertParamExists('importOrders', 'project', project);
|
|
445
|
+
// verify required parameter 'file' is not null or undefined
|
|
446
|
+
assertParamExists('importOrders', 'file', file);
|
|
447
|
+
const localVarPath = `/v1/orders/import`;
|
|
448
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
449
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
450
|
+
let baseOptions;
|
|
451
|
+
if (configuration) {
|
|
452
|
+
baseOptions = configuration.baseOptions;
|
|
453
|
+
}
|
|
454
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
455
|
+
const localVarHeaderParameter = {};
|
|
456
|
+
const localVarQueryParameter = {};
|
|
457
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
458
|
+
// authentication session-oauth required
|
|
459
|
+
// oauth required
|
|
460
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
461
|
+
// authentication api-key required
|
|
462
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
463
|
+
if (project !== undefined) {
|
|
464
|
+
localVarQueryParameter['project'] = project;
|
|
465
|
+
}
|
|
466
|
+
if (file !== undefined) {
|
|
467
|
+
localVarFormParams.append('file', file);
|
|
468
|
+
}
|
|
469
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
470
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
471
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
472
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
473
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
474
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
475
|
+
return {
|
|
476
|
+
url: toPathString(localVarUrlObj),
|
|
477
|
+
options: localVarRequestOptions,
|
|
478
|
+
};
|
|
479
|
+
}),
|
|
422
480
|
/**
|
|
423
481
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
424
482
|
* @summary Retry
|
|
425
|
-
* @param {string} project
|
|
483
|
+
* @param {string} project The project identifier to scope the request to.
|
|
426
484
|
* @param {string} orderId Unique identifier of an order
|
|
427
485
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
428
486
|
* @param {*} [options] Override http request option.
|
|
@@ -475,7 +533,7 @@ export const OrdersApiFp = function (configuration) {
|
|
|
475
533
|
/**
|
|
476
534
|
* Cancels an order if it has not yet started processing.
|
|
477
535
|
* @summary Cancel order
|
|
478
|
-
* @param {string} project
|
|
536
|
+
* @param {string} project The project identifier to scope the request to.
|
|
479
537
|
* @param {string} orderId Unique identifier of an order
|
|
480
538
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
481
539
|
* @param {*} [options] Override http request option.
|
|
@@ -493,9 +551,9 @@ export const OrdersApiFp = function (configuration) {
|
|
|
493
551
|
/**
|
|
494
552
|
* Confirms an order, and submits it as ready to take payment and begin processing.
|
|
495
553
|
* @summary Confirm order
|
|
496
|
-
* @param {string} project
|
|
554
|
+
* @param {string} project The project identifier to scope the request to.
|
|
497
555
|
* @param {string} orderId Unique identifier of an order
|
|
498
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest
|
|
556
|
+
* @param {ConfirmOrderRequest} confirmOrderRequest Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
|
|
499
557
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
500
558
|
* @param {*} [options] Override http request option.
|
|
501
559
|
* @throws {RequiredError}
|
|
@@ -512,7 +570,7 @@ export const OrdersApiFp = function (configuration) {
|
|
|
512
570
|
/**
|
|
513
571
|
* 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.
|
|
514
572
|
* @summary Create order
|
|
515
|
-
* @param {string} project
|
|
573
|
+
* @param {string} project The project identifier to scope the request to.
|
|
516
574
|
* @param {CreateOrder} createOrder Create Order schema
|
|
517
575
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
518
576
|
* @param {*} [options] Override http request option.
|
|
@@ -530,7 +588,7 @@ export const OrdersApiFp = function (configuration) {
|
|
|
530
588
|
/**
|
|
531
589
|
* Download an order invoice.
|
|
532
590
|
* @summary Download order invoice
|
|
533
|
-
* @param {string} project
|
|
591
|
+
* @param {string} project The project identifier to scope the request to.
|
|
534
592
|
* @param {string} orderId Unique identifier of an order
|
|
535
593
|
* @param {*} [options] Override http request option.
|
|
536
594
|
* @throws {RequiredError}
|
|
@@ -547,9 +605,9 @@ export const OrdersApiFp = function (configuration) {
|
|
|
547
605
|
/**
|
|
548
606
|
* Export orders as a CSV file
|
|
549
607
|
* @summary Export orders
|
|
550
|
-
* @param {string} project
|
|
551
|
-
* @param {string} start Start of date range to filter by when orders were placed
|
|
552
|
-
* @param {string} [end] End of date range
|
|
608
|
+
* @param {string} project The project identifier to scope the request to.
|
|
609
|
+
* @param {string} start Start of the date range to filter by when orders were placed.
|
|
610
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
553
611
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
554
612
|
* @param {*} [options] Override http request option.
|
|
555
613
|
* @throws {RequiredError}
|
|
@@ -566,7 +624,7 @@ export const OrdersApiFp = function (configuration) {
|
|
|
566
624
|
/**
|
|
567
625
|
* Get an order by a given ID.
|
|
568
626
|
* @summary Get order
|
|
569
|
-
* @param {string} project
|
|
627
|
+
* @param {string} project The project identifier to scope the request to.
|
|
570
628
|
* @param {string} orderId Unique identifier of an order
|
|
571
629
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
572
630
|
* @param {*} [options] Override http request option.
|
|
@@ -584,15 +642,15 @@ export const OrdersApiFp = function (configuration) {
|
|
|
584
642
|
/**
|
|
585
643
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
586
644
|
* @summary List orders
|
|
587
|
-
* @param {string} project
|
|
645
|
+
* @param {string} project The project identifier to scope the request to.
|
|
588
646
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
589
647
|
* @param {number} [pageToken] Page reference token
|
|
590
648
|
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
591
649
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
592
|
-
* @param {Array<string>} [ids]
|
|
593
|
-
* @param {Array<Status>} [statuses] Filter by
|
|
594
|
-
* @param {string} [start] Start of date range
|
|
595
|
-
* @param {string} [end] End of date range
|
|
650
|
+
* @param {Array<string>} [ids] Filter to specific order IDs. Only orders matching these IDs will be returned.
|
|
651
|
+
* @param {Array<Status>} [statuses] Filter by order status. Only orders matching one of the given statuses will be returned.
|
|
652
|
+
* @param {string} [start] Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
653
|
+
* @param {string} [end] End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter.
|
|
596
654
|
* @param {GetOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query.
|
|
597
655
|
* @param {*} [options] Override http request option.
|
|
598
656
|
* @throws {RequiredError}
|
|
@@ -606,10 +664,27 @@ export const OrdersApiFp = function (configuration) {
|
|
|
606
664
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
607
665
|
});
|
|
608
666
|
},
|
|
667
|
+
/**
|
|
668
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
669
|
+
* @summary Import orders
|
|
670
|
+
* @param {string} project The project identifier to scope the request to.
|
|
671
|
+
* @param {File} file CSV file containing order data
|
|
672
|
+
* @param {*} [options] Override http request option.
|
|
673
|
+
* @throws {RequiredError}
|
|
674
|
+
*/
|
|
675
|
+
importOrders(project, file, options) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
677
|
+
var _a, _b, _c;
|
|
678
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.importOrders(project, file, options);
|
|
679
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
680
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.importOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
681
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
682
|
+
});
|
|
683
|
+
},
|
|
609
684
|
/**
|
|
610
685
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
611
686
|
* @summary Retry
|
|
612
|
-
* @param {string} project
|
|
687
|
+
* @param {string} project The project identifier to scope the request to.
|
|
613
688
|
* @param {string} orderId Unique identifier of an order
|
|
614
689
|
* @param {string} [fields] Specifies which fields to return, separated by commas
|
|
615
690
|
* @param {*} [options] Override http request option.
|
|
@@ -702,6 +777,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
702
777
|
getOrders(requestParameters, options) {
|
|
703
778
|
return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
|
|
704
779
|
},
|
|
780
|
+
/**
|
|
781
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
782
|
+
* @summary Import orders
|
|
783
|
+
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
784
|
+
* @param {*} [options] Override http request option.
|
|
785
|
+
* @throws {RequiredError}
|
|
786
|
+
*/
|
|
787
|
+
importOrders(requestParameters, options) {
|
|
788
|
+
return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
|
|
789
|
+
},
|
|
705
790
|
/**
|
|
706
791
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
707
792
|
* @summary Retry
|
|
@@ -788,6 +873,16 @@ export class OrdersApi extends BaseAPI {
|
|
|
788
873
|
getOrders(requestParameters, options) {
|
|
789
874
|
return OrdersApiFp(this.configuration).getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(this.axios, this.basePath));
|
|
790
875
|
}
|
|
876
|
+
/**
|
|
877
|
+
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
878
|
+
* @summary Import orders
|
|
879
|
+
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
880
|
+
* @param {*} [options] Override http request option.
|
|
881
|
+
* @throws {RequiredError}
|
|
882
|
+
*/
|
|
883
|
+
importOrders(requestParameters, options) {
|
|
884
|
+
return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
|
|
885
|
+
}
|
|
791
886
|
/**
|
|
792
887
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
793
888
|
* @summary Retry
|
package/dist/esm/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.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.26.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/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.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.26.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Orders API
|
|
4
4
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 1.
|
|
6
|
+
* The version of the OpenAPI document: 1.26.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/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.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.26.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.26.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.26.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/Address.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Address
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A postal address for shipping or billing.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**contactName** | **string** |
|
|
10
|
-
**company** | **string** |
|
|
11
|
-
**line1** | **string** | First line of the address. | [optional] [default to undefined]
|
|
12
|
-
**line2** | **string** | Second line of the address. | [optional] [default to undefined]
|
|
13
|
-
**city** | **string** |
|
|
14
|
-
**postalCode** | **string** |
|
|
15
|
-
**country** | **string** |
|
|
16
|
-
**state** | **string** |
|
|
9
|
+
**contactName** | **string** | The full name of the recipient. | [optional] [default to undefined]
|
|
10
|
+
**company** | **string** | The company name, if applicable. | [optional] [default to undefined]
|
|
11
|
+
**line1** | **string** | First line of the street address. | [optional] [default to undefined]
|
|
12
|
+
**line2** | **string** | Second line of the street address (apartment, suite, etc.). | [optional] [default to undefined]
|
|
13
|
+
**city** | **string** | The city or town. | [optional] [default to undefined]
|
|
14
|
+
**postalCode** | **string** | The postal or ZIP code. | [optional] [default to undefined]
|
|
15
|
+
**country** | **string** | Two-letter country code (ISO 3166-1 alpha-2). | [default to undefined]
|
|
16
|
+
**state** | **string** | The state, province, or region. Required when the country is US, CA, or AU. | [optional] [default to undefined]
|
|
17
17
|
|
|
18
18
|
## Example
|
|
19
19
|
|
package/docs/ApiError.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# ApiError
|
|
2
2
|
|
|
3
|
+
A standard error response returned when a request fails.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**code** | **string** |
|
|
9
|
-
**message** | **string** |
|
|
9
|
+
**code** | **string** | A machine-readable error code. | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | A human-readable description of what went wrong. | [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# ConfirmOrderFulfillment
|
|
2
2
|
|
|
3
|
+
Confirmation details for a single fulfillment. Provide either a `shippingMethodId` to use a PodOS shipping method, or a `shipment` object with your own shipping label.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**fulfillmentId** | **string** |
|
|
9
|
-
**shippingMethodId** | **string** |
|
|
10
|
-
**shipment** | [**
|
|
9
|
+
**fulfillmentId** | **string** | The ID of the fulfillment to confirm. | [default to undefined]
|
|
10
|
+
**shippingMethodId** | **string** | The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`. | [default to undefined]
|
|
11
|
+
**shipment** | [**Shipment**](Shipment.md) | | [default to undefined]
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# ConfirmOrderFulfillmentWithShipment
|
|
2
2
|
|
|
3
|
+
Confirm a fulfillment using your own shipping label. Use this when you generate shipping labels outside of PodOS.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**fulfillmentId** | **string** |
|
|
9
|
-
**shipment** | [**
|
|
9
|
+
**fulfillmentId** | **string** | The ID of the fulfillment to confirm. | [default to undefined]
|
|
10
|
+
**shipment** | [**Shipment**](Shipment.md) | | [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# ConfirmOrderFulfillmentWithShippingMethod
|
|
2
2
|
|
|
3
|
+
Confirm a fulfillment using a PodOS shipping method. Choose from the `availableShippingMethods` returned on the fulfillment.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**fulfillmentId** | **string** |
|
|
9
|
-
**shippingMethodId** | **string** |
|
|
9
|
+
**fulfillmentId** | **string** | The ID of the fulfillment to confirm. | [default to undefined]
|
|
10
|
+
**shippingMethodId** | **string** | The ID of the shipping method to use, from the fulfillment\'s `availableShippingMethods`. | [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**code** | **string** | | [default to undefined]
|
|
9
9
|
**message** | **string** | | [default to undefined]
|
|
10
|
+
**errors** | [**Array<StockConflictError>**](StockConflictError.md) | Present when one or more items cannot be fulfilled. Each entry describes a specific item and why it cannot be fulfilled, with a `code` that determines the error type. See `StockUnavailableError` and `ProductUnavailableError` schemas. | [optional] [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ import { ConfirmOrderValidationError } from '@teemill/orders';
|
|
|
16
17
|
const instance: ConfirmOrderValidationError = {
|
|
17
18
|
code,
|
|
18
19
|
message,
|
|
20
|
+
errors,
|
|
19
21
|
};
|
|
20
22
|
```
|
|
21
23
|
|
|
@@ -6,8 +6,8 @@ Order recipient contact information, used only for courier tracking/updates.
|
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**email** | **string** |
|
|
10
|
-
**phone** | **string** |
|
|
9
|
+
**email** | **string** | Email address for delivery notifications. | [default to undefined]
|
|
10
|
+
**phone** | **string** | Phone number for courier contact. Include the country code. | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ContactInformation1
|
|
2
|
+
|
|
3
|
+
Contact details for the order recipient. Used for courier delivery notifications.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**email** | **string** | Email address for delivery notifications. | [default to undefined]
|
|
10
|
+
**phone** | **string** | Phone number including country code. Used by couriers for delivery updates. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { ContactInformation1 } from '@teemill/orders';
|
|
16
|
+
|
|
17
|
+
const instance: ContactInformation1 = {
|
|
18
|
+
email,
|
|
19
|
+
phone,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/CreateOrder.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# CreateOrder
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The request body for creating a new print-on-demand order.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**merchantReference** | **string** |
|
|
10
|
-
**contactInformation** | [**
|
|
11
|
-
**shippingAddress** | [**Address**](Address.md) |
|
|
12
|
-
**customsInformation** | [**CustomsInformation**](CustomsInformation.md) |
|
|
13
|
-
**items** | [**Array<
|
|
14
|
-
**preferredFulfillers** | **Array<string>** |
|
|
9
|
+
**merchantReference** | **string** | Your own reference for this order, such as an order number from your storefront. This is returned in subsequent responses and can be used for reconciliation. | [optional] [default to undefined]
|
|
10
|
+
**contactInformation** | [**ContactInformation1**](ContactInformation1.md) | | [default to undefined]
|
|
11
|
+
**shippingAddress** | [**Address**](Address.md) | The address to ship the order to. | [default to undefined]
|
|
12
|
+
**customsInformation** | [**CustomsInformation**](CustomsInformation.md) | Customs and tax registration details. Required for international shipments. | [optional] [default to undefined]
|
|
13
|
+
**items** | [**Array<CreateOrderItem>**](CreateOrderItem.md) | The items to include in the order. Each item references a product variant from the Product Catalog API. | [default to undefined]
|
|
14
|
+
**preferredFulfillers** | **Array<string>** | An optional list of preferred fulfiller IDs. When provided, the system will attempt to route the order to one of these fulfillers. | [optional] [default to undefined]
|
|
15
15
|
|
|
16
16
|
## Example
|
|
17
17
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# CreateOrderItem
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**variantRef** | **string** | A reference to the variant being ordered | [default to undefined]
|
|
9
|
+
**quantity** | **number** | The number of units to order. | [default to undefined]
|
|
10
|
+
**recipientCost** | [**RecipientCost**](RecipientCost.md) | | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { CreateOrderItem } from '@teemill/orders';
|
|
16
|
+
|
|
17
|
+
const instance: CreateOrderItem = {
|
|
18
|
+
variantRef,
|
|
19
|
+
quantity,
|
|
20
|
+
recipientCost,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|