@sp-api-sdk/fulfillment-outbound-api-2020-07-01 1.10.9 → 1.10.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,6 +33,7 @@ const auth = new SellingPartnerApiAuth({
33
33
  refreshToken: 'Atzr|…',
34
34
  accessKeyId: '',
35
35
  secretAccessKey: '',
36
+ region: 'eu-west-1',
36
37
  role: {
37
38
  arn: 'arn:aws:iam::…',
38
39
  },
@@ -573,121 +573,111 @@ const FbaOutboundApiFactory = function (configuration, basePath, axios) {
573
573
  return {
574
574
  /**
575
575
  * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
576
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
576
+ * @param {FbaOutboundApiCancelFulfillmentOrderRequest} requestParameters Request parameters.
577
577
  * @param {*} [options] Override http request option.
578
578
  * @throws {RequiredError}
579
579
  */
580
- cancelFulfillmentOrder(sellerFulfillmentOrderId, options) {
581
- return localVarFp.cancelFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
580
+ cancelFulfillmentOrder(requestParameters, options) {
581
+ return localVarFp.cancelFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
582
582
  },
583
583
  /**
584
584
  * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
585
- * @param {CreateFulfillmentOrderRequest} body
585
+ * @param {FbaOutboundApiCreateFulfillmentOrderRequest} requestParameters Request parameters.
586
586
  * @param {*} [options] Override http request option.
587
587
  * @throws {RequiredError}
588
588
  */
589
- createFulfillmentOrder(body, options) {
590
- return localVarFp.createFulfillmentOrder(body, options).then((request) => request(axios, basePath));
589
+ createFulfillmentOrder(requestParameters, options) {
590
+ return localVarFp.createFulfillmentOrder(requestParameters.body, options).then((request) => request(axios, basePath));
591
591
  },
592
592
  /**
593
593
  * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
594
- * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items.
595
- * @param {CreateFulfillmentReturnRequest} body
594
+ * @param {FbaOutboundApiCreateFulfillmentReturnRequest} requestParameters Request parameters.
596
595
  * @param {*} [options] Override http request option.
597
596
  * @throws {RequiredError}
598
597
  */
599
- createFulfillmentReturn(sellerFulfillmentOrderId, body, options) {
600
- return localVarFp.createFulfillmentReturn(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath));
598
+ createFulfillmentReturn(requestParameters, options) {
599
+ return localVarFp.createFulfillmentReturn(requestParameters.sellerFulfillmentOrderId, requestParameters.body, options).then((request) => request(axios, basePath));
601
600
  },
602
601
  /**
603
602
  * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
604
- * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature.
605
- * @param {string} featureName The name of the feature for which to return a list of eligible inventory.
606
- * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
603
+ * @param {FbaOutboundApiGetFeatureInventoryRequest} requestParameters Request parameters.
607
604
  * @param {*} [options] Override http request option.
608
605
  * @throws {RequiredError}
609
606
  */
610
- getFeatureInventory(marketplaceId, featureName, nextToken, options) {
611
- return localVarFp.getFeatureInventory(marketplaceId, featureName, nextToken, options).then((request) => request(axios, basePath));
607
+ getFeatureInventory(requestParameters, options) {
608
+ return localVarFp.getFeatureInventory(requestParameters.marketplaceId, requestParameters.featureName, requestParameters.nextToken, options).then((request) => request(axios, basePath));
612
609
  },
613
610
  /**
614
611
  * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
615
- * @param {string} marketplaceId The marketplace for which to return the count.
616
- * @param {string} featureName The name of the feature.
617
- * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
612
+ * @param {FbaOutboundApiGetFeatureSKURequest} requestParameters Request parameters.
618
613
  * @param {*} [options] Override http request option.
619
614
  * @throws {RequiredError}
620
615
  */
621
- getFeatureSKU(marketplaceId, featureName, sellerSku, options) {
622
- return localVarFp.getFeatureSKU(marketplaceId, featureName, sellerSku, options).then((request) => request(axios, basePath));
616
+ getFeatureSKU(requestParameters, options) {
617
+ return localVarFp.getFeatureSKU(requestParameters.marketplaceId, requestParameters.featureName, requestParameters.sellerSku, options).then((request) => request(axios, basePath));
623
618
  },
624
619
  /**
625
620
  * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
626
- * @param {string} marketplaceId The marketplace for which to return the list of features.
621
+ * @param {FbaOutboundApiGetFeaturesRequest} requestParameters Request parameters.
627
622
  * @param {*} [options] Override http request option.
628
623
  * @throws {RequiredError}
629
624
  */
630
- getFeatures(marketplaceId, options) {
631
- return localVarFp.getFeatures(marketplaceId, options).then((request) => request(axios, basePath));
625
+ getFeatures(requestParameters, options) {
626
+ return localVarFp.getFeatures(requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
632
627
  },
633
628
  /**
634
629
  * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
635
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
630
+ * @param {FbaOutboundApiGetFulfillmentOrderRequest} requestParameters Request parameters.
636
631
  * @param {*} [options] Override http request option.
637
632
  * @throws {RequiredError}
638
633
  */
639
- getFulfillmentOrder(sellerFulfillmentOrderId, options) {
640
- return localVarFp.getFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
634
+ getFulfillmentOrder(requestParameters, options) {
635
+ return localVarFp.getFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
641
636
  },
642
637
  /**
643
638
  * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
644
- * @param {GetFulfillmentPreviewRequest} body
639
+ * @param {FbaOutboundApiGetFulfillmentPreviewRequest} requestParameters Request parameters.
645
640
  * @param {*} [options] Override http request option.
646
641
  * @throws {RequiredError}
647
642
  */
648
- getFulfillmentPreview(body, options) {
649
- return localVarFp.getFulfillmentPreview(body, options).then((request) => request(axios, basePath));
643
+ getFulfillmentPreview(requestParameters, options) {
644
+ return localVarFp.getFulfillmentPreview(requestParameters.body, options).then((request) => request(axios, basePath));
650
645
  },
651
646
  /**
652
647
  * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
653
- * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation.
648
+ * @param {FbaOutboundApiGetPackageTrackingDetailsRequest} requestParameters Request parameters.
654
649
  * @param {*} [options] Override http request option.
655
650
  * @throws {RequiredError}
656
651
  */
657
- getPackageTrackingDetails(packageNumber, options) {
658
- return localVarFp.getPackageTrackingDetails(packageNumber, options).then((request) => request(axios, basePath));
652
+ getPackageTrackingDetails(requestParameters, options) {
653
+ return localVarFp.getPackageTrackingDetails(requestParameters.packageNumber, options).then((request) => request(axios, basePath));
659
654
  },
660
655
  /**
661
656
  * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
662
- * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
663
- * @param {string} [nextToken] A string token returned in the response to your previous request.
657
+ * @param {FbaOutboundApiListAllFulfillmentOrdersRequest} requestParameters Request parameters.
664
658
  * @param {*} [options] Override http request option.
665
659
  * @throws {RequiredError}
666
660
  */
667
- listAllFulfillmentOrders(queryStartDate, nextToken, options) {
668
- return localVarFp.listAllFulfillmentOrders(queryStartDate, nextToken, options).then((request) => request(axios, basePath));
661
+ listAllFulfillmentOrders(requestParameters = {}, options) {
662
+ return localVarFp.listAllFulfillmentOrders(requestParameters.queryStartDate, requestParameters.nextToken, options).then((request) => request(axios, basePath));
669
663
  },
670
664
  /**
671
665
  * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
672
- * @param {string} sellerSku The seller SKU for which return reason codes are required.
673
- * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into.
674
- * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes.
675
- * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
666
+ * @param {FbaOutboundApiListReturnReasonCodesRequest} requestParameters Request parameters.
676
667
  * @param {*} [options] Override http request option.
677
668
  * @throws {RequiredError}
678
669
  */
679
- listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options) {
680
- return localVarFp.listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
670
+ listReturnReasonCodes(requestParameters, options) {
671
+ return localVarFp.listReturnReasonCodes(requestParameters.sellerSku, requestParameters.language, requestParameters.marketplaceId, requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
681
672
  },
682
673
  /**
683
674
  * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
684
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
685
- * @param {UpdateFulfillmentOrderRequest} body
675
+ * @param {FbaOutboundApiUpdateFulfillmentOrderRequest} requestParameters Request parameters.
686
676
  * @param {*} [options] Override http request option.
687
677
  * @throws {RequiredError}
688
678
  */
689
- updateFulfillmentOrder(sellerFulfillmentOrderId, body, options) {
690
- return localVarFp.updateFulfillmentOrder(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath));
679
+ updateFulfillmentOrder(requestParameters, options) {
680
+ return localVarFp.updateFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, requestParameters.body, options).then((request) => request(axios, basePath));
691
681
  },
692
682
  };
693
683
  };
@@ -15,8 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
17
  const tslib_1 = require("tslib");
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
18
  const axios_1 = tslib_1.__importDefault(require("axios"));
21
19
  exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
20
  /**
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
57
55
  */
58
56
  class RequiredError extends Error {
59
57
  field;
60
- name = "RequiredError";
61
58
  constructor(field, msg) {
62
59
  super(msg);
63
60
  this.field = field;
61
+ this.name = "RequiredError";
64
62
  }
65
63
  }
66
64
  exports.RequiredError = RequiredError;
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
81
81
  };
82
82
  exports.setOAuthToObject = setOAuthToObject;
83
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (parameter == null)
85
+ return;
84
86
  if (typeof parameter === "object") {
85
87
  if (Array.isArray(parameter)) {
86
88
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -567,121 +567,111 @@ export const FbaOutboundApiFactory = function (configuration, basePath, axios) {
567
567
  return {
568
568
  /**
569
569
  * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
570
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
570
+ * @param {FbaOutboundApiCancelFulfillmentOrderRequest} requestParameters Request parameters.
571
571
  * @param {*} [options] Override http request option.
572
572
  * @throws {RequiredError}
573
573
  */
574
- cancelFulfillmentOrder(sellerFulfillmentOrderId, options) {
575
- return localVarFp.cancelFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
574
+ cancelFulfillmentOrder(requestParameters, options) {
575
+ return localVarFp.cancelFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
576
576
  },
577
577
  /**
578
578
  * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
579
- * @param {CreateFulfillmentOrderRequest} body
579
+ * @param {FbaOutboundApiCreateFulfillmentOrderRequest} requestParameters Request parameters.
580
580
  * @param {*} [options] Override http request option.
581
581
  * @throws {RequiredError}
582
582
  */
583
- createFulfillmentOrder(body, options) {
584
- return localVarFp.createFulfillmentOrder(body, options).then((request) => request(axios, basePath));
583
+ createFulfillmentOrder(requestParameters, options) {
584
+ return localVarFp.createFulfillmentOrder(requestParameters.body, options).then((request) => request(axios, basePath));
585
585
  },
586
586
  /**
587
587
  * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
588
- * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\'s request to return items.
589
- * @param {CreateFulfillmentReturnRequest} body
588
+ * @param {FbaOutboundApiCreateFulfillmentReturnRequest} requestParameters Request parameters.
590
589
  * @param {*} [options] Override http request option.
591
590
  * @throws {RequiredError}
592
591
  */
593
- createFulfillmentReturn(sellerFulfillmentOrderId, body, options) {
594
- return localVarFp.createFulfillmentReturn(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath));
592
+ createFulfillmentReturn(requestParameters, options) {
593
+ return localVarFp.createFulfillmentReturn(requestParameters.sellerFulfillmentOrderId, requestParameters.body, options).then((request) => request(axios, basePath));
595
594
  },
596
595
  /**
597
596
  * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
598
- * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature.
599
- * @param {string} featureName The name of the feature for which to return a list of eligible inventory.
600
- * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
597
+ * @param {FbaOutboundApiGetFeatureInventoryRequest} requestParameters Request parameters.
601
598
  * @param {*} [options] Override http request option.
602
599
  * @throws {RequiredError}
603
600
  */
604
- getFeatureInventory(marketplaceId, featureName, nextToken, options) {
605
- return localVarFp.getFeatureInventory(marketplaceId, featureName, nextToken, options).then((request) => request(axios, basePath));
601
+ getFeatureInventory(requestParameters, options) {
602
+ return localVarFp.getFeatureInventory(requestParameters.marketplaceId, requestParameters.featureName, requestParameters.nextToken, options).then((request) => request(axios, basePath));
606
603
  },
607
604
  /**
608
605
  * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
609
- * @param {string} marketplaceId The marketplace for which to return the count.
610
- * @param {string} featureName The name of the feature.
611
- * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\'s SellerId, which is included with every operation that you submit.
606
+ * @param {FbaOutboundApiGetFeatureSKURequest} requestParameters Request parameters.
612
607
  * @param {*} [options] Override http request option.
613
608
  * @throws {RequiredError}
614
609
  */
615
- getFeatureSKU(marketplaceId, featureName, sellerSku, options) {
616
- return localVarFp.getFeatureSKU(marketplaceId, featureName, sellerSku, options).then((request) => request(axios, basePath));
610
+ getFeatureSKU(requestParameters, options) {
611
+ return localVarFp.getFeatureSKU(requestParameters.marketplaceId, requestParameters.featureName, requestParameters.sellerSku, options).then((request) => request(axios, basePath));
617
612
  },
618
613
  /**
619
614
  * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
620
- * @param {string} marketplaceId The marketplace for which to return the list of features.
615
+ * @param {FbaOutboundApiGetFeaturesRequest} requestParameters Request parameters.
621
616
  * @param {*} [options] Override http request option.
622
617
  * @throws {RequiredError}
623
618
  */
624
- getFeatures(marketplaceId, options) {
625
- return localVarFp.getFeatures(marketplaceId, options).then((request) => request(axios, basePath));
619
+ getFeatures(requestParameters, options) {
620
+ return localVarFp.getFeatures(requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
626
621
  },
627
622
  /**
628
623
  * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
629
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
624
+ * @param {FbaOutboundApiGetFulfillmentOrderRequest} requestParameters Request parameters.
630
625
  * @param {*} [options] Override http request option.
631
626
  * @throws {RequiredError}
632
627
  */
633
- getFulfillmentOrder(sellerFulfillmentOrderId, options) {
634
- return localVarFp.getFulfillmentOrder(sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
628
+ getFulfillmentOrder(requestParameters, options) {
629
+ return localVarFp.getFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
635
630
  },
636
631
  /**
637
632
  * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
638
- * @param {GetFulfillmentPreviewRequest} body
633
+ * @param {FbaOutboundApiGetFulfillmentPreviewRequest} requestParameters Request parameters.
639
634
  * @param {*} [options] Override http request option.
640
635
  * @throws {RequiredError}
641
636
  */
642
- getFulfillmentPreview(body, options) {
643
- return localVarFp.getFulfillmentPreview(body, options).then((request) => request(axios, basePath));
637
+ getFulfillmentPreview(requestParameters, options) {
638
+ return localVarFp.getFulfillmentPreview(requestParameters.body, options).then((request) => request(axios, basePath));
644
639
  },
645
640
  /**
646
641
  * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
647
- * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation.
642
+ * @param {FbaOutboundApiGetPackageTrackingDetailsRequest} requestParameters Request parameters.
648
643
  * @param {*} [options] Override http request option.
649
644
  * @throws {RequiredError}
650
645
  */
651
- getPackageTrackingDetails(packageNumber, options) {
652
- return localVarFp.getPackageTrackingDetails(packageNumber, options).then((request) => request(axios, basePath));
646
+ getPackageTrackingDetails(requestParameters, options) {
647
+ return localVarFp.getPackageTrackingDetails(requestParameters.packageNumber, options).then((request) => request(axios, basePath));
653
648
  },
654
649
  /**
655
650
  * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
656
- * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
657
- * @param {string} [nextToken] A string token returned in the response to your previous request.
651
+ * @param {FbaOutboundApiListAllFulfillmentOrdersRequest} requestParameters Request parameters.
658
652
  * @param {*} [options] Override http request option.
659
653
  * @throws {RequiredError}
660
654
  */
661
- listAllFulfillmentOrders(queryStartDate, nextToken, options) {
662
- return localVarFp.listAllFulfillmentOrders(queryStartDate, nextToken, options).then((request) => request(axios, basePath));
655
+ listAllFulfillmentOrders(requestParameters = {}, options) {
656
+ return localVarFp.listAllFulfillmentOrders(requestParameters.queryStartDate, requestParameters.nextToken, options).then((request) => request(axios, basePath));
663
657
  },
664
658
  /**
665
659
  * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
666
- * @param {string} sellerSku The seller SKU for which return reason codes are required.
667
- * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into.
668
- * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes.
669
- * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
660
+ * @param {FbaOutboundApiListReturnReasonCodesRequest} requestParameters Request parameters.
670
661
  * @param {*} [options] Override http request option.
671
662
  * @throws {RequiredError}
672
663
  */
673
- listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options) {
674
- return localVarFp.listReturnReasonCodes(sellerSku, language, marketplaceId, sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
664
+ listReturnReasonCodes(requestParameters, options) {
665
+ return localVarFp.listReturnReasonCodes(requestParameters.sellerSku, requestParameters.language, requestParameters.marketplaceId, requestParameters.sellerFulfillmentOrderId, options).then((request) => request(axios, basePath));
675
666
  },
676
667
  /**
677
668
  * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
678
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
679
- * @param {UpdateFulfillmentOrderRequest} body
669
+ * @param {FbaOutboundApiUpdateFulfillmentOrderRequest} requestParameters Request parameters.
680
670
  * @param {*} [options] Override http request option.
681
671
  * @throws {RequiredError}
682
672
  */
683
- updateFulfillmentOrder(sellerFulfillmentOrderId, body, options) {
684
- return localVarFp.updateFulfillmentOrder(sellerFulfillmentOrderId, body, options).then((request) => request(axios, basePath));
673
+ updateFulfillmentOrder(requestParameters, options) {
674
+ return localVarFp.updateFulfillmentOrder(requestParameters.sellerFulfillmentOrderId, requestParameters.body, options).then((request) => request(axios, basePath));
685
675
  },
686
676
  };
687
677
  };
@@ -11,8 +11,6 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- // Some imports not used depending on template conditions
15
- // @ts-ignore
16
14
  import globalAxios from 'axios';
17
15
  export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
18
16
  /**
@@ -52,9 +50,9 @@ export class BaseAPI {
52
50
  */
53
51
  export class RequiredError extends Error {
54
52
  field;
55
- name = "RequiredError";
56
53
  constructor(field, msg) {
57
54
  super(msg);
58
55
  this.field = field;
56
+ this.name = "RequiredError";
59
57
  }
60
58
  }
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
73
73
  }
74
74
  };
75
75
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
+ if (parameter == null)
77
+ return;
76
78
  if (typeof parameter === "object") {
77
79
  if (Array.isArray(parameter)) {
78
80
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CancelFulfillmentOrderResponse } from '../models';
16
16
  import { CreateFulfillmentOrderRequest } from '../models';
@@ -235,98 +235,88 @@ export declare const FbaOutboundApiFp: (configuration?: Configuration) => {
235
235
  export declare const FbaOutboundApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
236
236
  /**
237
237
  * Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
238
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
238
+ * @param {FbaOutboundApiCancelFulfillmentOrderRequest} requestParameters Request parameters.
239
239
  * @param {*} [options] Override http request option.
240
240
  * @throws {RequiredError}
241
241
  */
242
- cancelFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): AxiosPromise<CancelFulfillmentOrderResponse>;
242
+ cancelFulfillmentOrder(requestParameters: FbaOutboundApiCancelFulfillmentOrderRequest, options?: AxiosRequestConfig): AxiosPromise<CancelFulfillmentOrderResponse>;
243
243
  /**
244
244
  * Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
245
- * @param {CreateFulfillmentOrderRequest} body
245
+ * @param {FbaOutboundApiCreateFulfillmentOrderRequest} requestParameters Request parameters.
246
246
  * @param {*} [options] Override http request option.
247
247
  * @throws {RequiredError}
248
248
  */
249
- createFulfillmentOrder(body: CreateFulfillmentOrderRequest, options?: any): AxiosPromise<CreateFulfillmentOrderResponse>;
249
+ createFulfillmentOrder(requestParameters: FbaOutboundApiCreateFulfillmentOrderRequest, options?: AxiosRequestConfig): AxiosPromise<CreateFulfillmentOrderResponse>;
250
250
  /**
251
251
  * Creates a fulfillment return. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
252
- * @param {string} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer\&#39;s request to return items.
253
- * @param {CreateFulfillmentReturnRequest} body
252
+ * @param {FbaOutboundApiCreateFulfillmentReturnRequest} requestParameters Request parameters.
254
253
  * @param {*} [options] Override http request option.
255
254
  * @throws {RequiredError}
256
255
  */
257
- createFulfillmentReturn(sellerFulfillmentOrderId: string, body: CreateFulfillmentReturnRequest, options?: any): AxiosPromise<CreateFulfillmentReturnResponse>;
256
+ createFulfillmentReturn(requestParameters: FbaOutboundApiCreateFulfillmentReturnRequest, options?: AxiosRequestConfig): AxiosPromise<CreateFulfillmentReturnResponse>;
258
257
  /**
259
258
  * Returns a list of inventory items that are eligible for the fulfillment feature you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
260
- * @param {string} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature.
261
- * @param {string} featureName The name of the feature for which to return a list of eligible inventory.
262
- * @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
259
+ * @param {FbaOutboundApiGetFeatureInventoryRequest} requestParameters Request parameters.
263
260
  * @param {*} [options] Override http request option.
264
261
  * @throws {RequiredError}
265
262
  */
266
- getFeatureInventory(marketplaceId: string, featureName: string, nextToken?: string, options?: any): AxiosPromise<GetFeatureInventoryResponse>;
263
+ getFeatureInventory(requestParameters: FbaOutboundApiGetFeatureInventoryRequest, options?: AxiosRequestConfig): AxiosPromise<GetFeatureInventoryResponse>;
267
264
  /**
268
265
  * Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
269
- * @param {string} marketplaceId The marketplace for which to return the count.
270
- * @param {string} featureName The name of the feature.
271
- * @param {string} sellerSku Used to identify an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
266
+ * @param {FbaOutboundApiGetFeatureSKURequest} requestParameters Request parameters.
272
267
  * @param {*} [options] Override http request option.
273
268
  * @throws {RequiredError}
274
269
  */
275
- getFeatureSKU(marketplaceId: string, featureName: string, sellerSku: string, options?: any): AxiosPromise<GetFeatureSkuResponse>;
270
+ getFeatureSKU(requestParameters: FbaOutboundApiGetFeatureSKURequest, options?: AxiosRequestConfig): AxiosPromise<GetFeatureSkuResponse>;
276
271
  /**
277
272
  * Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
278
- * @param {string} marketplaceId The marketplace for which to return the list of features.
273
+ * @param {FbaOutboundApiGetFeaturesRequest} requestParameters Request parameters.
279
274
  * @param {*} [options] Override http request option.
280
275
  * @throws {RequiredError}
281
276
  */
282
- getFeatures(marketplaceId: string, options?: any): AxiosPromise<GetFeaturesResponse>;
277
+ getFeatures(requestParameters: FbaOutboundApiGetFeaturesRequest, options?: AxiosRequestConfig): AxiosPromise<GetFeaturesResponse>;
283
278
  /**
284
279
  * Returns the fulfillment order indicated by the specified order identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
285
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
280
+ * @param {FbaOutboundApiGetFulfillmentOrderRequest} requestParameters Request parameters.
286
281
  * @param {*} [options] Override http request option.
287
282
  * @throws {RequiredError}
288
283
  */
289
- getFulfillmentOrder(sellerFulfillmentOrderId: string, options?: any): AxiosPromise<GetFulfillmentOrderResponse>;
284
+ getFulfillmentOrder(requestParameters: FbaOutboundApiGetFulfillmentOrderRequest, options?: AxiosRequestConfig): AxiosPromise<GetFulfillmentOrderResponse>;
290
285
  /**
291
286
  * Returns a list of fulfillment order previews based on shipping criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
292
- * @param {GetFulfillmentPreviewRequest} body
287
+ * @param {FbaOutboundApiGetFulfillmentPreviewRequest} requestParameters Request parameters.
293
288
  * @param {*} [options] Override http request option.
294
289
  * @throws {RequiredError}
295
290
  */
296
- getFulfillmentPreview(body: GetFulfillmentPreviewRequest, options?: any): AxiosPromise<GetFulfillmentPreviewResponse>;
291
+ getFulfillmentPreview(requestParameters: FbaOutboundApiGetFulfillmentPreviewRequest, options?: AxiosRequestConfig): AxiosPromise<GetFulfillmentPreviewResponse>;
297
292
  /**
298
293
  * Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
299
- * @param {number} packageNumber The unencrypted package identifier returned by the getFulfillmentOrder operation.
294
+ * @param {FbaOutboundApiGetPackageTrackingDetailsRequest} requestParameters Request parameters.
300
295
  * @param {*} [options] Override http request option.
301
296
  * @throws {RequiredError}
302
297
  */
303
- getPackageTrackingDetails(packageNumber: number, options?: any): AxiosPromise<GetPackageTrackingDetailsResponse>;
298
+ getPackageTrackingDetails(requestParameters: FbaOutboundApiGetPackageTrackingDetailsRequest, options?: AxiosRequestConfig): AxiosPromise<GetPackageTrackingDetailsResponse>;
304
299
  /**
305
300
  * Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
306
- * @param {string} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
307
- * @param {string} [nextToken] A string token returned in the response to your previous request.
301
+ * @param {FbaOutboundApiListAllFulfillmentOrdersRequest} requestParameters Request parameters.
308
302
  * @param {*} [options] Override http request option.
309
303
  * @throws {RequiredError}
310
304
  */
311
- listAllFulfillmentOrders(queryStartDate?: string, nextToken?: string, options?: any): AxiosPromise<ListAllFulfillmentOrdersResponse>;
305
+ listAllFulfillmentOrders(requestParameters?: FbaOutboundApiListAllFulfillmentOrdersRequest, options?: AxiosRequestConfig): AxiosPromise<ListAllFulfillmentOrdersResponse>;
312
306
  /**
313
307
  * Returns a list of return reason codes for a seller SKU in a given marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
314
- * @param {string} sellerSku The seller SKU for which return reason codes are required.
315
- * @param {string} language The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into.
316
- * @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes.
317
- * @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
308
+ * @param {FbaOutboundApiListReturnReasonCodesRequest} requestParameters Request parameters.
318
309
  * @param {*} [options] Override http request option.
319
310
  * @throws {RequiredError}
320
311
  */
321
- listReturnReasonCodes(sellerSku: string, language: string, marketplaceId?: string, sellerFulfillmentOrderId?: string, options?: any): AxiosPromise<ListReturnReasonCodesResponse>;
312
+ listReturnReasonCodes(requestParameters: FbaOutboundApiListReturnReasonCodesRequest, options?: AxiosRequestConfig): AxiosPromise<ListReturnReasonCodesResponse>;
322
313
  /**
323
314
  * Updates and/or requests shipment for a fulfillment order with an order hold on it. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
324
- * @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
325
- * @param {UpdateFulfillmentOrderRequest} body
315
+ * @param {FbaOutboundApiUpdateFulfillmentOrderRequest} requestParameters Request parameters.
326
316
  * @param {*} [options] Override http request option.
327
317
  * @throws {RequiredError}
328
318
  */
329
- updateFulfillmentOrder(sellerFulfillmentOrderId: string, body: UpdateFulfillmentOrderRequest, options?: any): AxiosPromise<UpdateFulfillmentOrderResponse>;
319
+ updateFulfillmentOrder(requestParameters: FbaOutboundApiUpdateFulfillmentOrderRequest, options?: AxiosRequestConfig): AxiosPromise<UpdateFulfillmentOrderResponse>;
330
320
  };
331
321
  /**
332
322
  * Request parameters for cancelFulfillmentOrder operation in FbaOutboundApi.
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from "./configuration";
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -50,6 +50,5 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: "RequiredError";
54
53
  constructor(field: string, msg?: string);
55
54
  }
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /// <reference types="node" />
13
- import { Configuration } from "./configuration";
14
- import { RequestArgs } from "./base";
15
- import { AxiosInstance, AxiosResponse } from 'axios';
13
+ import type { Configuration } from "./configuration";
14
+ import type { RequestArgs } from "./base";
15
+ import type { AxiosInstance, AxiosResponse } from 'axios';
16
16
  /**
17
17
  *
18
18
  * @export
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/fulfillment-outbound-api-2020-07-01",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.",
5
- "version": "1.10.9",
5
+ "version": "1.10.11",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "test": "jest"
27
27
  },
28
28
  "dependencies": {
29
- "@sp-api-sdk/common": "^1.9.21",
29
+ "@sp-api-sdk/common": "^1.10.0",
30
30
  "axios": "^0.27.2"
31
31
  },
32
32
  "repository": {
@@ -51,5 +51,5 @@
51
51
  "typedoc": {
52
52
  "entryPoint": "./index.ts"
53
53
  },
54
- "gitHead": "4aae180b5a1395b37b673b93c285065ddba25470"
54
+ "gitHead": "3a4bc7db3349aaf06b421f0e89c9fb3f60a76cd1"
55
55
  }