@sp-api-sdk/orders-api-2026-01-01 0.0.0 → 1.1.1
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/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/cjs/api-model/api/orders-api.js +266 -0
- package/dist/cjs/api-model/api.js +30 -0
- package/dist/cjs/api-model/base.js +52 -0
- package/dist/cjs/api-model/common.js +122 -0
- package/dist/cjs/api-model/configuration.js +98 -0
- package/dist/cjs/api-model/index.js +32 -0
- package/dist/cjs/api-model/models/address-extended-fields.js +15 -0
- package/dist/cjs/api-model/models/alias.js +15 -0
- package/dist/cjs/api-model/models/associated-order.js +15 -0
- package/dist/cjs/api-model/models/business-hour.js +25 -0
- package/dist/cjs/api-model/models/buyer.js +15 -0
- package/dist/cjs/api-model/models/constraint-type.js +22 -0
- package/dist/cjs/api-model/models/customer-address.js +15 -0
- package/dist/cjs/api-model/models/date-time-range.js +15 -0
- package/dist/cjs/api-model/models/delivery-preference.js +15 -0
- package/dist/cjs/api-model/models/error-list.js +15 -0
- package/dist/cjs/api-model/models/exception-date.js +20 -0
- package/dist/cjs/api-model/models/fulfillment-status.js +28 -0
- package/dist/cjs/api-model/models/get-order-response.js +15 -0
- package/dist/cjs/api-model/models/gift-option.js +15 -0
- package/dist/cjs/api-model/models/hour-minute.js +15 -0
- package/dist/cjs/api-model/models/index.js +70 -0
- package/dist/cjs/api-model/models/item-cancellation-request.js +15 -0
- package/dist/cjs/api-model/models/item-cancellation.js +15 -0
- package/dist/cjs/api-model/models/item-condition.js +15 -0
- package/dist/cjs/api-model/models/item-customization.js +15 -0
- package/dist/cjs/api-model/models/item-expense.js +15 -0
- package/dist/cjs/api-model/models/item-fulfillment.js +15 -0
- package/dist/cjs/api-model/models/item-international-shipping.js +15 -0
- package/dist/cjs/api-model/models/item-packing.js +15 -0
- package/dist/cjs/api-model/models/item-picking.js +15 -0
- package/dist/cjs/api-model/models/item-points-cost.js +15 -0
- package/dist/cjs/api-model/models/item-price.js +15 -0
- package/dist/cjs/api-model/models/item-proceeds-breakdown.js +15 -0
- package/dist/cjs/api-model/models/item-proceeds-detailed-breakdown.js +15 -0
- package/dist/cjs/api-model/models/item-proceeds.js +15 -0
- package/dist/cjs/api-model/models/item-product.js +15 -0
- package/dist/cjs/api-model/models/item-promotion-breakdown.js +15 -0
- package/dist/cjs/api-model/models/item-promotion.js +15 -0
- package/dist/cjs/api-model/models/item-shipping-constraints.js +15 -0
- package/dist/cjs/api-model/models/item-shipping.js +15 -0
- package/dist/cjs/api-model/models/item-substitution-option.js +15 -0
- package/dist/cjs/api-model/models/item-substitution-preference.js +21 -0
- package/dist/cjs/api-model/models/measurement.js +42 -0
- package/dist/cjs/api-model/models/merchant-address.js +15 -0
- package/dist/cjs/api-model/models/model-error.js +15 -0
- package/dist/cjs/api-model/models/money.js +15 -0
- package/dist/cjs/api-model/models/order-fulfillment.js +15 -0
- package/dist/cjs/api-model/models/order-item.js +15 -0
- package/dist/cjs/api-model/models/order-package.js +15 -0
- package/dist/cjs/api-model/models/order-proceeds.js +15 -0
- package/dist/cjs/api-model/models/order.js +15 -0
- package/dist/cjs/api-model/models/package-item.js +15 -0
- package/dist/cjs/api-model/models/package-status.js +24 -0
- package/dist/cjs/api-model/models/pagination.js +15 -0
- package/dist/cjs/api-model/models/points-granted.js +15 -0
- package/dist/cjs/api-model/models/preferred-delivery-time.js +15 -0
- package/dist/cjs/api-model/models/recipient.js +15 -0
- package/dist/cjs/api-model/models/sales-channel.js +15 -0
- package/dist/cjs/api-model/models/search-orders-response.js +15 -0
- package/dist/cjs/api-model/models/time-window.js +15 -0
- package/dist/cjs/client.js +13 -0
- package/dist/cjs/index.js +19 -0
- package/dist/es/api-model/api/orders-api.js +256 -0
- package/dist/es/api-model/api.js +14 -0
- package/dist/es/api-model/base.js +44 -0
- package/dist/es/api-model/common.js +109 -0
- package/dist/es/api-model/configuration.js +94 -0
- package/dist/es/api-model/index.js +16 -0
- package/dist/es/api-model/models/address-extended-fields.js +14 -0
- package/dist/es/api-model/models/alias.js +14 -0
- package/dist/es/api-model/models/associated-order.js +14 -0
- package/dist/es/api-model/models/business-hour.js +22 -0
- package/dist/es/api-model/models/buyer.js +14 -0
- package/dist/es/api-model/models/constraint-type.js +19 -0
- package/dist/es/api-model/models/customer-address.js +14 -0
- package/dist/es/api-model/models/date-time-range.js +14 -0
- package/dist/es/api-model/models/delivery-preference.js +14 -0
- package/dist/es/api-model/models/error-list.js +14 -0
- package/dist/es/api-model/models/exception-date.js +17 -0
- package/dist/es/api-model/models/fulfillment-status.js +25 -0
- package/dist/es/api-model/models/get-order-response.js +14 -0
- package/dist/es/api-model/models/gift-option.js +14 -0
- package/dist/es/api-model/models/hour-minute.js +14 -0
- package/dist/es/api-model/models/index.js +54 -0
- package/dist/es/api-model/models/item-cancellation-request.js +14 -0
- package/dist/es/api-model/models/item-cancellation.js +14 -0
- package/dist/es/api-model/models/item-condition.js +14 -0
- package/dist/es/api-model/models/item-customization.js +14 -0
- package/dist/es/api-model/models/item-expense.js +14 -0
- package/dist/es/api-model/models/item-fulfillment.js +14 -0
- package/dist/es/api-model/models/item-international-shipping.js +14 -0
- package/dist/es/api-model/models/item-packing.js +14 -0
- package/dist/es/api-model/models/item-picking.js +14 -0
- package/dist/es/api-model/models/item-points-cost.js +14 -0
- package/dist/es/api-model/models/item-price.js +14 -0
- package/dist/es/api-model/models/item-proceeds-breakdown.js +14 -0
- package/dist/es/api-model/models/item-proceeds-detailed-breakdown.js +14 -0
- package/dist/es/api-model/models/item-proceeds.js +14 -0
- package/dist/es/api-model/models/item-product.js +14 -0
- package/dist/es/api-model/models/item-promotion-breakdown.js +14 -0
- package/dist/es/api-model/models/item-promotion.js +14 -0
- package/dist/es/api-model/models/item-shipping-constraints.js +14 -0
- package/dist/es/api-model/models/item-shipping.js +14 -0
- package/dist/es/api-model/models/item-substitution-option.js +14 -0
- package/dist/es/api-model/models/item-substitution-preference.js +18 -0
- package/dist/es/api-model/models/measurement.js +39 -0
- package/dist/es/api-model/models/merchant-address.js +14 -0
- package/dist/es/api-model/models/model-error.js +14 -0
- package/dist/es/api-model/models/money.js +14 -0
- package/dist/es/api-model/models/order-fulfillment.js +14 -0
- package/dist/es/api-model/models/order-item.js +14 -0
- package/dist/es/api-model/models/order-package.js +14 -0
- package/dist/es/api-model/models/order-proceeds.js +14 -0
- package/dist/es/api-model/models/order.js +14 -0
- package/dist/es/api-model/models/package-item.js +14 -0
- package/dist/es/api-model/models/package-status.js +21 -0
- package/dist/es/api-model/models/pagination.js +14 -0
- package/dist/es/api-model/models/points-granted.js +14 -0
- package/dist/es/api-model/models/preferred-delivery-time.js +14 -0
- package/dist/es/api-model/models/recipient.js +14 -0
- package/dist/es/api-model/models/sales-channel.js +14 -0
- package/dist/es/api-model/models/search-orders-response.js +14 -0
- package/dist/es/api-model/models/time-window.js +14 -0
- package/dist/es/client.js +9 -0
- package/dist/es/index.js +3 -0
- package/dist/types/api-model/api/orders-api.d.ts +208 -0
- package/dist/types/api-model/api.d.ts +12 -0
- package/dist/types/api-model/base.d.ts +42 -0
- package/dist/types/api-model/common.d.ts +34 -0
- package/dist/types/api-model/configuration.d.ts +98 -0
- package/dist/types/api-model/index.d.ts +14 -0
- package/dist/types/api-model/models/address-extended-fields.d.ts +32 -0
- package/dist/types/api-model/models/alias.d.ts +24 -0
- package/dist/types/api-model/models/associated-order.d.ts +24 -0
- package/dist/types/api-model/models/business-hour.d.ts +35 -0
- package/dist/types/api-model/models/buyer.d.ts +32 -0
- package/dist/types/api-model/models/constraint-type.d.ts +18 -0
- package/dist/types/api-model/models/customer-address.d.ts +70 -0
- package/dist/types/api-model/models/date-time-range.d.ts +24 -0
- package/dist/types/api-model/models/delivery-preference.d.ts +30 -0
- package/dist/types/api-model/models/error-list.d.ts +20 -0
- package/dist/types/api-model/models/exception-date.d.ts +34 -0
- package/dist/types/api-model/models/fulfillment-status.d.ts +24 -0
- package/dist/types/api-model/models/get-order-response.d.ts +18 -0
- package/dist/types/api-model/models/gift-option.d.ts +24 -0
- package/dist/types/api-model/models/hour-minute.d.ts +24 -0
- package/dist/types/api-model/models/index.d.ts +54 -0
- package/dist/types/api-model/models/item-cancellation-request.d.ts +24 -0
- package/dist/types/api-model/models/item-cancellation.d.ts +18 -0
- package/dist/types/api-model/models/item-condition.d.ts +28 -0
- package/dist/types/api-model/models/item-customization.d.ts +20 -0
- package/dist/types/api-model/models/item-expense.d.ts +18 -0
- package/dist/types/api-model/models/item-fulfillment.d.ts +30 -0
- package/dist/types/api-model/models/item-international-shipping.d.ts +20 -0
- package/dist/types/api-model/models/item-packing.d.ts +18 -0
- package/dist/types/api-model/models/item-picking.d.ts +18 -0
- package/dist/types/api-model/models/item-points-cost.d.ts +18 -0
- package/dist/types/api-model/models/item-price.d.ts +22 -0
- package/dist/types/api-model/models/item-proceeds-breakdown.d.ts +27 -0
- package/dist/types/api-model/models/item-proceeds-detailed-breakdown.d.ts +22 -0
- package/dist/types/api-model/models/item-proceeds.d.ts +23 -0
- package/dist/types/api-model/models/item-product.d.ts +38 -0
- package/dist/types/api-model/models/item-promotion-breakdown.d.ts +20 -0
- package/dist/types/api-model/models/item-promotion.d.ts +21 -0
- package/dist/types/api-model/models/item-shipping-constraints.d.ts +22 -0
- package/dist/types/api-model/models/item-shipping.d.ts +22 -0
- package/dist/types/api-model/models/item-substitution-option.d.ts +34 -0
- package/dist/types/api-model/models/item-substitution-preference.d.ts +31 -0
- package/dist/types/api-model/models/measurement.d.ts +51 -0
- package/dist/types/api-model/models/merchant-address.d.ts +56 -0
- package/dist/types/api-model/models/model-error.d.ts +28 -0
- package/dist/types/api-model/models/money.d.ts +24 -0
- package/dist/types/api-model/models/order-fulfillment.d.ts +29 -0
- package/dist/types/api-model/models/order-item.d.ts +42 -0
- package/dist/types/api-model/models/order-package.d.ts +49 -0
- package/dist/types/api-model/models/order-proceeds.d.ts +18 -0
- package/dist/types/api-model/models/order.d.ts +62 -0
- package/dist/types/api-model/models/package-item.d.ts +28 -0
- package/dist/types/api-model/models/package-status.d.ts +33 -0
- package/dist/types/api-model/models/pagination.d.ts +20 -0
- package/dist/types/api-model/models/points-granted.d.ts +22 -0
- package/dist/types/api-model/models/preferred-delivery-time.d.ts +26 -0
- package/dist/types/api-model/models/recipient.d.ts +20 -0
- package/dist/types/api-model/models/sales-channel.d.ts +28 -0
- package/dist/types/api-model/models/search-orders-response.d.ts +31 -0
- package/dist/types/api-model/models/time-window.d.ts +19 -0
- package/dist/types/client.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +32 -3
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
// Some imports not used depending on template conditions
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from '../common';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
|
+
/**
|
|
21
|
+
* OrdersApi - axios parameter creator
|
|
22
|
+
*/
|
|
23
|
+
export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
24
|
+
return {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the order that you specify.
|
|
27
|
+
* @param {string} orderId An Amazon-defined order identifier.
|
|
28
|
+
* @param {Array<GetOrderIncludedDataEnum>} [includedData] A list of datasets to include in the response.
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
getOrder: async (orderId, includedData, options = {}) => {
|
|
33
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
34
|
+
assertParamExists('getOrder', 'orderId', orderId);
|
|
35
|
+
const localVarPath = `/orders/2026-01-01/orders/{orderId}`
|
|
36
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
37
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
39
|
+
let baseOptions;
|
|
40
|
+
if (configuration) {
|
|
41
|
+
baseOptions = configuration.baseOptions;
|
|
42
|
+
}
|
|
43
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
44
|
+
const localVarHeaderParameter = {};
|
|
45
|
+
const localVarQueryParameter = {};
|
|
46
|
+
if (includedData) {
|
|
47
|
+
localVarQueryParameter['includedData'] = includedData.join(COLLECTION_FORMATS.csv);
|
|
48
|
+
}
|
|
49
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
50
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
53
|
+
return {
|
|
54
|
+
url: toPathString(localVarUrlObj),
|
|
55
|
+
options: localVarRequestOptions,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
|
|
60
|
+
* @param {string} [createdAfter] The response includes orders created at or after this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter` in your request. If `createdAfter` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
|
|
61
|
+
* @param {string} [createdBefore] The response includes orders created at or before this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `createdAfter` in the request, `createdBefore` is optional, and if provided must be equal to or after the `createdAfter` date and at least two minutes before the time of the request. If `createdBefore` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
|
|
62
|
+
* @param {string} [lastUpdatedAfter] The response includes orders updated at or after this time. An update is defined as any change made by Amazon or by the seller, including an update to the order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter`. If `lastUpdatedAfter` is provided, neither `createdAfter` nor `createdBefore` may be provided.
|
|
63
|
+
* @param {string} [lastUpdatedBefore] The response includes orders updated at or before this time. An update is defined as any change made by Amazon or by the seller, including an update to the order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `lastUpdatedAfter` in the request, `lastUpdatedBefore` is optional, and if provided must be equal to or after the `lastUpdatedAfter` date and at least two minutes before the time of the request. If `lastUpdatedBefore` is provided, neither `createdAfter` nor `createdBefore` may be provided.
|
|
64
|
+
* @param {Array<SearchOrdersFulfillmentStatusesEnum>} [fulfillmentStatuses] A list of `FulfillmentStatus` values you can use to filter the results.
|
|
65
|
+
* @param {Array<string>} [marketplaceIds] The response includes orders that were placed in marketplaces you include in this list. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of `marketplaceId` values.
|
|
66
|
+
* @param {Array<SearchOrdersFulfilledByEnum>} [fulfilledBy] The response includes orders that are fulfilled by the parties that you include in this list.
|
|
67
|
+
* @param {number} [maxResultsPerPage] The maximum number of orders that can be returned per page. The value must be between 1 and 100. **Default:** 100.
|
|
68
|
+
* @param {string} [paginationToken] Pagination occurs when a request produces a response that exceeds the `maxResultsPerPage`. This means that the response is divided into individual pages. To retrieve the next page, you must pass the `nextToken` value as the `paginationToken` query parameter in the next request. You will not receive a `nextToken` value on the last page.
|
|
69
|
+
* @param {Array<SearchOrdersIncludedDataEnum>} [includedData] A list of datasets to include in the response.
|
|
70
|
+
* @param {*} [options] Override http request option.
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
*/
|
|
73
|
+
searchOrders: async (createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, fulfillmentStatuses, marketplaceIds, fulfilledBy, maxResultsPerPage, paginationToken, includedData, options = {}) => {
|
|
74
|
+
const localVarPath = `/orders/2026-01-01/orders`;
|
|
75
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
76
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
77
|
+
let baseOptions;
|
|
78
|
+
if (configuration) {
|
|
79
|
+
baseOptions = configuration.baseOptions;
|
|
80
|
+
}
|
|
81
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
82
|
+
const localVarHeaderParameter = {};
|
|
83
|
+
const localVarQueryParameter = {};
|
|
84
|
+
if (createdAfter !== undefined) {
|
|
85
|
+
localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
|
|
86
|
+
createdAfter.toISOString() :
|
|
87
|
+
createdAfter;
|
|
88
|
+
}
|
|
89
|
+
if (createdBefore !== undefined) {
|
|
90
|
+
localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
|
|
91
|
+
createdBefore.toISOString() :
|
|
92
|
+
createdBefore;
|
|
93
|
+
}
|
|
94
|
+
if (lastUpdatedAfter !== undefined) {
|
|
95
|
+
localVarQueryParameter['lastUpdatedAfter'] = (lastUpdatedAfter instanceof Date) ?
|
|
96
|
+
lastUpdatedAfter.toISOString() :
|
|
97
|
+
lastUpdatedAfter;
|
|
98
|
+
}
|
|
99
|
+
if (lastUpdatedBefore !== undefined) {
|
|
100
|
+
localVarQueryParameter['lastUpdatedBefore'] = (lastUpdatedBefore instanceof Date) ?
|
|
101
|
+
lastUpdatedBefore.toISOString() :
|
|
102
|
+
lastUpdatedBefore;
|
|
103
|
+
}
|
|
104
|
+
if (fulfillmentStatuses) {
|
|
105
|
+
localVarQueryParameter['fulfillmentStatuses'] = fulfillmentStatuses.join(COLLECTION_FORMATS.csv);
|
|
106
|
+
}
|
|
107
|
+
if (marketplaceIds) {
|
|
108
|
+
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
|
|
109
|
+
}
|
|
110
|
+
if (fulfilledBy) {
|
|
111
|
+
localVarQueryParameter['fulfilledBy'] = fulfilledBy.join(COLLECTION_FORMATS.csv);
|
|
112
|
+
}
|
|
113
|
+
if (maxResultsPerPage !== undefined) {
|
|
114
|
+
localVarQueryParameter['maxResultsPerPage'] = maxResultsPerPage;
|
|
115
|
+
}
|
|
116
|
+
if (paginationToken !== undefined) {
|
|
117
|
+
localVarQueryParameter['paginationToken'] = paginationToken;
|
|
118
|
+
}
|
|
119
|
+
if (includedData) {
|
|
120
|
+
localVarQueryParameter['includedData'] = includedData.join(COLLECTION_FORMATS.csv);
|
|
121
|
+
}
|
|
122
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
123
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
124
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
125
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
126
|
+
return {
|
|
127
|
+
url: toPathString(localVarUrlObj),
|
|
128
|
+
options: localVarRequestOptions,
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* OrdersApi - functional programming interface
|
|
135
|
+
*/
|
|
136
|
+
export const OrdersApiFp = function (configuration) {
|
|
137
|
+
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
|
|
138
|
+
return {
|
|
139
|
+
/**
|
|
140
|
+
* Returns the order that you specify.
|
|
141
|
+
* @param {string} orderId An Amazon-defined order identifier.
|
|
142
|
+
* @param {Array<GetOrderIncludedDataEnum>} [includedData] A list of datasets to include in the response.
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
*/
|
|
146
|
+
async getOrder(orderId, includedData, options) {
|
|
147
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(orderId, includedData, options);
|
|
148
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
149
|
+
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
|
|
150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
|
|
154
|
+
* @param {string} [createdAfter] The response includes orders created at or after this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter` in your request. If `createdAfter` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
|
|
155
|
+
* @param {string} [createdBefore] The response includes orders created at or before this time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `createdAfter` in the request, `createdBefore` is optional, and if provided must be equal to or after the `createdAfter` date and at least two minutes before the time of the request. If `createdBefore` is provided, neither `lastUpdatedAfter` nor `lastUpdatedBefore` may be provided.
|
|
156
|
+
* @param {string} [lastUpdatedAfter] The response includes orders updated at or after this time. An update is defined as any change made by Amazon or by the seller, including an update to the order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: You must provide exactly one of `createdAfter` and `lastUpdatedAfter`. If `lastUpdatedAfter` is provided, neither `createdAfter` nor `createdBefore` may be provided.
|
|
157
|
+
* @param {string} [lastUpdatedBefore] The response includes orders updated at or before this time. An update is defined as any change made by Amazon or by the seller, including an update to the order status. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: If you include `lastUpdatedAfter` in the request, `lastUpdatedBefore` is optional, and if provided must be equal to or after the `lastUpdatedAfter` date and at least two minutes before the time of the request. If `lastUpdatedBefore` is provided, neither `createdAfter` nor `createdBefore` may be provided.
|
|
158
|
+
* @param {Array<SearchOrdersFulfillmentStatusesEnum>} [fulfillmentStatuses] A list of `FulfillmentStatus` values you can use to filter the results.
|
|
159
|
+
* @param {Array<string>} [marketplaceIds] The response includes orders that were placed in marketplaces you include in this list. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of `marketplaceId` values.
|
|
160
|
+
* @param {Array<SearchOrdersFulfilledByEnum>} [fulfilledBy] The response includes orders that are fulfilled by the parties that you include in this list.
|
|
161
|
+
* @param {number} [maxResultsPerPage] The maximum number of orders that can be returned per page. The value must be between 1 and 100. **Default:** 100.
|
|
162
|
+
* @param {string} [paginationToken] Pagination occurs when a request produces a response that exceeds the `maxResultsPerPage`. This means that the response is divided into individual pages. To retrieve the next page, you must pass the `nextToken` value as the `paginationToken` query parameter in the next request. You will not receive a `nextToken` value on the last page.
|
|
163
|
+
* @param {Array<SearchOrdersIncludedDataEnum>} [includedData] A list of datasets to include in the response.
|
|
164
|
+
* @param {*} [options] Override http request option.
|
|
165
|
+
* @throws {RequiredError}
|
|
166
|
+
*/
|
|
167
|
+
async searchOrders(createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, fulfillmentStatuses, marketplaceIds, fulfilledBy, maxResultsPerPage, paginationToken, includedData, options) {
|
|
168
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.searchOrders(createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, fulfillmentStatuses, marketplaceIds, fulfilledBy, maxResultsPerPage, paginationToken, includedData, options);
|
|
169
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
170
|
+
const localVarOperationServerBasePath = operationServerMap['OrdersApi.searchOrders']?.[localVarOperationServerIndex]?.url;
|
|
171
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* OrdersApi - factory interface
|
|
177
|
+
*/
|
|
178
|
+
export const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
179
|
+
const localVarFp = OrdersApiFp(configuration);
|
|
180
|
+
return {
|
|
181
|
+
/**
|
|
182
|
+
* Returns the order that you specify.
|
|
183
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
*/
|
|
187
|
+
getOrder(requestParameters, options) {
|
|
188
|
+
return localVarFp.getOrder(requestParameters.orderId, requestParameters.includedData, options).then((request) => request(axios, basePath));
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
|
|
192
|
+
* @param {OrdersApiSearchOrdersRequest} requestParameters Request parameters.
|
|
193
|
+
* @param {*} [options] Override http request option.
|
|
194
|
+
* @throws {RequiredError}
|
|
195
|
+
*/
|
|
196
|
+
searchOrders(requestParameters = {}, options) {
|
|
197
|
+
return localVarFp.searchOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.fulfillmentStatuses, requestParameters.marketplaceIds, requestParameters.fulfilledBy, requestParameters.maxResultsPerPage, requestParameters.paginationToken, requestParameters.includedData, options).then((request) => request(axios, basePath));
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* OrdersApi - object-oriented interface
|
|
203
|
+
*/
|
|
204
|
+
export class OrdersApi extends BaseAPI {
|
|
205
|
+
/**
|
|
206
|
+
* Returns the order that you specify.
|
|
207
|
+
* @param {OrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
*/
|
|
211
|
+
getOrder(requestParameters, options) {
|
|
212
|
+
return OrdersApiFp(this.configuration).getOrder(requestParameters.orderId, requestParameters.includedData, options).then((request) => request(this.axios, this.basePath));
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
|
|
216
|
+
* @param {OrdersApiSearchOrdersRequest} requestParameters Request parameters.
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
searchOrders(requestParameters = {}, options) {
|
|
221
|
+
return OrdersApiFp(this.configuration).searchOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.fulfillmentStatuses, requestParameters.marketplaceIds, requestParameters.fulfilledBy, requestParameters.maxResultsPerPage, requestParameters.paginationToken, requestParameters.includedData, options).then((request) => request(this.axios, this.basePath));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
export const GetOrderIncludedDataEnum = {
|
|
225
|
+
Buyer: 'BUYER',
|
|
226
|
+
Recipient: 'RECIPIENT',
|
|
227
|
+
Proceeds: 'PROCEEDS',
|
|
228
|
+
Expense: 'EXPENSE',
|
|
229
|
+
Promotion: 'PROMOTION',
|
|
230
|
+
Cancellation: 'CANCELLATION',
|
|
231
|
+
Fulfillment: 'FULFILLMENT',
|
|
232
|
+
Packages: 'PACKAGES'
|
|
233
|
+
};
|
|
234
|
+
export const SearchOrdersFulfillmentStatusesEnum = {
|
|
235
|
+
PendingAvailability: 'PENDING_AVAILABILITY',
|
|
236
|
+
Pending: 'PENDING',
|
|
237
|
+
Unshipped: 'UNSHIPPED',
|
|
238
|
+
PartiallyShipped: 'PARTIALLY_SHIPPED',
|
|
239
|
+
Shipped: 'SHIPPED',
|
|
240
|
+
Cancelled: 'CANCELLED',
|
|
241
|
+
Unfulfillable: 'UNFULFILLABLE'
|
|
242
|
+
};
|
|
243
|
+
export const SearchOrdersFulfilledByEnum = {
|
|
244
|
+
Merchant: 'MERCHANT',
|
|
245
|
+
Amazon: 'AMAZON'
|
|
246
|
+
};
|
|
247
|
+
export const SearchOrdersIncludedDataEnum = {
|
|
248
|
+
Buyer: 'BUYER',
|
|
249
|
+
Recipient: 'RECIPIENT',
|
|
250
|
+
Proceeds: 'PROCEEDS',
|
|
251
|
+
Expense: 'EXPENSE',
|
|
252
|
+
Promotion: 'PROMOTION',
|
|
253
|
+
Cancellation: 'CANCELLATION',
|
|
254
|
+
Fulfillment: 'FULFILLMENT',
|
|
255
|
+
Packages: 'PACKAGES'
|
|
256
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from './api/orders-api';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
16
|
+
export const COLLECTION_FORMATS = {
|
|
17
|
+
csv: ",",
|
|
18
|
+
ssv: " ",
|
|
19
|
+
tsv: "\t",
|
|
20
|
+
pipes: "|",
|
|
21
|
+
};
|
|
22
|
+
export class BaseAPI {
|
|
23
|
+
basePath;
|
|
24
|
+
axios;
|
|
25
|
+
configuration;
|
|
26
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
27
|
+
this.basePath = basePath;
|
|
28
|
+
this.axios = axios;
|
|
29
|
+
if (configuration) {
|
|
30
|
+
this.configuration = configuration;
|
|
31
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
export class RequiredError extends Error {
|
|
37
|
+
field;
|
|
38
|
+
constructor(field, msg) {
|
|
39
|
+
super(msg);
|
|
40
|
+
this.field = field;
|
|
41
|
+
this.name = "RequiredError";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export const operationServerMap = {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { RequiredError } from "./base";
|
|
15
|
+
export const DUMMY_BASE_URL = 'https://example.com';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @throws {RequiredError}
|
|
19
|
+
*/
|
|
20
|
+
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
21
|
+
if (paramValue === null || paramValue === undefined) {
|
|
22
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
26
|
+
if (configuration && configuration.apiKey) {
|
|
27
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
28
|
+
? await configuration.apiKey(keyParamName)
|
|
29
|
+
: await configuration.apiKey;
|
|
30
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const setBasicAuthToObject = function (object, configuration) {
|
|
34
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
35
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export const setBearerAuthToObject = async function (object, configuration) {
|
|
39
|
+
if (configuration && configuration.accessToken) {
|
|
40
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
41
|
+
? await configuration.accessToken()
|
|
42
|
+
: await configuration.accessToken;
|
|
43
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
47
|
+
if (configuration && configuration.accessToken) {
|
|
48
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
49
|
+
? await configuration.accessToken(name, scopes)
|
|
50
|
+
: await configuration.accessToken;
|
|
51
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
55
|
+
if (parameter == null)
|
|
56
|
+
return;
|
|
57
|
+
if (typeof parameter === "object") {
|
|
58
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
59
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
if (urlSearchParams.has(key)) {
|
|
67
|
+
urlSearchParams.append(key, parameter);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
urlSearchParams.set(key, parameter);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export const setSearchParams = function (url, ...objects) {
|
|
75
|
+
const searchParams = new URLSearchParams(url.search);
|
|
76
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
77
|
+
url.search = searchParams.toString();
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
81
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
82
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
83
|
+
*/
|
|
84
|
+
export const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
85
|
+
if (value instanceof Set) {
|
|
86
|
+
return Array.from(value);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
93
|
+
const nonString = typeof value !== 'string';
|
|
94
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
95
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
96
|
+
: nonString;
|
|
97
|
+
return needsSerialization
|
|
98
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
99
|
+
: (value || "");
|
|
100
|
+
};
|
|
101
|
+
export const toPathString = function (url) {
|
|
102
|
+
return url.pathname + url.search + url.hash;
|
|
103
|
+
};
|
|
104
|
+
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
105
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
106
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
107
|
+
return axios.request(axiosRequestArgs);
|
|
108
|
+
};
|
|
109
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* The Selling Partner API for Orders
|
|
4
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
export class Configuration {
|
|
14
|
+
/**
|
|
15
|
+
* parameter for apiKey security
|
|
16
|
+
* @param name security name
|
|
17
|
+
*/
|
|
18
|
+
apiKey;
|
|
19
|
+
/**
|
|
20
|
+
* parameter for basic security
|
|
21
|
+
*/
|
|
22
|
+
username;
|
|
23
|
+
/**
|
|
24
|
+
* parameter for basic security
|
|
25
|
+
*/
|
|
26
|
+
password;
|
|
27
|
+
/**
|
|
28
|
+
* parameter for oauth2 security
|
|
29
|
+
* @param name security name
|
|
30
|
+
* @param scopes oauth2 scope
|
|
31
|
+
*/
|
|
32
|
+
accessToken;
|
|
33
|
+
/**
|
|
34
|
+
* parameter for aws4 signature security
|
|
35
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
36
|
+
* @param {string} options.region - aws region
|
|
37
|
+
* @param {string} options.service - name of the service.
|
|
38
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
39
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
40
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
41
|
+
* @memberof Configuration
|
|
42
|
+
*/
|
|
43
|
+
awsv4;
|
|
44
|
+
/**
|
|
45
|
+
* override base path
|
|
46
|
+
*/
|
|
47
|
+
basePath;
|
|
48
|
+
/**
|
|
49
|
+
* override server index
|
|
50
|
+
*/
|
|
51
|
+
serverIndex;
|
|
52
|
+
/**
|
|
53
|
+
* base options for axios calls
|
|
54
|
+
*/
|
|
55
|
+
baseOptions;
|
|
56
|
+
/**
|
|
57
|
+
* The FormData constructor that will be used to create multipart form data
|
|
58
|
+
* requests. You can inject this here so that execution environments that
|
|
59
|
+
* do not support the FormData class can still run the generated client.
|
|
60
|
+
*
|
|
61
|
+
* @type {new () => FormData}
|
|
62
|
+
*/
|
|
63
|
+
formDataCtor;
|
|
64
|
+
constructor(param = {}) {
|
|
65
|
+
this.apiKey = param.apiKey;
|
|
66
|
+
this.username = param.username;
|
|
67
|
+
this.password = param.password;
|
|
68
|
+
this.accessToken = param.accessToken;
|
|
69
|
+
this.awsv4 = param.awsv4;
|
|
70
|
+
this.basePath = param.basePath;
|
|
71
|
+
this.serverIndex = param.serverIndex;
|
|
72
|
+
this.baseOptions = {
|
|
73
|
+
...param.baseOptions,
|
|
74
|
+
headers: {
|
|
75
|
+
...param.baseOptions?.headers,
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
this.formDataCtor = param.formDataCtor;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if the given MIME is a JSON MIME.
|
|
82
|
+
* JSON MIME examples:
|
|
83
|
+
* application/json
|
|
84
|
+
* application/json; charset=UTF8
|
|
85
|
+
* APPLICATION/JSON
|
|
86
|
+
* application/vnd.company+json
|
|
87
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
88
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
89
|
+
*/
|
|
90
|
+
isJsonMime(mime) {
|
|
91
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
92
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from "./api";
|
|
15
|
+
export * from "./configuration";
|
|
16
|
+
export * from "./models";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export const BusinessHourDayOfWeekEnum = {
|
|
15
|
+
Sun: 'SUN',
|
|
16
|
+
Mon: 'MON',
|
|
17
|
+
Tue: 'TUE',
|
|
18
|
+
Wed: 'WED',
|
|
19
|
+
Thu: 'THU',
|
|
20
|
+
Fri: 'FRI',
|
|
21
|
+
Sat: 'SAT'
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Orders
|
|
5
|
+
* The Selling Partner API for Orders returns orders information. This API supports the following types of orders: - FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2026-01-01
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Classification of the enforcement level required for shipping and delivery constraints.
|
|
16
|
+
*/
|
|
17
|
+
export const ConstraintType = {
|
|
18
|
+
Mandatory: 'MANDATORY'
|
|
19
|
+
};
|