@sp-api-sdk/application-management-api-2023-11-30 3.0.17 → 4.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 (41) hide show
  1. package/README.md +7 -8
  2. package/dist/index.cjs +256 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +219 -0
  5. package/dist/index.d.ts +219 -0
  6. package/dist/index.js +227 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +26 -12
  9. package/dist/cjs/api-model/api/application-management-api.js +0 -109
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/error-list.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -18
  17. package/dist/cjs/api-model/models/model-error.js +0 -15
  18. package/dist/cjs/client.js +0 -21
  19. package/dist/cjs/index.js +0 -18
  20. package/dist/es/api-model/api/application-management-api.js +0 -99
  21. package/dist/es/api-model/api.js +0 -14
  22. package/dist/es/api-model/base.js +0 -44
  23. package/dist/es/api-model/common.js +0 -110
  24. package/dist/es/api-model/configuration.js +0 -94
  25. package/dist/es/api-model/index.js +0 -16
  26. package/dist/es/api-model/models/error-list.js +0 -14
  27. package/dist/es/api-model/models/index.js +0 -2
  28. package/dist/es/api-model/models/model-error.js +0 -14
  29. package/dist/es/client.js +0 -17
  30. package/dist/es/index.js +0 -2
  31. package/dist/types/api-model/api/application-management-api.d.ts +0 -59
  32. package/dist/types/api-model/api.d.ts +0 -12
  33. package/dist/types/api-model/base.d.ts +0 -42
  34. package/dist/types/api-model/common.d.ts +0 -34
  35. package/dist/types/api-model/configuration.d.ts +0 -98
  36. package/dist/types/api-model/index.d.ts +0 -14
  37. package/dist/types/api-model/models/error-list.d.ts +0 -20
  38. package/dist/types/api-model/models/index.d.ts +0 -2
  39. package/dist/types/api-model/models/model-error.d.ts +0 -28
  40. package/dist/types/client.d.ts +0 -6
  41. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `application-management-api-2023-11-30`
1
+ # `@sp-api-sdk/application-management-api-2023-11-30`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@sp-api-sdk/application-management-api-2023-11-30)](https://www.npmjs.com/package/@sp-api-sdk/application-management-api-2023-11-30)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/application-management-api-2023-11-30
25
25
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
26
26
  import {ApplicationManagementApiClient} from '@sp-api-sdk/application-management-api-2023-11-30'
27
27
 
28
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
29
+ // `LWA_CLIENT_SECRET` environment variables.
28
30
  const auth = new SellingPartnerApiAuth({
29
- clientId: process.env.LWA_CLIENT_ID,
30
- clientSecret: process.env.LWA_CLIENT_SECRET,
31
- refreshToken: 'Atzr|…',
31
+ refreshToken: await getRefreshTokenForSeller(sellerId),
32
32
  })
33
33
 
34
34
  const client = new ApplicationManagementApiClient({
@@ -67,10 +67,10 @@ const client = new ApplicationManagementApiClient({
67
67
  region: 'eu',
68
68
  logging: {
69
69
  request: {
70
- logger: console.debug
70
+ logger: console.debug,
71
71
  },
72
72
  response: {
73
- logger: console.debug
73
+ logger: console.debug,
74
74
  },
75
75
  error: true,
76
76
  },
@@ -81,14 +81,13 @@ Specifying `true` will use the default options, specifying an object will allow
81
81
  This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
82
82
  By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
83
83
 
84
-
85
84
  ## License
86
85
 
87
86
  MIT
88
87
 
89
88
  ## Miscellaneous
90
89
 
91
- ```
90
+ ```text
92
91
  ╚⊙ ⊙╝
93
92
  ╚═(███)═╝
94
93
  ╚═(███)═╝
package/dist/index.cjs ADDED
@@ -0,0 +1,256 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
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;
18
+ };
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(/\/+$/, "");
29
+ var BaseAPI = class {
30
+ basePath;
31
+ axios;
32
+ configuration;
33
+ constructor(configuration, basePath = BASE_PATH, axios$3 = axios.default) {
34
+ this.basePath = basePath;
35
+ this.axios = axios$3;
36
+ if (configuration) {
37
+ this.configuration = configuration;
38
+ this.basePath = configuration.basePath ?? basePath;
39
+ }
40
+ }
41
+ };
42
+ const operationServerMap = {};
43
+ //#endregion
44
+ //#region src/api-model/common.ts
45
+ const DUMMY_BASE_URL = "https://example.com";
46
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
47
+ if (parameter == null) return;
48
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
49
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
50
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
51
+ else urlSearchParams.set(key, parameter);
52
+ }
53
+ const setSearchParams = function(url, ...objects) {
54
+ const searchParams = new URLSearchParams(url.search);
55
+ setFlattenedQueryParams(searchParams, objects);
56
+ url.search = searchParams.toString();
57
+ };
58
+ const toPathString = function(url) {
59
+ return url.pathname + url.search + url.hash;
60
+ };
61
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
62
+ return (axios = globalAxios, basePath = BASE_PATH) => {
63
+ const axiosRequestArgs = {
64
+ ...axiosArgs.options,
65
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
66
+ };
67
+ return axios.request(axiosRequestArgs);
68
+ };
69
+ };
70
+ //#endregion
71
+ //#region src/api-model/api/application-management-api.ts
72
+ /**
73
+ * ApplicationManagementApi - axios parameter creator
74
+ */
75
+ const ApplicationManagementApiAxiosParamCreator = function(configuration) {
76
+ return {
77
+ /**
78
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
79
+ * @param {*} [options] Override http request option.
80
+ * @throws {RequiredError}
81
+ */
82
+ rotateApplicationClientSecret: async (options = {}) => {
83
+ const localVarUrlObj = new URL(`/applications/2023-11-30/clientSecret`, DUMMY_BASE_URL);
84
+ let baseOptions;
85
+ if (configuration) baseOptions = configuration.baseOptions;
86
+ const localVarRequestOptions = {
87
+ method: "POST",
88
+ ...baseOptions,
89
+ ...options
90
+ };
91
+ const localVarHeaderParameter = {};
92
+ const localVarQueryParameter = {};
93
+ localVarHeaderParameter["Accept"] = "application/json";
94
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = {
97
+ ...localVarHeaderParameter,
98
+ ...headersFromBaseOptions,
99
+ ...options.headers
100
+ };
101
+ return {
102
+ url: toPathString(localVarUrlObj),
103
+ options: localVarRequestOptions
104
+ };
105
+ } };
106
+ };
107
+ /**
108
+ * ApplicationManagementApi - functional programming interface
109
+ */
110
+ const ApplicationManagementApiFp = function(configuration) {
111
+ const localVarAxiosParamCreator = ApplicationManagementApiAxiosParamCreator(configuration);
112
+ return {
113
+ /**
114
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ async rotateApplicationClientSecret(options) {
119
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options);
120
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
121
+ const localVarOperationServerBasePath = operationServerMap["ApplicationManagementApi.rotateApplicationClientSecret"]?.[localVarOperationServerIndex]?.url;
122
+ return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
123
+ } };
124
+ };
125
+ /**
126
+ * ApplicationManagementApi - factory interface
127
+ */
128
+ const ApplicationManagementApiFactory = function(configuration, basePath, axios$2) {
129
+ const localVarFp = ApplicationManagementApiFp(configuration);
130
+ return {
131
+ /**
132
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
133
+ * @param {*} [options] Override http request option.
134
+ * @throws {RequiredError}
135
+ */
136
+ rotateApplicationClientSecret(options) {
137
+ return localVarFp.rotateApplicationClientSecret(options).then((request) => request(axios$2, basePath));
138
+ } };
139
+ };
140
+ /**
141
+ * ApplicationManagementApi - object-oriented interface
142
+ */
143
+ var ApplicationManagementApi = class extends BaseAPI {
144
+ /**
145
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ rotateApplicationClientSecret(options) {
150
+ return ApplicationManagementApiFp(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath));
151
+ }
152
+ };
153
+ //#endregion
154
+ //#region src/api-model/configuration.ts
155
+ var Configuration = class {
156
+ /**
157
+ * parameter for apiKey security
158
+ * @param name security name
159
+ */
160
+ apiKey;
161
+ /**
162
+ * parameter for basic security
163
+ */
164
+ username;
165
+ /**
166
+ * parameter for basic security
167
+ */
168
+ password;
169
+ /**
170
+ * parameter for oauth2 security
171
+ * @param name security name
172
+ * @param scopes oauth2 scope
173
+ */
174
+ accessToken;
175
+ /**
176
+ * parameter for aws4 signature security
177
+ * @param {Object} AWS4Signature - AWS4 Signature security
178
+ * @param {string} options.region - aws region
179
+ * @param {string} options.service - name of the service.
180
+ * @param {string} credentials.accessKeyId - aws access key id
181
+ * @param {string} credentials.secretAccessKey - aws access key
182
+ * @param {string} credentials.sessionToken - aws session token
183
+ * @memberof Configuration
184
+ */
185
+ awsv4;
186
+ /**
187
+ * override base path
188
+ */
189
+ basePath;
190
+ /**
191
+ * override server index
192
+ */
193
+ serverIndex;
194
+ /**
195
+ * base options for axios calls
196
+ */
197
+ baseOptions;
198
+ /**
199
+ * The FormData constructor that will be used to create multipart form data
200
+ * requests. You can inject this here so that execution environments that
201
+ * do not support the FormData class can still run the generated client.
202
+ *
203
+ * @type {new () => FormData}
204
+ */
205
+ formDataCtor;
206
+ constructor(param = {}) {
207
+ this.apiKey = param.apiKey;
208
+ this.username = param.username;
209
+ this.password = param.password;
210
+ this.accessToken = param.accessToken;
211
+ this.awsv4 = param.awsv4;
212
+ this.basePath = param.basePath;
213
+ this.serverIndex = param.serverIndex;
214
+ this.baseOptions = {
215
+ ...param.baseOptions,
216
+ headers: { ...param.baseOptions?.headers }
217
+ };
218
+ this.formDataCtor = param.formDataCtor;
219
+ }
220
+ /**
221
+ * Check if the given MIME is a JSON MIME.
222
+ * JSON MIME examples:
223
+ * application/json
224
+ * application/json; charset=UTF8
225
+ * APPLICATION/JSON
226
+ * application/vnd.company+json
227
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
228
+ * @return True if the given MIME is JSON, false otherwise.
229
+ */
230
+ isJsonMime(mime) {
231
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
232
+ }
233
+ };
234
+ //#endregion
235
+ //#region src/client.ts
236
+ const clientRateLimits = [{
237
+ method: "post",
238
+ urlRegex: /^\/applications\/2023\u{2D}11\u{2D}30\/clientSecret$/v,
239
+ rate: .0167,
240
+ burst: 1
241
+ }];
242
+ var ApplicationManagementApiClient = class extends ApplicationManagementApi {
243
+ constructor(configuration) {
244
+ const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
245
+ super(new Configuration(), endpoint, axios);
246
+ }
247
+ };
248
+ //#endregion
249
+ exports.ApplicationManagementApi = ApplicationManagementApi;
250
+ exports.ApplicationManagementApiAxiosParamCreator = ApplicationManagementApiAxiosParamCreator;
251
+ exports.ApplicationManagementApiClient = ApplicationManagementApiClient;
252
+ exports.ApplicationManagementApiFactory = ApplicationManagementApiFactory;
253
+ exports.ApplicationManagementApiFp = ApplicationManagementApiFp;
254
+ exports.clientRateLimits = clientRateLimits;
255
+
256
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["axios","globalAxios","globalAxios","axios"],"sources":["../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/api/application-management-api.ts","../src/api-model/configuration.ts","../src/client.ts"],"sourcesContent":["/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Application Management\n * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.\n *\n * The version of the OpenAPI document: 2023-11-30\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration.js';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"https://sellingpartnerapi-na.amazon.com\".replace(/\\/+$/, \"\");\n\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\nexport const operationServerMap: ServerMap = {\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Application Management\n * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.\n *\n * The version of the OpenAPI document: 2023-11-30\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport type { Configuration } from \"./configuration.js\";\nimport type { RequestArgs } from \"./base.js\";\nimport type { AxiosInstance, AxiosResponse } from 'axios';\nimport { RequiredError } from \"./base.js\";\n\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n\nfunction setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = \"\"): void {\n if (parameter == null) return;\n if (typeof parameter === \"object\") {\n if (Array.isArray(parameter) || parameter instanceof Set) {\n (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n }\n else {\n Object.keys(parameter).forEach(currentKey =>\n setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)\n );\n }\n }\n else {\n if (urlSearchParams.has(key)) {\n urlSearchParams.append(key, parameter);\n }\n else {\n urlSearchParams.set(key, parameter);\n }\n }\n}\n\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n setFlattenedQueryParams(searchParams, objects);\n url.search = searchParams.toString();\n}\n\n/**\n * JSON serialization helper function which replaces instances of unserializable types with serializable ones.\n * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.\n * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.\n */\n// @ts-ignore\nexport const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {\n if (value instanceof Set) {\n return Array.from(value);\n } else {\n return value;\n }\n}\n\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)\n : (value || \"\");\n}\n\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Application Management\n * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.\n *\n * The version of the OpenAPI document: 2023-11-30\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from '../configuration.js';\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common.js';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';\n// @ts-ignore\nimport type { ErrorList } from '../models/index.js';\n/**\n * ApplicationManagementApi - axios parameter creator\n */\nexport const ApplicationManagementApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n rotateApplicationClientSecret: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n const localVarPath = `/applications/2023-11-30/clientSecret`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n localVarHeaderParameter['Accept'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * ApplicationManagementApi - functional programming interface\n */\nexport const ApplicationManagementApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = ApplicationManagementApiAxiosParamCreator(configuration)\n return {\n /**\n * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async rotateApplicationClientSecret(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['ApplicationManagementApi.rotateApplicationClientSecret']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n }\n};\n\n/**\n * ApplicationManagementApi - factory interface\n */\nexport const ApplicationManagementApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = ApplicationManagementApiFp(configuration)\n return {\n /**\n * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n rotateApplicationClientSecret(options?: RawAxiosRequestConfig): AxiosPromise<void> {\n return localVarFp.rotateApplicationClientSecret(options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * ApplicationManagementApi - object-oriented interface\n */\nexport class ApplicationManagementApi extends BaseAPI {\n /**\n * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public rotateApplicationClientSecret(options?: RawAxiosRequestConfig) {\n return ApplicationManagementApiFp(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath));\n }\n}\n\n","/* tslint:disable */\n/**\n * Selling Partner API for Application Management\n * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.\n *\n * The version of the OpenAPI document: 2023-11-30\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\ninterface AWSv4Configuration {\n options?: {\n region?: string\n service?: string\n }\n credentials?: {\n accessKeyId?: string\n secretAccessKey?: string,\n sessionToken?: string\n }\n}\n\nexport interface ConfigurationParameters {\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n username?: string;\n password?: string;\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n awsv4?: AWSv4Configuration;\n basePath?: string;\n serverIndex?: number;\n baseOptions?: any;\n formDataCtor?: new () => any;\n}\n\nexport class Configuration {\n /**\n * parameter for apiKey security\n * @param name security name\n */\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n /**\n * parameter for basic security\n */\n username?: string;\n /**\n * parameter for basic security\n */\n password?: string;\n /**\n * parameter for oauth2 security\n * @param name security name\n * @param scopes oauth2 scope\n */\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n /**\n * parameter for aws4 signature security\n * @param {Object} AWS4Signature - AWS4 Signature security\n * @param {string} options.region - aws region\n * @param {string} options.service - name of the service.\n * @param {string} credentials.accessKeyId - aws access key id\n * @param {string} credentials.secretAccessKey - aws access key\n * @param {string} credentials.sessionToken - aws session token\n * @memberof Configuration\n */\n awsv4?: AWSv4Configuration;\n /**\n * override base path\n */\n basePath?: string;\n /**\n * override server index\n */\n serverIndex?: number;\n /**\n * base options for axios calls\n */\n baseOptions?: any;\n /**\n * The FormData constructor that will be used to create multipart form data\n * requests. You can inject this here so that execution environments that\n * do not support the FormData class can still run the generated client.\n *\n * @type {new () => FormData}\n */\n formDataCtor?: new () => any;\n\n constructor(param: ConfigurationParameters = {}) {\n this.apiKey = param.apiKey;\n this.username = param.username;\n this.password = param.password;\n this.accessToken = param.accessToken;\n this.awsv4 = param.awsv4;\n this.basePath = param.basePath;\n this.serverIndex = param.serverIndex;\n this.baseOptions = {\n ...param.baseOptions,\n headers: {\n ...param.baseOptions?.headers,\n },\n };\n this.formDataCtor = param.formDataCtor;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = /^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$/i;\n return mime !== null && jsonMime.test(mime);\n }\n}\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {ApplicationManagementApi, Configuration} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'post',\n urlRegex: /^\\/applications\\/2023\\u{2D}11\\u{2D}30\\/clientSecret$/v,\n rate: 0.0167,\n burst: 1,\n },\n]\n\nexport class ApplicationManagementApiClient extends ApplicationManagementApi {\n constructor(configuration: ClientConfiguration) {\n const {axios, endpoint} = createAxiosInstance(configuration, clientRateLimits)\n\n super(new Configuration(), endpoint, axios)\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,219 @@
1
+ import { ClientConfiguration, RateLimit } from "@sp-api-sdk/common";
2
+ import { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from "axios";
3
+ //#region src/api-model/configuration.d.ts
4
+ /**
5
+ * Selling Partner API for Application Management
6
+ * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
7
+ *
8
+ * The version of the OpenAPI document: 2023-11-30
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
+ interface AWSv4Configuration {
16
+ options?: {
17
+ region?: string;
18
+ service?: string;
19
+ };
20
+ credentials?: {
21
+ accessKeyId?: string;
22
+ secretAccessKey?: string;
23
+ sessionToken?: string;
24
+ };
25
+ }
26
+ interface ConfigurationParameters {
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ username?: string;
29
+ password?: string;
30
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
31
+ awsv4?: AWSv4Configuration;
32
+ basePath?: string;
33
+ serverIndex?: number;
34
+ baseOptions?: any;
35
+ formDataCtor?: new () => any;
36
+ }
37
+ declare class Configuration {
38
+ /**
39
+ * parameter for apiKey security
40
+ * @param name security name
41
+ */
42
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
43
+ /**
44
+ * parameter for basic security
45
+ */
46
+ username?: string;
47
+ /**
48
+ * parameter for basic security
49
+ */
50
+ password?: string;
51
+ /**
52
+ * parameter for oauth2 security
53
+ * @param name security name
54
+ * @param scopes oauth2 scope
55
+ */
56
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
57
+ /**
58
+ * parameter for aws4 signature security
59
+ * @param {Object} AWS4Signature - AWS4 Signature security
60
+ * @param {string} options.region - aws region
61
+ * @param {string} options.service - name of the service.
62
+ * @param {string} credentials.accessKeyId - aws access key id
63
+ * @param {string} credentials.secretAccessKey - aws access key
64
+ * @param {string} credentials.sessionToken - aws session token
65
+ * @memberof Configuration
66
+ */
67
+ awsv4?: AWSv4Configuration;
68
+ /**
69
+ * override base path
70
+ */
71
+ basePath?: string;
72
+ /**
73
+ * override server index
74
+ */
75
+ serverIndex?: number;
76
+ /**
77
+ * base options for axios calls
78
+ */
79
+ baseOptions?: any;
80
+ /**
81
+ * The FormData constructor that will be used to create multipart form data
82
+ * requests. You can inject this here so that execution environments that
83
+ * do not support the FormData class can still run the generated client.
84
+ *
85
+ * @type {new () => FormData}
86
+ */
87
+ formDataCtor?: new () => any;
88
+ constructor(param?: ConfigurationParameters);
89
+ /**
90
+ * Check if the given MIME is a JSON MIME.
91
+ * JSON MIME examples:
92
+ * application/json
93
+ * application/json; charset=UTF8
94
+ * APPLICATION/JSON
95
+ * application/vnd.company+json
96
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
97
+ * @return True if the given MIME is JSON, false otherwise.
98
+ */
99
+ isJsonMime(mime: string): boolean;
100
+ }
101
+ //#endregion
102
+ //#region src/api-model/base.d.ts
103
+ interface RequestArgs {
104
+ url: string;
105
+ options: RawAxiosRequestConfig;
106
+ }
107
+ declare class BaseAPI {
108
+ protected basePath: string;
109
+ protected axios: AxiosInstance;
110
+ protected configuration: Configuration | undefined;
111
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
112
+ }
113
+ //#endregion
114
+ //#region src/api-model/api/application-management-api.d.ts
115
+ /**
116
+ * ApplicationManagementApi - axios parameter creator
117
+ */
118
+ declare const ApplicationManagementApiAxiosParamCreator: (configuration?: Configuration) => {
119
+ /**
120
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ rotateApplicationClientSecret: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
125
+ };
126
+ /**
127
+ * ApplicationManagementApi - functional programming interface
128
+ */
129
+ declare const ApplicationManagementApiFp: (configuration?: Configuration) => {
130
+ /**
131
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ rotateApplicationClientSecret(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
136
+ };
137
+ /**
138
+ * ApplicationManagementApi - factory interface
139
+ */
140
+ declare const ApplicationManagementApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
141
+ /**
142
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ rotateApplicationClientSecret(options?: RawAxiosRequestConfig): AxiosPromise<void>;
147
+ };
148
+ /**
149
+ * ApplicationManagementApi - object-oriented interface
150
+ */
151
+ declare class ApplicationManagementApi extends BaseAPI {
152
+ /**
153
+ * Rotates application client secrets for a developer application. Developers must register a destination queue in the developer console before calling this operation. When this operation is called a new client secret is generated and sent to the developer-registered queue. For more information, refer to [Rotate your application client secret](https://developer-docs.amazon.com/sp-api/v0/docs/application-management-api-v2023-11-30-use-case-guide#tutorial-rotate-your-applications-client-secret). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | 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, 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).
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ rotateApplicationClientSecret(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
158
+ }
159
+ //#endregion
160
+ //#region src/api-model/models/error-list.d.ts
161
+ /**
162
+ * Selling Partner API for Application Management
163
+ * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
164
+ *
165
+ * The version of the OpenAPI document: 2023-11-30
166
+ *
167
+ *
168
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
169
+ * https://openapi-generator.tech
170
+ * Do not edit the class manually.
171
+ */
172
+ /**
173
+ * A list of error responses returned when a request is unsuccessful.
174
+ */
175
+ interface ErrorList {
176
+ /**
177
+ * array of errors
178
+ */
179
+ 'errors': Array<Error>;
180
+ }
181
+ //#endregion
182
+ //#region src/api-model/models/model-error.d.ts
183
+ /**
184
+ * Selling Partner API for Application Management
185
+ * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
186
+ *
187
+ * The version of the OpenAPI document: 2023-11-30
188
+ *
189
+ *
190
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
191
+ * https://openapi-generator.tech
192
+ * Do not edit the class manually.
193
+ */
194
+ /**
195
+ * Error response returned when the request is unsuccessful.
196
+ */
197
+ interface ModelError {
198
+ /**
199
+ * An error code that identifies the type of error that occurred.
200
+ */
201
+ 'code': string;
202
+ /**
203
+ * A message that describes the error condition.
204
+ */
205
+ 'message': string;
206
+ /**
207
+ * Additional details that can help the caller understand or fix the issue.
208
+ */
209
+ 'details'?: string;
210
+ }
211
+ //#endregion
212
+ //#region src/client.d.ts
213
+ declare const clientRateLimits: RateLimit[];
214
+ declare class ApplicationManagementApiClient extends ApplicationManagementApi {
215
+ constructor(configuration: ClientConfiguration);
216
+ }
217
+ //#endregion
218
+ export { ApplicationManagementApi, ApplicationManagementApiAxiosParamCreator, ApplicationManagementApiClient, ApplicationManagementApiFactory, ApplicationManagementApiFp, type ErrorList, type ModelError, clientRateLimits };
219
+ //# sourceMappingURL=index.d.cts.map