New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sp-api-sdk/notifications-api-v1

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sp-api-sdk/notifications-api-v1 - npm Package Compare versions

Comparing version 1.9.1 to 1.9.2

16

dist/types/src/api-model/api/notifications-api.d.ts

@@ -340,3 +340,3 @@ /**

*/
createDestination(requestParameters: NotificationsApiCreateDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<CreateDestinationResponse>>;
createDestination(requestParameters: NotificationsApiCreateDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<CreateDestinationResponse, any>>;
/**

@@ -349,3 +349,3 @@ * Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
createSubscription(requestParameters: NotificationsApiCreateSubscriptionRequest, options?: any): Promise<import("axios").AxiosResponse<CreateSubscriptionResponse>>;
createSubscription(requestParameters: NotificationsApiCreateSubscriptionRequest, options?: any): Promise<import("axios").AxiosResponse<CreateSubscriptionResponse, any>>;
/**

@@ -358,3 +358,3 @@ * Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
deleteDestination(requestParameters: NotificationsApiDeleteDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<DeleteDestinationResponse>>;
deleteDestination(requestParameters: NotificationsApiDeleteDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<DeleteDestinationResponse, any>>;
/**

@@ -367,3 +367,3 @@ * Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
deleteSubscriptionById(requestParameters: NotificationsApiDeleteSubscriptionByIdRequest, options?: any): Promise<import("axios").AxiosResponse<DeleteSubscriptionByIdResponse>>;
deleteSubscriptionById(requestParameters: NotificationsApiDeleteSubscriptionByIdRequest, options?: any): Promise<import("axios").AxiosResponse<DeleteSubscriptionByIdResponse, any>>;
/**

@@ -376,3 +376,3 @@ * Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
getDestination(requestParameters: NotificationsApiGetDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<GetDestinationResponse>>;
getDestination(requestParameters: NotificationsApiGetDestinationRequest, options?: any): Promise<import("axios").AxiosResponse<GetDestinationResponse, any>>;
/**

@@ -384,3 +384,3 @@ * Returns information about all destinations. The getDestinations API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
getDestinations(options?: any): Promise<import("axios").AxiosResponse<GetDestinationsResponse>>;
getDestinations(options?: any): Promise<import("axios").AxiosResponse<GetDestinationsResponse, any>>;
/**

@@ -393,3 +393,3 @@ * Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
getSubscription(requestParameters: NotificationsApiGetSubscriptionRequest, options?: any): Promise<import("axios").AxiosResponse<GetSubscriptionResponse>>;
getSubscription(requestParameters: NotificationsApiGetSubscriptionRequest, options?: any): Promise<import("axios").AxiosResponse<GetSubscriptionResponse, any>>;
/**

@@ -402,3 +402,3 @@ * Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \"Grantless operations\" in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

*/
getSubscriptionById(requestParameters: NotificationsApiGetSubscriptionByIdRequest, options?: any): Promise<import("axios").AxiosResponse<GetSubscriptionByIdResponse>>;
getSubscriptionById(requestParameters: NotificationsApiGetSubscriptionByIdRequest, options?: any): Promise<import("axios").AxiosResponse<GetSubscriptionByIdResponse, any>>;
}

@@ -65,2 +65,2 @@ /**

*/
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>;
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,3 +0,2 @@

import { onRetry } from '@sp-api-sdk/common';
import type { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
import type { ClientConfiguration, RateLimit, OnRetryHandler } from '@sp-api-sdk/common';
import { NotificationsApi } from './api-model';

@@ -8,3 +7,3 @@ export declare const RATE_LIMITS: RateLimit[];

retry: boolean;
onRetry?: onRetry;
onRetry?: OnRetryHandler;
};

@@ -11,0 +10,0 @@ }

@@ -5,3 +5,3 @@ {

"description": "The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. For more information, see the Notifications Use Case Guide",
"version": "1.9.1",
"version": "1.9.2",
"main": "dist/cjs/index.js",

@@ -29,5 +29,5 @@ "module": "dist/es/index.js",

"dependencies": {
"@sp-api-sdk/auth": "^1.9.4",
"@sp-api-sdk/common": "^1.7.6",
"axios": "^0.21.1"
"@sp-api-sdk/auth": "^1.9.5",
"@sp-api-sdk/common": "^1.7.7",
"axios": "^0.24.0"
},

@@ -53,3 +53,3 @@ "repository": {

],
"gitHead": "5dbdf09e0f74182eaa9b6c5f9ef0c931b0aa3089"
"gitHead": "e8c21d7d481263e8a6663ee11f6708d4dc6968b6"
}

@@ -7,2 +7,8 @@ # `notifications-api-v1`

## Documentation
Learn more about this Selling Partner API by visiting the [official documentation](https://github.com/amzn/selling-partner-api-docs/tree/main/references/notifications-api/notifications.md).
Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_notifications_api_v1.html) for this API client.
## Installing

@@ -27,10 +33,9 @@

const auth = new SellingPartnerApiAuth({
clientId: '',
clientSecret: '',
clientId: process.env.LWA_CLIENT_ID,
clientSecret: process.env.LWA_CLIENT_SECRET,
scopes: [AuthorizationScope.NOTIFICATIONS],
accessKeyId: '',
secretAccessKey: '',
accessKeyId: '',
region: '',
role: {
arn: '',
arn: 'arn:aws:iam::…',
}

@@ -42,3 +47,3 @@ })

auth,
region: 'eu' // or 'eu-west-1'
region: 'eu'
})

@@ -54,11 +59,10 @@ ```

const auth = new SellingPartnerApiAuth({
clientId: '',
clientSecret: '',
refreshToken: '',
clientId: process.env.LWA_CLIENT_ID,
clientSecret: process.env.LWA_CLIENT_SECRET,
refreshToken: 'Atzr|…',
accessKeyId: '',
secretAccessKey: '',
accessKeyId: '',
region: '',
role: {
arn: '',
}
arn: 'arn:aws:iam::…',
},
})

@@ -68,9 +72,9 @@

auth,
region: 'eu' // or 'eu-west-1'
region: 'eu',
})
```
## Handle Rate Limiting
## Rate Limiting
If you want to let the SDK retry after each 429 responses, instanciate the client like this:
In order to retry rate limited requests (HTTP 429), you can configure the API client as such:

@@ -83,11 +87,26 @@ ```javascript

retry: true,
onRetry: (retryInfo) => console.log(retryInfo) // Optional
}
// Optionally specify a callback that will be called on every retry.
onRetry: (retryInfo) => {
console.log(retryInfo)
},
},
})
```
The SDK gets the rate limits for each routes from the API documentation
The rate limits used for each route are specified in the [API documentation]((https://github.com/amzn/selling-partner-api-docs/tree/main/references/notifications-api/notifications.md)).
## API documentation
## License
See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/notifications-api/notifications.md)
MIT
## Miscellaneous
```
╚⊙ ⊙╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc