@sp-api-sdk/application-integrations-api-2024-04-01 1.1.0

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/dist/cjs/index.js +19 -0
  4. package/dist/cjs/src/api-model/api/app-integrations-api.js +248 -0
  5. package/dist/cjs/src/api-model/api.js +30 -0
  6. package/dist/cjs/src/api-model/base.js +71 -0
  7. package/dist/cjs/src/api-model/common.js +145 -0
  8. package/dist/cjs/src/api-model/configuration.js +99 -0
  9. package/dist/cjs/src/api-model/index.js +32 -0
  10. package/dist/cjs/src/api-model/models/create-notification-request.js +15 -0
  11. package/dist/cjs/src/api-model/models/create-notification-response.js +15 -0
  12. package/dist/cjs/src/api-model/models/delete-notifications-request.js +20 -0
  13. package/dist/cjs/src/api-model/models/error-list.js +15 -0
  14. package/dist/cjs/src/api-model/models/index.js +22 -0
  15. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  16. package/dist/cjs/src/api-model/models/record-action-feedback-request.js +19 -0
  17. package/dist/cjs/src/client.js +35 -0
  18. package/dist/es/index.js +3 -0
  19. package/dist/es/src/api-model/api/app-integrations-api.js +238 -0
  20. package/dist/es/src/api-model/api.js +14 -0
  21. package/dist/es/src/api-model/base.js +63 -0
  22. package/dist/es/src/api-model/common.js +133 -0
  23. package/dist/es/src/api-model/configuration.js +95 -0
  24. package/dist/es/src/api-model/index.js +16 -0
  25. package/dist/es/src/api-model/models/create-notification-request.js +14 -0
  26. package/dist/es/src/api-model/models/create-notification-response.js +14 -0
  27. package/dist/es/src/api-model/models/delete-notifications-request.js +17 -0
  28. package/dist/es/src/api-model/models/error-list.js +14 -0
  29. package/dist/es/src/api-model/models/index.js +6 -0
  30. package/dist/es/src/api-model/models/model-error.js +14 -0
  31. package/dist/es/src/api-model/models/record-action-feedback-request.js +16 -0
  32. package/dist/es/src/client.js +31 -0
  33. package/dist/types/index.d.ts +3 -0
  34. package/dist/types/src/api-model/api/app-integrations-api.d.ts +179 -0
  35. package/dist/types/src/api-model/api.d.ts +12 -0
  36. package/dist/types/src/api-model/base.d.ts +66 -0
  37. package/dist/types/src/api-model/common.d.ts +65 -0
  38. package/dist/types/src/api-model/configuration.d.ts +91 -0
  39. package/dist/types/src/api-model/index.d.ts +14 -0
  40. package/dist/types/src/api-model/models/create-notification-request.d.ts +38 -0
  41. package/dist/types/src/api-model/models/create-notification-response.d.ts +24 -0
  42. package/dist/types/src/api-model/models/delete-notifications-request.d.ts +35 -0
  43. package/dist/types/src/api-model/models/error-list.d.ts +24 -0
  44. package/dist/types/src/api-model/models/index.d.ts +6 -0
  45. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  46. package/dist/types/src/api-model/models/record-action-feedback-request.d.ts +28 -0
  47. package/dist/types/src/client.d.ts +6 -0
  48. package/package.json +44 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Bizon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # `application-integrations-api-2024-04-01`
2
+
3
+ With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
4
+
5
+ [![npm version](https://badgen.net/npm/v/@sp-api-sdk/application-integrations-api-2024-04-01)](https://www.npmjs.com/package/@sp-api-sdk/application-integrations-api-2024-04-01)
6
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
7
+
8
+ ## Documentation
9
+
10
+ Learn more about this Selling Partner API by visiting the [official documentation](https://developer-docs.amazon.com/sp-api/docs).
11
+
12
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_application_integrations_api_2024_04_01.html) for this API client.
13
+
14
+ ## Installing
15
+
16
+ ```sh
17
+ npm install @sp-api-sdk/application-integrations-api-2024-04-01
18
+ ```
19
+
20
+ ## Getting Started
21
+
22
+ ```javascript
23
+ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
24
+ import {ApplicationIntegrationsApiClient} from '@sp-api-sdk/application-integrations-api-2024-04-01'
25
+
26
+ const auth = new SellingPartnerApiAuth({
27
+ clientId: process.env.LWA_CLIENT_ID,
28
+ clientSecret: process.env.LWA_CLIENT_SECRET,
29
+ refreshToken: 'Atzr|…',
30
+ })
31
+
32
+ const client = new ApplicationIntegrationsApiClient({
33
+ auth,
34
+ region: 'eu',
35
+ })
36
+ ```
37
+
38
+ ## Rate Limiting
39
+
40
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
41
+
42
+ ```javascript
43
+ const client = new ApplicationIntegrationsApiClient({
44
+ auth,
45
+ region: 'eu',
46
+ rateLimiting: {
47
+ retry: true,
48
+ // Optionally specify a callback that will be called on every retry.
49
+ onRetry: (retryInfo) => {
50
+ console.log(retryInfo)
51
+ },
52
+ },
53
+ })
54
+ ```
55
+
56
+ The rate limits used for each route are specified in the [API documentation](https://developer-docs.amazon.com/sp-api/docs).
57
+
58
+ ## Logging
59
+
60
+ You can enable logging for both SP-API requests and responses by configuring the `logging.request` and `logging.response` properties.
61
+
62
+ ```javascript
63
+ const client = new ApplicationIntegrationsApiClient({
64
+ auth,
65
+ region: 'eu',
66
+ logging: {
67
+ request: {
68
+ logger: console.debug
69
+ },
70
+ response: {
71
+ logger: console.debug
72
+ },
73
+ error: true,
74
+ },
75
+ })
76
+ ```
77
+
78
+ Specifying `true` will use the default options, specifying an object will allow you to override the default options.
79
+ This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
80
+ By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
81
+
82
+
83
+ ## License
84
+
85
+ MIT
86
+
87
+ ## Miscellaneous
88
+
89
+ ```
90
+ ╚⊙ ⊙╝
91
+ ╚═(███)═╝
92
+ ╚═(███)═╝
93
+ ╚═(███)═╝
94
+ ╚═(███)═╝
95
+ ╚═(███)═╝
96
+ ╚═(███)═╝
97
+ ```
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/client"), exports);
18
+ __exportStar(require("./src/api-model/api"), exports);
19
+ __exportStar(require("./src/api-model/models"), exports);
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The Selling Partner API for third party application integrations.
6
+ * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
7
+ *
8
+ * The version of the OpenAPI document: 2024-04-01
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AppIntegrationsApi = exports.AppIntegrationsApiFactory = exports.AppIntegrationsApiFp = exports.AppIntegrationsApiAxiosParamCreator = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // Some imports not used depending on template conditions
22
+ // @ts-ignore
23
+ const common_1 = require("../common");
24
+ // @ts-ignore
25
+ const base_1 = require("../base");
26
+ /**
27
+ * AppIntegrationsApi - axios parameter creator
28
+ * @export
29
+ */
30
+ const AppIntegrationsApiAxiosParamCreator = function (configuration) {
31
+ return {
32
+ /**
33
+ * Create a notification for sellers in Seller Central. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
34
+ * @param {CreateNotificationRequest} body The request body for the `createNotification` operation.
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ createNotification: async (body, options = {}) => {
39
+ // verify required parameter 'body' is not null or undefined
40
+ (0, common_1.assertParamExists)('createNotification', 'body', body);
41
+ const localVarPath = `/appIntegrations/2024-04-01/notifications`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ }
48
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
49
+ const localVarHeaderParameter = {};
50
+ const localVarQueryParameter = {};
51
+ localVarHeaderParameter['Content-Type'] = 'application/json';
52
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
53
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
54
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
55
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
56
+ return {
57
+ url: (0, common_1.toPathString)(localVarUrlObj),
58
+ options: localVarRequestOptions,
59
+ };
60
+ },
61
+ /**
62
+ * Remove your application\'s notifications from the Appstore notifications dashboard. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
63
+ * @param {DeleteNotificationsRequest} body The request body for the `deleteNotifications` operation.
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ */
67
+ deleteNotifications: async (body, options = {}) => {
68
+ // verify required parameter 'body' is not null or undefined
69
+ (0, common_1.assertParamExists)('deleteNotifications', 'body', body);
70
+ const localVarPath = `/appIntegrations/2024-04-01/notifications/deletion`;
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ if (configuration) {
75
+ baseOptions = configuration.baseOptions;
76
+ }
77
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
78
+ const localVarHeaderParameter = {};
79
+ const localVarQueryParameter = {};
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
82
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
84
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
85
+ return {
86
+ url: (0, common_1.toPathString)(localVarUrlObj),
87
+ options: localVarRequestOptions,
88
+ };
89
+ },
90
+ /**
91
+ * Records the seller\'s response to a notification. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
92
+ * @param {string} notificationId A `notificationId` uniquely identifies a notification.
93
+ * @param {RecordActionFeedbackRequest} body The request body for the `recordActionFeedback` operation.
94
+ * @param {*} [options] Override http request option.
95
+ * @throws {RequiredError}
96
+ */
97
+ recordActionFeedback: async (notificationId, body, options = {}) => {
98
+ // verify required parameter 'notificationId' is not null or undefined
99
+ (0, common_1.assertParamExists)('recordActionFeedback', 'notificationId', notificationId);
100
+ // verify required parameter 'body' is not null or undefined
101
+ (0, common_1.assertParamExists)('recordActionFeedback', 'body', body);
102
+ const localVarPath = `/appIntegrations/2024-04-01/notifications/{notificationId}/feedback`
103
+ .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId)));
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
111
+ const localVarHeaderParameter = {};
112
+ const localVarQueryParameter = {};
113
+ localVarHeaderParameter['Content-Type'] = 'application/json';
114
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
117
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
118
+ return {
119
+ url: (0, common_1.toPathString)(localVarUrlObj),
120
+ options: localVarRequestOptions,
121
+ };
122
+ },
123
+ };
124
+ };
125
+ exports.AppIntegrationsApiAxiosParamCreator = AppIntegrationsApiAxiosParamCreator;
126
+ /**
127
+ * AppIntegrationsApi - functional programming interface
128
+ * @export
129
+ */
130
+ const AppIntegrationsApiFp = function (configuration) {
131
+ const localVarAxiosParamCreator = (0, exports.AppIntegrationsApiAxiosParamCreator)(configuration);
132
+ return {
133
+ /**
134
+ * Create a notification for sellers in Seller Central. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
135
+ * @param {CreateNotificationRequest} body The request body for the `createNotification` operation.
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ async createNotification(body, options) {
140
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createNotification(body, options);
141
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
142
+ const localVarOperationServerBasePath = base_1.operationServerMap['AppIntegrationsApi.createNotification']?.[localVarOperationServerIndex]?.url;
143
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
144
+ },
145
+ /**
146
+ * Remove your application\'s notifications from the Appstore notifications dashboard. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
147
+ * @param {DeleteNotificationsRequest} body The request body for the `deleteNotifications` operation.
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ async deleteNotifications(body, options) {
152
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNotifications(body, options);
153
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
154
+ const localVarOperationServerBasePath = base_1.operationServerMap['AppIntegrationsApi.deleteNotifications']?.[localVarOperationServerIndex]?.url;
155
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
156
+ },
157
+ /**
158
+ * Records the seller\'s response to a notification. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
159
+ * @param {string} notificationId A `notificationId` uniquely identifies a notification.
160
+ * @param {RecordActionFeedbackRequest} body The request body for the `recordActionFeedback` operation.
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ async recordActionFeedback(notificationId, body, options) {
165
+ const localVarAxiosArgs = await localVarAxiosParamCreator.recordActionFeedback(notificationId, body, options);
166
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
167
+ const localVarOperationServerBasePath = base_1.operationServerMap['AppIntegrationsApi.recordActionFeedback']?.[localVarOperationServerIndex]?.url;
168
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
169
+ },
170
+ };
171
+ };
172
+ exports.AppIntegrationsApiFp = AppIntegrationsApiFp;
173
+ /**
174
+ * AppIntegrationsApi - factory interface
175
+ * @export
176
+ */
177
+ const AppIntegrationsApiFactory = function (configuration, basePath, axios) {
178
+ const localVarFp = (0, exports.AppIntegrationsApiFp)(configuration);
179
+ return {
180
+ /**
181
+ * Create a notification for sellers in Seller Central. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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 {AppIntegrationsApiCreateNotificationRequest} requestParameters Request parameters.
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ createNotification(requestParameters, options) {
187
+ return localVarFp.createNotification(requestParameters.body, options).then((request) => request(axios, basePath));
188
+ },
189
+ /**
190
+ * Remove your application\'s notifications from the Appstore notifications dashboard. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
191
+ * @param {AppIntegrationsApiDeleteNotificationsRequest} requestParameters Request parameters.
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ deleteNotifications(requestParameters, options) {
196
+ return localVarFp.deleteNotifications(requestParameters.body, options).then((request) => request(axios, basePath));
197
+ },
198
+ /**
199
+ * Records the seller\'s response to a notification. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
200
+ * @param {AppIntegrationsApiRecordActionFeedbackRequest} requestParameters Request parameters.
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ recordActionFeedback(requestParameters, options) {
205
+ return localVarFp.recordActionFeedback(requestParameters.notificationId, requestParameters.body, options).then((request) => request(axios, basePath));
206
+ },
207
+ };
208
+ };
209
+ exports.AppIntegrationsApiFactory = AppIntegrationsApiFactory;
210
+ /**
211
+ * AppIntegrationsApi - object-oriented interface
212
+ * @export
213
+ * @class AppIntegrationsApi
214
+ * @extends {BaseAPI}
215
+ */
216
+ class AppIntegrationsApi extends base_1.BaseAPI {
217
+ /**
218
+ * Create a notification for sellers in Seller Central. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
219
+ * @param {AppIntegrationsApiCreateNotificationRequest} requestParameters Request parameters.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ * @memberof AppIntegrationsApi
223
+ */
224
+ createNotification(requestParameters, options) {
225
+ return (0, exports.AppIntegrationsApiFp)(this.configuration).createNotification(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
226
+ }
227
+ /**
228
+ * Remove your application\'s notifications from the Appstore notifications dashboard. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
229
+ * @param {AppIntegrationsApiDeleteNotificationsRequest} requestParameters Request parameters.
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ * @memberof AppIntegrationsApi
233
+ */
234
+ deleteNotifications(requestParameters, options) {
235
+ return (0, exports.AppIntegrationsApiFp)(this.configuration).deleteNotifications(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
236
+ }
237
+ /**
238
+ * Records the seller\'s response to a notification. **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 preceding table indicates the default rate and burst values for this operation. Sellers whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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).
239
+ * @param {AppIntegrationsApiRecordActionFeedbackRequest} requestParameters Request parameters.
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ * @memberof AppIntegrationsApi
243
+ */
244
+ recordActionFeedback(requestParameters, options) {
245
+ return (0, exports.AppIntegrationsApiFp)(this.configuration).recordActionFeedback(requestParameters.notificationId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
246
+ }
247
+ }
248
+ exports.AppIntegrationsApi = AppIntegrationsApi;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The Selling Partner API for third party application integrations.
6
+ * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
7
+ *
8
+ * The version of the OpenAPI document: 2024-04-01
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api/app-integrations-api"), exports);
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The Selling Partner API for third party application integrations.
6
+ * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
7
+ *
8
+ * The version of the OpenAPI document: 2024-04-01
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.COLLECTION_FORMATS = {
27
+ csv: ",",
28
+ ssv: " ",
29
+ tsv: "\t",
30
+ pipes: "|",
31
+ };
32
+ /**
33
+ *
34
+ * @export
35
+ * @class BaseAPI
36
+ */
37
+ class BaseAPI {
38
+ basePath;
39
+ axios;
40
+ configuration;
41
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
42
+ this.basePath = basePath;
43
+ this.axios = axios;
44
+ if (configuration) {
45
+ this.configuration = configuration;
46
+ this.basePath = configuration.basePath ?? basePath;
47
+ }
48
+ }
49
+ }
50
+ exports.BaseAPI = BaseAPI;
51
+ ;
52
+ /**
53
+ *
54
+ * @export
55
+ * @class RequiredError
56
+ * @extends {Error}
57
+ */
58
+ class RequiredError extends Error {
59
+ field;
60
+ constructor(field, msg) {
61
+ super(msg);
62
+ this.field = field;
63
+ this.name = "RequiredError";
64
+ }
65
+ }
66
+ exports.RequiredError = RequiredError;
67
+ /**
68
+ *
69
+ * @export
70
+ */
71
+ exports.operationServerMap = {};
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * The Selling Partner API for third party application integrations.
6
+ * With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
7
+ *
8
+ * The version of the OpenAPI document: 2024-04-01
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
+ const base_1 = require("./base");
18
+ /**
19
+ *
20
+ * @export
21
+ */
22
+ exports.DUMMY_BASE_URL = 'https://example.com';
23
+ /**
24
+ *
25
+ * @throws {RequiredError}
26
+ * @export
27
+ */
28
+ const assertParamExists = function (functionName, paramName, paramValue) {
29
+ if (paramValue === null || paramValue === undefined) {
30
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
31
+ }
32
+ };
33
+ exports.assertParamExists = assertParamExists;
34
+ /**
35
+ *
36
+ * @export
37
+ */
38
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
39
+ if (configuration && configuration.apiKey) {
40
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
41
+ ? await configuration.apiKey(keyParamName)
42
+ : await configuration.apiKey;
43
+ object[keyParamName] = localVarApiKeyValue;
44
+ }
45
+ };
46
+ exports.setApiKeyToObject = setApiKeyToObject;
47
+ /**
48
+ *
49
+ * @export
50
+ */
51
+ const setBasicAuthToObject = function (object, configuration) {
52
+ if (configuration && (configuration.username || configuration.password)) {
53
+ object["auth"] = { username: configuration.username, password: configuration.password };
54
+ }
55
+ };
56
+ exports.setBasicAuthToObject = setBasicAuthToObject;
57
+ /**
58
+ *
59
+ * @export
60
+ */
61
+ const setBearerAuthToObject = async function (object, configuration) {
62
+ if (configuration && configuration.accessToken) {
63
+ const accessToken = typeof configuration.accessToken === 'function'
64
+ ? await configuration.accessToken()
65
+ : await configuration.accessToken;
66
+ object["Authorization"] = "Bearer " + accessToken;
67
+ }
68
+ };
69
+ exports.setBearerAuthToObject = setBearerAuthToObject;
70
+ /**
71
+ *
72
+ * @export
73
+ */
74
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
75
+ if (configuration && configuration.accessToken) {
76
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
77
+ ? await configuration.accessToken(name, scopes)
78
+ : await configuration.accessToken;
79
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
80
+ }
81
+ };
82
+ exports.setOAuthToObject = setOAuthToObject;
83
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (parameter == null)
85
+ return;
86
+ if (typeof parameter === "object") {
87
+ if (Array.isArray(parameter)) {
88
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
89
+ }
90
+ else {
91
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
92
+ }
93
+ }
94
+ else {
95
+ if (urlSearchParams.has(key)) {
96
+ urlSearchParams.append(key, parameter);
97
+ }
98
+ else {
99
+ urlSearchParams.set(key, parameter);
100
+ }
101
+ }
102
+ }
103
+ /**
104
+ *
105
+ * @export
106
+ */
107
+ const setSearchParams = function (url, ...objects) {
108
+ const searchParams = new URLSearchParams(url.search);
109
+ setFlattenedQueryParams(searchParams, objects);
110
+ url.search = searchParams.toString();
111
+ };
112
+ exports.setSearchParams = setSearchParams;
113
+ /**
114
+ *
115
+ * @export
116
+ */
117
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
118
+ const nonString = typeof value !== 'string';
119
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
120
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
121
+ : nonString;
122
+ return needsSerialization
123
+ ? JSON.stringify(value !== undefined ? value : {})
124
+ : (value || "");
125
+ };
126
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
127
+ /**
128
+ *
129
+ * @export
130
+ */
131
+ const toPathString = function (url) {
132
+ return url.pathname + url.search + url.hash;
133
+ };
134
+ exports.toPathString = toPathString;
135
+ /**
136
+ *
137
+ * @export
138
+ */
139
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
140
+ return (axios = globalAxios, basePath = BASE_PATH) => {
141
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
142
+ return axios.request(axiosRequestArgs);
143
+ };
144
+ };
145
+ exports.createRequestFunction = createRequestFunction;