@sp-api-sdk/notifications-api-v1
Version:
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 subscrip
71 lines (70 loc) • 2.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationsApiClient = exports.clientRateLimits = void 0;
const common_1 = require("@sp-api-sdk/common");
const api_model_1 = require("./api-model");
exports.clientRateLimits = [
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/subscriptions/[^/]*$'),
rate: 1,
burst: 5,
},
{
method: 'post',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/subscriptions/[^/]*$'),
rate: 1,
burst: 5,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/subscriptions/[^/]*$'),
rate: 1,
burst: 5,
},
{
method: 'delete',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/subscriptions/[^/]*$'),
rate: 1,
burst: 5,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/destinations$'),
rate: 1,
burst: 5,
},
{
method: 'post',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/destinations$'),
rate: 1,
burst: 5,
},
{
method: 'get',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/destinations/[^/]*$'),
rate: 1,
burst: 5,
},
{
method: 'delete',
// eslint-disable-next-line prefer-regex-literals
urlRegex: new RegExp('^/notifications/v1/destinations/[^/]*$'),
rate: 1,
burst: 5,
},
];
class NotificationsApiClient extends api_model_1.NotificationsApi {
constructor(configuration) {
const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
super(new api_model_1.Configuration(), endpoint, axios);
}
}
exports.NotificationsApiClient = NotificationsApiClient;