@sp-api-sdk/vendor-direct-fulfillment-shipping-api-v1 2.1.5 → 2.2.1

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.
Files changed (37) hide show
  1. package/dist/cjs/src/api-model/api/vendor-shipping-api.js +55 -16
  2. package/dist/cjs/src/api-model/base.js +7 -2
  3. package/dist/cjs/src/api-model/common.js +1 -1
  4. package/dist/cjs/src/api-model/configuration.js +8 -0
  5. package/dist/es/src/api-model/api/vendor-shipping-api.js +55 -16
  6. package/dist/es/src/api-model/base.js +6 -1
  7. package/dist/es/src/api-model/common.js +1 -1
  8. package/dist/es/src/api-model/configuration.js +8 -0
  9. package/dist/types/src/api-model/api/vendor-shipping-api.d.ts +83 -59
  10. package/dist/types/src/api-model/base.d.ts +14 -2
  11. package/dist/types/src/api-model/configuration.d.ts +8 -0
  12. package/dist/types/src/api-model/models/container.d.ts +3 -3
  13. package/dist/types/src/api-model/models/customer-invoice-list.d.ts +2 -2
  14. package/dist/types/src/api-model/models/get-customer-invoice-response.d.ts +1 -1
  15. package/dist/types/src/api-model/models/get-customer-invoices-response.d.ts +1 -1
  16. package/dist/types/src/api-model/models/get-packing-slip-list-response.d.ts +1 -1
  17. package/dist/types/src/api-model/models/get-packing-slip-response.d.ts +1 -1
  18. package/dist/types/src/api-model/models/get-shipping-label-list-response.d.ts +1 -1
  19. package/dist/types/src/api-model/models/get-shipping-label-response.d.ts +1 -1
  20. package/dist/types/src/api-model/models/item.d.ts +1 -1
  21. package/dist/types/src/api-model/models/packed-item.d.ts +1 -1
  22. package/dist/types/src/api-model/models/packing-slip-list.d.ts +2 -2
  23. package/dist/types/src/api-model/models/party-identification.d.ts +2 -2
  24. package/dist/types/src/api-model/models/shipment-confirmation.d.ts +4 -4
  25. package/dist/types/src/api-model/models/shipment-status-update.d.ts +2 -2
  26. package/dist/types/src/api-model/models/shipping-label-list.d.ts +2 -2
  27. package/dist/types/src/api-model/models/shipping-label-request.d.ts +2 -2
  28. package/dist/types/src/api-model/models/shipping-label.d.ts +2 -2
  29. package/dist/types/src/api-model/models/status-update-details.d.ts +2 -2
  30. package/dist/types/src/api-model/models/submit-shipment-confirmations-request.d.ts +1 -1
  31. package/dist/types/src/api-model/models/submit-shipment-confirmations-response.d.ts +1 -1
  32. package/dist/types/src/api-model/models/submit-shipment-status-updates-request.d.ts +1 -1
  33. package/dist/types/src/api-model/models/submit-shipment-status-updates-response.d.ts +1 -1
  34. package/dist/types/src/api-model/models/submit-shipping-labels-request.d.ts +1 -1
  35. package/dist/types/src/api-model/models/submit-shipping-labels-response.d.ts +1 -1
  36. package/dist/types/src/api-model/models/tax-registration-details.d.ts +1 -1
  37. package/package.json +4 -4
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.VendorShippingApi = exports.VendorShippingApiFactory = exports.VendorShippingApiFp = exports.VendorShippingApiAxiosParamCreator = void 0;
19
+ exports.GetShippingLabelsSortOrderEnum = exports.GetPackingSlipsSortOrderEnum = exports.GetCustomerInvoicesSortOrderEnum = exports.VendorShippingApi = exports.VendorShippingApiFactory = exports.VendorShippingApiFp = exports.VendorShippingApiAxiosParamCreator = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
@@ -63,7 +63,7 @@ const VendorShippingApiAxiosParamCreator = function (configuration) {
63
63
  * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
64
64
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
65
65
  * @param {number} [limit] The limit to the number of records returned
66
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
66
+ * @param {GetCustomerInvoicesSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
67
67
  * @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.
68
68
  * @param {*} [options] Override http request option.
69
69
  * @throws {RequiredError}
@@ -147,7 +147,7 @@ const VendorShippingApiAxiosParamCreator = function (configuration) {
147
147
  * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
148
148
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
149
149
  * @param {number} [limit] The limit to the number of records returned
150
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date.
150
+ * @param {GetPackingSlipsSortOrderEnum} [sortOrder] Sort ASC or DESC by packing slip creation date.
151
151
  * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
152
152
  * @param {*} [options] Override http request option.
153
153
  * @throws {RequiredError}
@@ -231,7 +231,7 @@ const VendorShippingApiAxiosParamCreator = function (configuration) {
231
231
  * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
232
232
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
233
233
  * @param {number} [limit] The limit to the number of records returned.
234
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
234
+ * @param {GetShippingLabelsSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
235
235
  * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
236
236
  * @param {*} [options] Override http request option.
237
237
  * @throws {RequiredError}
@@ -386,7 +386,9 @@ const VendorShippingApiFp = function (configuration) {
386
386
  */
387
387
  async getCustomerInvoice(purchaseOrderNumber, options) {
388
388
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoice(purchaseOrderNumber, options);
389
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
389
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
390
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getCustomerInvoice']?.[localVarOperationServerIndex]?.url;
391
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
390
392
  },
391
393
  /**
392
394
  * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -394,14 +396,16 @@ const VendorShippingApiFp = function (configuration) {
394
396
  * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
395
397
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
396
398
  * @param {number} [limit] The limit to the number of records returned
397
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
399
+ * @param {GetCustomerInvoicesSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
398
400
  * @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.
399
401
  * @param {*} [options] Override http request option.
400
402
  * @throws {RequiredError}
401
403
  */
402
404
  async getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
403
405
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
404
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
406
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
407
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getCustomerInvoices']?.[localVarOperationServerIndex]?.url;
408
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
405
409
  },
406
410
  /**
407
411
  * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -411,7 +415,9 @@ const VendorShippingApiFp = function (configuration) {
411
415
  */
412
416
  async getPackingSlip(purchaseOrderNumber, options) {
413
417
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlip(purchaseOrderNumber, options);
414
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
418
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
419
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getPackingSlip']?.[localVarOperationServerIndex]?.url;
420
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
415
421
  },
416
422
  /**
417
423
  * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -419,14 +425,16 @@ const VendorShippingApiFp = function (configuration) {
419
425
  * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
420
426
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
421
427
  * @param {number} [limit] The limit to the number of records returned
422
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date.
428
+ * @param {GetPackingSlipsSortOrderEnum} [sortOrder] Sort ASC or DESC by packing slip creation date.
423
429
  * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
424
430
  * @param {*} [options] Override http request option.
425
431
  * @throws {RequiredError}
426
432
  */
427
433
  async getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
428
434
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
429
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
435
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
436
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getPackingSlips']?.[localVarOperationServerIndex]?.url;
437
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
430
438
  },
431
439
  /**
432
440
  * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -436,7 +444,9 @@ const VendorShippingApiFp = function (configuration) {
436
444
  */
437
445
  async getShippingLabel(purchaseOrderNumber, options) {
438
446
  const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabel(purchaseOrderNumber, options);
439
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
447
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
448
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getShippingLabel']?.[localVarOperationServerIndex]?.url;
449
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
440
450
  },
441
451
  /**
442
452
  * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -444,14 +454,16 @@ const VendorShippingApiFp = function (configuration) {
444
454
  * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
445
455
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
446
456
  * @param {number} [limit] The limit to the number of records returned.
447
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
457
+ * @param {GetShippingLabelsSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
448
458
  * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
449
459
  * @param {*} [options] Override http request option.
450
460
  * @throws {RequiredError}
451
461
  */
452
462
  async getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
453
463
  const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
454
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
464
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
465
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.getShippingLabels']?.[localVarOperationServerIndex]?.url;
466
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
455
467
  },
456
468
  /**
457
469
  * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -461,7 +473,9 @@ const VendorShippingApiFp = function (configuration) {
461
473
  */
462
474
  async submitShipmentConfirmations(body, options) {
463
475
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentConfirmations(body, options);
464
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
476
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
477
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.submitShipmentConfirmations']?.[localVarOperationServerIndex]?.url;
478
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
465
479
  },
466
480
  /**
467
481
  * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -471,7 +485,9 @@ const VendorShippingApiFp = function (configuration) {
471
485
  */
472
486
  async submitShipmentStatusUpdates(body, options) {
473
487
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentStatusUpdates(body, options);
474
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
488
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
489
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.submitShipmentStatusUpdates']?.[localVarOperationServerIndex]?.url;
490
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
475
491
  },
476
492
  /**
477
493
  * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -481,7 +497,9 @@ const VendorShippingApiFp = function (configuration) {
481
497
  */
482
498
  async submitShippingLabelRequest(body, options) {
483
499
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShippingLabelRequest(body, options);
484
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
500
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
501
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorShippingApi.submitShippingLabelRequest']?.[localVarOperationServerIndex]?.url;
502
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
485
503
  },
486
504
  };
487
505
  };
@@ -676,3 +694,24 @@ class VendorShippingApi extends base_1.BaseAPI {
676
694
  }
677
695
  }
678
696
  exports.VendorShippingApi = VendorShippingApi;
697
+ /**
698
+ * @export
699
+ */
700
+ exports.GetCustomerInvoicesSortOrderEnum = {
701
+ Asc: 'ASC',
702
+ Desc: 'DESC'
703
+ };
704
+ /**
705
+ * @export
706
+ */
707
+ exports.GetPackingSlipsSortOrderEnum = {
708
+ Asc: 'ASC',
709
+ Desc: 'DESC'
710
+ };
711
+ /**
712
+ * @export
713
+ */
714
+ exports.GetShippingLabelsSortOrderEnum = {
715
+ Asc: 'ASC',
716
+ Desc: 'DESC'
717
+ };
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
19
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
22
  /**
@@ -43,7 +43,7 @@ class BaseAPI {
43
43
  this.axios = axios;
44
44
  if (configuration) {
45
45
  this.configuration = configuration;
46
- this.basePath = configuration.basePath || this.basePath;
46
+ this.basePath = configuration.basePath ?? basePath;
47
47
  }
48
48
  }
49
49
  }
@@ -64,3 +64,8 @@ class RequiredError extends Error {
64
64
  }
65
65
  }
66
66
  exports.RequiredError = RequiredError;
67
+ /**
68
+ *
69
+ * @export
70
+ */
71
+ exports.operationServerMap = {};
@@ -138,7 +138,7 @@ exports.toPathString = toPathString;
138
138
  */
139
139
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
140
140
  return (axios = globalAxios, basePath = BASE_PATH) => {
141
- const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
141
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
142
142
  return axios.request(axiosRequestArgs);
143
143
  };
144
144
  };
@@ -49,6 +49,13 @@ class Configuration {
49
49
  * @memberof Configuration
50
50
  */
51
51
  basePath;
52
+ /**
53
+ * override server index
54
+ *
55
+ * @type {number}
56
+ * @memberof Configuration
57
+ */
58
+ serverIndex;
52
59
  /**
53
60
  * base options for axios calls
54
61
  *
@@ -70,6 +77,7 @@ class Configuration {
70
77
  this.password = param.password;
71
78
  this.accessToken = param.accessToken;
72
79
  this.basePath = param.basePath;
80
+ this.serverIndex = param.serverIndex;
73
81
  this.baseOptions = param.baseOptions;
74
82
  this.formDataCtor = param.formDataCtor;
75
83
  }
@@ -16,7 +16,7 @@ import globalAxios from 'axios';
16
16
  // @ts-ignore
17
17
  import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
18
  // @ts-ignore
19
- import { BASE_PATH, BaseAPI } from '../base';
19
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
20
20
  /**
21
21
  * VendorShippingApi - axios parameter creator
22
22
  * @export
@@ -57,7 +57,7 @@ export const VendorShippingApiAxiosParamCreator = function (configuration) {
57
57
  * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
58
58
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
59
59
  * @param {number} [limit] The limit to the number of records returned
60
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
60
+ * @param {GetCustomerInvoicesSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
61
61
  * @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.
62
62
  * @param {*} [options] Override http request option.
63
63
  * @throws {RequiredError}
@@ -141,7 +141,7 @@ export const VendorShippingApiAxiosParamCreator = function (configuration) {
141
141
  * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
142
142
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
143
143
  * @param {number} [limit] The limit to the number of records returned
144
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date.
144
+ * @param {GetPackingSlipsSortOrderEnum} [sortOrder] Sort ASC or DESC by packing slip creation date.
145
145
  * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
146
146
  * @param {*} [options] Override http request option.
147
147
  * @throws {RequiredError}
@@ -225,7 +225,7 @@ export const VendorShippingApiAxiosParamCreator = function (configuration) {
225
225
  * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
226
226
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
227
227
  * @param {number} [limit] The limit to the number of records returned.
228
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
228
+ * @param {GetShippingLabelsSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
229
229
  * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
230
230
  * @param {*} [options] Override http request option.
231
231
  * @throws {RequiredError}
@@ -379,7 +379,9 @@ export const VendorShippingApiFp = function (configuration) {
379
379
  */
380
380
  async getCustomerInvoice(purchaseOrderNumber, options) {
381
381
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoice(purchaseOrderNumber, options);
382
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
382
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
383
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getCustomerInvoice']?.[localVarOperationServerIndex]?.url;
384
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
383
385
  },
384
386
  /**
385
387
  * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -387,14 +389,16 @@ export const VendorShippingApiFp = function (configuration) {
387
389
  * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
388
390
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
389
391
  * @param {number} [limit] The limit to the number of records returned
390
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
392
+ * @param {GetCustomerInvoicesSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
391
393
  * @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.
392
394
  * @param {*} [options] Override http request option.
393
395
  * @throws {RequiredError}
394
396
  */
395
397
  async getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
396
398
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
397
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
399
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
400
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getCustomerInvoices']?.[localVarOperationServerIndex]?.url;
401
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
398
402
  },
399
403
  /**
400
404
  * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -404,7 +408,9 @@ export const VendorShippingApiFp = function (configuration) {
404
408
  */
405
409
  async getPackingSlip(purchaseOrderNumber, options) {
406
410
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlip(purchaseOrderNumber, options);
407
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
411
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
412
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getPackingSlip']?.[localVarOperationServerIndex]?.url;
413
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
408
414
  },
409
415
  /**
410
416
  * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -412,14 +418,16 @@ export const VendorShippingApiFp = function (configuration) {
412
418
  * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
413
419
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
414
420
  * @param {number} [limit] The limit to the number of records returned
415
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by packing slip creation date.
421
+ * @param {GetPackingSlipsSortOrderEnum} [sortOrder] Sort ASC or DESC by packing slip creation date.
416
422
  * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
417
423
  * @param {*} [options] Override http request option.
418
424
  * @throws {RequiredError}
419
425
  */
420
426
  async getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
421
427
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
422
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
428
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
429
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getPackingSlips']?.[localVarOperationServerIndex]?.url;
430
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
423
431
  },
424
432
  /**
425
433
  * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -429,7 +437,9 @@ export const VendorShippingApiFp = function (configuration) {
429
437
  */
430
438
  async getShippingLabel(purchaseOrderNumber, options) {
431
439
  const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabel(purchaseOrderNumber, options);
432
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
440
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
441
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getShippingLabel']?.[localVarOperationServerIndex]?.url;
442
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
433
443
  },
434
444
  /**
435
445
  * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -437,14 +447,16 @@ export const VendorShippingApiFp = function (configuration) {
437
447
  * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
438
448
  * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
439
449
  * @param {number} [limit] The limit to the number of records returned.
440
- * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
450
+ * @param {GetShippingLabelsSortOrderEnum} [sortOrder] Sort ASC or DESC by order creation date.
441
451
  * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
442
452
  * @param {*} [options] Override http request option.
443
453
  * @throws {RequiredError}
444
454
  */
445
455
  async getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
446
456
  const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
447
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
457
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
458
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.getShippingLabels']?.[localVarOperationServerIndex]?.url;
459
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
448
460
  },
449
461
  /**
450
462
  * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -454,7 +466,9 @@ export const VendorShippingApiFp = function (configuration) {
454
466
  */
455
467
  async submitShipmentConfirmations(body, options) {
456
468
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentConfirmations(body, options);
457
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
469
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
470
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.submitShipmentConfirmations']?.[localVarOperationServerIndex]?.url;
471
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
458
472
  },
459
473
  /**
460
474
  * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -464,7 +478,9 @@ export const VendorShippingApiFp = function (configuration) {
464
478
  */
465
479
  async submitShipmentStatusUpdates(body, options) {
466
480
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentStatusUpdates(body, options);
467
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
481
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
482
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.submitShipmentStatusUpdates']?.[localVarOperationServerIndex]?.url;
483
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
468
484
  },
469
485
  /**
470
486
  * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
@@ -474,7 +490,9 @@ export const VendorShippingApiFp = function (configuration) {
474
490
  */
475
491
  async submitShippingLabelRequest(body, options) {
476
492
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitShippingLabelRequest(body, options);
477
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
493
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
494
+ const localVarOperationServerBasePath = operationServerMap['VendorShippingApi.submitShippingLabelRequest']?.[localVarOperationServerIndex]?.url;
495
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
478
496
  },
479
497
  };
480
498
  };
@@ -666,3 +684,24 @@ export class VendorShippingApi extends BaseAPI {
666
684
  return VendorShippingApiFp(this.configuration).submitShippingLabelRequest(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
667
685
  }
668
686
  }
687
+ /**
688
+ * @export
689
+ */
690
+ export const GetCustomerInvoicesSortOrderEnum = {
691
+ Asc: 'ASC',
692
+ Desc: 'DESC'
693
+ };
694
+ /**
695
+ * @export
696
+ */
697
+ export const GetPackingSlipsSortOrderEnum = {
698
+ Asc: 'ASC',
699
+ Desc: 'DESC'
700
+ };
701
+ /**
702
+ * @export
703
+ */
704
+ export const GetShippingLabelsSortOrderEnum = {
705
+ Asc: 'ASC',
706
+ Desc: 'DESC'
707
+ };
@@ -37,7 +37,7 @@ export class BaseAPI {
37
37
  this.axios = axios;
38
38
  if (configuration) {
39
39
  this.configuration = configuration;
40
- this.basePath = configuration.basePath || this.basePath;
40
+ this.basePath = configuration.basePath ?? basePath;
41
41
  }
42
42
  }
43
43
  }
@@ -56,3 +56,8 @@ export class RequiredError extends Error {
56
56
  this.name = "RequiredError";
57
57
  }
58
58
  }
59
+ /**
60
+ *
61
+ * @export
62
+ */
63
+ export const operationServerMap = {};
@@ -127,7 +127,7 @@ export const toPathString = function (url) {
127
127
  */
128
128
  export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
129
129
  return (axios = globalAxios, basePath = BASE_PATH) => {
130
- const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
130
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
131
131
  return axios.request(axiosRequestArgs);
132
132
  };
133
133
  };
@@ -46,6 +46,13 @@ export class Configuration {
46
46
  * @memberof Configuration
47
47
  */
48
48
  basePath;
49
+ /**
50
+ * override server index
51
+ *
52
+ * @type {number}
53
+ * @memberof Configuration
54
+ */
55
+ serverIndex;
49
56
  /**
50
57
  * base options for axios calls
51
58
  *
@@ -67,6 +74,7 @@ export class Configuration {
67
74
  this.password = param.password;
68
75
  this.accessToken = param.accessToken;
69
76
  this.basePath = param.basePath;
77
+ this.serverIndex = param.serverIndex;
70
78
  this.baseOptions = param.baseOptions;
71
79
  this.formDataCtor = param.formDataCtor;
72
80
  }