@sp-api-sdk/vendor-orders-api-v1 1.10.9 → 1.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/api-model/api/vendor-orders-api.js +12 -35
- package/dist/cjs/src/api-model/base.js +1 -3
- package/dist/cjs/src/api-model/common.js +2 -0
- package/dist/es/src/api-model/api/vendor-orders-api.js +12 -35
- package/dist/es/src/api-model/base.js +1 -3
- package/dist/es/src/api-model/common.js +2 -0
- package/dist/types/src/api-model/api/vendor-orders-api.d.ts +10 -33
- package/dist/types/src/api-model/base.d.ts +2 -3
- package/dist/types/src/api-model/common.d.ts +3 -3
- package/package.json +3 -3
|
@@ -333,62 +333,39 @@ const VendorOrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
333
333
|
return {
|
|
334
334
|
/**
|
|
335
335
|
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
336
|
-
* @param {
|
|
336
|
+
* @param {VendorOrdersApiGetPurchaseOrderRequest} requestParameters Request parameters.
|
|
337
337
|
* @param {*} [options] Override http request option.
|
|
338
338
|
* @throws {RequiredError}
|
|
339
339
|
*/
|
|
340
|
-
getPurchaseOrder(
|
|
341
|
-
return localVarFp.getPurchaseOrder(purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
340
|
+
getPurchaseOrder(requestParameters, options) {
|
|
341
|
+
return localVarFp.getPurchaseOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
342
342
|
},
|
|
343
343
|
/**
|
|
344
344
|
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
345
|
-
* @param {
|
|
346
|
-
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
347
|
-
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
348
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
349
|
-
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
350
|
-
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
351
|
-
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
352
|
-
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
353
|
-
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
354
|
-
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
355
|
-
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
356
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
345
|
+
* @param {VendorOrdersApiGetPurchaseOrdersRequest} requestParameters Request parameters.
|
|
357
346
|
* @param {*} [options] Override http request option.
|
|
358
347
|
* @throws {RequiredError}
|
|
359
348
|
*/
|
|
360
|
-
getPurchaseOrders(
|
|
361
|
-
return localVarFp.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options).then((request) => request(axios, basePath));
|
|
349
|
+
getPurchaseOrders(requestParameters = {}, options) {
|
|
350
|
+
return localVarFp.getPurchaseOrders(requestParameters.limit, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, requestParameters.changedAfter, requestParameters.changedBefore, requestParameters.poItemState, requestParameters.isPOChanged, requestParameters.purchaseOrderState, requestParameters.orderingVendorCode, options).then((request) => request(axios, basePath));
|
|
362
351
|
},
|
|
363
352
|
/**
|
|
364
353
|
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
367
|
-
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
368
|
-
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
369
|
-
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
370
|
-
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
371
|
-
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
372
|
-
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
373
|
-
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
374
|
-
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
|
|
375
|
-
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
|
|
376
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
377
|
-
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
354
|
+
* @param {VendorOrdersApiGetPurchaseOrdersStatusRequest} requestParameters Request parameters.
|
|
378
355
|
* @param {*} [options] Override http request option.
|
|
379
356
|
* @throws {RequiredError}
|
|
380
357
|
*/
|
|
381
|
-
getPurchaseOrdersStatus(
|
|
382
|
-
return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
|
|
358
|
+
getPurchaseOrdersStatus(requestParameters = {}, options) {
|
|
359
|
+
return localVarFp.getPurchaseOrdersStatus(requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.purchaseOrderNumber, requestParameters.purchaseOrderStatus, requestParameters.itemConfirmationStatus, requestParameters.itemReceiveStatus, requestParameters.orderingVendorCode, requestParameters.shipToPartyId, options).then((request) => request(axios, basePath));
|
|
383
360
|
},
|
|
384
361
|
/**
|
|
385
362
|
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
386
|
-
* @param {
|
|
363
|
+
* @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
387
364
|
* @param {*} [options] Override http request option.
|
|
388
365
|
* @throws {RequiredError}
|
|
389
366
|
*/
|
|
390
|
-
submitAcknowledgement(
|
|
391
|
-
return localVarFp.submitAcknowledgement(body, options).then((request) => request(axios, basePath));
|
|
367
|
+
submitAcknowledgement(requestParameters, options) {
|
|
368
|
+
return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
392
369
|
},
|
|
393
370
|
};
|
|
394
371
|
};
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
17
17
|
const tslib_1 = require("tslib");
|
|
18
|
-
// Some imports not used depending on template conditions
|
|
19
|
-
// @ts-ignore
|
|
20
18
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
21
19
|
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
20
|
/**
|
|
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
|
|
|
57
55
|
*/
|
|
58
56
|
class RequiredError extends Error {
|
|
59
57
|
field;
|
|
60
|
-
name = "RequiredError";
|
|
61
58
|
constructor(field, msg) {
|
|
62
59
|
super(msg);
|
|
63
60
|
this.field = field;
|
|
61
|
+
this.name = "RequiredError";
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
exports.RequiredError = RequiredError;
|
|
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
|
81
81
|
};
|
|
82
82
|
exports.setOAuthToObject = setOAuthToObject;
|
|
83
83
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
84
|
+
if (parameter == null)
|
|
85
|
+
return;
|
|
84
86
|
if (typeof parameter === "object") {
|
|
85
87
|
if (Array.isArray(parameter)) {
|
|
86
88
|
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
@@ -327,62 +327,39 @@ export const VendorOrdersApiFactory = function (configuration, basePath, axios)
|
|
|
327
327
|
return {
|
|
328
328
|
/**
|
|
329
329
|
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
330
|
-
* @param {
|
|
330
|
+
* @param {VendorOrdersApiGetPurchaseOrderRequest} requestParameters Request parameters.
|
|
331
331
|
* @param {*} [options] Override http request option.
|
|
332
332
|
* @throws {RequiredError}
|
|
333
333
|
*/
|
|
334
|
-
getPurchaseOrder(
|
|
335
|
-
return localVarFp.getPurchaseOrder(purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
334
|
+
getPurchaseOrder(requestParameters, options) {
|
|
335
|
+
return localVarFp.getPurchaseOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
336
336
|
},
|
|
337
337
|
/**
|
|
338
338
|
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
339
|
-
* @param {
|
|
340
|
-
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
341
|
-
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
342
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
343
|
-
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
344
|
-
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
345
|
-
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
346
|
-
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
347
|
-
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
348
|
-
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
349
|
-
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
350
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
339
|
+
* @param {VendorOrdersApiGetPurchaseOrdersRequest} requestParameters Request parameters.
|
|
351
340
|
* @param {*} [options] Override http request option.
|
|
352
341
|
* @throws {RequiredError}
|
|
353
342
|
*/
|
|
354
|
-
getPurchaseOrders(
|
|
355
|
-
return localVarFp.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options).then((request) => request(axios, basePath));
|
|
343
|
+
getPurchaseOrders(requestParameters = {}, options) {
|
|
344
|
+
return localVarFp.getPurchaseOrders(requestParameters.limit, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, requestParameters.changedAfter, requestParameters.changedBefore, requestParameters.poItemState, requestParameters.isPOChanged, requestParameters.purchaseOrderState, requestParameters.orderingVendorCode, options).then((request) => request(axios, basePath));
|
|
356
345
|
},
|
|
357
346
|
/**
|
|
358
347
|
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
359
|
-
* @param {
|
|
360
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
361
|
-
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
362
|
-
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
363
|
-
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
364
|
-
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
365
|
-
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
366
|
-
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
367
|
-
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
368
|
-
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
|
|
369
|
-
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
|
|
370
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
371
|
-
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
348
|
+
* @param {VendorOrdersApiGetPurchaseOrdersStatusRequest} requestParameters Request parameters.
|
|
372
349
|
* @param {*} [options] Override http request option.
|
|
373
350
|
* @throws {RequiredError}
|
|
374
351
|
*/
|
|
375
|
-
getPurchaseOrdersStatus(
|
|
376
|
-
return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
|
|
352
|
+
getPurchaseOrdersStatus(requestParameters = {}, options) {
|
|
353
|
+
return localVarFp.getPurchaseOrdersStatus(requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.purchaseOrderNumber, requestParameters.purchaseOrderStatus, requestParameters.itemConfirmationStatus, requestParameters.itemReceiveStatus, requestParameters.orderingVendorCode, requestParameters.shipToPartyId, options).then((request) => request(axios, basePath));
|
|
377
354
|
},
|
|
378
355
|
/**
|
|
379
356
|
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
380
|
-
* @param {
|
|
357
|
+
* @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
381
358
|
* @param {*} [options] Override http request option.
|
|
382
359
|
* @throws {RequiredError}
|
|
383
360
|
*/
|
|
384
|
-
submitAcknowledgement(
|
|
385
|
-
return localVarFp.submitAcknowledgement(body, options).then((request) => request(axios, basePath));
|
|
361
|
+
submitAcknowledgement(requestParameters, options) {
|
|
362
|
+
return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
386
363
|
},
|
|
387
364
|
};
|
|
388
365
|
};
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
// Some imports not used depending on template conditions
|
|
15
|
-
// @ts-ignore
|
|
16
14
|
import globalAxios from 'axios';
|
|
17
15
|
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
18
16
|
/**
|
|
@@ -52,9 +50,9 @@ export class BaseAPI {
|
|
|
52
50
|
*/
|
|
53
51
|
export class RequiredError extends Error {
|
|
54
52
|
field;
|
|
55
|
-
name = "RequiredError";
|
|
56
53
|
constructor(field, msg) {
|
|
57
54
|
super(msg);
|
|
58
55
|
this.field = field;
|
|
56
|
+
this.name = "RequiredError";
|
|
59
57
|
}
|
|
60
58
|
}
|
|
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
76
|
+
if (parameter == null)
|
|
77
|
+
return;
|
|
76
78
|
if (typeof parameter === "object") {
|
|
77
79
|
if (Array.isArray(parameter)) {
|
|
78
80
|
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { GetPurchaseOrderResponse } from '../models';
|
|
16
16
|
import { GetPurchaseOrdersResponse } from '../models';
|
|
@@ -138,55 +138,32 @@ export declare const VendorOrdersApiFp: (configuration?: Configuration) => {
|
|
|
138
138
|
export declare const VendorOrdersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
139
139
|
/**
|
|
140
140
|
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
141
|
-
* @param {
|
|
141
|
+
* @param {VendorOrdersApiGetPurchaseOrderRequest} requestParameters Request parameters.
|
|
142
142
|
* @param {*} [options] Override http request option.
|
|
143
143
|
* @throws {RequiredError}
|
|
144
144
|
*/
|
|
145
|
-
getPurchaseOrder(
|
|
145
|
+
getPurchaseOrder(requestParameters: VendorOrdersApiGetPurchaseOrderRequest, options?: AxiosRequestConfig): AxiosPromise<GetPurchaseOrderResponse>;
|
|
146
146
|
/**
|
|
147
147
|
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
148
|
-
* @param {
|
|
149
|
-
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
150
|
-
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
151
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
152
|
-
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
153
|
-
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
154
|
-
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
155
|
-
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
156
|
-
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
157
|
-
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
158
|
-
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
159
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
148
|
+
* @param {VendorOrdersApiGetPurchaseOrdersRequest} requestParameters Request parameters.
|
|
160
149
|
* @param {*} [options] Override http request option.
|
|
161
150
|
* @throws {RequiredError}
|
|
162
151
|
*/
|
|
163
|
-
getPurchaseOrders(
|
|
152
|
+
getPurchaseOrders(requestParameters?: VendorOrdersApiGetPurchaseOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<GetPurchaseOrdersResponse>;
|
|
164
153
|
/**
|
|
165
154
|
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
166
|
-
* @param {
|
|
167
|
-
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
168
|
-
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
169
|
-
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
170
|
-
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
171
|
-
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
172
|
-
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
173
|
-
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
174
|
-
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
175
|
-
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
|
|
176
|
-
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
|
|
177
|
-
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
178
|
-
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
155
|
+
* @param {VendorOrdersApiGetPurchaseOrdersStatusRequest} requestParameters Request parameters.
|
|
179
156
|
* @param {*} [options] Override http request option.
|
|
180
157
|
* @throws {RequiredError}
|
|
181
158
|
*/
|
|
182
|
-
getPurchaseOrdersStatus(
|
|
159
|
+
getPurchaseOrdersStatus(requestParameters?: VendorOrdersApiGetPurchaseOrdersStatusRequest, options?: AxiosRequestConfig): AxiosPromise<GetPurchaseOrdersStatusResponse>;
|
|
183
160
|
/**
|
|
184
161
|
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
185
|
-
* @param {
|
|
162
|
+
* @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
186
163
|
* @param {*} [options] Override http request option.
|
|
187
164
|
* @throws {RequiredError}
|
|
188
165
|
*/
|
|
189
|
-
submitAcknowledgement(
|
|
166
|
+
submitAcknowledgement(requestParameters: VendorOrdersApiSubmitAcknowledgementRequest, options?: AxiosRequestConfig): AxiosPromise<SubmitAcknowledgementResponse>;
|
|
190
167
|
};
|
|
191
168
|
/**
|
|
192
169
|
* Request parameters for getPurchaseOrder operation in VendorOrdersApi.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Configuration } from
|
|
13
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -50,6 +50,5 @@ export declare class BaseAPI {
|
|
|
50
50
|
*/
|
|
51
51
|
export declare class RequiredError extends Error {
|
|
52
52
|
field: string;
|
|
53
|
-
name: "RequiredError";
|
|
54
53
|
constructor(field: string, msg?: string);
|
|
55
54
|
}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/// <reference types="node" />
|
|
13
|
-
import { Configuration } from "./configuration";
|
|
14
|
-
import { RequestArgs } from "./base";
|
|
15
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
13
|
+
import type { Configuration } from "./configuration";
|
|
14
|
+
import type { RequestArgs } from "./base";
|
|
15
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/vendor-orders-api-v1",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.10",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "jest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sp-api-sdk/common": "^1.9.
|
|
29
|
+
"@sp-api-sdk/common": "^1.9.22",
|
|
30
30
|
"axios": "^0.27.2"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"typedoc": {
|
|
52
52
|
"entryPoint": "./index.ts"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
|
|
55
55
|
}
|