@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1 1.9.9 → 1.9.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.
@@ -207,37 +207,30 @@ const VendorOrdersApiFactory = function (configuration, basePath, axios) {
207
207
  return {
208
208
  /**
209
209
  * Returns purchase order information for the purchaseOrderNumber 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.
210
- * @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
210
+ * @param {VendorOrdersApiGetOrderRequest} requestParameters Request parameters.
211
211
  * @param {*} [options] Override http request option.
212
212
  * @throws {RequiredError}
213
213
  */
214
- getOrder(purchaseOrderNumber, options) {
215
- return localVarFp.getOrder(purchaseOrderNumber, options).then((request) => request(axios, basePath));
214
+ getOrder(requestParameters, options) {
215
+ return localVarFp.getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
216
216
  },
217
217
  /**
218
218
  * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage 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.
219
- * @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
220
- * @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
221
- * @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
222
- * @param {'NEW' | 'SHIPPED' | 'ACCEPTED' | 'CANCELLED'} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
223
- * @param {number} [limit] The limit to the number of purchase orders returned.
224
- * @param {'ASC' | 'DESC'} [sortOrder] Sort the list in ascending or descending order by order creation date.
225
- * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
226
- * @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
219
+ * @param {VendorOrdersApiGetOrdersRequest} requestParameters Request parameters.
227
220
  * @param {*} [options] Override http request option.
228
221
  * @throws {RequiredError}
229
222
  */
230
- getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options) {
231
- return localVarFp.getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options).then((request) => request(axios, basePath));
223
+ getOrders(requestParameters, options) {
224
+ return localVarFp.getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(axios, basePath));
232
225
  },
233
226
  /**
234
227
  * 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.
235
- * @param {SubmitAcknowledgementRequest} body
228
+ * @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
236
229
  * @param {*} [options] Override http request option.
237
230
  * @throws {RequiredError}
238
231
  */
239
- submitAcknowledgement(body, options) {
240
- return localVarFp.submitAcknowledgement(body, options).then((request) => request(axios, basePath));
232
+ submitAcknowledgement(requestParameters, options) {
233
+ return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
241
234
  },
242
235
  };
243
236
  };
@@ -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));
@@ -201,37 +201,30 @@ export const VendorOrdersApiFactory = function (configuration, basePath, axios)
201
201
  return {
202
202
  /**
203
203
  * Returns purchase order information for the purchaseOrderNumber 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.
204
- * @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
204
+ * @param {VendorOrdersApiGetOrderRequest} requestParameters Request parameters.
205
205
  * @param {*} [options] Override http request option.
206
206
  * @throws {RequiredError}
207
207
  */
208
- getOrder(purchaseOrderNumber, options) {
209
- return localVarFp.getOrder(purchaseOrderNumber, options).then((request) => request(axios, basePath));
208
+ getOrder(requestParameters, options) {
209
+ return localVarFp.getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
210
210
  },
211
211
  /**
212
212
  * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage 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.
213
- * @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
214
- * @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
215
- * @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
216
- * @param {'NEW' | 'SHIPPED' | 'ACCEPTED' | 'CANCELLED'} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
217
- * @param {number} [limit] The limit to the number of purchase orders returned.
218
- * @param {'ASC' | 'DESC'} [sortOrder] Sort the list in ascending or descending order by order creation date.
219
- * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
220
- * @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
213
+ * @param {VendorOrdersApiGetOrdersRequest} requestParameters Request parameters.
221
214
  * @param {*} [options] Override http request option.
222
215
  * @throws {RequiredError}
223
216
  */
224
- getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options) {
225
- return localVarFp.getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options).then((request) => request(axios, basePath));
217
+ getOrders(requestParameters, options) {
218
+ return localVarFp.getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(axios, basePath));
226
219
  },
227
220
  /**
228
221
  * 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.
229
- * @param {SubmitAcknowledgementRequest} body
222
+ * @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
230
223
  * @param {*} [options] Override http request option.
231
224
  * @throws {RequiredError}
232
225
  */
233
- submitAcknowledgement(body, options) {
234
- return localVarFp.submitAcknowledgement(body, options).then((request) => request(axios, basePath));
226
+ submitAcknowledgement(requestParameters, options) {
227
+ return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
235
228
  },
236
229
  };
237
230
  };
@@ -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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { GetOrderResponse } from '../models';
16
16
  import { GetOrdersResponse } from '../models';
@@ -91,32 +91,25 @@ export declare const VendorOrdersApiFp: (configuration?: Configuration) => {
91
91
  export declare const VendorOrdersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
92
92
  /**
93
93
  * Returns purchase order information for the purchaseOrderNumber 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.
94
- * @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
94
+ * @param {VendorOrdersApiGetOrderRequest} requestParameters Request parameters.
95
95
  * @param {*} [options] Override http request option.
96
96
  * @throws {RequiredError}
97
97
  */
98
- getOrder(purchaseOrderNumber: string, options?: any): AxiosPromise<GetOrderResponse>;
98
+ getOrder(requestParameters: VendorOrdersApiGetOrderRequest, options?: AxiosRequestConfig): AxiosPromise<GetOrderResponse>;
99
99
  /**
100
100
  * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **Usage 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.
101
- * @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
102
- * @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
103
- * @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
104
- * @param {'NEW' | 'SHIPPED' | 'ACCEPTED' | 'CANCELLED'} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
105
- * @param {number} [limit] The limit to the number of purchase orders returned.
106
- * @param {'ASC' | 'DESC'} [sortOrder] Sort the list in ascending or descending order by order creation date.
107
- * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
108
- * @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
101
+ * @param {VendorOrdersApiGetOrdersRequest} requestParameters Request parameters.
109
102
  * @param {*} [options] Override http request option.
110
103
  * @throws {RequiredError}
111
104
  */
112
- getOrders(createdAfter: string, createdBefore: string, shipFromPartyId?: string, status?: 'NEW' | 'SHIPPED' | 'ACCEPTED' | 'CANCELLED', limit?: number, sortOrder?: 'ASC' | 'DESC', nextToken?: string, includeDetails?: boolean, options?: any): AxiosPromise<GetOrdersResponse>;
105
+ getOrders(requestParameters: VendorOrdersApiGetOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<GetOrdersResponse>;
113
106
  /**
114
107
  * 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.
115
- * @param {SubmitAcknowledgementRequest} body
108
+ * @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
116
109
  * @param {*} [options] Override http request option.
117
110
  * @throws {RequiredError}
118
111
  */
119
- submitAcknowledgement(body: SubmitAcknowledgementRequest, options?: any): AxiosPromise<SubmitAcknowledgementResponse>;
112
+ submitAcknowledgement(requestParameters: VendorOrdersApiSubmitAcknowledgementRequest, options?: AxiosRequestConfig): AxiosPromise<SubmitAcknowledgementResponse>;
120
113
  };
121
114
  /**
122
115
  * Request parameters for getOrder 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 "./configuration";
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-direct-fulfillment-orders-api-v1",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data.",
5
- "version": "1.9.9",
5
+ "version": "1.9.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.21",
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": "4aae180b5a1395b37b673b93c285065ddba25470"
54
+ "gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
55
55
  }