@sp-api-sdk/application-integrations-api-2024-04-01 4.0.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/index.cjs +417 -427
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +262 -265
- package/dist/index.d.ts +262 -265
- package/dist/index.js +392 -389
- package/dist/index.js.map +1 -1
- package/package.json +14 -6
package/dist/index.cjs
CHANGED
|
@@ -1,459 +1,449 @@
|
|
|
1
|
-
"
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
ApplicationIntegrationsApi: () => ApplicationIntegrationsApi,
|
|
34
|
-
ApplicationIntegrationsApiAxiosParamCreator: () => ApplicationIntegrationsApiAxiosParamCreator,
|
|
35
|
-
ApplicationIntegrationsApiClient: () => ApplicationIntegrationsApiClient,
|
|
36
|
-
ApplicationIntegrationsApiFactory: () => ApplicationIntegrationsApiFactory,
|
|
37
|
-
ApplicationIntegrationsApiFp: () => ApplicationIntegrationsApiFp,
|
|
38
|
-
DeleteNotificationsRequestDeletionReasonEnum: () => DeleteNotificationsRequestDeletionReasonEnum,
|
|
39
|
-
RecordActionFeedbackRequestFeedbackActionCodeEnum: () => RecordActionFeedbackRequestFeedbackActionCodeEnum,
|
|
40
|
-
clientRateLimits: () => clientRateLimits
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
|
|
44
|
-
// src/client.ts
|
|
45
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
46
|
-
|
|
47
|
-
// src/api-model/api/application-integrations-api.ts
|
|
48
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
49
|
-
|
|
50
|
-
// src/api-model/base.ts
|
|
51
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
52
|
-
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _sp_api_sdk_common = require("@sp-api-sdk/common");
|
|
25
|
+
let axios = require("axios");
|
|
26
|
+
axios = __toESM(axios, 1);
|
|
27
|
+
//#region src/api-model/base.ts
|
|
28
|
+
const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
53
29
|
var BaseAPI = class {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
basePath;
|
|
31
|
+
axios;
|
|
32
|
+
configuration;
|
|
33
|
+
constructor(configuration, basePath = BASE_PATH, axios$5 = axios.default) {
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios$5;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
65
41
|
};
|
|
66
42
|
var RequiredError = class extends Error {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
field;
|
|
44
|
+
constructor(field, msg) {
|
|
45
|
+
super(msg);
|
|
46
|
+
this.field = field;
|
|
47
|
+
this.name = "RequiredError";
|
|
48
|
+
}
|
|
73
49
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
50
|
+
const operationServerMap = {};
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/api-model/common.ts
|
|
53
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
*/
|
|
58
|
+
const assertParamExists = function(functionName, paramName, paramValue) {
|
|
59
|
+
if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
82
60
|
};
|
|
83
61
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Object.keys(parameter).forEach(
|
|
90
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
if (urlSearchParams.has(key)) {
|
|
95
|
-
urlSearchParams.append(key, parameter);
|
|
96
|
-
} else {
|
|
97
|
-
urlSearchParams.set(key, parameter);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
62
|
+
if (parameter == null) return;
|
|
63
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
64
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
65
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
66
|
+
else urlSearchParams.set(key, parameter);
|
|
100
67
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
68
|
+
const setSearchParams = function(url, ...objects) {
|
|
69
|
+
const searchParams = new URLSearchParams(url.search);
|
|
70
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
71
|
+
url.search = searchParams.toString();
|
|
105
72
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
73
|
+
/**
|
|
74
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
75
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
76
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
77
|
+
*/
|
|
78
|
+
const replaceWithSerializableTypeIfNeeded = function(key, value) {
|
|
79
|
+
if (value instanceof Set) return Array.from(value);
|
|
80
|
+
else return value;
|
|
112
81
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
82
|
+
const serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
83
|
+
const nonString = typeof value !== "string";
|
|
84
|
+
return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
|
|
117
85
|
};
|
|
118
|
-
|
|
119
|
-
|
|
86
|
+
const toPathString = function(url) {
|
|
87
|
+
return url.pathname + url.search + url.hash;
|
|
120
88
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
89
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
90
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
91
|
+
const axiosRequestArgs = {
|
|
92
|
+
...axiosArgs.options,
|
|
93
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
94
|
+
};
|
|
95
|
+
return axios.request(axiosRequestArgs);
|
|
96
|
+
};
|
|
126
97
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/api-model/api/application-integrations-api.ts
|
|
100
|
+
/**
|
|
101
|
+
* ApplicationIntegrationsApi - axios parameter creator
|
|
102
|
+
*/
|
|
103
|
+
const ApplicationIntegrationsApiAxiosParamCreator = function(configuration) {
|
|
104
|
+
return {
|
|
105
|
+
/**
|
|
106
|
+
* 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).
|
|
107
|
+
* @param {CreateNotificationRequest} body The request body for the `createNotification` operation.
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
createNotification: async (body, options = {}) => {
|
|
112
|
+
assertParamExists("createNotification", "body", body);
|
|
113
|
+
const localVarUrlObj = new URL(`/appIntegrations/2024-04-01/notifications`, DUMMY_BASE_URL);
|
|
114
|
+
let baseOptions;
|
|
115
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
116
|
+
const localVarRequestOptions = {
|
|
117
|
+
method: "POST",
|
|
118
|
+
...baseOptions,
|
|
119
|
+
...options
|
|
120
|
+
};
|
|
121
|
+
const localVarHeaderParameter = {};
|
|
122
|
+
const localVarQueryParameter = {};
|
|
123
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
124
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
125
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
126
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
127
|
+
localVarRequestOptions.headers = {
|
|
128
|
+
...localVarHeaderParameter,
|
|
129
|
+
...headersFromBaseOptions,
|
|
130
|
+
...options.headers
|
|
131
|
+
};
|
|
132
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
133
|
+
return {
|
|
134
|
+
url: toPathString(localVarUrlObj),
|
|
135
|
+
options: localVarRequestOptions
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* 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).
|
|
140
|
+
* @param {DeleteNotificationsRequest} body The request body for the `deleteNotifications` operation.
|
|
141
|
+
* @param {*} [options] Override http request option.
|
|
142
|
+
* @throws {RequiredError}
|
|
143
|
+
*/
|
|
144
|
+
deleteNotifications: async (body, options = {}) => {
|
|
145
|
+
assertParamExists("deleteNotifications", "body", body);
|
|
146
|
+
const localVarUrlObj = new URL(`/appIntegrations/2024-04-01/notifications/deletion`, DUMMY_BASE_URL);
|
|
147
|
+
let baseOptions;
|
|
148
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
149
|
+
const localVarRequestOptions = {
|
|
150
|
+
method: "POST",
|
|
151
|
+
...baseOptions,
|
|
152
|
+
...options
|
|
153
|
+
};
|
|
154
|
+
const localVarHeaderParameter = {};
|
|
155
|
+
const localVarQueryParameter = {};
|
|
156
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
157
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
158
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
159
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
160
|
+
localVarRequestOptions.headers = {
|
|
161
|
+
...localVarHeaderParameter,
|
|
162
|
+
...headersFromBaseOptions,
|
|
163
|
+
...options.headers
|
|
164
|
+
};
|
|
165
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
166
|
+
return {
|
|
167
|
+
url: toPathString(localVarUrlObj),
|
|
168
|
+
options: localVarRequestOptions
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* 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).
|
|
173
|
+
* @param {string} notificationId A `notificationId` uniquely identifies a notification.
|
|
174
|
+
* @param {RecordActionFeedbackRequest} body The request body for the `recordActionFeedback` operation.
|
|
175
|
+
* @param {*} [options] Override http request option.
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
*/
|
|
178
|
+
recordActionFeedback: async (notificationId, body, options = {}) => {
|
|
179
|
+
assertParamExists("recordActionFeedback", "notificationId", notificationId);
|
|
180
|
+
assertParamExists("recordActionFeedback", "body", body);
|
|
181
|
+
const localVarPath = `/appIntegrations/2024-04-01/notifications/{notificationId}/feedback`.replace("{notificationId}", encodeURIComponent(String(notificationId)));
|
|
182
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
183
|
+
let baseOptions;
|
|
184
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
185
|
+
const localVarRequestOptions = {
|
|
186
|
+
method: "POST",
|
|
187
|
+
...baseOptions,
|
|
188
|
+
...options
|
|
189
|
+
};
|
|
190
|
+
const localVarHeaderParameter = {};
|
|
191
|
+
const localVarQueryParameter = {};
|
|
192
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
193
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
194
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = {
|
|
197
|
+
...localVarHeaderParameter,
|
|
198
|
+
...headersFromBaseOptions,
|
|
199
|
+
...options.headers
|
|
200
|
+
};
|
|
201
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
202
|
+
return {
|
|
203
|
+
url: toPathString(localVarUrlObj),
|
|
204
|
+
options: localVarRequestOptions
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
};
|
|
218
208
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
209
|
+
/**
|
|
210
|
+
* ApplicationIntegrationsApi - functional programming interface
|
|
211
|
+
*/
|
|
212
|
+
const ApplicationIntegrationsApiFp = function(configuration) {
|
|
213
|
+
const localVarAxiosParamCreator = ApplicationIntegrationsApiAxiosParamCreator(configuration);
|
|
214
|
+
return {
|
|
215
|
+
/**
|
|
216
|
+
* 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).
|
|
217
|
+
* @param {CreateNotificationRequest} body The request body for the `createNotification` operation.
|
|
218
|
+
* @param {*} [options] Override http request option.
|
|
219
|
+
* @throws {RequiredError}
|
|
220
|
+
*/
|
|
221
|
+
async createNotification(body, options) {
|
|
222
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createNotification(body, options);
|
|
223
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
224
|
+
const localVarOperationServerBasePath = operationServerMap["ApplicationIntegrationsApi.createNotification"]?.[localVarOperationServerIndex]?.url;
|
|
225
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || 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 {DeleteNotificationsRequest} body The request body for the `deleteNotifications` operation.
|
|
230
|
+
* @param {*} [options] Override http request option.
|
|
231
|
+
* @throws {RequiredError}
|
|
232
|
+
*/
|
|
233
|
+
async deleteNotifications(body, options) {
|
|
234
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNotifications(body, options);
|
|
235
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
236
|
+
const localVarOperationServerBasePath = operationServerMap["ApplicationIntegrationsApi.deleteNotifications"]?.[localVarOperationServerIndex]?.url;
|
|
237
|
+
return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* 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).
|
|
241
|
+
* @param {string} notificationId A `notificationId` uniquely identifies a notification.
|
|
242
|
+
* @param {RecordActionFeedbackRequest} body The request body for the `recordActionFeedback` operation.
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
*/
|
|
246
|
+
async recordActionFeedback(notificationId, body, options) {
|
|
247
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.recordActionFeedback(notificationId, body, options);
|
|
248
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
249
|
+
const localVarOperationServerBasePath = operationServerMap["ApplicationIntegrationsApi.recordActionFeedback"]?.[localVarOperationServerIndex]?.url;
|
|
250
|
+
return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
260
253
|
};
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
254
|
+
/**
|
|
255
|
+
* ApplicationIntegrationsApi - factory interface
|
|
256
|
+
*/
|
|
257
|
+
const ApplicationIntegrationsApiFactory = function(configuration, basePath, axios$4) {
|
|
258
|
+
const localVarFp = ApplicationIntegrationsApiFp(configuration);
|
|
259
|
+
return {
|
|
260
|
+
/**
|
|
261
|
+
* 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).
|
|
262
|
+
* @param {ApplicationIntegrationsApiCreateNotificationRequest} requestParameters Request parameters.
|
|
263
|
+
* @param {*} [options] Override http request option.
|
|
264
|
+
* @throws {RequiredError}
|
|
265
|
+
*/
|
|
266
|
+
createNotification(requestParameters, options) {
|
|
267
|
+
return localVarFp.createNotification(requestParameters.body, options).then((request) => request(axios$4, basePath));
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* 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).
|
|
271
|
+
* @param {ApplicationIntegrationsApiDeleteNotificationsRequest} requestParameters Request parameters.
|
|
272
|
+
* @param {*} [options] Override http request option.
|
|
273
|
+
* @throws {RequiredError}
|
|
274
|
+
*/
|
|
275
|
+
deleteNotifications(requestParameters, options) {
|
|
276
|
+
return localVarFp.deleteNotifications(requestParameters.body, options).then((request) => request(axios$4, basePath));
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* 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).
|
|
280
|
+
* @param {ApplicationIntegrationsApiRecordActionFeedbackRequest} requestParameters Request parameters.
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
recordActionFeedback(requestParameters, options) {
|
|
285
|
+
return localVarFp.recordActionFeedback(requestParameters.notificationId, requestParameters.body, options).then((request) => request(axios$4, basePath));
|
|
286
|
+
}
|
|
287
|
+
};
|
|
292
288
|
};
|
|
289
|
+
/**
|
|
290
|
+
* ApplicationIntegrationsApi - object-oriented interface
|
|
291
|
+
*/
|
|
293
292
|
var ApplicationIntegrationsApi = class extends BaseAPI {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
293
|
+
/**
|
|
294
|
+
* 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).
|
|
295
|
+
* @param {ApplicationIntegrationsApiCreateNotificationRequest} requestParameters Request parameters.
|
|
296
|
+
* @param {*} [options] Override http request option.
|
|
297
|
+
* @throws {RequiredError}
|
|
298
|
+
*/
|
|
299
|
+
createNotification(requestParameters, options) {
|
|
300
|
+
return ApplicationIntegrationsApiFp(this.configuration).createNotification(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* 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).
|
|
304
|
+
* @param {ApplicationIntegrationsApiDeleteNotificationsRequest} requestParameters Request parameters.
|
|
305
|
+
* @param {*} [options] Override http request option.
|
|
306
|
+
* @throws {RequiredError}
|
|
307
|
+
*/
|
|
308
|
+
deleteNotifications(requestParameters, options) {
|
|
309
|
+
return ApplicationIntegrationsApiFp(this.configuration).deleteNotifications(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* 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).
|
|
313
|
+
* @param {ApplicationIntegrationsApiRecordActionFeedbackRequest} requestParameters Request parameters.
|
|
314
|
+
* @param {*} [options] Override http request option.
|
|
315
|
+
* @throws {RequiredError}
|
|
316
|
+
*/
|
|
317
|
+
recordActionFeedback(requestParameters, options) {
|
|
318
|
+
return ApplicationIntegrationsApiFp(this.configuration).recordActionFeedback(requestParameters.notificationId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
319
|
+
}
|
|
321
320
|
};
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region src/api-model/configuration.ts
|
|
324
323
|
var Configuration = class {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
403
|
-
return mime !== null && jsonMime.test(mime);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
// src/api-model/models/delete-notifications-request.ts
|
|
408
|
-
var DeleteNotificationsRequestDeletionReasonEnum = {
|
|
409
|
-
IncorrectContent: "INCORRECT_CONTENT",
|
|
410
|
-
IncorrectRecipient: "INCORRECT_RECIPIENT"
|
|
324
|
+
/**
|
|
325
|
+
* parameter for apiKey security
|
|
326
|
+
* @param name security name
|
|
327
|
+
*/
|
|
328
|
+
apiKey;
|
|
329
|
+
/**
|
|
330
|
+
* parameter for basic security
|
|
331
|
+
*/
|
|
332
|
+
username;
|
|
333
|
+
/**
|
|
334
|
+
* parameter for basic security
|
|
335
|
+
*/
|
|
336
|
+
password;
|
|
337
|
+
/**
|
|
338
|
+
* parameter for oauth2 security
|
|
339
|
+
* @param name security name
|
|
340
|
+
* @param scopes oauth2 scope
|
|
341
|
+
*/
|
|
342
|
+
accessToken;
|
|
343
|
+
/**
|
|
344
|
+
* parameter for aws4 signature security
|
|
345
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
346
|
+
* @param {string} options.region - aws region
|
|
347
|
+
* @param {string} options.service - name of the service.
|
|
348
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
349
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
350
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
351
|
+
* @memberof Configuration
|
|
352
|
+
*/
|
|
353
|
+
awsv4;
|
|
354
|
+
/**
|
|
355
|
+
* override base path
|
|
356
|
+
*/
|
|
357
|
+
basePath;
|
|
358
|
+
/**
|
|
359
|
+
* override server index
|
|
360
|
+
*/
|
|
361
|
+
serverIndex;
|
|
362
|
+
/**
|
|
363
|
+
* base options for axios calls
|
|
364
|
+
*/
|
|
365
|
+
baseOptions;
|
|
366
|
+
/**
|
|
367
|
+
* The FormData constructor that will be used to create multipart form data
|
|
368
|
+
* requests. You can inject this here so that execution environments that
|
|
369
|
+
* do not support the FormData class can still run the generated client.
|
|
370
|
+
*
|
|
371
|
+
* @type {new () => FormData}
|
|
372
|
+
*/
|
|
373
|
+
formDataCtor;
|
|
374
|
+
constructor(param = {}) {
|
|
375
|
+
this.apiKey = param.apiKey;
|
|
376
|
+
this.username = param.username;
|
|
377
|
+
this.password = param.password;
|
|
378
|
+
this.accessToken = param.accessToken;
|
|
379
|
+
this.awsv4 = param.awsv4;
|
|
380
|
+
this.basePath = param.basePath;
|
|
381
|
+
this.serverIndex = param.serverIndex;
|
|
382
|
+
this.baseOptions = {
|
|
383
|
+
...param.baseOptions,
|
|
384
|
+
headers: { ...param.baseOptions?.headers }
|
|
385
|
+
};
|
|
386
|
+
this.formDataCtor = param.formDataCtor;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Check if the given MIME is a JSON MIME.
|
|
390
|
+
* JSON MIME examples:
|
|
391
|
+
* application/json
|
|
392
|
+
* application/json; charset=UTF8
|
|
393
|
+
* APPLICATION/JSON
|
|
394
|
+
* application/vnd.company+json
|
|
395
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
396
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
397
|
+
*/
|
|
398
|
+
isJsonMime(mime) {
|
|
399
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
400
|
+
}
|
|
411
401
|
};
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/api-model/models/delete-notifications-request.ts
|
|
404
|
+
const DeleteNotificationsRequestDeletionReasonEnum = {
|
|
405
|
+
IncorrectContent: "INCORRECT_CONTENT",
|
|
406
|
+
IncorrectRecipient: "INCORRECT_RECIPIENT"
|
|
416
407
|
};
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region src/api-model/models/record-action-feedback-request.ts
|
|
410
|
+
const RecordActionFeedbackRequestFeedbackActionCodeEnum = { SellerActionCompleted: "SELLER_ACTION_COMPLETED" };
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/client.ts
|
|
413
|
+
const clientRateLimits = [
|
|
414
|
+
{
|
|
415
|
+
method: "post",
|
|
416
|
+
urlRegex: /^\/appIntegrations\/2024\u{2D}04\u{2D}01\/notifications$/v,
|
|
417
|
+
rate: 1,
|
|
418
|
+
burst: 5
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
method: "post",
|
|
422
|
+
urlRegex: /^\/appIntegrations\/2024\u{2D}04\u{2D}01\/notifications\/deletion$/v,
|
|
423
|
+
rate: 1,
|
|
424
|
+
burst: 5
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
method: "post",
|
|
428
|
+
urlRegex: /^\/appIntegrations\/2024\u{2D}04\u{2D}01\/notifications\/[^\/]*\/feedback$/v,
|
|
429
|
+
rate: 1,
|
|
430
|
+
burst: 5
|
|
431
|
+
}
|
|
441
432
|
];
|
|
442
433
|
var ApplicationIntegrationsApiClient = class extends ApplicationIntegrationsApi {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
434
|
+
constructor(configuration) {
|
|
435
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
436
|
+
super(new Configuration(), endpoint, axios);
|
|
437
|
+
}
|
|
447
438
|
};
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
});
|
|
439
|
+
//#endregion
|
|
440
|
+
exports.ApplicationIntegrationsApi = ApplicationIntegrationsApi;
|
|
441
|
+
exports.ApplicationIntegrationsApiAxiosParamCreator = ApplicationIntegrationsApiAxiosParamCreator;
|
|
442
|
+
exports.ApplicationIntegrationsApiClient = ApplicationIntegrationsApiClient;
|
|
443
|
+
exports.ApplicationIntegrationsApiFactory = ApplicationIntegrationsApiFactory;
|
|
444
|
+
exports.ApplicationIntegrationsApiFp = ApplicationIntegrationsApiFp;
|
|
445
|
+
exports.DeleteNotificationsRequestDeletionReasonEnum = DeleteNotificationsRequestDeletionReasonEnum;
|
|
446
|
+
exports.RecordActionFeedbackRequestFeedbackActionCodeEnum = RecordActionFeedbackRequestFeedbackActionCodeEnum;
|
|
447
|
+
exports.clientRateLimits = clientRateLimits;
|
|
448
|
+
|
|
459
449
|
//# sourceMappingURL=index.cjs.map
|