@sp-api-sdk/orders-api-v0 1.19.0 → 2.0.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.
- package/README.md +1 -0
- package/dist/cjs/src/api-model/api/orders-v0-api.js +33 -124
- package/dist/cjs/src/api-model/base.js +1 -3
- package/dist/cjs/src/api-model/common.js +2 -0
- package/dist/cjs/src/api-model/models/index.js +0 -4
- package/dist/cjs/src/client.js +0 -7
- package/dist/es/src/api-model/api/orders-v0-api.js +33 -124
- package/dist/es/src/api-model/base.js +1 -3
- package/dist/es/src/api-model/common.js +2 -0
- package/dist/es/src/api-model/models/index.js +0 -4
- package/dist/es/src/client.js +0 -7
- package/dist/types/src/api-model/api/orders-v0-api.d.ts +24 -103
- package/dist/types/src/api-model/base.d.ts +2 -3
- package/dist/types/src/api-model/common.d.ts +3 -3
- package/dist/types/src/api-model/models/index.d.ts +0 -4
- package/package.json +3 -3
- package/dist/cjs/src/api-model/models/confirm-shipment-error-response.js +0 -15
- package/dist/cjs/src/api-model/models/confirm-shipment-order-item.js +0 -15
- package/dist/cjs/src/api-model/models/confirm-shipment-request.js +0 -19
- package/dist/cjs/src/api-model/models/package-detail.js +0 -15
- package/dist/es/src/api-model/models/confirm-shipment-error-response.js +0 -14
- package/dist/es/src/api-model/models/confirm-shipment-order-item.js +0 -14
- package/dist/es/src/api-model/models/confirm-shipment-request.js +0 -16
- package/dist/es/src/api-model/models/package-detail.js +0 -14
- package/dist/types/src/api-model/models/confirm-shipment-error-response.d.ts +0 -24
- package/dist/types/src/api-model/models/confirm-shipment-order-item.d.ts +0 -36
- package/dist/types/src/api-model/models/confirm-shipment-request.d.ts +0 -41
- package/dist/types/src/api-model/models/package-detail.d.ts +0 -67
package/README.md
CHANGED
|
@@ -27,39 +27,6 @@ const base_1 = require("../base");
|
|
|
27
27
|
*/
|
|
28
28
|
const OrdersV0ApiAxiosParamCreator = function (configuration) {
|
|
29
29
|
return {
|
|
30
|
-
/**
|
|
31
|
-
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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 then 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).
|
|
32
|
-
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
33
|
-
* @param {ConfirmShipmentRequest} payload Request body of confirmShipment.
|
|
34
|
-
* @param {*} [options] Override http request option.
|
|
35
|
-
* @throws {RequiredError}
|
|
36
|
-
*/
|
|
37
|
-
confirmShipment: async (orderId, payload, options = {}) => {
|
|
38
|
-
// verify required parameter 'orderId' is not null or undefined
|
|
39
|
-
(0, common_1.assertParamExists)('confirmShipment', 'orderId', orderId);
|
|
40
|
-
// verify required parameter 'payload' is not null or undefined
|
|
41
|
-
(0, common_1.assertParamExists)('confirmShipment', 'payload', payload);
|
|
42
|
-
const localVarPath = `/orders/v0/orders/{orderId}/shipmentConfirmation`
|
|
43
|
-
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
44
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
46
|
-
let baseOptions;
|
|
47
|
-
if (configuration) {
|
|
48
|
-
baseOptions = configuration.baseOptions;
|
|
49
|
-
}
|
|
50
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
51
|
-
const localVarHeaderParameter = {};
|
|
52
|
-
const localVarQueryParameter = {};
|
|
53
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
54
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
55
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
56
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
57
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(payload, localVarRequestOptions, configuration);
|
|
58
|
-
return {
|
|
59
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
60
|
-
options: localVarRequestOptions,
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
30
|
/**
|
|
64
31
|
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
65
32
|
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
@@ -491,17 +458,6 @@ exports.OrdersV0ApiAxiosParamCreator = OrdersV0ApiAxiosParamCreator;
|
|
|
491
458
|
const OrdersV0ApiFp = function (configuration) {
|
|
492
459
|
const localVarAxiosParamCreator = (0, exports.OrdersV0ApiAxiosParamCreator)(configuration);
|
|
493
460
|
return {
|
|
494
|
-
/**
|
|
495
|
-
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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 then 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).
|
|
496
|
-
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
497
|
-
* @param {ConfirmShipmentRequest} payload Request body of confirmShipment.
|
|
498
|
-
* @param {*} [options] Override http request option.
|
|
499
|
-
* @throws {RequiredError}
|
|
500
|
-
*/
|
|
501
|
-
async confirmShipment(orderId, payload, options) {
|
|
502
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.confirmShipment(orderId, payload, options);
|
|
503
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
504
|
-
},
|
|
505
461
|
/**
|
|
506
462
|
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
507
463
|
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
@@ -649,141 +605,104 @@ exports.OrdersV0ApiFp = OrdersV0ApiFp;
|
|
|
649
605
|
const OrdersV0ApiFactory = function (configuration, basePath, axios) {
|
|
650
606
|
const localVarFp = (0, exports.OrdersV0ApiFp)(configuration);
|
|
651
607
|
return {
|
|
652
|
-
/**
|
|
653
|
-
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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 then 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).
|
|
654
|
-
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
655
|
-
* @param {ConfirmShipmentRequest} payload Request body of confirmShipment.
|
|
656
|
-
* @param {*} [options] Override http request option.
|
|
657
|
-
* @throws {RequiredError}
|
|
658
|
-
*/
|
|
659
|
-
confirmShipment(orderId, payload, options) {
|
|
660
|
-
return localVarFp.confirmShipment(orderId, payload, options).then((request) => request(axios, basePath));
|
|
661
|
-
},
|
|
662
608
|
/**
|
|
663
609
|
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
664
|
-
* @param {
|
|
610
|
+
* @param {OrdersV0ApiGetOrderRequest} requestParameters Request parameters.
|
|
665
611
|
* @param {*} [options] Override http request option.
|
|
666
612
|
* @throws {RequiredError}
|
|
667
613
|
*/
|
|
668
|
-
getOrder(
|
|
669
|
-
return localVarFp.getOrder(orderId, options).then((request) => request(axios, basePath));
|
|
614
|
+
getOrder(requestParameters, options) {
|
|
615
|
+
return localVarFp.getOrder(requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
670
616
|
},
|
|
671
617
|
/**
|
|
672
618
|
* Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
673
|
-
* @param {
|
|
619
|
+
* @param {OrdersV0ApiGetOrderAddressRequest} requestParameters Request parameters.
|
|
674
620
|
* @param {*} [options] Override http request option.
|
|
675
621
|
* @throws {RequiredError}
|
|
676
622
|
*/
|
|
677
|
-
getOrderAddress(
|
|
678
|
-
return localVarFp.getOrderAddress(orderId, options).then((request) => request(axios, basePath));
|
|
623
|
+
getOrderAddress(requestParameters, options) {
|
|
624
|
+
return localVarFp.getOrderAddress(requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
679
625
|
},
|
|
680
626
|
/**
|
|
681
627
|
* Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
682
|
-
* @param {
|
|
628
|
+
* @param {OrdersV0ApiGetOrderBuyerInfoRequest} requestParameters Request parameters.
|
|
683
629
|
* @param {*} [options] Override http request option.
|
|
684
630
|
* @throws {RequiredError}
|
|
685
631
|
*/
|
|
686
|
-
getOrderBuyerInfo(
|
|
687
|
-
return localVarFp.getOrderBuyerInfo(orderId, options).then((request) => request(axios, basePath));
|
|
632
|
+
getOrderBuyerInfo(requestParameters, options) {
|
|
633
|
+
return localVarFp.getOrderBuyerInfo(requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
688
634
|
},
|
|
689
635
|
/**
|
|
690
636
|
* Returns detailed order item information for the order that you specify. If NextToken is provided, it\'s used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 then 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).
|
|
691
|
-
* @param {
|
|
692
|
-
* @param {string} [nextToken] A string token returned in the response of your previous request.
|
|
637
|
+
* @param {OrdersV0ApiGetOrderItemsRequest} requestParameters Request parameters.
|
|
693
638
|
* @param {*} [options] Override http request option.
|
|
694
639
|
* @throws {RequiredError}
|
|
695
640
|
*/
|
|
696
|
-
getOrderItems(
|
|
697
|
-
return localVarFp.getOrderItems(orderId, nextToken, options).then((request) => request(axios, basePath));
|
|
641
|
+
getOrderItems(requestParameters, options) {
|
|
642
|
+
return localVarFp.getOrderItems(requestParameters.orderId, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
698
643
|
},
|
|
699
644
|
/**
|
|
700
645
|
* Returns detailed order items approvals information for the order specified. If NextToken is provided, it\'s used to retrieve the next page of order items approvals. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 0.5 | 30 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
701
|
-
* @param {
|
|
702
|
-
* @param {string} [nextToken] A string token returned in the response of your previous request.
|
|
703
|
-
* @param {Array<ItemApprovalType>} [itemApprovalTypes] When set, only return approvals for items which approval type is contained in the specified approval types.
|
|
704
|
-
* @param {Array<ItemApprovalStatus>} [itemApprovalStatus] When set, only return approvals that contain items which approval status is contained in the specified approval status.
|
|
646
|
+
* @param {OrdersV0ApiGetOrderItemsApprovalsRequest} requestParameters Request parameters.
|
|
705
647
|
* @param {*} [options] Override http request option.
|
|
706
648
|
* @throws {RequiredError}
|
|
707
649
|
*/
|
|
708
|
-
getOrderItemsApprovals(
|
|
709
|
-
return localVarFp.getOrderItemsApprovals(orderId, nextToken, itemApprovalTypes, itemApprovalStatus, options).then((request) => request(axios, basePath));
|
|
650
|
+
getOrderItemsApprovals(requestParameters, options) {
|
|
651
|
+
return localVarFp.getOrderItemsApprovals(requestParameters.orderId, requestParameters.nextToken, requestParameters.itemApprovalTypes, requestParameters.itemApprovalStatus, options).then((request) => request(axios, basePath));
|
|
710
652
|
},
|
|
711
653
|
/**
|
|
712
654
|
* Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 then 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).
|
|
713
|
-
* @param {
|
|
714
|
-
* @param {string} [nextToken] A string token returned in the response of your previous request.
|
|
655
|
+
* @param {OrdersV0ApiGetOrderItemsBuyerInfoRequest} requestParameters Request parameters.
|
|
715
656
|
* @param {*} [options] Override http request option.
|
|
716
657
|
* @throws {RequiredError}
|
|
717
658
|
*/
|
|
718
|
-
getOrderItemsBuyerInfo(
|
|
719
|
-
return localVarFp.getOrderItemsBuyerInfo(orderId, nextToken, options).then((request) => request(axios, basePath));
|
|
659
|
+
getOrderItemsBuyerInfo(requestParameters, options) {
|
|
660
|
+
return localVarFp.getOrderItemsBuyerInfo(requestParameters.orderId, requestParameters.nextToken, options).then((request) => request(axios, basePath));
|
|
720
661
|
},
|
|
721
662
|
/**
|
|
722
663
|
* Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 then 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).
|
|
723
|
-
* @param {
|
|
664
|
+
* @param {OrdersV0ApiGetOrderRegulatedInfoRequest} requestParameters Request parameters.
|
|
724
665
|
* @param {*} [options] Override http request option.
|
|
725
666
|
* @throws {RequiredError}
|
|
726
667
|
*/
|
|
727
|
-
getOrderRegulatedInfo(
|
|
728
|
-
return localVarFp.getOrderRegulatedInfo(orderId, options).then((request) => request(axios, basePath));
|
|
668
|
+
getOrderRegulatedInfo(requestParameters, options) {
|
|
669
|
+
return localVarFp.getOrderRegulatedInfo(requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
729
670
|
},
|
|
730
671
|
/**
|
|
731
672
|
* Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
732
|
-
* @param {
|
|
733
|
-
* @param {string} [createdAfter] A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format.
|
|
734
|
-
* @param {string} [createdBefore] A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format.
|
|
735
|
-
* @param {string} [lastUpdatedAfter] A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.
|
|
736
|
-
* @param {string} [lastUpdatedBefore] A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.
|
|
737
|
-
* @param {Array<string>} [orderStatuses] A list of `OrderStatus` values used to filter the results. **Possible values:** - `PendingAvailability` (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.) - `Pending` (The order has been placed but payment has not been authorized.) - `Unshipped` (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped.) - `PartiallyShipped` (One or more, but not all, items in the order have been shipped.) - `Shipped` (All items in the order have been shipped.) - `InvoiceUnconfirmed` (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.) - `Canceled` (The order has been canceled.) - `Unfulfillable` (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.)
|
|
738
|
-
* @param {Array<string>} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: AFN (Fulfillment by Amazon); MFN (Fulfilled by the seller).
|
|
739
|
-
* @param {Array<string>} [paymentMethods] A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS).
|
|
740
|
-
* @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address.
|
|
741
|
-
* @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified.
|
|
742
|
-
* @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
|
|
743
|
-
* @param {Array<string>} [easyShipShipmentStatuses] A list of `EasyShipShipmentStatus` values. Used to select Easy Ship orders with statuses that match the specified values. If `EasyShipShipmentStatus` is specified, only Amazon Easy Ship orders are returned. **Possible values:** - `PendingSchedule` (The package is awaiting the schedule for pick-up.) - `PendingPickUp` (Amazon has not yet picked up the package from the seller.) - `PendingDropOff` (The seller will deliver the package to the carrier.) - `LabelCanceled` (The seller canceled the pickup.) - `PickedUp` (Amazon has picked up the package from the seller.) - `DroppedOff` (The package is delivered to the carrier by the seller.) - `AtOriginFC` (The packaged is at the origin fulfillment center.) - `AtDestinationFC` (The package is at the destination fulfillment center.) - `Delivered` (The package has been delivered.) - `RejectedByBuyer` (The package has been rejected by the buyer.) - `Undeliverable` (The package cannot be delivered.) - `ReturningToSeller` (The package was not delivered and is being returned to the seller.) - `ReturnedToSeller` (The package was not delivered and was returned to the seller.) - `Lost` (The package is lost.) - `OutForDelivery` (The package is out for delivery.) - `Damaged` (The package was damaged by the carrier.)
|
|
744
|
-
* @param {Array<string>} [electronicInvoiceStatuses] A list of `ElectronicInvoiceStatus` values. Used to select orders with electronic invoice statuses that match the specified values. **Possible values:** - `NotRequired` (Electronic invoice submission is not required for this order.) - `NotFound` (The electronic invoice was not submitted for this order.) - `Processing` (The electronic invoice is being processed for this order.) - `Errored` (The last submitted electronic invoice was rejected for this order.) - `Accepted` (The last submitted electronic invoice was submitted and accepted.)
|
|
745
|
-
* @param {string} [nextToken] A string token returned in the response of your previous request.
|
|
746
|
-
* @param {Array<string>} [amazonOrderIds] A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format.
|
|
747
|
-
* @param {string} [actualFulfillmentSupplySourceId] Denotes the recommended sourceId where the order should be fulfilled from.
|
|
748
|
-
* @param {boolean} [isISPU] When true, this order is marked to be picked up from a store rather than delivered.
|
|
749
|
-
* @param {string} [storeChainStoreId] The store chain store identifier. Linked to a specific store in a store chain.
|
|
750
|
-
* @param {Array<ItemApprovalType>} [itemApprovalTypes] When set, only return orders that contain items which approval type is contained in the specified approval types.
|
|
751
|
-
* @param {Array<ItemApprovalStatus>} [itemApprovalStatus] When set, only return orders that contain items which approval status is contained in the specified approval status.
|
|
673
|
+
* @param {OrdersV0ApiGetOrdersRequest} requestParameters Request parameters.
|
|
752
674
|
* @param {*} [options] Override http request option.
|
|
753
675
|
* @throws {RequiredError}
|
|
754
676
|
*/
|
|
755
|
-
getOrders(
|
|
756
|
-
return localVarFp.getOrders(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, electronicInvoiceStatuses, nextToken, amazonOrderIds, actualFulfillmentSupplySourceId, isISPU, storeChainStoreId, itemApprovalTypes, itemApprovalStatus, options).then((request) => request(axios, basePath));
|
|
677
|
+
getOrders(requestParameters, options) {
|
|
678
|
+
return localVarFp.getOrders(requestParameters.marketplaceIds, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.orderStatuses, requestParameters.fulfillmentChannels, requestParameters.paymentMethods, requestParameters.buyerEmail, requestParameters.sellerOrderId, requestParameters.maxResultsPerPage, requestParameters.easyShipShipmentStatuses, requestParameters.electronicInvoiceStatuses, requestParameters.nextToken, requestParameters.amazonOrderIds, requestParameters.actualFulfillmentSupplySourceId, requestParameters.isISPU, requestParameters.storeChainStoreId, requestParameters.itemApprovalTypes, requestParameters.itemApprovalStatus, options).then((request) => request(axios, basePath));
|
|
757
679
|
},
|
|
758
680
|
/**
|
|
759
681
|
* Update the order items approvals for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then 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).
|
|
760
|
-
* @param {
|
|
761
|
-
* @param {UpdateOrderApprovalsRequest} payload The request body for the updateOrderItemsApprovals operation.
|
|
682
|
+
* @param {OrdersV0ApiUpdateOrderItemsApprovalsRequest} requestParameters Request parameters.
|
|
762
683
|
* @param {*} [options] Override http request option.
|
|
763
684
|
* @throws {RequiredError}
|
|
764
685
|
*/
|
|
765
|
-
updateOrderItemsApprovals(
|
|
766
|
-
return localVarFp.updateOrderItemsApprovals(orderId, payload, options).then((request) => request(axios, basePath));
|
|
686
|
+
updateOrderItemsApprovals(requestParameters, options) {
|
|
687
|
+
return localVarFp.updateOrderItemsApprovals(requestParameters.orderId, requestParameters.payload, options).then((request) => request(axios, basePath));
|
|
767
688
|
},
|
|
768
689
|
/**
|
|
769
690
|
* Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then 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).
|
|
770
|
-
* @param {
|
|
771
|
-
* @param {UpdateShipmentStatusRequest} payload The request body for the updateShipmentStatus operation.
|
|
691
|
+
* @param {OrdersV0ApiUpdateShipmentStatusRequest} requestParameters Request parameters.
|
|
772
692
|
* @param {*} [options] Override http request option.
|
|
773
693
|
* @throws {RequiredError}
|
|
774
694
|
*/
|
|
775
|
-
updateShipmentStatus(
|
|
776
|
-
return localVarFp.updateShipmentStatus(orderId, payload, options).then((request) => request(axios, basePath));
|
|
695
|
+
updateShipmentStatus(requestParameters, options) {
|
|
696
|
+
return localVarFp.updateShipmentStatus(requestParameters.orderId, requestParameters.payload, options).then((request) => request(axios, basePath));
|
|
777
697
|
},
|
|
778
698
|
/**
|
|
779
699
|
* Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 then 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).
|
|
780
|
-
* @param {
|
|
781
|
-
* @param {UpdateVerificationStatusRequest} payload The request body for the updateVerificationStatus operation.
|
|
700
|
+
* @param {OrdersV0ApiUpdateVerificationStatusRequest} requestParameters Request parameters.
|
|
782
701
|
* @param {*} [options] Override http request option.
|
|
783
702
|
* @throws {RequiredError}
|
|
784
703
|
*/
|
|
785
|
-
updateVerificationStatus(
|
|
786
|
-
return localVarFp.updateVerificationStatus(orderId, payload, options).then((request) => request(axios, basePath));
|
|
704
|
+
updateVerificationStatus(requestParameters, options) {
|
|
705
|
+
return localVarFp.updateVerificationStatus(requestParameters.orderId, requestParameters.payload, options).then((request) => request(axios, basePath));
|
|
787
706
|
},
|
|
788
707
|
};
|
|
789
708
|
};
|
|
@@ -795,16 +714,6 @@ exports.OrdersV0ApiFactory = OrdersV0ApiFactory;
|
|
|
795
714
|
* @extends {BaseAPI}
|
|
796
715
|
*/
|
|
797
716
|
class OrdersV0Api extends base_1.BaseAPI {
|
|
798
|
-
/**
|
|
799
|
-
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 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 then 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).
|
|
800
|
-
* @param {OrdersV0ApiConfirmShipmentRequest} requestParameters Request parameters.
|
|
801
|
-
* @param {*} [options] Override http request option.
|
|
802
|
-
* @throws {RequiredError}
|
|
803
|
-
* @memberof OrdersV0Api
|
|
804
|
-
*/
|
|
805
|
-
confirmShipment(requestParameters, options) {
|
|
806
|
-
return (0, exports.OrdersV0ApiFp)(this.configuration).confirmShipment(requestParameters.orderId, requestParameters.payload, options).then((request) => request(this.axios, this.basePath));
|
|
807
|
-
}
|
|
808
717
|
/**
|
|
809
718
|
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | 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 then 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).
|
|
810
719
|
* @param {OrdersV0ApiGetOrderRequest} requestParameters Request parameters.
|
|
@@ -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));
|
|
@@ -9,9 +9,6 @@ tslib_1.__exportStar(require("./buyer-info"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./buyer-requested-cancel"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./buyer-tax-info"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./buyer-tax-information"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./confirm-shipment-error-response"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./confirm-shipment-order-item"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./confirm-shipment-request"), exports);
|
|
15
12
|
tslib_1.__exportStar(require("./easy-ship-shipment-status"), exports);
|
|
16
13
|
tslib_1.__exportStar(require("./electronic-invoice-status"), exports);
|
|
17
14
|
tslib_1.__exportStar(require("./fulfillment-instruction"), exports);
|
|
@@ -47,7 +44,6 @@ tslib_1.__exportStar(require("./order-items-inner"), exports);
|
|
|
47
44
|
tslib_1.__exportStar(require("./order-items-list"), exports);
|
|
48
45
|
tslib_1.__exportStar(require("./order-regulated-info"), exports);
|
|
49
46
|
tslib_1.__exportStar(require("./orders-list"), exports);
|
|
50
|
-
tslib_1.__exportStar(require("./package-detail"), exports);
|
|
51
47
|
tslib_1.__exportStar(require("./payment-execution-detail-item"), exports);
|
|
52
48
|
tslib_1.__exportStar(require("./points-granted-detail"), exports);
|
|
53
49
|
tslib_1.__exportStar(require("./product-info-detail"), exports);
|
package/dist/cjs/src/client.js
CHANGED
|
@@ -81,13 +81,6 @@ exports.clientRateLimits = [
|
|
|
81
81
|
rate: 5,
|
|
82
82
|
burst: 15,
|
|
83
83
|
},
|
|
84
|
-
{
|
|
85
|
-
method: 'post',
|
|
86
|
-
// eslint-disable-next-line prefer-regex-literals
|
|
87
|
-
urlRegex: new RegExp('^/orders/v0/orders/[^/]*/shipmentConfirmation$'),
|
|
88
|
-
rate: 2,
|
|
89
|
-
burst: 10,
|
|
90
|
-
},
|
|
91
84
|
];
|
|
92
85
|
class OrdersApiClient extends api_model_1.OrdersV0Api {
|
|
93
86
|
constructor(configuration) {
|