@sp-api-sdk/vendor-direct-fulfillment-shipping-api-v1 1.7.2 → 1.7.6

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
4
4
 
5
+ ## Documentation
6
+
7
+ Learn more about this Selling Partner API by visiting the [official documentation](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-direct-fulfillment-shipping-api/vendorDirectFulfillmentShippingV1.md).
8
+
9
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_vendor_direct_fulfillment_shipping_api_v1.html) for this API client.
10
+
5
11
  ## Installing
6
12
 
7
13
  ```sh
@@ -19,26 +25,25 @@ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
19
25
  import {VendorDirectFulfillmentShippingApiClient} from '@sp-api-sdk/vendor-direct-fulfillment-shipping-api-v1'
20
26
 
21
27
  const auth = new SellingPartnerApiAuth({
22
- clientId: '',
23
- clientSecret: '',
24
- refreshToken: '',
25
- secretAccessKey: '',
28
+ clientId: process.env.LWA_CLIENT_ID,
29
+ clientSecret: process.env.LWA_CLIENT_SECRET,
30
+ refreshToken: 'Atzr|…',
26
31
  accessKeyId: '',
27
- region: '',
32
+ secretAccessKey: '',
28
33
  role: {
29
- arn: '',
30
- }
34
+ arn: 'arn:aws:iam::…',
35
+ },
31
36
  })
32
37
 
33
38
  const client = new VendorDirectFulfillmentShippingApiClient({
34
39
  auth,
35
- region: 'eu' // or 'eu-west-1'
40
+ region: 'eu',
36
41
  })
37
42
  ```
38
43
 
39
- ## Handle Rate Limiting
44
+ ## Rate Limiting
40
45
 
41
- If you want to let the SDK retry after each 429 responses, instanciate the client like this:
46
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
42
47
 
43
48
  ```javascript
44
49
  const client = new VendorDirectFulfillmentShippingApiClient({
@@ -46,13 +51,28 @@ const client = new VendorDirectFulfillmentShippingApiClient({
46
51
  region: 'eu',
47
52
  rateLimiting: {
48
53
  retry: true,
49
- onRetry: (retryInfo) => console.log(retryInfo) // Optional
50
- }
54
+ // Optionally specify a callback that will be called on every retry.
55
+ onRetry: (retryInfo) => {
56
+ console.log(retryInfo)
57
+ },
58
+ },
51
59
  })
52
60
  ```
53
61
 
54
- The SDK gets the rate limits for each routes from the API documentation
62
+ The rate limits used for each route are specified in the [API documentation]((https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-direct-fulfillment-shipping-api/vendorDirectFulfillmentShippingV1.md)).
63
+
64
+ ## License
65
+
66
+ MIT
55
67
 
56
- ## API documentation
68
+ ## Miscellaneous
57
69
 
58
- See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-direct-fulfillment-shipping-api/vendorDirectFulfillmentShippingV1.md)
70
+ ```
71
+ ╚⊙ ⊙╝
72
+ ╚═(███)═╝
73
+ ╚═(███)═╝
74
+ ╚═(███)═╝
75
+ ╚═(███)═╝
76
+ ╚═(███)═╝
77
+ ╚═(███)═╝
78
+ ```
@@ -159,7 +159,7 @@ export declare class CustomerInvoicesApi extends BaseAPI {
159
159
  * @throws {RequiredError}
160
160
  * @memberof CustomerInvoicesApi
161
161
  */
162
- getCustomerInvoice(requestParameters: CustomerInvoicesApiGetCustomerInvoiceRequest, options?: any): Promise<import("axios").AxiosResponse<GetCustomerInvoiceResponse>>;
162
+ getCustomerInvoice(requestParameters: CustomerInvoicesApiGetCustomerInvoiceRequest, options?: any): Promise<import("axios").AxiosResponse<GetCustomerInvoiceResponse, any>>;
163
163
  /**
164
164
  * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
165
165
  * @param {CustomerInvoicesApiGetCustomerInvoicesRequest} requestParameters Request parameters.
@@ -167,5 +167,5 @@ export declare class CustomerInvoicesApi extends BaseAPI {
167
167
  * @throws {RequiredError}
168
168
  * @memberof CustomerInvoicesApi
169
169
  */
170
- getCustomerInvoices(requestParameters: CustomerInvoicesApiGetCustomerInvoicesRequest, options?: any): Promise<import("axios").AxiosResponse<GetCustomerInvoicesResponse>>;
170
+ getCustomerInvoices(requestParameters: CustomerInvoicesApiGetCustomerInvoicesRequest, options?: any): Promise<import("axios").AxiosResponse<GetCustomerInvoicesResponse, any>>;
171
171
  }
@@ -231,7 +231,7 @@ export declare class VendorShippingApi extends BaseAPI {
231
231
  * @throws {RequiredError}
232
232
  * @memberof VendorShippingApi
233
233
  */
234
- getPackingSlip(requestParameters: VendorShippingApiGetPackingSlipRequest, options?: any): Promise<import("axios").AxiosResponse<GetPackingSlipResponse>>;
234
+ getPackingSlip(requestParameters: VendorShippingApiGetPackingSlipRequest, options?: any): Promise<import("axios").AxiosResponse<GetPackingSlipResponse, any>>;
235
235
  /**
236
236
  * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
237
237
  * @param {VendorShippingApiGetPackingSlipsRequest} requestParameters Request parameters.
@@ -239,7 +239,7 @@ export declare class VendorShippingApi extends BaseAPI {
239
239
  * @throws {RequiredError}
240
240
  * @memberof VendorShippingApi
241
241
  */
242
- getPackingSlips(requestParameters: VendorShippingApiGetPackingSlipsRequest, options?: any): Promise<import("axios").AxiosResponse<GetPackingSlipListResponse>>;
242
+ getPackingSlips(requestParameters: VendorShippingApiGetPackingSlipsRequest, options?: any): Promise<import("axios").AxiosResponse<GetPackingSlipListResponse, any>>;
243
243
  /**
244
244
  * Submits one or more shipment confirmations for vendor orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
245
245
  * @param {VendorShippingApiSubmitShipmentConfirmationsRequest} requestParameters Request parameters.
@@ -247,7 +247,7 @@ export declare class VendorShippingApi extends BaseAPI {
247
247
  * @throws {RequiredError}
248
248
  * @memberof VendorShippingApi
249
249
  */
250
- submitShipmentConfirmations(requestParameters: VendorShippingApiSubmitShipmentConfirmationsRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShipmentConfirmationsResponse>>;
250
+ submitShipmentConfirmations(requestParameters: VendorShippingApiSubmitShipmentConfirmationsRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShipmentConfirmationsResponse, any>>;
251
251
  /**
252
252
  * This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
253
253
  * @param {VendorShippingApiSubmitShipmentStatusUpdatesRequest} requestParameters Request parameters.
@@ -255,5 +255,5 @@ export declare class VendorShippingApi extends BaseAPI {
255
255
  * @throws {RequiredError}
256
256
  * @memberof VendorShippingApi
257
257
  */
258
- submitShipmentStatusUpdates(requestParameters: VendorShippingApiSubmitShipmentStatusUpdatesRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShipmentStatusUpdatesResponse>>;
258
+ submitShipmentStatusUpdates(requestParameters: VendorShippingApiSubmitShipmentStatusUpdatesRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShipmentStatusUpdatesResponse, any>>;
259
259
  }
@@ -195,7 +195,7 @@ export declare class VendorShippingLabelsApi extends BaseAPI {
195
195
  * @throws {RequiredError}
196
196
  * @memberof VendorShippingLabelsApi
197
197
  */
198
- getShippingLabel(requestParameters: VendorShippingLabelsApiGetShippingLabelRequest, options?: any): Promise<import("axios").AxiosResponse<GetShippingLabelResponse>>;
198
+ getShippingLabel(requestParameters: VendorShippingLabelsApiGetShippingLabelRequest, options?: any): Promise<import("axios").AxiosResponse<GetShippingLabelResponse, any>>;
199
199
  /**
200
200
  * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
201
201
  * @param {VendorShippingLabelsApiGetShippingLabelsRequest} requestParameters Request parameters.
@@ -203,7 +203,7 @@ export declare class VendorShippingLabelsApi extends BaseAPI {
203
203
  * @throws {RequiredError}
204
204
  * @memberof VendorShippingLabelsApi
205
205
  */
206
- getShippingLabels(requestParameters: VendorShippingLabelsApiGetShippingLabelsRequest, options?: any): Promise<import("axios").AxiosResponse<GetShippingLabelListResponse>>;
206
+ getShippingLabels(requestParameters: VendorShippingLabelsApiGetShippingLabelsRequest, options?: any): Promise<import("axios").AxiosResponse<GetShippingLabelListResponse, any>>;
207
207
  /**
208
208
  * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |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.
209
209
  * @param {VendorShippingLabelsApiSubmitShippingLabelRequestRequest} requestParameters Request parameters.
@@ -211,5 +211,5 @@ export declare class VendorShippingLabelsApi extends BaseAPI {
211
211
  * @throws {RequiredError}
212
212
  * @memberof VendorShippingLabelsApi
213
213
  */
214
- submitShippingLabelRequest(requestParameters: VendorShippingLabelsApiSubmitShippingLabelRequestRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShippingLabelsResponse>>;
214
+ submitShippingLabelRequest(requestParameters: VendorShippingLabelsApiSubmitShippingLabelRequestRequest, options?: any): Promise<import("axios").AxiosResponse<SubmitShippingLabelsResponse, any>>;
215
215
  }
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
62
62
  *
63
63
  * @export
64
64
  */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,11 +1,10 @@
1
- import { onRetry } from '@sp-api-sdk/common';
2
- import type { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
1
+ import type { ClientConfiguration, RateLimit, OnRetryHandler } from '@sp-api-sdk/common';
3
2
  import { VendorShippingLabelsApi } from './api-model';
4
3
  export declare const RATE_LIMITS: RateLimit[];
5
4
  export interface ClientParameters extends Omit<ClientConfiguration, 'rateLimits' | 'onRetry'> {
6
5
  rateLimiting?: {
7
6
  retry: boolean;
8
- onRetry?: onRetry;
7
+ onRetry?: OnRetryHandler;
9
8
  };
10
9
  }
11
10
  export declare class VendorDirectFulfillmentShippingApiClient extends VendorShippingLabelsApi {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/vendor-direct-fulfillment-shipping-api-v1",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.",
5
- "version": "1.7.2",
5
+ "version": "1.7.6",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -25,9 +25,9 @@
25
25
  "test": "NODE_ENV='test' yarn jest"
26
26
  },
27
27
  "dependencies": {
28
- "@sp-api-sdk/auth": "^1.9.2",
29
- "@sp-api-sdk/common": "^1.7.3",
30
- "axios": "^0.21.1"
28
+ "@sp-api-sdk/auth": "^1.9.5",
29
+ "@sp-api-sdk/common": "^1.7.7",
30
+ "axios": "^0.24.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "sp sdk",
49
49
  "vendor direct fulfillment shipping api"
50
50
  ],
51
- "gitHead": "af064cf72ac5a2111135439fc179580e6b495399"
51
+ "gitHead": "e8c21d7d481263e8a6663ee11f6708d4dc6968b6"
52
52
  }