@sp-api-sdk/notifications-api-v1 1.13.9 → 1.13.10
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/dist/cjs/src/api-model/api/notifications-api.js +21 -24
- package/dist/cjs/src/api-model/base.js +1 -3
- package/dist/cjs/src/api-model/common.js +2 -0
- package/dist/es/src/api-model/api/notifications-api.js +21 -24
- package/dist/es/src/api-model/base.js +1 -3
- package/dist/es/src/api-model/common.js +2 -0
- package/dist/types/src/api-model/api/notifications-api.d.ts +17 -20
- package/dist/types/src/api-model/base.d.ts +2 -3
- package/dist/types/src/api-model/common.d.ts +3 -3
- package/package.json +3 -3
|
@@ -365,50 +365,48 @@ const NotificationsApiFactory = function (configuration, basePath, axios) {
|
|
|
365
365
|
return {
|
|
366
366
|
/**
|
|
367
367
|
* Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
368
|
-
* @param {
|
|
368
|
+
* @param {NotificationsApiCreateDestinationRequest} requestParameters Request parameters.
|
|
369
369
|
* @param {*} [options] Override http request option.
|
|
370
370
|
* @throws {RequiredError}
|
|
371
371
|
*/
|
|
372
|
-
createDestination(
|
|
373
|
-
return localVarFp.createDestination(body, options).then((request) => request(axios, basePath));
|
|
372
|
+
createDestination(requestParameters, options) {
|
|
373
|
+
return localVarFp.createDestination(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
374
374
|
},
|
|
375
375
|
/**
|
|
376
376
|
* 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 | 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 than 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).
|
|
377
|
-
* @param {
|
|
378
|
-
* @param {CreateSubscriptionRequest} body
|
|
377
|
+
* @param {NotificationsApiCreateSubscriptionRequest} requestParameters Request parameters.
|
|
379
378
|
* @param {*} [options] Override http request option.
|
|
380
379
|
* @throws {RequiredError}
|
|
381
380
|
*/
|
|
382
|
-
createSubscription(
|
|
383
|
-
return localVarFp.createSubscription(notificationType, body, options).then((request) => request(axios, basePath));
|
|
381
|
+
createSubscription(requestParameters, options) {
|
|
382
|
+
return localVarFp.createSubscription(requestParameters.notificationType, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
384
383
|
},
|
|
385
384
|
/**
|
|
386
385
|
* Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
387
|
-
* @param {
|
|
386
|
+
* @param {NotificationsApiDeleteDestinationRequest} requestParameters Request parameters.
|
|
388
387
|
* @param {*} [options] Override http request option.
|
|
389
388
|
* @throws {RequiredError}
|
|
390
389
|
*/
|
|
391
|
-
deleteDestination(
|
|
392
|
-
return localVarFp.deleteDestination(destinationId, options).then((request) => request(axios, basePath));
|
|
390
|
+
deleteDestination(requestParameters, options) {
|
|
391
|
+
return localVarFp.deleteDestination(requestParameters.destinationId, options).then((request) => request(axios, basePath));
|
|
393
392
|
},
|
|
394
393
|
/**
|
|
395
394
|
* 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](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
396
|
-
* @param {
|
|
397
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
395
|
+
* @param {NotificationsApiDeleteSubscriptionByIdRequest} requestParameters Request parameters.
|
|
398
396
|
* @param {*} [options] Override http request option.
|
|
399
397
|
* @throws {RequiredError}
|
|
400
398
|
*/
|
|
401
|
-
deleteSubscriptionById(
|
|
402
|
-
return localVarFp.deleteSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath));
|
|
399
|
+
deleteSubscriptionById(requestParameters, options) {
|
|
400
|
+
return localVarFp.deleteSubscriptionById(requestParameters.subscriptionId, requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
403
401
|
},
|
|
404
402
|
/**
|
|
405
403
|
* Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
406
|
-
* @param {
|
|
404
|
+
* @param {NotificationsApiGetDestinationRequest} requestParameters Request parameters.
|
|
407
405
|
* @param {*} [options] Override http request option.
|
|
408
406
|
* @throws {RequiredError}
|
|
409
407
|
*/
|
|
410
|
-
getDestination(
|
|
411
|
-
return localVarFp.getDestination(destinationId, options).then((request) => request(axios, basePath));
|
|
408
|
+
getDestination(requestParameters, options) {
|
|
409
|
+
return localVarFp.getDestination(requestParameters.destinationId, options).then((request) => request(axios, basePath));
|
|
412
410
|
},
|
|
413
411
|
/**
|
|
414
412
|
* Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
@@ -420,22 +418,21 @@ const NotificationsApiFactory = function (configuration, basePath, axios) {
|
|
|
420
418
|
},
|
|
421
419
|
/**
|
|
422
420
|
* 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 | 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 than 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).
|
|
423
|
-
* @param {
|
|
421
|
+
* @param {NotificationsApiGetSubscriptionRequest} requestParameters Request parameters.
|
|
424
422
|
* @param {*} [options] Override http request option.
|
|
425
423
|
* @throws {RequiredError}
|
|
426
424
|
*/
|
|
427
|
-
getSubscription(
|
|
428
|
-
return localVarFp.getSubscription(notificationType, options).then((request) => request(axios, basePath));
|
|
425
|
+
getSubscription(requestParameters, options) {
|
|
426
|
+
return localVarFp.getSubscription(requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
429
427
|
},
|
|
430
428
|
/**
|
|
431
429
|
* Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
432
|
-
* @param {
|
|
433
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
430
|
+
* @param {NotificationsApiGetSubscriptionByIdRequest} requestParameters Request parameters.
|
|
434
431
|
* @param {*} [options] Override http request option.
|
|
435
432
|
* @throws {RequiredError}
|
|
436
433
|
*/
|
|
437
|
-
getSubscriptionById(
|
|
438
|
-
return localVarFp.getSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath));
|
|
434
|
+
getSubscriptionById(requestParameters, options) {
|
|
435
|
+
return localVarFp.getSubscriptionById(requestParameters.subscriptionId, requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
439
436
|
},
|
|
440
437
|
};
|
|
441
438
|
};
|
|
@@ -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));
|
|
@@ -359,50 +359,48 @@ export const NotificationsApiFactory = function (configuration, basePath, axios)
|
|
|
359
359
|
return {
|
|
360
360
|
/**
|
|
361
361
|
* Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
362
|
-
* @param {
|
|
362
|
+
* @param {NotificationsApiCreateDestinationRequest} requestParameters Request parameters.
|
|
363
363
|
* @param {*} [options] Override http request option.
|
|
364
364
|
* @throws {RequiredError}
|
|
365
365
|
*/
|
|
366
|
-
createDestination(
|
|
367
|
-
return localVarFp.createDestination(body, options).then((request) => request(axios, basePath));
|
|
366
|
+
createDestination(requestParameters, options) {
|
|
367
|
+
return localVarFp.createDestination(requestParameters.body, options).then((request) => request(axios, basePath));
|
|
368
368
|
},
|
|
369
369
|
/**
|
|
370
370
|
* 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 | 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 than 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).
|
|
371
|
-
* @param {
|
|
372
|
-
* @param {CreateSubscriptionRequest} body
|
|
371
|
+
* @param {NotificationsApiCreateSubscriptionRequest} requestParameters Request parameters.
|
|
373
372
|
* @param {*} [options] Override http request option.
|
|
374
373
|
* @throws {RequiredError}
|
|
375
374
|
*/
|
|
376
|
-
createSubscription(
|
|
377
|
-
return localVarFp.createSubscription(notificationType, body, options).then((request) => request(axios, basePath));
|
|
375
|
+
createSubscription(requestParameters, options) {
|
|
376
|
+
return localVarFp.createSubscription(requestParameters.notificationType, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
378
377
|
},
|
|
379
378
|
/**
|
|
380
379
|
* Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
381
|
-
* @param {
|
|
380
|
+
* @param {NotificationsApiDeleteDestinationRequest} requestParameters Request parameters.
|
|
382
381
|
* @param {*} [options] Override http request option.
|
|
383
382
|
* @throws {RequiredError}
|
|
384
383
|
*/
|
|
385
|
-
deleteDestination(
|
|
386
|
-
return localVarFp.deleteDestination(destinationId, options).then((request) => request(axios, basePath));
|
|
384
|
+
deleteDestination(requestParameters, options) {
|
|
385
|
+
return localVarFp.deleteDestination(requestParameters.destinationId, options).then((request) => request(axios, basePath));
|
|
387
386
|
},
|
|
388
387
|
/**
|
|
389
388
|
* 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](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
390
|
-
* @param {
|
|
391
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
389
|
+
* @param {NotificationsApiDeleteSubscriptionByIdRequest} requestParameters Request parameters.
|
|
392
390
|
* @param {*} [options] Override http request option.
|
|
393
391
|
* @throws {RequiredError}
|
|
394
392
|
*/
|
|
395
|
-
deleteSubscriptionById(
|
|
396
|
-
return localVarFp.deleteSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath));
|
|
393
|
+
deleteSubscriptionById(requestParameters, options) {
|
|
394
|
+
return localVarFp.deleteSubscriptionById(requestParameters.subscriptionId, requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
397
395
|
},
|
|
398
396
|
/**
|
|
399
397
|
* Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
400
|
-
* @param {
|
|
398
|
+
* @param {NotificationsApiGetDestinationRequest} requestParameters Request parameters.
|
|
401
399
|
* @param {*} [options] Override http request option.
|
|
402
400
|
* @throws {RequiredError}
|
|
403
401
|
*/
|
|
404
|
-
getDestination(
|
|
405
|
-
return localVarFp.getDestination(destinationId, options).then((request) => request(axios, basePath));
|
|
402
|
+
getDestination(requestParameters, options) {
|
|
403
|
+
return localVarFp.getDestination(requestParameters.destinationId, options).then((request) => request(axios, basePath));
|
|
406
404
|
},
|
|
407
405
|
/**
|
|
408
406
|
* Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
@@ -414,22 +412,21 @@ export const NotificationsApiFactory = function (configuration, basePath, axios)
|
|
|
414
412
|
},
|
|
415
413
|
/**
|
|
416
414
|
* 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 | 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 than 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).
|
|
417
|
-
* @param {
|
|
415
|
+
* @param {NotificationsApiGetSubscriptionRequest} requestParameters Request parameters.
|
|
418
416
|
* @param {*} [options] Override http request option.
|
|
419
417
|
* @throws {RequiredError}
|
|
420
418
|
*/
|
|
421
|
-
getSubscription(
|
|
422
|
-
return localVarFp.getSubscription(notificationType, options).then((request) => request(axios, basePath));
|
|
419
|
+
getSubscription(requestParameters, options) {
|
|
420
|
+
return localVarFp.getSubscription(requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
423
421
|
},
|
|
424
422
|
/**
|
|
425
423
|
* Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
426
|
-
* @param {
|
|
427
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
424
|
+
* @param {NotificationsApiGetSubscriptionByIdRequest} requestParameters Request parameters.
|
|
428
425
|
* @param {*} [options] Override http request option.
|
|
429
426
|
* @throws {RequiredError}
|
|
430
427
|
*/
|
|
431
|
-
getSubscriptionById(
|
|
432
|
-
return localVarFp.getSubscriptionById(subscriptionId, notificationType, options).then((request) => request(axios, basePath));
|
|
428
|
+
getSubscriptionById(requestParameters, options) {
|
|
429
|
+
return localVarFp.getSubscriptionById(requestParameters.subscriptionId, requestParameters.notificationType, options).then((request) => request(axios, basePath));
|
|
433
430
|
},
|
|
434
431
|
};
|
|
435
432
|
};
|
|
@@ -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 {
|
|
13
|
-
import {
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { CreateDestinationRequest } from '../models';
|
|
16
16
|
import { CreateDestinationResponse } from '../models';
|
|
@@ -157,62 +157,59 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
157
157
|
export declare const NotificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
158
158
|
/**
|
|
159
159
|
* Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
160
|
-
* @param {
|
|
160
|
+
* @param {NotificationsApiCreateDestinationRequest} requestParameters Request parameters.
|
|
161
161
|
* @param {*} [options] Override http request option.
|
|
162
162
|
* @throws {RequiredError}
|
|
163
163
|
*/
|
|
164
|
-
createDestination(
|
|
164
|
+
createDestination(requestParameters: NotificationsApiCreateDestinationRequest, options?: AxiosRequestConfig): AxiosPromise<CreateDestinationResponse>;
|
|
165
165
|
/**
|
|
166
166
|
* 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 | 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 than 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).
|
|
167
|
-
* @param {
|
|
168
|
-
* @param {CreateSubscriptionRequest} body
|
|
167
|
+
* @param {NotificationsApiCreateSubscriptionRequest} requestParameters Request parameters.
|
|
169
168
|
* @param {*} [options] Override http request option.
|
|
170
169
|
* @throws {RequiredError}
|
|
171
170
|
*/
|
|
172
|
-
createSubscription(
|
|
171
|
+
createSubscription(requestParameters: NotificationsApiCreateSubscriptionRequest, options?: AxiosRequestConfig): AxiosPromise<CreateSubscriptionResponse>;
|
|
173
172
|
/**
|
|
174
173
|
* Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
175
|
-
* @param {
|
|
174
|
+
* @param {NotificationsApiDeleteDestinationRequest} requestParameters Request parameters.
|
|
176
175
|
* @param {*} [options] Override http request option.
|
|
177
176
|
* @throws {RequiredError}
|
|
178
177
|
*/
|
|
179
|
-
deleteDestination(
|
|
178
|
+
deleteDestination(requestParameters: NotificationsApiDeleteDestinationRequest, options?: AxiosRequestConfig): AxiosPromise<DeleteDestinationResponse>;
|
|
180
179
|
/**
|
|
181
180
|
* 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](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
182
|
-
* @param {
|
|
183
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
181
|
+
* @param {NotificationsApiDeleteSubscriptionByIdRequest} requestParameters Request parameters.
|
|
184
182
|
* @param {*} [options] Override http request option.
|
|
185
183
|
* @throws {RequiredError}
|
|
186
184
|
*/
|
|
187
|
-
deleteSubscriptionById(
|
|
185
|
+
deleteSubscriptionById(requestParameters: NotificationsApiDeleteSubscriptionByIdRequest, options?: AxiosRequestConfig): AxiosPromise<DeleteSubscriptionByIdResponse>;
|
|
188
186
|
/**
|
|
189
187
|
* Returns information about the destination that you specify. The getDestination API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
190
|
-
* @param {
|
|
188
|
+
* @param {NotificationsApiGetDestinationRequest} requestParameters Request parameters.
|
|
191
189
|
* @param {*} [options] Override http request option.
|
|
192
190
|
* @throws {RequiredError}
|
|
193
191
|
*/
|
|
194
|
-
getDestination(
|
|
192
|
+
getDestination(requestParameters: NotificationsApiGetDestinationRequest, options?: AxiosRequestConfig): AxiosPromise<GetDestinationResponse>;
|
|
195
193
|
/**
|
|
196
194
|
* Returns information about all destinations. The getDestinations API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
197
195
|
* @param {*} [options] Override http request option.
|
|
198
196
|
* @throws {RequiredError}
|
|
199
197
|
*/
|
|
200
|
-
getDestinations(options?:
|
|
198
|
+
getDestinations(options?: AxiosRequestConfig): AxiosPromise<GetDestinationsResponse>;
|
|
201
199
|
/**
|
|
202
200
|
* 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 | 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 than 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).
|
|
203
|
-
* @param {
|
|
201
|
+
* @param {NotificationsApiGetSubscriptionRequest} requestParameters Request parameters.
|
|
204
202
|
* @param {*} [options] Override http request option.
|
|
205
203
|
* @throws {RequiredError}
|
|
206
204
|
*/
|
|
207
|
-
getSubscription(
|
|
205
|
+
getSubscription(requestParameters: NotificationsApiGetSubscriptionRequest, options?: AxiosRequestConfig): AxiosPromise<GetSubscriptionResponse>;
|
|
208
206
|
/**
|
|
209
207
|
* Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations) in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | 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 than 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).
|
|
210
|
-
* @param {
|
|
211
|
-
* @param {string} notificationType The type of notification. For more information about notification types, see [the Notifications API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
|
|
208
|
+
* @param {NotificationsApiGetSubscriptionByIdRequest} requestParameters Request parameters.
|
|
212
209
|
* @param {*} [options] Override http request option.
|
|
213
210
|
* @throws {RequiredError}
|
|
214
211
|
*/
|
|
215
|
-
getSubscriptionById(
|
|
212
|
+
getSubscriptionById(requestParameters: NotificationsApiGetSubscriptionByIdRequest, options?: AxiosRequestConfig): AxiosPromise<GetSubscriptionByIdResponse>;
|
|
216
213
|
};
|
|
217
214
|
/**
|
|
218
215
|
* Request parameters for createDestination operation in NotificationsApi.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { Configuration } from
|
|
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/notifications-api-v1",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
4
|
"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.",
|
|
5
|
-
"version": "1.13.
|
|
5
|
+
"version": "1.13.10",
|
|
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.
|
|
29
|
+
"@sp-api-sdk/common": "^1.9.22",
|
|
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": "
|
|
54
|
+
"gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
|
|
55
55
|
}
|