@sp-api-sdk/vendor-orders-api-v1 2.0.7 → 2.1.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 (33) hide show
  1. package/dist/cjs/src/api-model/api/vendor-orders-api.js +79 -19
  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-orders-api.js +79 -19
  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-orders-api.d.ts +103 -44
  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/acknowledgement-status-details.d.ts +1 -1
  13. package/dist/types/src/api-model/models/get-purchase-order-response.d.ts +1 -1
  14. package/dist/types/src/api-model/models/get-purchase-orders-response.d.ts +1 -1
  15. package/dist/types/src/api-model/models/get-purchase-orders-status-response.d.ts +1 -1
  16. package/dist/types/src/api-model/models/order-acknowledgement-item.d.ts +3 -3
  17. package/dist/types/src/api-model/models/order-acknowledgement.d.ts +2 -2
  18. package/dist/types/src/api-model/models/order-details.d.ts +3 -3
  19. package/dist/types/src/api-model/models/order-item-acknowledgement.d.ts +1 -1
  20. package/dist/types/src/api-model/models/order-item-status-acknowledgement-status.d.ts +2 -2
  21. package/dist/types/src/api-model/models/order-item-status-ordered-quantity.d.ts +2 -2
  22. package/dist/types/src/api-model/models/order-item-status-receiving-status.d.ts +1 -1
  23. package/dist/types/src/api-model/models/order-item-status.d.ts +4 -4
  24. package/dist/types/src/api-model/models/order-item.d.ts +2 -2
  25. package/dist/types/src/api-model/models/order-list-status.d.ts +2 -2
  26. package/dist/types/src/api-model/models/order-list.d.ts +2 -2
  27. package/dist/types/src/api-model/models/order-status.d.ts +2 -2
  28. package/dist/types/src/api-model/models/order.d.ts +1 -1
  29. package/dist/types/src/api-model/models/ordered-quantity-details.d.ts +1 -1
  30. package/dist/types/src/api-model/models/party-identification.d.ts +2 -2
  31. package/dist/types/src/api-model/models/submit-acknowledgement-request.d.ts +1 -1
  32. package/dist/types/src/api-model/models/submit-acknowledgement-response.d.ts +1 -1
  33. 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.VendorOrdersApi = exports.VendorOrdersApiFactory = exports.VendorOrdersApiFp = exports.VendorOrdersApiAxiosParamCreator = void 0;
19
+ exports.GetPurchaseOrdersStatusItemReceiveStatusEnum = exports.GetPurchaseOrdersStatusItemConfirmationStatusEnum = exports.GetPurchaseOrdersStatusPurchaseOrderStatusEnum = exports.GetPurchaseOrdersStatusSortOrderEnum = exports.GetPurchaseOrdersPurchaseOrderStateEnum = exports.GetPurchaseOrdersPoItemStateEnum = exports.GetPurchaseOrdersSortOrderEnum = exports.VendorOrdersApi = exports.VendorOrdersApiFactory = exports.VendorOrdersApiFp = exports.VendorOrdersApiAxiosParamCreator = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  // Some imports not used depending on template conditions
22
22
  // @ts-ignore
@@ -62,14 +62,14 @@ const VendorOrdersApiAxiosParamCreator = function (configuration) {
62
62
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
63
63
  * @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
64
64
  * @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
65
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
65
+ * @param {GetPurchaseOrdersSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
66
66
  * @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
67
67
  * @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
68
68
  * @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
69
69
  * @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
70
- * @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
70
+ * @param {GetPurchaseOrdersPoItemStateEnum} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
71
71
  * @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
72
- * @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
72
+ * @param {GetPurchaseOrdersPurchaseOrderStateEnum} [purchaseOrderState] Filters purchase orders based on the purchase order state.
73
73
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
74
74
  * @param {*} [options] Override http request option.
75
75
  * @throws {RequiredError}
@@ -140,16 +140,16 @@ const VendorOrdersApiAxiosParamCreator = function (configuration) {
140
140
  /**
141
141
  * Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage 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).
142
142
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
143
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
143
+ * @param {GetPurchaseOrdersStatusSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
144
144
  * @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
145
145
  * @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
146
146
  * @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
147
147
  * @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
148
148
  * @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
149
149
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
150
- * @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
151
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
152
- * @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
150
+ * @param {GetPurchaseOrdersStatusPurchaseOrderStatusEnum} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
151
+ * @param {GetPurchaseOrdersStatusItemConfirmationStatusEnum} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
152
+ * @param {GetPurchaseOrdersStatusItemReceiveStatusEnum} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
153
153
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
154
154
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
155
155
  * @param {*} [options] Override http request option.
@@ -268,42 +268,46 @@ const VendorOrdersApiFp = function (configuration) {
268
268
  */
269
269
  async getPurchaseOrder(purchaseOrderNumber, options) {
270
270
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrder(purchaseOrderNumber, options);
271
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
271
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
272
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorOrdersApi.getPurchaseOrder']?.[localVarOperationServerIndex]?.url;
273
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
272
274
  },
273
275
  /**
274
276
  * Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage 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).
275
277
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
276
278
  * @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
277
279
  * @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
278
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
280
+ * @param {GetPurchaseOrdersSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
279
281
  * @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
280
282
  * @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
281
283
  * @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
282
284
  * @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
283
- * @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
285
+ * @param {GetPurchaseOrdersPoItemStateEnum} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
284
286
  * @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
285
- * @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
287
+ * @param {GetPurchaseOrdersPurchaseOrderStateEnum} [purchaseOrderState] Filters purchase orders based on the purchase order state.
286
288
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
287
289
  * @param {*} [options] Override http request option.
288
290
  * @throws {RequiredError}
289
291
  */
290
292
  async getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options) {
291
293
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options);
292
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
294
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
295
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorOrdersApi.getPurchaseOrders']?.[localVarOperationServerIndex]?.url;
296
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
293
297
  },
294
298
  /**
295
299
  * Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage 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).
296
300
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
297
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
301
+ * @param {GetPurchaseOrdersStatusSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
298
302
  * @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
299
303
  * @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
300
304
  * @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
301
305
  * @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
302
306
  * @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
303
307
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
304
- * @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
305
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
306
- * @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
308
+ * @param {GetPurchaseOrdersStatusPurchaseOrderStatusEnum} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
309
+ * @param {GetPurchaseOrdersStatusItemConfirmationStatusEnum} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
310
+ * @param {GetPurchaseOrdersStatusItemReceiveStatusEnum} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
307
311
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
308
312
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
309
313
  * @param {*} [options] Override http request option.
@@ -311,7 +315,9 @@ const VendorOrdersApiFp = function (configuration) {
311
315
  */
312
316
  async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
313
317
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options);
314
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
318
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
319
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorOrdersApi.getPurchaseOrdersStatus']?.[localVarOperationServerIndex]?.url;
320
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
315
321
  },
316
322
  /**
317
323
  * Submits acknowledgements for one or more purchase 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).
@@ -321,7 +327,9 @@ const VendorOrdersApiFp = function (configuration) {
321
327
  */
322
328
  async submitAcknowledgement(body, options) {
323
329
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitAcknowledgement(body, options);
324
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
330
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
331
+ const localVarOperationServerBasePath = base_1.operationServerMap['VendorOrdersApi.submitAcknowledgement']?.[localVarOperationServerIndex]?.url;
332
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
325
333
  },
326
334
  };
327
335
  };
@@ -421,3 +429,55 @@ class VendorOrdersApi extends base_1.BaseAPI {
421
429
  }
422
430
  }
423
431
  exports.VendorOrdersApi = VendorOrdersApi;
432
+ /**
433
+ * @export
434
+ */
435
+ exports.GetPurchaseOrdersSortOrderEnum = {
436
+ Asc: 'ASC',
437
+ Desc: 'DESC'
438
+ };
439
+ /**
440
+ * @export
441
+ */
442
+ exports.GetPurchaseOrdersPoItemStateEnum = {
443
+ Cancelled: 'Cancelled'
444
+ };
445
+ /**
446
+ * @export
447
+ */
448
+ exports.GetPurchaseOrdersPurchaseOrderStateEnum = {
449
+ New: 'New',
450
+ Acknowledged: 'Acknowledged',
451
+ Closed: 'Closed'
452
+ };
453
+ /**
454
+ * @export
455
+ */
456
+ exports.GetPurchaseOrdersStatusSortOrderEnum = {
457
+ Asc: 'ASC',
458
+ Desc: 'DESC'
459
+ };
460
+ /**
461
+ * @export
462
+ */
463
+ exports.GetPurchaseOrdersStatusPurchaseOrderStatusEnum = {
464
+ Open: 'OPEN',
465
+ Closed: 'CLOSED'
466
+ };
467
+ /**
468
+ * @export
469
+ */
470
+ exports.GetPurchaseOrdersStatusItemConfirmationStatusEnum = {
471
+ Accepted: 'ACCEPTED',
472
+ PartiallyAccepted: 'PARTIALLY_ACCEPTED',
473
+ Rejected: 'REJECTED',
474
+ Unconfirmed: 'UNCONFIRMED'
475
+ };
476
+ /**
477
+ * @export
478
+ */
479
+ exports.GetPurchaseOrdersStatusItemReceiveStatusEnum = {
480
+ NotReceived: 'NOT_RECEIVED',
481
+ PartiallyReceived: 'PARTIALLY_RECEIVED',
482
+ Received: 'RECEIVED'
483
+ };
@@ -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
  * VendorOrdersApi - axios parameter creator
22
22
  * @export
@@ -56,14 +56,14 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration) {
56
56
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
57
57
  * @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
58
58
  * @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
59
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
59
+ * @param {GetPurchaseOrdersSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
60
60
  * @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
61
61
  * @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
62
62
  * @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
63
63
  * @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
64
- * @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
64
+ * @param {GetPurchaseOrdersPoItemStateEnum} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
65
65
  * @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
66
- * @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
66
+ * @param {GetPurchaseOrdersPurchaseOrderStateEnum} [purchaseOrderState] Filters purchase orders based on the purchase order state.
67
67
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
68
68
  * @param {*} [options] Override http request option.
69
69
  * @throws {RequiredError}
@@ -134,16 +134,16 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration) {
134
134
  /**
135
135
  * Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage 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).
136
136
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
137
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
137
+ * @param {GetPurchaseOrdersStatusSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
138
138
  * @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
139
139
  * @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
140
140
  * @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
141
141
  * @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
142
142
  * @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
143
143
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
144
- * @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
145
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
146
- * @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
144
+ * @param {GetPurchaseOrdersStatusPurchaseOrderStatusEnum} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
145
+ * @param {GetPurchaseOrdersStatusItemConfirmationStatusEnum} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
146
+ * @param {GetPurchaseOrdersStatusItemReceiveStatusEnum} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
147
147
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
148
148
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
149
149
  * @param {*} [options] Override http request option.
@@ -261,42 +261,46 @@ export const VendorOrdersApiFp = function (configuration) {
261
261
  */
262
262
  async getPurchaseOrder(purchaseOrderNumber, options) {
263
263
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrder(purchaseOrderNumber, options);
264
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
264
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
265
+ const localVarOperationServerBasePath = operationServerMap['VendorOrdersApi.getPurchaseOrder']?.[localVarOperationServerIndex]?.url;
266
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
265
267
  },
266
268
  /**
267
269
  * Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage 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).
268
270
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
269
271
  * @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
270
272
  * @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
271
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
273
+ * @param {GetPurchaseOrdersSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
272
274
  * @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
273
275
  * @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
274
276
  * @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
275
277
  * @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
276
- * @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
278
+ * @param {GetPurchaseOrdersPoItemStateEnum} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
277
279
  * @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
278
- * @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
280
+ * @param {GetPurchaseOrdersPurchaseOrderStateEnum} [purchaseOrderState] Filters purchase orders based on the purchase order state.
279
281
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
280
282
  * @param {*} [options] Override http request option.
281
283
  * @throws {RequiredError}
282
284
  */
283
285
  async getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options) {
284
286
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options);
285
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
287
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
288
+ const localVarOperationServerBasePath = operationServerMap['VendorOrdersApi.getPurchaseOrders']?.[localVarOperationServerIndex]?.url;
289
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
286
290
  },
287
291
  /**
288
292
  * Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage 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).
289
293
  * @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
290
- * @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
294
+ * @param {GetPurchaseOrdersStatusSortOrderEnum} [sortOrder] Sort in ascending or descending order by purchase order creation date.
291
295
  * @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
292
296
  * @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
293
297
  * @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
294
298
  * @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
295
299
  * @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
296
300
  * @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
297
- * @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
298
- * @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
299
- * @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
301
+ * @param {GetPurchaseOrdersStatusPurchaseOrderStatusEnum} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
302
+ * @param {GetPurchaseOrdersStatusItemConfirmationStatusEnum} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
303
+ * @param {GetPurchaseOrdersStatusItemReceiveStatusEnum} [itemReceiveStatus] Filters purchase orders based on the purchase order\'s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
300
304
  * @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
301
305
  * @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
302
306
  * @param {*} [options] Override http request option.
@@ -304,7 +308,9 @@ export const VendorOrdersApiFp = function (configuration) {
304
308
  */
305
309
  async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options) {
306
310
  const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options);
307
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
311
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
312
+ const localVarOperationServerBasePath = operationServerMap['VendorOrdersApi.getPurchaseOrdersStatus']?.[localVarOperationServerIndex]?.url;
313
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
308
314
  },
309
315
  /**
310
316
  * Submits acknowledgements for one or more purchase 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).
@@ -314,7 +320,9 @@ export const VendorOrdersApiFp = function (configuration) {
314
320
  */
315
321
  async submitAcknowledgement(body, options) {
316
322
  const localVarAxiosArgs = await localVarAxiosParamCreator.submitAcknowledgement(body, options);
317
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
323
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
324
+ const localVarOperationServerBasePath = operationServerMap['VendorOrdersApi.submitAcknowledgement']?.[localVarOperationServerIndex]?.url;
325
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
318
326
  },
319
327
  };
320
328
  };
@@ -411,3 +419,55 @@ export class VendorOrdersApi extends BaseAPI {
411
419
  return VendorOrdersApiFp(this.configuration).submitAcknowledgement(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
412
420
  }
413
421
  }
422
+ /**
423
+ * @export
424
+ */
425
+ export const GetPurchaseOrdersSortOrderEnum = {
426
+ Asc: 'ASC',
427
+ Desc: 'DESC'
428
+ };
429
+ /**
430
+ * @export
431
+ */
432
+ export const GetPurchaseOrdersPoItemStateEnum = {
433
+ Cancelled: 'Cancelled'
434
+ };
435
+ /**
436
+ * @export
437
+ */
438
+ export const GetPurchaseOrdersPurchaseOrderStateEnum = {
439
+ New: 'New',
440
+ Acknowledged: 'Acknowledged',
441
+ Closed: 'Closed'
442
+ };
443
+ /**
444
+ * @export
445
+ */
446
+ export const GetPurchaseOrdersStatusSortOrderEnum = {
447
+ Asc: 'ASC',
448
+ Desc: 'DESC'
449
+ };
450
+ /**
451
+ * @export
452
+ */
453
+ export const GetPurchaseOrdersStatusPurchaseOrderStatusEnum = {
454
+ Open: 'OPEN',
455
+ Closed: 'CLOSED'
456
+ };
457
+ /**
458
+ * @export
459
+ */
460
+ export const GetPurchaseOrdersStatusItemConfirmationStatusEnum = {
461
+ Accepted: 'ACCEPTED',
462
+ PartiallyAccepted: 'PARTIALLY_ACCEPTED',
463
+ Rejected: 'REJECTED',
464
+ Unconfirmed: 'UNCONFIRMED'
465
+ };
466
+ /**
467
+ * @export
468
+ */
469
+ export const GetPurchaseOrdersStatusItemReceiveStatusEnum = {
470
+ NotReceived: 'NOT_RECEIVED',
471
+ PartiallyReceived: 'PARTIALLY_RECEIVED',
472
+ Received: 'RECEIVED'
473
+ };
@@ -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
  }