@sp-api-sdk/vendor-orders-api-v1 1.6.17 → 1.7.2

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 CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
4
4
 
5
+ [![npm version](https://badgen.net/npm/v/@sp-api-sdk/vendor-orders-api-v1)](https://www.npmjs.com/package/@sp-api-sdk/vendor-orders-api-v1)
6
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
7
+
8
+ ## Documentation
9
+
10
+ Learn more about this Selling Partner API by visiting the [official documentation](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-orders-api/vendorOrders.md).
11
+
12
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_vendor_orders_api_v1.html) for this API client.
13
+
5
14
  ## Installing
6
15
 
7
16
  ```sh
@@ -19,26 +28,25 @@ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
19
28
  import {VendorOrdersApiClient} from '@sp-api-sdk/vendor-orders-api-v1'
20
29
 
21
30
  const auth = new SellingPartnerApiAuth({
22
- clientId: '',
23
- clientSecret: '',
24
- refreshToken: '',
25
- secretAccessKey: '',
31
+ clientId: process.env.LWA_CLIENT_ID,
32
+ clientSecret: process.env.LWA_CLIENT_SECRET,
33
+ refreshToken: 'Atzr|…',
26
34
  accessKeyId: '',
27
- region: '',
35
+ secretAccessKey: '',
28
36
  role: {
29
- arn: '',
30
- }
37
+ arn: 'arn:aws:iam::…',
38
+ },
31
39
  })
32
40
 
33
41
  const client = new VendorOrdersApiClient({
34
42
  auth,
35
- region: 'eu' // or 'eu-west-1'
43
+ region: 'eu',
36
44
  })
37
45
  ```
38
46
 
39
- ## Handle Rate Limiting
47
+ ## Rate Limiting
40
48
 
41
- If you want to let the SDK retry after each 429 responses, instanciate the client like this:
49
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
42
50
 
43
51
  ```javascript
44
52
  const client = new VendorOrdersApiClient({
@@ -46,13 +54,28 @@ const client = new VendorOrdersApiClient({
46
54
  region: 'eu',
47
55
  rateLimiting: {
48
56
  retry: true,
49
- onRetry: (retryInfo) => console.log(retryInfo) // Optional
50
- }
57
+ // Optionally specify a callback that will be called on every retry.
58
+ onRetry: (retryInfo) => {
59
+ console.log(retryInfo)
60
+ },
61
+ },
51
62
  })
52
63
  ```
53
64
 
54
- The SDK gets the rate limits for each routes from the API documentation
65
+ The rate limits used for each route are specified in the [API documentation]((https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-orders-api/vendorOrders.md)).
66
+
67
+ ## License
68
+
69
+ MIT
55
70
 
56
- ## API documentation
71
+ ## Miscellaneous
57
72
 
58
- See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-orders-api/vendorOrders.md)
73
+ ```
74
+ ╚⊙ ⊙╝
75
+ ╚═(███)═╝
76
+ ╚═(███)═╝
77
+ ╚═(███)═╝
78
+ ╚═(███)═╝
79
+ ╚═(███)═╝
80
+ ╚═(███)═╝
81
+ ```
@@ -146,13 +146,14 @@ const VendorOrdersApiAxiosParamCreator = function (configuration) {
146
146
  * @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.
147
147
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
148
148
  * @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.
149
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
149
+ * @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.
150
+ * @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.
150
151
  * @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.
151
152
  * @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.
152
153
  * @param {*} [options] Override http request option.
153
154
  * @throws {RequiredError}
154
155
  */
155
- getPurchaseOrdersStatus: async (limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options = {}) => {
156
+ getPurchaseOrdersStatus: async (limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options = {}) => {
156
157
  const localVarPath = `/vendor/orders/v1/purchaseOrdersStatus`;
157
158
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
158
159
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -201,6 +202,9 @@ const VendorOrdersApiAxiosParamCreator = function (configuration) {
201
202
  if (itemConfirmationStatus !== undefined) {
202
203
  localVarQueryParameter['itemConfirmationStatus'] = itemConfirmationStatus;
203
204
  }
205
+ if (itemReceiveStatus !== undefined) {
206
+ localVarQueryParameter['itemReceiveStatus'] = itemReceiveStatus;
207
+ }
204
208
  if (orderingVendorCode !== undefined) {
205
209
  localVarQueryParameter['orderingVendorCode'] = orderingVendorCode;
206
210
  }
@@ -296,14 +300,15 @@ const VendorOrdersApiFp = function (configuration) {
296
300
  * @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.
297
301
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
298
302
  * @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.
299
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
303
+ * @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.
304
+ * @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.
300
305
  * @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.
301
306
  * @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.
302
307
  * @param {*} [options] Override http request option.
303
308
  * @throws {RequiredError}
304
309
  */
305
- async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
306
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options);
310
+ async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
311
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options);
307
312
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
308
313
  },
309
314
  /**
@@ -366,14 +371,15 @@ const VendorOrdersApiFactory = function (configuration, basePath, axios) {
366
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.
367
372
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
368
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.
369
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
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.
370
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.
371
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.
372
378
  * @param {*} [options] Override http request option.
373
379
  * @throws {RequiredError}
374
380
  */
375
- getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
376
- return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
381
+ getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
382
+ return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
377
383
  },
378
384
  /**
379
385
  * 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.
@@ -422,7 +428,7 @@ class VendorOrdersApi extends base_1.BaseAPI {
422
428
  * @memberof VendorOrdersApi
423
429
  */
424
430
  getPurchaseOrdersStatus(requestParameters = {}, options) {
425
- return (0, exports.VendorOrdersApiFp)(this.configuration).getPurchaseOrdersStatus(requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.purchaseOrderNumber, requestParameters.purchaseOrderStatus, requestParameters.itemConfirmationStatus, requestParameters.orderingVendorCode, requestParameters.shipToPartyId, options).then((request) => request(this.axios, this.basePath));
431
+ return (0, exports.VendorOrdersApiFp)(this.configuration).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(this.axios, this.basePath));
426
432
  }
427
433
  /**
428
434
  * 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.
@@ -19,6 +19,7 @@ const tslib_1 = require("tslib");
19
19
  (0, tslib_1.__exportStar)(require("./order-item-status"), exports);
20
20
  (0, tslib_1.__exportStar)(require("./order-item-status-acknowledgement-status"), exports);
21
21
  (0, tslib_1.__exportStar)(require("./order-item-status-ordered-quantity"), exports);
22
+ (0, tslib_1.__exportStar)(require("./order-item-status-receiving-status"), exports);
22
23
  (0, tslib_1.__exportStar)(require("./order-list"), exports);
23
24
  (0, tslib_1.__exportStar)(require("./order-list-status"), exports);
24
25
  (0, tslib_1.__exportStar)(require("./order-status"), exports);
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Retail Procurement Orders
6
+ * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.OrderItemStatusReceivingStatusReceiveStatusEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var OrderItemStatusReceivingStatusReceiveStatusEnum;
22
+ (function (OrderItemStatusReceivingStatusReceiveStatusEnum) {
23
+ OrderItemStatusReceivingStatusReceiveStatusEnum["NotReceived"] = "NOT_RECEIVED";
24
+ OrderItemStatusReceivingStatusReceiveStatusEnum["PartiallyReceived"] = "PARTIALLY_RECEIVED";
25
+ OrderItemStatusReceivingStatusReceiveStatusEnum["Received"] = "RECEIVED";
26
+ })(OrderItemStatusReceivingStatusReceiveStatusEnum = exports.OrderItemStatusReceivingStatusReceiveStatusEnum || (exports.OrderItemStatusReceivingStatusReceiveStatusEnum = {}));
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VendorOrdersApiClient = exports.RATE_LIMITS = void 0;
3
+ exports.VendorOrdersApiClient = exports.clientRateLimits = void 0;
4
4
  /* eslint-disable prefer-regex-literals */
5
5
  const common_1 = require("@sp-api-sdk/common");
6
6
  const api_model_1 = require("./api-model");
7
7
  const error_1 = require("./error");
8
- exports.RATE_LIMITS = [
8
+ exports.clientRateLimits = [
9
9
  {
10
10
  method: 'get',
11
11
  urlRegex: new RegExp('^/vendor/orders/v1/purchaseOrders$'),
@@ -33,20 +33,23 @@ exports.RATE_LIMITS = [
33
33
  ];
34
34
  class VendorOrdersApiClient extends api_model_1.VendorOrdersApi {
35
35
  constructor(parameters) {
36
- const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
36
+ const config = common_1.sellingPartnerRegions[parameters.region];
37
+ if (!config) {
38
+ throw new error_1.VendorOrdersApiError(`Unknown region: ${parameters.region}`);
39
+ }
37
40
  const { rateLimiting, ...clientParameters } = parameters;
38
- const axiosParameters = { ...clientParameters, region };
41
+ const axiosParameters = {
42
+ ...clientParameters,
43
+ region: config.awsRegion,
44
+ };
39
45
  if (rateLimiting?.retry) {
40
- axiosParameters.rateLimits = exports.RATE_LIMITS;
46
+ axiosParameters.rateLimits = exports.clientRateLimits;
41
47
  axiosParameters.onRetry = rateLimiting.onRetry;
42
48
  }
43
49
  const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
44
50
  const configuration = new api_model_1.Configuration();
45
51
  const environment = parameters.sandbox ? 'sandbox' : 'production';
46
- const endpoint = common_1.endpoints[environment][region];
47
- if (!endpoint) {
48
- throw new error_1.VendorOrdersApiError(`Unknown region : ${region}`);
49
- }
52
+ const endpoint = config.endpoints[environment];
50
53
  super(configuration, endpoint, axiosInstance);
51
54
  }
52
55
  }
@@ -142,13 +142,14 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration) {
142
142
  * @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.
143
143
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
144
144
  * @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.
145
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
145
+ * @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.
146
+ * @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.
146
147
  * @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.
147
148
  * @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.
148
149
  * @param {*} [options] Override http request option.
149
150
  * @throws {RequiredError}
150
151
  */
151
- getPurchaseOrdersStatus: async (limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options = {}) => {
152
+ getPurchaseOrdersStatus: async (limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options = {}) => {
152
153
  const localVarPath = `/vendor/orders/v1/purchaseOrdersStatus`;
153
154
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
155
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -197,6 +198,9 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration) {
197
198
  if (itemConfirmationStatus !== undefined) {
198
199
  localVarQueryParameter['itemConfirmationStatus'] = itemConfirmationStatus;
199
200
  }
201
+ if (itemReceiveStatus !== undefined) {
202
+ localVarQueryParameter['itemReceiveStatus'] = itemReceiveStatus;
203
+ }
200
204
  if (orderingVendorCode !== undefined) {
201
205
  localVarQueryParameter['orderingVendorCode'] = orderingVendorCode;
202
206
  }
@@ -291,14 +295,15 @@ export const VendorOrdersApiFp = function (configuration) {
291
295
  * @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.
292
296
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
293
297
  * @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.
294
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
298
+ * @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.
299
+ * @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.
295
300
  * @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.
296
301
  * @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.
297
302
  * @param {*} [options] Override http request option.
298
303
  * @throws {RequiredError}
299
304
  */
300
- async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
301
- const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options);
305
+ async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
306
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options);
302
307
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
303
308
  },
304
309
  /**
@@ -360,14 +365,15 @@ export const VendorOrdersApiFactory = function (configuration, basePath, axios)
360
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.
361
366
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
362
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.
363
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
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.
364
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.
365
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.
366
372
  * @param {*} [options] Override http request option.
367
373
  * @throws {RequiredError}
368
374
  */
369
- getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
370
- return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
375
+ getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
376
+ return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
371
377
  },
372
378
  /**
373
379
  * 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.
@@ -415,7 +421,7 @@ export class VendorOrdersApi extends BaseAPI {
415
421
  * @memberof VendorOrdersApi
416
422
  */
417
423
  getPurchaseOrdersStatus(requestParameters = {}, options) {
418
- return VendorOrdersApiFp(this.configuration).getPurchaseOrdersStatus(requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.purchaseOrderNumber, requestParameters.purchaseOrderStatus, requestParameters.itemConfirmationStatus, requestParameters.orderingVendorCode, requestParameters.shipToPartyId, options).then((request) => request(this.axios, this.basePath));
424
+ return VendorOrdersApiFp(this.configuration).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(this.axios, this.basePath));
419
425
  }
420
426
  /**
421
427
  * 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.
@@ -16,6 +16,7 @@ export * from './order-item-acknowledgement';
16
16
  export * from './order-item-status';
17
17
  export * from './order-item-status-acknowledgement-status';
18
18
  export * from './order-item-status-ordered-quantity';
19
+ export * from './order-item-status-receiving-status';
19
20
  export * from './order-list';
20
21
  export * from './order-list-status';
21
22
  export * from './order-status';
@@ -0,0 +1,23 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Retail Procurement Orders
5
+ * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ * @export
16
+ * @enum {string}
17
+ */
18
+ export var OrderItemStatusReceivingStatusReceiveStatusEnum;
19
+ (function (OrderItemStatusReceivingStatusReceiveStatusEnum) {
20
+ OrderItemStatusReceivingStatusReceiveStatusEnum["NotReceived"] = "NOT_RECEIVED";
21
+ OrderItemStatusReceivingStatusReceiveStatusEnum["PartiallyReceived"] = "PARTIALLY_RECEIVED";
22
+ OrderItemStatusReceivingStatusReceiveStatusEnum["Received"] = "RECEIVED";
23
+ })(OrderItemStatusReceivingStatusReceiveStatusEnum || (OrderItemStatusReceivingStatusReceiveStatusEnum = {}));
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable prefer-regex-literals */
2
- import { endpoints, awsRegionByCode, createAxiosInstance } from '@sp-api-sdk/common';
2
+ import { sellingPartnerRegions, createAxiosInstance } from '@sp-api-sdk/common';
3
3
  import { Configuration, VendorOrdersApi } from './api-model';
4
4
  import { VendorOrdersApiError } from './error';
5
- export const RATE_LIMITS = [
5
+ export const clientRateLimits = [
6
6
  {
7
7
  method: 'get',
8
8
  urlRegex: new RegExp('^/vendor/orders/v1/purchaseOrders$'),
@@ -30,20 +30,23 @@ export const RATE_LIMITS = [
30
30
  ];
31
31
  export class VendorOrdersApiClient extends VendorOrdersApi {
32
32
  constructor(parameters) {
33
- const region = awsRegionByCode[parameters.region] ?? parameters.region;
33
+ const config = sellingPartnerRegions[parameters.region];
34
+ if (!config) {
35
+ throw new VendorOrdersApiError(`Unknown region: ${parameters.region}`);
36
+ }
34
37
  const { rateLimiting, ...clientParameters } = parameters;
35
- const axiosParameters = { ...clientParameters, region };
38
+ const axiosParameters = {
39
+ ...clientParameters,
40
+ region: config.awsRegion,
41
+ };
36
42
  if (rateLimiting?.retry) {
37
- axiosParameters.rateLimits = RATE_LIMITS;
43
+ axiosParameters.rateLimits = clientRateLimits;
38
44
  axiosParameters.onRetry = rateLimiting.onRetry;
39
45
  }
40
46
  const axiosInstance = createAxiosInstance(axiosParameters);
41
47
  const configuration = new Configuration();
42
48
  const environment = parameters.sandbox ? 'sandbox' : 'production';
43
- const endpoint = endpoints[environment][region];
44
- if (!endpoint) {
45
- throw new VendorOrdersApiError(`Unknown region : ${region}`);
46
- }
49
+ const endpoint = config.endpoints[environment];
47
50
  super(configuration, endpoint, axiosInstance);
48
51
  }
49
52
  }
@@ -58,13 +58,14 @@ export declare const VendorOrdersApiAxiosParamCreator: (configuration?: Configur
58
58
  * @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.
59
59
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
60
60
  * @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.
61
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
61
+ * @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.
62
+ * @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.
62
63
  * @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.
63
64
  * @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.
64
65
  * @param {*} [options] Override http request option.
65
66
  * @throws {RequiredError}
66
67
  */
67
- getPurchaseOrdersStatus: (limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any) => Promise<RequestArgs>;
68
+ getPurchaseOrdersStatus: (limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, itemReceiveStatus?: "NOT_RECEIVED" | "PARTIALLY_RECEIVED" | "RECEIVED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any) => Promise<RequestArgs>;
68
69
  /**
69
70
  * 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.
70
71
  * @param {SubmitAcknowledgementRequest} body
@@ -114,13 +115,14 @@ export declare const VendorOrdersApiFp: (configuration?: Configuration | undefin
114
115
  * @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.
115
116
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
116
117
  * @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.
117
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
118
+ * @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.
119
+ * @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
118
120
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; 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.
119
121
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\&#39;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \&#39;shipToParty.partyId\&#39; in the purchase order. If not included in filter, this will return purchase orders for all the buyer\&#39;s warehouses used for vendor group purchase orders.
120
122
  * @param {*} [options] Override http request option.
121
123
  * @throws {RequiredError}
122
124
  */
123
- getPurchaseOrdersStatus(limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<GetPurchaseOrdersStatusResponse>>;
125
+ getPurchaseOrdersStatus(limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, itemReceiveStatus?: "NOT_RECEIVED" | "PARTIALLY_RECEIVED" | "RECEIVED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<GetPurchaseOrdersStatusResponse>>;
124
126
  /**
125
127
  * 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.
126
128
  * @param {SubmitAcknowledgementRequest} body
@@ -170,13 +172,14 @@ export declare const VendorOrdersApiFactory: (configuration?: Configuration | un
170
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.
171
173
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
172
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.
173
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
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\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
174
177
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; 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.
175
178
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\&#39;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \&#39;shipToParty.partyId\&#39; in the purchase order. If not included in filter, this will return purchase orders for all the buyer\&#39;s warehouses used for vendor group purchase orders.
176
179
  * @param {*} [options] Override http request option.
177
180
  * @throws {RequiredError}
178
181
  */
179
- getPurchaseOrdersStatus(limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any): AxiosPromise<GetPurchaseOrdersStatusResponse>;
182
+ getPurchaseOrdersStatus(limit?: number | undefined, sortOrder?: "ASC" | "DESC" | undefined, nextToken?: string | undefined, createdAfter?: string | undefined, createdBefore?: string | undefined, updatedAfter?: string | undefined, updatedBefore?: string | undefined, purchaseOrderNumber?: string | undefined, purchaseOrderStatus?: "OPEN" | "CLOSED" | undefined, itemConfirmationStatus?: "ACCEPTED" | "PARTIALLY_ACCEPTED" | "REJECTED" | "UNCONFIRMED" | undefined, itemReceiveStatus?: "NOT_RECEIVED" | "PARTIALLY_RECEIVED" | "RECEIVED" | undefined, orderingVendorCode?: string | undefined, shipToPartyId?: string | undefined, options?: any): AxiosPromise<GetPurchaseOrdersStatusResponse>;
180
183
  /**
181
184
  * 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.
182
185
  * @param {SubmitAcknowledgementRequest} body
@@ -338,11 +341,17 @@ export interface VendorOrdersApiGetPurchaseOrdersStatusRequest {
338
341
  */
339
342
  readonly purchaseOrderStatus?: 'OPEN' | 'CLOSED';
340
343
  /**
341
- * Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
344
+ * 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.
342
345
  * @type {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'}
343
346
  * @memberof VendorOrdersApiGetPurchaseOrdersStatus
344
347
  */
345
348
  readonly itemConfirmationStatus?: 'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED';
349
+ /**
350
+ * Filters purchase orders based on the purchase order\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
351
+ * @type {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'}
352
+ * @memberof VendorOrdersApiGetPurchaseOrdersStatus
353
+ */
354
+ readonly itemReceiveStatus?: 'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED';
346
355
  /**
347
356
  * Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; 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.
348
357
  * @type {string}
@@ -383,7 +392,7 @@ export declare class VendorOrdersApi extends BaseAPI {
383
392
  * @throws {RequiredError}
384
393
  * @memberof VendorOrdersApi
385
394
  */
386
- getPurchaseOrder(requestParameters: VendorOrdersApiGetPurchaseOrderRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrderResponse>>;
395
+ getPurchaseOrder(requestParameters: VendorOrdersApiGetPurchaseOrderRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrderResponse, any>>;
387
396
  /**
388
397
  * 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.
389
398
  * @param {VendorOrdersApiGetPurchaseOrdersRequest} requestParameters Request parameters.
@@ -391,7 +400,7 @@ export declare class VendorOrdersApi extends BaseAPI {
391
400
  * @throws {RequiredError}
392
401
  * @memberof VendorOrdersApi
393
402
  */
394
- getPurchaseOrders(requestParameters?: VendorOrdersApiGetPurchaseOrdersRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrdersResponse>>;
403
+ getPurchaseOrders(requestParameters?: VendorOrdersApiGetPurchaseOrdersRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrdersResponse, any>>;
395
404
  /**
396
405
  * 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.
397
406
  * @param {VendorOrdersApiGetPurchaseOrdersStatusRequest} requestParameters Request parameters.
@@ -399,7 +408,7 @@ export declare class VendorOrdersApi extends BaseAPI {
399
408
  * @throws {RequiredError}
400
409
  * @memberof VendorOrdersApi
401
410
  */
402
- getPurchaseOrdersStatus(requestParameters?: VendorOrdersApiGetPurchaseOrdersStatusRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrdersStatusResponse>>;
411
+ getPurchaseOrdersStatus(requestParameters?: VendorOrdersApiGetPurchaseOrdersStatusRequest, options?: any): Promise<import("axios").AxiosResponse<GetPurchaseOrdersStatusResponse, any>>;
403
412
  /**
404
413
  * 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.
405
414
  * @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
@@ -407,5 +416,5 @@ export declare class VendorOrdersApi extends BaseAPI {
407
416
  * @throws {RequiredError}
408
417
  * @memberof VendorOrdersApi
409
418
  */
410
- submitAcknowledgement(requestParameters: VendorOrdersApiSubmitAcknowledgementRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitAcknowledgementResponse>>;
419
+ submitAcknowledgement(requestParameters: VendorOrdersApiSubmitAcknowledgementRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitAcknowledgementResponse, any>>;
411
420
  }
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -16,6 +16,7 @@ export * from './order-item-acknowledgement';
16
16
  export * from './order-item-status';
17
17
  export * from './order-item-status-acknowledgement-status';
18
18
  export * from './order-item-status-ordered-quantity';
19
+ export * from './order-item-status-receiving-status';
19
20
  export * from './order-list';
20
21
  export * from './order-list-status';
21
22
  export * from './order-status';
@@ -47,7 +47,7 @@ export interface OrderAcknowledgementItem {
47
47
  * @type {Money}
48
48
  * @memberof OrderAcknowledgementItem
49
49
  */
50
- netCost: Money;
50
+ netCost?: Money;
51
51
  /**
52
52
  *
53
53
  * @type {Money}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Selling Partner API for Retail Procurement Orders
3
+ * The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
4
+ *
5
+ * The version of the OpenAPI document: v1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ItemQuantity } from './item-quantity';
13
+ /**
14
+ * Item receive status at the buyer\'s warehouse.
15
+ * @export
16
+ * @interface OrderItemStatusReceivingStatus
17
+ */
18
+ export interface OrderItemStatusReceivingStatus {
19
+ /**
20
+ * Receive status of the line item.
21
+ * @type {string}
22
+ * @memberof OrderItemStatusReceivingStatus
23
+ */
24
+ receiveStatus?: OrderItemStatusReceivingStatusReceiveStatusEnum;
25
+ /**
26
+ *
27
+ * @type {ItemQuantity}
28
+ * @memberof OrderItemStatusReceivingStatus
29
+ */
30
+ receivedQuantity?: ItemQuantity;
31
+ /**
32
+ * The date when the most recent item was received at the buyer\'s warehouse. Must be in ISO-8601 date/time format.
33
+ * @type {string}
34
+ * @memberof OrderItemStatusReceivingStatus
35
+ */
36
+ lastReceiveDate?: string;
37
+ }
38
+ /**
39
+ * @export
40
+ * @enum {string}
41
+ */
42
+ export declare enum OrderItemStatusReceivingStatusReceiveStatusEnum {
43
+ NotReceived = "NOT_RECEIVED",
44
+ PartiallyReceived = "PARTIALLY_RECEIVED",
45
+ Received = "RECEIVED"
46
+ }
@@ -12,6 +12,7 @@
12
12
  import { Money } from './money';
13
13
  import { OrderItemStatusAcknowledgementStatus } from './order-item-status-acknowledgement-status';
14
14
  import { OrderItemStatusOrderedQuantity } from './order-item-status-ordered-quantity';
15
+ import { OrderItemStatusReceivingStatus } from './order-item-status-receiving-status';
15
16
  /**
16
17
  *
17
18
  * @export
@@ -60,4 +61,10 @@ export interface OrderItemStatus {
60
61
  * @memberof OrderItemStatus
61
62
  */
62
63
  acknowledgementStatus?: OrderItemStatusAcknowledgementStatus;
64
+ /**
65
+ *
66
+ * @type {OrderItemStatusReceivingStatus}
67
+ * @memberof OrderItemStatus
68
+ */
69
+ receivingStatus?: OrderItemStatusReceivingStatus;
63
70
  }
@@ -1,11 +1,11 @@
1
- import { onRetry } from '@sp-api-sdk/common';
2
- import type { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
1
+ import type { ClientConfiguration, SellingPartnerRegion, RateLimit, OnRetryHandler } from '@sp-api-sdk/common';
3
2
  import { VendorOrdersApi } from './api-model';
4
- export declare const RATE_LIMITS: RateLimit[];
3
+ export declare const clientRateLimits: RateLimit[];
5
4
  export interface ClientParameters extends Omit<ClientConfiguration, 'rateLimits' | 'onRetry'> {
5
+ region: SellingPartnerRegion;
6
6
  rateLimiting?: {
7
7
  retry: boolean;
8
- onRetry?: onRetry;
8
+ onRetry?: OnRetryHandler;
9
9
  };
10
10
  }
11
11
  export declare class VendorOrdersApiClient extends VendorOrdersApi {
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.6.17",
5
+ "version": "1.7.2",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -25,9 +25,9 @@
25
25
  "test": "NODE_ENV='test' yarn jest"
26
26
  },
27
27
  "dependencies": {
28
- "@sp-api-sdk/auth": "^1.9.3",
29
- "@sp-api-sdk/common": "^1.7.4",
30
- "axios": "^0.21.1"
28
+ "@sp-api-sdk/auth": "^1.9.6",
29
+ "@sp-api-sdk/common": "^1.7.8",
30
+ "axios": "^0.24.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "sp sdk",
49
49
  "vendor orders api"
50
50
  ],
51
- "gitHead": "30d4f1399133a7e6a08f9a2ec2cb9ce4641a623b"
51
+ "gitHead": "f21b5cb511abd110bf1f07843558719993f36187"
52
52
  }