@sp-api-sdk/shipping-api-v1 1.10.8 → 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.
@@ -406,21 +406,21 @@ const ShippingApiFactory = function (configuration, basePath, axios) {
406
406
  return {
407
407
  /**
408
408
  * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
409
- * @param {string} shipmentId
409
+ * @param {ShippingApiCancelShipmentRequest} requestParameters Request parameters.
410
410
  * @param {*} [options] Override http request option.
411
411
  * @throws {RequiredError}
412
412
  */
413
- cancelShipment(shipmentId, options) {
414
- return localVarFp.cancelShipment(shipmentId, options).then((request) => request(axios, basePath));
413
+ cancelShipment(requestParameters, options) {
414
+ return localVarFp.cancelShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
415
415
  },
416
416
  /**
417
417
  * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
418
- * @param {CreateShipmentRequest} body
418
+ * @param {ShippingApiCreateShipmentRequest} requestParameters Request parameters.
419
419
  * @param {*} [options] Override http request option.
420
420
  * @throws {RequiredError}
421
421
  */
422
- createShipment(body, options) {
423
- return localVarFp.createShipment(body, options).then((request) => request(axios, basePath));
422
+ createShipment(requestParameters, options) {
423
+ return localVarFp.createShipment(requestParameters.body, options).then((request) => request(axios, basePath));
424
424
  },
425
425
  /**
426
426
  * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
@@ -432,60 +432,57 @@ const ShippingApiFactory = function (configuration, basePath, axios) {
432
432
  },
433
433
  /**
434
434
  * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
435
- * @param {GetRatesRequest} body
435
+ * @param {ShippingApiGetRatesRequest} requestParameters Request parameters.
436
436
  * @param {*} [options] Override http request option.
437
437
  * @throws {RequiredError}
438
438
  */
439
- getRates(body, options) {
440
- return localVarFp.getRates(body, options).then((request) => request(axios, basePath));
439
+ getRates(requestParameters, options) {
440
+ return localVarFp.getRates(requestParameters.body, options).then((request) => request(axios, basePath));
441
441
  },
442
442
  /**
443
443
  * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
444
- * @param {string} shipmentId
444
+ * @param {ShippingApiGetShipmentRequest} requestParameters Request parameters.
445
445
  * @param {*} [options] Override http request option.
446
446
  * @throws {RequiredError}
447
447
  */
448
- getShipment(shipmentId, options) {
449
- return localVarFp.getShipment(shipmentId, options).then((request) => request(axios, basePath));
448
+ getShipment(requestParameters, options) {
449
+ return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
450
450
  },
451
451
  /**
452
452
  * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
453
- * @param {string} trackingId
453
+ * @param {ShippingApiGetTrackingInformationRequest} requestParameters Request parameters.
454
454
  * @param {*} [options] Override http request option.
455
455
  * @throws {RequiredError}
456
456
  */
457
- getTrackingInformation(trackingId, options) {
458
- return localVarFp.getTrackingInformation(trackingId, options).then((request) => request(axios, basePath));
457
+ getTrackingInformation(requestParameters, options) {
458
+ return localVarFp.getTrackingInformation(requestParameters.trackingId, options).then((request) => request(axios, basePath));
459
459
  },
460
460
  /**
461
461
  * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
462
- * @param {string} shipmentId
463
- * @param {PurchaseLabelsRequest} body
462
+ * @param {ShippingApiPurchaseLabelsRequest} requestParameters Request parameters.
464
463
  * @param {*} [options] Override http request option.
465
464
  * @throws {RequiredError}
466
465
  */
467
- purchaseLabels(shipmentId, body, options) {
468
- return localVarFp.purchaseLabels(shipmentId, body, options).then((request) => request(axios, basePath));
466
+ purchaseLabels(requestParameters, options) {
467
+ return localVarFp.purchaseLabels(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios, basePath));
469
468
  },
470
469
  /**
471
470
  * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
472
- * @param {PurchaseShipmentRequest} body
471
+ * @param {ShippingApiPurchaseShipmentRequest} requestParameters Request parameters.
473
472
  * @param {*} [options] Override http request option.
474
473
  * @throws {RequiredError}
475
474
  */
476
- purchaseShipment(body, options) {
477
- return localVarFp.purchaseShipment(body, options).then((request) => request(axios, basePath));
475
+ purchaseShipment(requestParameters, options) {
476
+ return localVarFp.purchaseShipment(requestParameters.body, options).then((request) => request(axios, basePath));
478
477
  },
479
478
  /**
480
479
  * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
481
- * @param {string} shipmentId
482
- * @param {string} trackingId
483
- * @param {RetrieveShippingLabelRequest} body
480
+ * @param {ShippingApiRetrieveShippingLabelRequest} requestParameters Request parameters.
484
481
  * @param {*} [options] Override http request option.
485
482
  * @throws {RequiredError}
486
483
  */
487
- retrieveShippingLabel(shipmentId, trackingId, body, options) {
488
- return localVarFp.retrieveShippingLabel(shipmentId, trackingId, body, options).then((request) => request(axios, basePath));
484
+ retrieveShippingLabel(requestParameters, options) {
485
+ return localVarFp.retrieveShippingLabel(requestParameters.shipmentId, requestParameters.trackingId, requestParameters.body, options).then((request) => request(axios, basePath));
489
486
  },
490
487
  };
491
488
  };
@@ -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));
@@ -400,21 +400,21 @@ export const ShippingApiFactory = function (configuration, basePath, axios) {
400
400
  return {
401
401
  /**
402
402
  * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
403
- * @param {string} shipmentId
403
+ * @param {ShippingApiCancelShipmentRequest} requestParameters Request parameters.
404
404
  * @param {*} [options] Override http request option.
405
405
  * @throws {RequiredError}
406
406
  */
407
- cancelShipment(shipmentId, options) {
408
- return localVarFp.cancelShipment(shipmentId, options).then((request) => request(axios, basePath));
407
+ cancelShipment(requestParameters, options) {
408
+ return localVarFp.cancelShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
409
409
  },
410
410
  /**
411
411
  * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
412
- * @param {CreateShipmentRequest} body
412
+ * @param {ShippingApiCreateShipmentRequest} requestParameters Request parameters.
413
413
  * @param {*} [options] Override http request option.
414
414
  * @throws {RequiredError}
415
415
  */
416
- createShipment(body, options) {
417
- return localVarFp.createShipment(body, options).then((request) => request(axios, basePath));
416
+ createShipment(requestParameters, options) {
417
+ return localVarFp.createShipment(requestParameters.body, options).then((request) => request(axios, basePath));
418
418
  },
419
419
  /**
420
420
  * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
@@ -426,60 +426,57 @@ export const ShippingApiFactory = function (configuration, basePath, axios) {
426
426
  },
427
427
  /**
428
428
  * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
429
- * @param {GetRatesRequest} body
429
+ * @param {ShippingApiGetRatesRequest} requestParameters Request parameters.
430
430
  * @param {*} [options] Override http request option.
431
431
  * @throws {RequiredError}
432
432
  */
433
- getRates(body, options) {
434
- return localVarFp.getRates(body, options).then((request) => request(axios, basePath));
433
+ getRates(requestParameters, options) {
434
+ return localVarFp.getRates(requestParameters.body, options).then((request) => request(axios, basePath));
435
435
  },
436
436
  /**
437
437
  * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
438
- * @param {string} shipmentId
438
+ * @param {ShippingApiGetShipmentRequest} requestParameters Request parameters.
439
439
  * @param {*} [options] Override http request option.
440
440
  * @throws {RequiredError}
441
441
  */
442
- getShipment(shipmentId, options) {
443
- return localVarFp.getShipment(shipmentId, options).then((request) => request(axios, basePath));
442
+ getShipment(requestParameters, options) {
443
+ return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
444
444
  },
445
445
  /**
446
446
  * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
447
- * @param {string} trackingId
447
+ * @param {ShippingApiGetTrackingInformationRequest} requestParameters Request parameters.
448
448
  * @param {*} [options] Override http request option.
449
449
  * @throws {RequiredError}
450
450
  */
451
- getTrackingInformation(trackingId, options) {
452
- return localVarFp.getTrackingInformation(trackingId, options).then((request) => request(axios, basePath));
451
+ getTrackingInformation(requestParameters, options) {
452
+ return localVarFp.getTrackingInformation(requestParameters.trackingId, options).then((request) => request(axios, basePath));
453
453
  },
454
454
  /**
455
455
  * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
456
- * @param {string} shipmentId
457
- * @param {PurchaseLabelsRequest} body
456
+ * @param {ShippingApiPurchaseLabelsRequest} requestParameters Request parameters.
458
457
  * @param {*} [options] Override http request option.
459
458
  * @throws {RequiredError}
460
459
  */
461
- purchaseLabels(shipmentId, body, options) {
462
- return localVarFp.purchaseLabels(shipmentId, body, options).then((request) => request(axios, basePath));
460
+ purchaseLabels(requestParameters, options) {
461
+ return localVarFp.purchaseLabels(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios, basePath));
463
462
  },
464
463
  /**
465
464
  * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
466
- * @param {PurchaseShipmentRequest} body
465
+ * @param {ShippingApiPurchaseShipmentRequest} requestParameters Request parameters.
467
466
  * @param {*} [options] Override http request option.
468
467
  * @throws {RequiredError}
469
468
  */
470
- purchaseShipment(body, options) {
471
- return localVarFp.purchaseShipment(body, options).then((request) => request(axios, basePath));
469
+ purchaseShipment(requestParameters, options) {
470
+ return localVarFp.purchaseShipment(requestParameters.body, options).then((request) => request(axios, basePath));
472
471
  },
473
472
  /**
474
473
  * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
475
- * @param {string} shipmentId
476
- * @param {string} trackingId
477
- * @param {RetrieveShippingLabelRequest} body
474
+ * @param {ShippingApiRetrieveShippingLabelRequest} requestParameters Request parameters.
478
475
  * @param {*} [options] Override http request option.
479
476
  * @throws {RequiredError}
480
477
  */
481
- retrieveShippingLabel(shipmentId, trackingId, body, options) {
482
- return localVarFp.retrieveShippingLabel(shipmentId, trackingId, body, options).then((request) => request(axios, basePath));
478
+ retrieveShippingLabel(requestParameters, options) {
479
+ return localVarFp.retrieveShippingLabel(requestParameters.shipmentId, requestParameters.trackingId, requestParameters.body, options).then((request) => request(axios, basePath));
483
480
  },
484
481
  };
485
482
  };
@@ -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 { CancelShipmentResponse } from '../models';
16
16
  import { CreateShipmentRequest } from '../models';
@@ -175,69 +175,66 @@ export declare const ShippingApiFp: (configuration?: Configuration) => {
175
175
  export declare const ShippingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
176
176
  /**
177
177
  * Cancel a shipment by the given shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
178
- * @param {string} shipmentId
178
+ * @param {ShippingApiCancelShipmentRequest} requestParameters Request parameters.
179
179
  * @param {*} [options] Override http request option.
180
180
  * @throws {RequiredError}
181
181
  */
182
- cancelShipment(shipmentId: string, options?: any): AxiosPromise<CancelShipmentResponse>;
182
+ cancelShipment(requestParameters: ShippingApiCancelShipmentRequest, options?: AxiosRequestConfig): AxiosPromise<CancelShipmentResponse>;
183
183
  /**
184
184
  * Create a new shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
185
- * @param {CreateShipmentRequest} body
185
+ * @param {ShippingApiCreateShipmentRequest} requestParameters Request parameters.
186
186
  * @param {*} [options] Override http request option.
187
187
  * @throws {RequiredError}
188
188
  */
189
- createShipment(body: CreateShipmentRequest, options?: any): AxiosPromise<CreateShipmentResponse>;
189
+ createShipment(requestParameters: ShippingApiCreateShipmentRequest, options?: AxiosRequestConfig): AxiosPromise<CreateShipmentResponse>;
190
190
  /**
191
191
  * Verify if the current account is valid. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
192
192
  * @param {*} [options] Override http request option.
193
193
  * @throws {RequiredError}
194
194
  */
195
- getAccount(options?: any): AxiosPromise<GetAccountResponse>;
195
+ getAccount(options?: AxiosRequestConfig): AxiosPromise<GetAccountResponse>;
196
196
  /**
197
197
  * Get service rates. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
198
- * @param {GetRatesRequest} body
198
+ * @param {ShippingApiGetRatesRequest} requestParameters Request parameters.
199
199
  * @param {*} [options] Override http request option.
200
200
  * @throws {RequiredError}
201
201
  */
202
- getRates(body: GetRatesRequest, options?: any): AxiosPromise<GetRatesResponse>;
202
+ getRates(requestParameters: ShippingApiGetRatesRequest, options?: AxiosRequestConfig): AxiosPromise<GetRatesResponse>;
203
203
  /**
204
204
  * Return the entire shipment object for the shipmentId. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
205
- * @param {string} shipmentId
205
+ * @param {ShippingApiGetShipmentRequest} requestParameters Request parameters.
206
206
  * @param {*} [options] Override http request option.
207
207
  * @throws {RequiredError}
208
208
  */
209
- getShipment(shipmentId: string, options?: any): AxiosPromise<GetShipmentResponse>;
209
+ getShipment(requestParameters: ShippingApiGetShipmentRequest, options?: AxiosRequestConfig): AxiosPromise<GetShipmentResponse>;
210
210
  /**
211
211
  * Return the tracking information of a shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
212
- * @param {string} trackingId
212
+ * @param {ShippingApiGetTrackingInformationRequest} requestParameters Request parameters.
213
213
  * @param {*} [options] Override http request option.
214
214
  * @throws {RequiredError}
215
215
  */
216
- getTrackingInformation(trackingId: string, options?: any): AxiosPromise<GetTrackingInformationResponse>;
216
+ getTrackingInformation(requestParameters: ShippingApiGetTrackingInformationRequest, options?: AxiosRequestConfig): AxiosPromise<GetTrackingInformationResponse>;
217
217
  /**
218
218
  * Purchase shipping labels based on a given rate. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
219
- * @param {string} shipmentId
220
- * @param {PurchaseLabelsRequest} body
219
+ * @param {ShippingApiPurchaseLabelsRequest} requestParameters Request parameters.
221
220
  * @param {*} [options] Override http request option.
222
221
  * @throws {RequiredError}
223
222
  */
224
- purchaseLabels(shipmentId: string, body: PurchaseLabelsRequest, options?: any): AxiosPromise<PurchaseLabelsResponse>;
223
+ purchaseLabels(requestParameters: ShippingApiPurchaseLabelsRequest, options?: AxiosRequestConfig): AxiosPromise<PurchaseLabelsResponse>;
225
224
  /**
226
225
  * Purchase shipping labels. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
227
- * @param {PurchaseShipmentRequest} body
226
+ * @param {ShippingApiPurchaseShipmentRequest} requestParameters Request parameters.
228
227
  * @param {*} [options] Override http request option.
229
228
  * @throws {RequiredError}
230
229
  */
231
- purchaseShipment(body: PurchaseShipmentRequest, options?: any): AxiosPromise<PurchaseShipmentResponse>;
230
+ purchaseShipment(requestParameters: ShippingApiPurchaseShipmentRequest, options?: AxiosRequestConfig): AxiosPromise<PurchaseShipmentResponse>;
232
231
  /**
233
232
  * Retrieve shipping label based on the shipment id and tracking id. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
234
- * @param {string} shipmentId
235
- * @param {string} trackingId
236
- * @param {RetrieveShippingLabelRequest} body
233
+ * @param {ShippingApiRetrieveShippingLabelRequest} requestParameters Request parameters.
237
234
  * @param {*} [options] Override http request option.
238
235
  * @throws {RequiredError}
239
236
  */
240
- retrieveShippingLabel(shipmentId: string, trackingId: string, body: RetrieveShippingLabelRequest, options?: any): AxiosPromise<RetrieveShippingLabelResponse>;
237
+ retrieveShippingLabel(requestParameters: ShippingApiRetrieveShippingLabelRequest, options?: AxiosRequestConfig): AxiosPromise<RetrieveShippingLabelResponse>;
241
238
  };
242
239
  /**
243
240
  * Request parameters for cancelShipment operation in ShippingApi.
@@ -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/shipping-api-v1",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "Provides programmatic access to Amazon Shipping APIs. Note: If you are new to the Amazon Shipping API, refer to the latest version of Amazon Shipping API (v2) on the Amazon Shipping Developer Documentation site.",
5
- "version": "1.10.8",
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.20",
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": "e8ea8ef5b7745f2c4413bd7dd8eefa1b31cee128"
54
+ "gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
55
55
  }