@sp-api-sdk/application-management-api-2023-11-30 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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/dist/cjs/index.js +18 -0
  4. package/dist/cjs/src/api-model/api/applications-api.js +113 -0
  5. package/dist/cjs/src/api-model/api.js +30 -0
  6. package/dist/cjs/src/api-model/base.js +66 -0
  7. package/dist/cjs/src/api-model/common.js +145 -0
  8. package/dist/cjs/src/api-model/configuration.js +91 -0
  9. package/dist/cjs/src/api-model/index.js +32 -0
  10. package/dist/cjs/src/api-model/models/error-list.js +15 -0
  11. package/dist/cjs/src/api-model/models/index.js +18 -0
  12. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  13. package/dist/cjs/src/client.js +21 -0
  14. package/dist/es/index.js +2 -0
  15. package/dist/es/src/api-model/api/applications-api.js +103 -0
  16. package/dist/es/src/api-model/api.js +14 -0
  17. package/dist/es/src/api-model/base.js +58 -0
  18. package/dist/es/src/api-model/common.js +133 -0
  19. package/dist/es/src/api-model/configuration.js +87 -0
  20. package/dist/es/src/api-model/index.js +16 -0
  21. package/dist/es/src/api-model/models/error-list.js +14 -0
  22. package/dist/es/src/api-model/models/index.js +2 -0
  23. package/dist/es/src/api-model/models/model-error.js +14 -0
  24. package/dist/es/src/client.js +17 -0
  25. package/dist/types/index.d.ts +2 -0
  26. package/dist/types/src/api-model/api/applications-api.d.ts +66 -0
  27. package/dist/types/src/api-model/api.d.ts +12 -0
  28. package/dist/types/src/api-model/base.d.ts +54 -0
  29. package/dist/types/src/api-model/common.d.ts +66 -0
  30. package/dist/types/src/api-model/configuration.d.ts +83 -0
  31. package/dist/types/src/api-model/index.d.ts +14 -0
  32. package/dist/types/src/api-model/models/error-list.d.ts +24 -0
  33. package/dist/types/src/api-model/models/index.d.ts +2 -0
  34. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  35. package/dist/types/src/client.d.ts +6 -0
  36. 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-management-api-2023-11-30`
2
+
3
+ The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
4
+
5
+ [![npm version](https://badgen.net/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)
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_management_api_2023_11_30.html) for this API client.
13
+
14
+ ## Installing
15
+
16
+ ```sh
17
+ npm install @sp-api-sdk/application-management-api-2023-11-30
18
+ ```
19
+
20
+ ## Getting Started
21
+
22
+ ```javascript
23
+ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
24
+ import {ApplicationManagementApiClient} from '@sp-api-sdk/application-management-api-2023-11-30'
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 ApplicationManagementApiClient({
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 ApplicationManagementApiClient({
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 ApplicationManagementApiClient({
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,18 @@
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/models"), exports);
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ 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.ApplicationsApi = exports.ApplicationsApiFactory = exports.ApplicationsApiFp = exports.ApplicationsApiAxiosParamCreator = 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
+ * ApplicationsApi - axios parameter creator
28
+ * @export
29
+ */
30
+ const ApplicationsApiAxiosParamCreator = function (configuration) {
31
+ return {
32
+ /**
33
+ * 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/docs/application-management-api-v2023-11-30-use-case-guide). **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).
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ */
37
+ rotateApplicationClientSecret: async (options = {}) => {
38
+ const localVarPath = `/applications/2023-11-30/clientSecret`;
39
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
40
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
41
+ let baseOptions;
42
+ if (configuration) {
43
+ baseOptions = configuration.baseOptions;
44
+ }
45
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
46
+ const localVarHeaderParameter = {};
47
+ const localVarQueryParameter = {};
48
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
49
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
50
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
51
+ return {
52
+ url: (0, common_1.toPathString)(localVarUrlObj),
53
+ options: localVarRequestOptions,
54
+ };
55
+ },
56
+ };
57
+ };
58
+ exports.ApplicationsApiAxiosParamCreator = ApplicationsApiAxiosParamCreator;
59
+ /**
60
+ * ApplicationsApi - functional programming interface
61
+ * @export
62
+ */
63
+ const ApplicationsApiFp = function (configuration) {
64
+ const localVarAxiosParamCreator = (0, exports.ApplicationsApiAxiosParamCreator)(configuration);
65
+ return {
66
+ /**
67
+ * 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/docs/application-management-api-v2023-11-30-use-case-guide). **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).
68
+ * @param {*} [options] Override http request option.
69
+ * @throws {RequiredError}
70
+ */
71
+ async rotateApplicationClientSecret(options) {
72
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options);
73
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
74
+ },
75
+ };
76
+ };
77
+ exports.ApplicationsApiFp = ApplicationsApiFp;
78
+ /**
79
+ * ApplicationsApi - factory interface
80
+ * @export
81
+ */
82
+ const ApplicationsApiFactory = function (configuration, basePath, axios) {
83
+ const localVarFp = (0, exports.ApplicationsApiFp)(configuration);
84
+ return {
85
+ /**
86
+ * 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/docs/application-management-api-v2023-11-30-use-case-guide). **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).
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ rotateApplicationClientSecret(options) {
91
+ return localVarFp.rotateApplicationClientSecret(options).then((request) => request(axios, basePath));
92
+ },
93
+ };
94
+ };
95
+ exports.ApplicationsApiFactory = ApplicationsApiFactory;
96
+ /**
97
+ * ApplicationsApi - object-oriented interface
98
+ * @export
99
+ * @class ApplicationsApi
100
+ * @extends {BaseAPI}
101
+ */
102
+ class ApplicationsApi extends base_1.BaseAPI {
103
+ /**
104
+ * 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/docs/application-management-api-v2023-11-30-use-case-guide). **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).
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ * @memberof ApplicationsApi
108
+ */
109
+ rotateApplicationClientSecret(options) {
110
+ return (0, exports.ApplicationsApiFp)(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath));
111
+ }
112
+ }
113
+ exports.ApplicationsApi = ApplicationsApi;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ 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/applications-api"), exports);
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ 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.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 || this.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;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ 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: (configuration?.basePath || basePath) + axiosArgs.url };
142
+ return axios.request(axiosRequestArgs);
143
+ };
144
+ };
145
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ /**
19
+ * parameter for apiKey security
20
+ * @param name security name
21
+ * @memberof Configuration
22
+ */
23
+ apiKey;
24
+ /**
25
+ * parameter for basic security
26
+ *
27
+ * @type {string}
28
+ * @memberof Configuration
29
+ */
30
+ username;
31
+ /**
32
+ * parameter for basic security
33
+ *
34
+ * @type {string}
35
+ * @memberof Configuration
36
+ */
37
+ password;
38
+ /**
39
+ * parameter for oauth2 security
40
+ * @param name security name
41
+ * @param scopes oauth2 scope
42
+ * @memberof Configuration
43
+ */
44
+ accessToken;
45
+ /**
46
+ * override base path
47
+ *
48
+ * @type {string}
49
+ * @memberof Configuration
50
+ */
51
+ basePath;
52
+ /**
53
+ * base options for axios calls
54
+ *
55
+ * @type {any}
56
+ * @memberof Configuration
57
+ */
58
+ baseOptions;
59
+ /**
60
+ * The FormData constructor that will be used to create multipart form data
61
+ * requests. You can inject this here so that execution environments that
62
+ * do not support the FormData class can still run the generated client.
63
+ *
64
+ * @type {new () => FormData}
65
+ */
66
+ formDataCtor;
67
+ constructor(param = {}) {
68
+ this.apiKey = param.apiKey;
69
+ this.username = param.username;
70
+ this.password = param.password;
71
+ this.accessToken = param.accessToken;
72
+ this.basePath = param.basePath;
73
+ this.baseOptions = param.baseOptions;
74
+ this.formDataCtor = param.formDataCtor;
75
+ }
76
+ /**
77
+ * Check if the given MIME is a JSON MIME.
78
+ * JSON MIME examples:
79
+ * application/json
80
+ * application/json; charset=UTF8
81
+ * APPLICATION/JSON
82
+ * application/vnd.company+json
83
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
84
+ * @return True if the given MIME is JSON, false otherwise.
85
+ */
86
+ isJsonMime(mime) {
87
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
88
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
89
+ }
90
+ }
91
+ exports.Configuration = Configuration;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ 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"), exports);
31
+ __exportStar(require("./configuration"), exports);
32
+ __exportStar(require("./models"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
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("./error-list"), exports);
18
+ __exportStar(require("./model-error"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
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
+ Object.defineProperty(exports, "__esModule", { value: true });