@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1 4.0.17 → 5.0.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 +4 -4
- package/dist/index.cjs +528 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1088 -0
- package/dist/index.d.ts +1088 -0
- package/dist/index.js +480 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -12
- package/dist/cjs/api-model/api/vendor-direct-fulfillment-orders-api.js +0 -288
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/acknowledgement-status.js +0 -15
- package/dist/cjs/api-model/models/address.js +0 -15
- package/dist/cjs/api-model/models/get-order-response.js +0 -15
- package/dist/cjs/api-model/models/get-orders-response.js +0 -15
- package/dist/cjs/api-model/models/gift-details.js +0 -15
- package/dist/cjs/api-model/models/index.js +0 -42
- package/dist/cjs/api-model/models/item-quantity.js +0 -19
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/api-model/models/money.js +0 -15
- package/dist/cjs/api-model/models/order-acknowledgement-item.js +0 -15
- package/dist/cjs/api-model/models/order-details-tax-total.js +0 -15
- package/dist/cjs/api-model/models/order-details.js +0 -22
- package/dist/cjs/api-model/models/order-item-acknowledgement.js +0 -15
- package/dist/cjs/api-model/models/order-item-tax-details.js +0 -15
- package/dist/cjs/api-model/models/order-item.js +0 -15
- package/dist/cjs/api-model/models/order-list.js +0 -15
- package/dist/cjs/api-model/models/order.js +0 -15
- package/dist/cjs/api-model/models/pagination.js +0 -15
- package/dist/cjs/api-model/models/party-identification.js +0 -15
- package/dist/cjs/api-model/models/scheduled-delivery-shipment.js +0 -15
- package/dist/cjs/api-model/models/shipment-dates.js +0 -15
- package/dist/cjs/api-model/models/shipment-details.js +0 -15
- package/dist/cjs/api-model/models/submit-acknowledgement-request.js +0 -15
- package/dist/cjs/api-model/models/submit-acknowledgement-response.js +0 -15
- package/dist/cjs/api-model/models/tax-details.js +0 -25
- package/dist/cjs/api-model/models/tax-registration-details.js +0 -20
- package/dist/cjs/api-model/models/transaction-id.js +0 -15
- package/dist/cjs/client.js +0 -35
- package/dist/cjs/index.js +0 -19
- package/dist/es/api-model/api/vendor-direct-fulfillment-orders-api.js +0 -278
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/acknowledgement-status.js +0 -14
- package/dist/es/api-model/models/address.js +0 -14
- package/dist/es/api-model/models/get-order-response.js +0 -14
- package/dist/es/api-model/models/get-orders-response.js +0 -14
- package/dist/es/api-model/models/gift-details.js +0 -14
- package/dist/es/api-model/models/index.js +0 -26
- package/dist/es/api-model/models/item-quantity.js +0 -16
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/api-model/models/money.js +0 -14
- package/dist/es/api-model/models/order-acknowledgement-item.js +0 -14
- package/dist/es/api-model/models/order-details-tax-total.js +0 -14
- package/dist/es/api-model/models/order-details.js +0 -19
- package/dist/es/api-model/models/order-item-acknowledgement.js +0 -14
- package/dist/es/api-model/models/order-item-tax-details.js +0 -14
- package/dist/es/api-model/models/order-item.js +0 -14
- package/dist/es/api-model/models/order-list.js +0 -14
- package/dist/es/api-model/models/order.js +0 -14
- package/dist/es/api-model/models/pagination.js +0 -14
- package/dist/es/api-model/models/party-identification.js +0 -14
- package/dist/es/api-model/models/scheduled-delivery-shipment.js +0 -14
- package/dist/es/api-model/models/shipment-dates.js +0 -14
- package/dist/es/api-model/models/shipment-details.js +0 -14
- package/dist/es/api-model/models/submit-acknowledgement-request.js +0 -14
- package/dist/es/api-model/models/submit-acknowledgement-response.js +0 -14
- package/dist/es/api-model/models/tax-details.js +0 -22
- package/dist/es/api-model/models/tax-registration-details.js +0 -17
- package/dist/es/api-model/models/transaction-id.js +0 -14
- package/dist/es/client.js +0 -31
- package/dist/es/index.js +0 -3
- package/dist/types/api-model/api/vendor-direct-fulfillment-orders-api.d.ts +0 -204
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/acknowledgement-status.d.ts +0 -24
- package/dist/types/api-model/models/address.d.ts +0 -64
- package/dist/types/api-model/models/get-order-response.d.ts +0 -22
- package/dist/types/api-model/models/get-orders-response.d.ts +0 -22
- package/dist/types/api-model/models/gift-details.d.ts +0 -24
- package/dist/types/api-model/models/index.d.ts +0 -26
- package/dist/types/api-model/models/item-quantity.d.ts +0 -28
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/api-model/models/money.d.ts +0 -24
- package/dist/types/api-model/models/order-acknowledgement-item.d.ts +0 -38
- package/dist/types/api-model/models/order-details-tax-total.d.ts +0 -21
- package/dist/types/api-model/models/order-details.d.ts +0 -50
- package/dist/types/api-model/models/order-item-acknowledgement.d.ts +0 -30
- package/dist/types/api-model/models/order-item-tax-details.d.ts +0 -21
- package/dist/types/api-model/models/order-item.d.ts +0 -43
- package/dist/types/api-model/models/order-list.d.ts +0 -23
- package/dist/types/api-model/models/order.d.ts +0 -22
- package/dist/types/api-model/models/pagination.d.ts +0 -20
- package/dist/types/api-model/models/party-identification.d.ts +0 -24
- package/dist/types/api-model/models/scheduled-delivery-shipment.d.ts +0 -28
- package/dist/types/api-model/models/shipment-dates.d.ts +0 -24
- package/dist/types/api-model/models/shipment-details.d.ts +0 -42
- package/dist/types/api-model/models/submit-acknowledgement-request.d.ts +0 -21
- package/dist/types/api-model/models/submit-acknowledgement-response.d.ts +0 -22
- package/dist/types/api-model/models/tax-details.d.ts +0 -37
- package/dist/types/api-model/models/tax-registration-details.d.ts +0 -35
- package/dist/types/api-model/models/transaction-id.d.ts +0 -20
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1`
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1)
|
|
4
4
|
[](https://github.com/xojs/xo)
|
|
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/vendor-direct-fulfillment-orders-api-v1
|
|
|
25
25
|
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
26
26
|
import {VendorDirectFulfillmentOrdersApiClient} from '@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1'
|
|
27
27
|
|
|
28
|
+
// `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
|
|
29
|
+
// `LWA_CLIENT_SECRET` environment variables.
|
|
28
30
|
const auth = new SellingPartnerApiAuth({
|
|
29
|
-
|
|
30
|
-
clientSecret: process.env.LWA_CLIENT_SECRET,
|
|
31
|
-
refreshToken: 'Atzr|…',
|
|
31
|
+
refreshToken: await getRefreshTokenForSeller(sellerId),
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
const client = new VendorDirectFulfillmentOrdersApiClient({
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
GetOrdersSortOrderEnum: () => GetOrdersSortOrderEnum,
|
|
34
|
+
GetOrdersStatusEnum: () => GetOrdersStatusEnum,
|
|
35
|
+
ItemQuantityUnitOfMeasureEnum: () => ItemQuantityUnitOfMeasureEnum,
|
|
36
|
+
OrderDetailsOrderStatusEnum: () => OrderDetailsOrderStatusEnum,
|
|
37
|
+
TaxDetailsTypeEnum: () => TaxDetailsTypeEnum,
|
|
38
|
+
TaxRegistrationDetailsTaxRegistrationTypeEnum: () => TaxRegistrationDetailsTaxRegistrationTypeEnum,
|
|
39
|
+
VendorDirectFulfillmentOrdersApi: () => VendorDirectFulfillmentOrdersApi,
|
|
40
|
+
VendorDirectFulfillmentOrdersApiAxiosParamCreator: () => VendorDirectFulfillmentOrdersApiAxiosParamCreator,
|
|
41
|
+
VendorDirectFulfillmentOrdersApiClient: () => VendorDirectFulfillmentOrdersApiClient,
|
|
42
|
+
VendorDirectFulfillmentOrdersApiFactory: () => VendorDirectFulfillmentOrdersApiFactory,
|
|
43
|
+
VendorDirectFulfillmentOrdersApiFp: () => VendorDirectFulfillmentOrdersApiFp,
|
|
44
|
+
clientRateLimits: () => clientRateLimits
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(index_exports);
|
|
47
|
+
|
|
48
|
+
// src/client.ts
|
|
49
|
+
var import_common2 = require("@sp-api-sdk/common");
|
|
50
|
+
|
|
51
|
+
// src/api-model/api/vendor-direct-fulfillment-orders-api.ts
|
|
52
|
+
var import_axios2 = __toESM(require("axios"), 1);
|
|
53
|
+
|
|
54
|
+
// src/api-model/base.ts
|
|
55
|
+
var import_axios = __toESM(require("axios"), 1);
|
|
56
|
+
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
57
|
+
var BaseAPI = class {
|
|
58
|
+
constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
|
|
59
|
+
this.basePath = basePath;
|
|
60
|
+
this.axios = axios;
|
|
61
|
+
if (configuration) {
|
|
62
|
+
this.configuration = configuration;
|
|
63
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
basePath;
|
|
67
|
+
axios;
|
|
68
|
+
configuration;
|
|
69
|
+
};
|
|
70
|
+
var RequiredError = class extends Error {
|
|
71
|
+
constructor(field, msg) {
|
|
72
|
+
super(msg);
|
|
73
|
+
this.field = field;
|
|
74
|
+
this.name = "RequiredError";
|
|
75
|
+
}
|
|
76
|
+
field;
|
|
77
|
+
};
|
|
78
|
+
var operationServerMap = {};
|
|
79
|
+
|
|
80
|
+
// src/api-model/common.ts
|
|
81
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
82
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
83
|
+
if (paramValue === null || paramValue === void 0) {
|
|
84
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
88
|
+
if (parameter == null) return;
|
|
89
|
+
if (typeof parameter === "object") {
|
|
90
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
91
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
+
} else {
|
|
93
|
+
Object.keys(parameter).forEach(
|
|
94
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
if (urlSearchParams.has(key)) {
|
|
99
|
+
urlSearchParams.append(key, parameter);
|
|
100
|
+
} else {
|
|
101
|
+
urlSearchParams.set(key, parameter);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
var setSearchParams = function(url, ...objects) {
|
|
106
|
+
const searchParams = new URLSearchParams(url.search);
|
|
107
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
108
|
+
url.search = searchParams.toString();
|
|
109
|
+
};
|
|
110
|
+
var replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
111
|
+
if (value instanceof Set) {
|
|
112
|
+
return Array.from(value);
|
|
113
|
+
} else {
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
118
|
+
const nonString = typeof value !== "string";
|
|
119
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
120
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
121
|
+
};
|
|
122
|
+
var toPathString = function(url) {
|
|
123
|
+
return url.pathname + url.search + url.hash;
|
|
124
|
+
};
|
|
125
|
+
var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
|
|
126
|
+
return (axios = globalAxios3, basePath = BASE_PATH2) => {
|
|
127
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
128
|
+
return axios.request(axiosRequestArgs);
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// src/api-model/api/vendor-direct-fulfillment-orders-api.ts
|
|
133
|
+
var VendorDirectFulfillmentOrdersApiAxiosParamCreator = function(configuration) {
|
|
134
|
+
return {
|
|
135
|
+
/**
|
|
136
|
+
* Returns purchase order information for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
137
|
+
* @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
|
|
138
|
+
* @param {*} [options] Override http request option.
|
|
139
|
+
* @throws {RequiredError}
|
|
140
|
+
*/
|
|
141
|
+
getOrder: async (purchaseOrderNumber, options = {}) => {
|
|
142
|
+
assertParamExists("getOrder", "purchaseOrderNumber", purchaseOrderNumber);
|
|
143
|
+
const localVarPath = `/vendor/directFulfillment/orders/v1/purchaseOrders/{purchaseOrderNumber}`.replace("{purchaseOrderNumber}", encodeURIComponent(String(purchaseOrderNumber)));
|
|
144
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
145
|
+
let baseOptions;
|
|
146
|
+
if (configuration) {
|
|
147
|
+
baseOptions = configuration.baseOptions;
|
|
148
|
+
}
|
|
149
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
150
|
+
const localVarHeaderParameter = {};
|
|
151
|
+
const localVarQueryParameter = {};
|
|
152
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
153
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
154
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
155
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
156
|
+
return {
|
|
157
|
+
url: toPathString(localVarUrlObj),
|
|
158
|
+
options: localVarRequestOptions
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
163
|
+
* @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
|
164
|
+
* @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
|
165
|
+
* @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
|
|
166
|
+
* @param {GetOrdersStatusEnum} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
|
|
167
|
+
* @param {number} [limit] The limit to the number of purchase orders returned.
|
|
168
|
+
* @param {GetOrdersSortOrderEnum} [sortOrder] Sort the list in ascending or descending order by order creation date.
|
|
169
|
+
* @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
|
|
170
|
+
* @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
|
|
171
|
+
* @param {*} [options] Override http request option.
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
*/
|
|
174
|
+
getOrders: async (createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options = {}) => {
|
|
175
|
+
assertParamExists("getOrders", "createdAfter", createdAfter);
|
|
176
|
+
assertParamExists("getOrders", "createdBefore", createdBefore);
|
|
177
|
+
const localVarPath = `/vendor/directFulfillment/orders/v1/purchaseOrders`;
|
|
178
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
179
|
+
let baseOptions;
|
|
180
|
+
if (configuration) {
|
|
181
|
+
baseOptions = configuration.baseOptions;
|
|
182
|
+
}
|
|
183
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
184
|
+
const localVarHeaderParameter = {};
|
|
185
|
+
const localVarQueryParameter = {};
|
|
186
|
+
if (shipFromPartyId !== void 0) {
|
|
187
|
+
localVarQueryParameter["shipFromPartyId"] = shipFromPartyId;
|
|
188
|
+
}
|
|
189
|
+
if (status !== void 0) {
|
|
190
|
+
localVarQueryParameter["status"] = status;
|
|
191
|
+
}
|
|
192
|
+
if (limit !== void 0) {
|
|
193
|
+
localVarQueryParameter["limit"] = limit;
|
|
194
|
+
}
|
|
195
|
+
if (createdAfter !== void 0) {
|
|
196
|
+
localVarQueryParameter["createdAfter"] = createdAfter instanceof Date ? createdAfter.toISOString() : createdAfter;
|
|
197
|
+
}
|
|
198
|
+
if (createdBefore !== void 0) {
|
|
199
|
+
localVarQueryParameter["createdBefore"] = createdBefore instanceof Date ? createdBefore.toISOString() : createdBefore;
|
|
200
|
+
}
|
|
201
|
+
if (sortOrder !== void 0) {
|
|
202
|
+
localVarQueryParameter["sortOrder"] = sortOrder;
|
|
203
|
+
}
|
|
204
|
+
if (nextToken !== void 0) {
|
|
205
|
+
localVarQueryParameter["nextToken"] = nextToken;
|
|
206
|
+
}
|
|
207
|
+
if (includeDetails !== void 0) {
|
|
208
|
+
localVarQueryParameter["includeDetails"] = includeDetails;
|
|
209
|
+
}
|
|
210
|
+
localVarHeaderParameter["Accept"] = "application/json,payload";
|
|
211
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
212
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
213
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
214
|
+
return {
|
|
215
|
+
url: toPathString(localVarUrlObj),
|
|
216
|
+
options: localVarRequestOptions
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
221
|
+
* @param {SubmitAcknowledgementRequest} body The request body containing the acknowledgement to an order.
|
|
222
|
+
* @param {*} [options] Override http request option.
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
*/
|
|
225
|
+
submitAcknowledgement: async (body, options = {}) => {
|
|
226
|
+
assertParamExists("submitAcknowledgement", "body", body);
|
|
227
|
+
const localVarPath = `/vendor/directFulfillment/orders/v1/acknowledgements`;
|
|
228
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
229
|
+
let baseOptions;
|
|
230
|
+
if (configuration) {
|
|
231
|
+
baseOptions = configuration.baseOptions;
|
|
232
|
+
}
|
|
233
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
234
|
+
const localVarHeaderParameter = {};
|
|
235
|
+
const localVarQueryParameter = {};
|
|
236
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
237
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
238
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
239
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
240
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
241
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
242
|
+
return {
|
|
243
|
+
url: toPathString(localVarUrlObj),
|
|
244
|
+
options: localVarRequestOptions
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
var VendorDirectFulfillmentOrdersApiFp = function(configuration) {
|
|
250
|
+
const localVarAxiosParamCreator = VendorDirectFulfillmentOrdersApiAxiosParamCreator(configuration);
|
|
251
|
+
return {
|
|
252
|
+
/**
|
|
253
|
+
* Returns purchase order information for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
254
|
+
* @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
|
|
255
|
+
* @param {*} [options] Override http request option.
|
|
256
|
+
* @throws {RequiredError}
|
|
257
|
+
*/
|
|
258
|
+
async getOrder(purchaseOrderNumber, options) {
|
|
259
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(purchaseOrderNumber, options);
|
|
260
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
261
|
+
const localVarOperationServerBasePath = operationServerMap["VendorDirectFulfillmentOrdersApi.getOrder"]?.[localVarOperationServerIndex]?.url;
|
|
262
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
263
|
+
},
|
|
264
|
+
/**
|
|
265
|
+
* Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
266
|
+
* @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
|
267
|
+
* @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
|
|
268
|
+
* @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
|
|
269
|
+
* @param {GetOrdersStatusEnum} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
|
|
270
|
+
* @param {number} [limit] The limit to the number of purchase orders returned.
|
|
271
|
+
* @param {GetOrdersSortOrderEnum} [sortOrder] Sort the list in ascending or descending order by order creation date.
|
|
272
|
+
* @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
|
|
273
|
+
* @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
async getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options) {
|
|
278
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options);
|
|
279
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
280
|
+
const localVarOperationServerBasePath = operationServerMap["VendorDirectFulfillmentOrdersApi.getOrders"]?.[localVarOperationServerIndex]?.url;
|
|
281
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
285
|
+
* @param {SubmitAcknowledgementRequest} body The request body containing the acknowledgement to an order.
|
|
286
|
+
* @param {*} [options] Override http request option.
|
|
287
|
+
* @throws {RequiredError}
|
|
288
|
+
*/
|
|
289
|
+
async submitAcknowledgement(body, options) {
|
|
290
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.submitAcknowledgement(body, options);
|
|
291
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
292
|
+
const localVarOperationServerBasePath = operationServerMap["VendorDirectFulfillmentOrdersApi.submitAcknowledgement"]?.[localVarOperationServerIndex]?.url;
|
|
293
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
var VendorDirectFulfillmentOrdersApiFactory = function(configuration, basePath, axios) {
|
|
298
|
+
const localVarFp = VendorDirectFulfillmentOrdersApiFp(configuration);
|
|
299
|
+
return {
|
|
300
|
+
/**
|
|
301
|
+
* Returns purchase order information for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
302
|
+
* @param {VendorDirectFulfillmentOrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
303
|
+
* @param {*} [options] Override http request option.
|
|
304
|
+
* @throws {RequiredError}
|
|
305
|
+
*/
|
|
306
|
+
getOrder(requestParameters, options) {
|
|
307
|
+
return localVarFp.getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
* Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
311
|
+
* @param {VendorDirectFulfillmentOrdersApiGetOrdersRequest} requestParameters Request parameters.
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
getOrders(requestParameters, options) {
|
|
316
|
+
return localVarFp.getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(axios, basePath));
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
320
|
+
* @param {VendorDirectFulfillmentOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
321
|
+
* @param {*} [options] Override http request option.
|
|
322
|
+
* @throws {RequiredError}
|
|
323
|
+
*/
|
|
324
|
+
submitAcknowledgement(requestParameters, options) {
|
|
325
|
+
return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
var VendorDirectFulfillmentOrdersApi = class extends BaseAPI {
|
|
330
|
+
/**
|
|
331
|
+
* Returns purchase order information for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
332
|
+
* @param {VendorDirectFulfillmentOrdersApiGetOrderRequest} requestParameters Request parameters.
|
|
333
|
+
* @param {*} [options] Override http request option.
|
|
334
|
+
* @throws {RequiredError}
|
|
335
|
+
*/
|
|
336
|
+
getOrder(requestParameters, options) {
|
|
337
|
+
return VendorDirectFulfillmentOrdersApiFp(this.configuration).getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath));
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
341
|
+
* @param {VendorDirectFulfillmentOrdersApiGetOrdersRequest} requestParameters Request parameters.
|
|
342
|
+
* @param {*} [options] Override http request option.
|
|
343
|
+
* @throws {RequiredError}
|
|
344
|
+
*/
|
|
345
|
+
getOrders(requestParameters, options) {
|
|
346
|
+
return VendorDirectFulfillmentOrdersApiFp(this.configuration).getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(this.axios, this.basePath));
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
350
|
+
* @param {VendorDirectFulfillmentOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
submitAcknowledgement(requestParameters, options) {
|
|
355
|
+
return VendorDirectFulfillmentOrdersApiFp(this.configuration).submitAcknowledgement(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
var GetOrdersStatusEnum = {
|
|
359
|
+
New: "NEW",
|
|
360
|
+
Shipped: "SHIPPED",
|
|
361
|
+
Accepted: "ACCEPTED",
|
|
362
|
+
Cancelled: "CANCELLED"
|
|
363
|
+
};
|
|
364
|
+
var GetOrdersSortOrderEnum = {
|
|
365
|
+
Asc: "ASC",
|
|
366
|
+
Desc: "DESC"
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// src/api-model/configuration.ts
|
|
370
|
+
var Configuration = class {
|
|
371
|
+
/**
|
|
372
|
+
* parameter for apiKey security
|
|
373
|
+
* @param name security name
|
|
374
|
+
*/
|
|
375
|
+
apiKey;
|
|
376
|
+
/**
|
|
377
|
+
* parameter for basic security
|
|
378
|
+
*/
|
|
379
|
+
username;
|
|
380
|
+
/**
|
|
381
|
+
* parameter for basic security
|
|
382
|
+
*/
|
|
383
|
+
password;
|
|
384
|
+
/**
|
|
385
|
+
* parameter for oauth2 security
|
|
386
|
+
* @param name security name
|
|
387
|
+
* @param scopes oauth2 scope
|
|
388
|
+
*/
|
|
389
|
+
accessToken;
|
|
390
|
+
/**
|
|
391
|
+
* parameter for aws4 signature security
|
|
392
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
393
|
+
* @param {string} options.region - aws region
|
|
394
|
+
* @param {string} options.service - name of the service.
|
|
395
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
396
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
397
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
398
|
+
* @memberof Configuration
|
|
399
|
+
*/
|
|
400
|
+
awsv4;
|
|
401
|
+
/**
|
|
402
|
+
* override base path
|
|
403
|
+
*/
|
|
404
|
+
basePath;
|
|
405
|
+
/**
|
|
406
|
+
* override server index
|
|
407
|
+
*/
|
|
408
|
+
serverIndex;
|
|
409
|
+
/**
|
|
410
|
+
* base options for axios calls
|
|
411
|
+
*/
|
|
412
|
+
baseOptions;
|
|
413
|
+
/**
|
|
414
|
+
* The FormData constructor that will be used to create multipart form data
|
|
415
|
+
* requests. You can inject this here so that execution environments that
|
|
416
|
+
* do not support the FormData class can still run the generated client.
|
|
417
|
+
*
|
|
418
|
+
* @type {new () => FormData}
|
|
419
|
+
*/
|
|
420
|
+
formDataCtor;
|
|
421
|
+
constructor(param = {}) {
|
|
422
|
+
this.apiKey = param.apiKey;
|
|
423
|
+
this.username = param.username;
|
|
424
|
+
this.password = param.password;
|
|
425
|
+
this.accessToken = param.accessToken;
|
|
426
|
+
this.awsv4 = param.awsv4;
|
|
427
|
+
this.basePath = param.basePath;
|
|
428
|
+
this.serverIndex = param.serverIndex;
|
|
429
|
+
this.baseOptions = {
|
|
430
|
+
...param.baseOptions,
|
|
431
|
+
headers: {
|
|
432
|
+
...param.baseOptions?.headers
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
this.formDataCtor = param.formDataCtor;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Check if the given MIME is a JSON MIME.
|
|
439
|
+
* JSON MIME examples:
|
|
440
|
+
* application/json
|
|
441
|
+
* application/json; charset=UTF8
|
|
442
|
+
* APPLICATION/JSON
|
|
443
|
+
* application/vnd.company+json
|
|
444
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
445
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
446
|
+
*/
|
|
447
|
+
isJsonMime(mime) {
|
|
448
|
+
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
449
|
+
return mime !== null && jsonMime.test(mime);
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
// src/api-model/models/item-quantity.ts
|
|
454
|
+
var ItemQuantityUnitOfMeasureEnum = {
|
|
455
|
+
Each: "Each"
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
// src/api-model/models/order-details.ts
|
|
459
|
+
var OrderDetailsOrderStatusEnum = {
|
|
460
|
+
New: "NEW",
|
|
461
|
+
Shipped: "SHIPPED",
|
|
462
|
+
Accepted: "ACCEPTED",
|
|
463
|
+
Cancelled: "CANCELLED"
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
// src/api-model/models/tax-details.ts
|
|
467
|
+
var TaxDetailsTypeEnum = {
|
|
468
|
+
Consumption: "CONSUMPTION",
|
|
469
|
+
Gst: "GST",
|
|
470
|
+
MwSt: "MwSt.",
|
|
471
|
+
Pst: "PST",
|
|
472
|
+
Total: "TOTAL",
|
|
473
|
+
Tva: "TVA",
|
|
474
|
+
Vat: "VAT"
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
// src/api-model/models/tax-registration-details.ts
|
|
478
|
+
var TaxRegistrationDetailsTaxRegistrationTypeEnum = {
|
|
479
|
+
Vat: "VAT",
|
|
480
|
+
Gst: "GST"
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// src/client.ts
|
|
484
|
+
var clientRateLimits = [
|
|
485
|
+
{
|
|
486
|
+
method: "get",
|
|
487
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
488
|
+
urlRegex: new RegExp("^/vendor/directFulfillment/orders/v1/purchaseOrders$"),
|
|
489
|
+
rate: 10,
|
|
490
|
+
burst: 10
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
method: "get",
|
|
494
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
495
|
+
urlRegex: new RegExp("^/vendor/directFulfillment/orders/v1/purchaseOrders/[^/]*$"),
|
|
496
|
+
rate: 10,
|
|
497
|
+
burst: 10
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
method: "post",
|
|
501
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
502
|
+
urlRegex: new RegExp("^/vendor/directFulfillment/orders/v1/acknowledgements$"),
|
|
503
|
+
rate: 10,
|
|
504
|
+
burst: 10
|
|
505
|
+
}
|
|
506
|
+
];
|
|
507
|
+
var VendorDirectFulfillmentOrdersApiClient = class extends VendorDirectFulfillmentOrdersApi {
|
|
508
|
+
constructor(configuration) {
|
|
509
|
+
const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
|
|
510
|
+
super(new Configuration(), endpoint, axios);
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
514
|
+
0 && (module.exports = {
|
|
515
|
+
GetOrdersSortOrderEnum,
|
|
516
|
+
GetOrdersStatusEnum,
|
|
517
|
+
ItemQuantityUnitOfMeasureEnum,
|
|
518
|
+
OrderDetailsOrderStatusEnum,
|
|
519
|
+
TaxDetailsTypeEnum,
|
|
520
|
+
TaxRegistrationDetailsTaxRegistrationTypeEnum,
|
|
521
|
+
VendorDirectFulfillmentOrdersApi,
|
|
522
|
+
VendorDirectFulfillmentOrdersApiAxiosParamCreator,
|
|
523
|
+
VendorDirectFulfillmentOrdersApiClient,
|
|
524
|
+
VendorDirectFulfillmentOrdersApiFactory,
|
|
525
|
+
VendorDirectFulfillmentOrdersApiFp,
|
|
526
|
+
clientRateLimits
|
|
527
|
+
});
|
|
528
|
+
//# sourceMappingURL=index.cjs.map
|