@sp-api-sdk/application-management-api-2023-11-30 3.0.17 → 4.0.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.
- package/README.md +4 -4
- package/dist/index.cjs +279 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +226 -0
- package/dist/index.d.ts +226 -0
- package/dist/index.js +237 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -12
- package/dist/cjs/api-model/api/application-management-api.js +0 -109
- package/dist/cjs/api-model/api.js +0 -30
- package/dist/cjs/api-model/base.js +0 -52
- package/dist/cjs/api-model/common.js +0 -123
- package/dist/cjs/api-model/configuration.js +0 -98
- package/dist/cjs/api-model/index.js +0 -32
- package/dist/cjs/api-model/models/error-list.js +0 -15
- package/dist/cjs/api-model/models/index.js +0 -18
- package/dist/cjs/api-model/models/model-error.js +0 -15
- package/dist/cjs/client.js +0 -21
- package/dist/cjs/index.js +0 -18
- package/dist/es/api-model/api/application-management-api.js +0 -99
- package/dist/es/api-model/api.js +0 -14
- package/dist/es/api-model/base.js +0 -44
- package/dist/es/api-model/common.js +0 -110
- package/dist/es/api-model/configuration.js +0 -94
- package/dist/es/api-model/index.js +0 -16
- package/dist/es/api-model/models/error-list.js +0 -14
- package/dist/es/api-model/models/index.js +0 -2
- package/dist/es/api-model/models/model-error.js +0 -14
- package/dist/es/client.js +0 -17
- package/dist/es/index.js +0 -2
- package/dist/types/api-model/api/application-management-api.d.ts +0 -59
- package/dist/types/api-model/api.d.ts +0 -12
- package/dist/types/api-model/base.d.ts +0 -42
- package/dist/types/api-model/common.d.ts +0 -34
- package/dist/types/api-model/configuration.d.ts +0 -98
- package/dist/types/api-model/index.d.ts +0 -14
- package/dist/types/api-model/models/error-list.d.ts +0 -20
- package/dist/types/api-model/models/index.d.ts +0 -2
- package/dist/types/api-model/models/model-error.d.ts +0 -28
- package/dist/types/client.d.ts +0 -6
- package/dist/types/index.d.ts +0 -3
|
@@ -1,109 +0,0 @@
|
|
|
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.ApplicationManagementApi = exports.ApplicationManagementApiFactory = exports.ApplicationManagementApiFp = exports.ApplicationManagementApiAxiosParamCreator = 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
|
-
* ApplicationManagementApi - axios parameter creator
|
|
28
|
-
*/
|
|
29
|
-
const ApplicationManagementApiAxiosParamCreator = function (configuration) {
|
|
30
|
-
return {
|
|
31
|
-
/**
|
|
32
|
-
* 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).
|
|
33
|
-
* @param {*} [options] Override http request option.
|
|
34
|
-
* @throws {RequiredError}
|
|
35
|
-
*/
|
|
36
|
-
rotateApplicationClientSecret: async (options = {}) => {
|
|
37
|
-
const localVarPath = `/applications/2023-11-30/clientSecret`;
|
|
38
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
39
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
40
|
-
let baseOptions;
|
|
41
|
-
if (configuration) {
|
|
42
|
-
baseOptions = configuration.baseOptions;
|
|
43
|
-
}
|
|
44
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
45
|
-
const localVarHeaderParameter = {};
|
|
46
|
-
const localVarQueryParameter = {};
|
|
47
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
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.ApplicationManagementApiAxiosParamCreator = ApplicationManagementApiAxiosParamCreator;
|
|
59
|
-
/**
|
|
60
|
-
* ApplicationManagementApi - functional programming interface
|
|
61
|
-
*/
|
|
62
|
-
const ApplicationManagementApiFp = function (configuration) {
|
|
63
|
-
const localVarAxiosParamCreator = (0, exports.ApplicationManagementApiAxiosParamCreator)(configuration);
|
|
64
|
-
return {
|
|
65
|
-
/**
|
|
66
|
-
* 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).
|
|
67
|
-
* @param {*} [options] Override http request option.
|
|
68
|
-
* @throws {RequiredError}
|
|
69
|
-
*/
|
|
70
|
-
async rotateApplicationClientSecret(options) {
|
|
71
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options);
|
|
72
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
73
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['ApplicationManagementApi.rotateApplicationClientSecret']?.[localVarOperationServerIndex]?.url;
|
|
74
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
exports.ApplicationManagementApiFp = ApplicationManagementApiFp;
|
|
79
|
-
/**
|
|
80
|
-
* ApplicationManagementApi - factory interface
|
|
81
|
-
*/
|
|
82
|
-
const ApplicationManagementApiFactory = function (configuration, basePath, axios) {
|
|
83
|
-
const localVarFp = (0, exports.ApplicationManagementApiFp)(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/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).
|
|
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.ApplicationManagementApiFactory = ApplicationManagementApiFactory;
|
|
96
|
-
/**
|
|
97
|
-
* ApplicationManagementApi - object-oriented interface
|
|
98
|
-
*/
|
|
99
|
-
class ApplicationManagementApi extends base_1.BaseAPI {
|
|
100
|
-
/**
|
|
101
|
-
* 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).
|
|
102
|
-
* @param {*} [options] Override http request option.
|
|
103
|
-
* @throws {RequiredError}
|
|
104
|
-
*/
|
|
105
|
-
rotateApplicationClientSecret(options) {
|
|
106
|
-
return (0, exports.ApplicationManagementApiFp)(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
exports.ApplicationManagementApi = ApplicationManagementApi;
|
|
@@ -1,30 +0,0 @@
|
|
|
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/application-management-api"), exports);
|
|
@@ -1,52 +0,0 @@
|
|
|
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.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
20
|
-
const axios_1 = __importDefault(require("axios"));
|
|
21
|
-
exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
22
|
-
exports.COLLECTION_FORMATS = {
|
|
23
|
-
csv: ",",
|
|
24
|
-
ssv: " ",
|
|
25
|
-
tsv: "\t",
|
|
26
|
-
pipes: "|",
|
|
27
|
-
};
|
|
28
|
-
class BaseAPI {
|
|
29
|
-
basePath;
|
|
30
|
-
axios;
|
|
31
|
-
configuration;
|
|
32
|
-
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
33
|
-
this.basePath = basePath;
|
|
34
|
-
this.axios = axios;
|
|
35
|
-
if (configuration) {
|
|
36
|
-
this.configuration = configuration;
|
|
37
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.BaseAPI = BaseAPI;
|
|
42
|
-
;
|
|
43
|
-
class RequiredError extends Error {
|
|
44
|
-
field;
|
|
45
|
-
constructor(field, msg) {
|
|
46
|
-
super(msg);
|
|
47
|
-
this.field = field;
|
|
48
|
-
this.name = "RequiredError";
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.RequiredError = RequiredError;
|
|
52
|
-
exports.operationServerMap = {};
|
|
@@ -1,123 +0,0 @@
|
|
|
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.replaceWithSerializableTypeIfNeeded = 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
|
-
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @throws {RequiredError}
|
|
22
|
-
*/
|
|
23
|
-
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
24
|
-
if (paramValue === null || paramValue === undefined) {
|
|
25
|
-
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.assertParamExists = assertParamExists;
|
|
29
|
-
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
30
|
-
if (configuration && configuration.apiKey) {
|
|
31
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
32
|
-
? await configuration.apiKey(keyParamName)
|
|
33
|
-
: await configuration.apiKey;
|
|
34
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
exports.setApiKeyToObject = setApiKeyToObject;
|
|
38
|
-
const setBasicAuthToObject = function (object, configuration) {
|
|
39
|
-
if (configuration && (configuration.username || configuration.password)) {
|
|
40
|
-
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
44
|
-
const setBearerAuthToObject = async function (object, configuration) {
|
|
45
|
-
if (configuration && configuration.accessToken) {
|
|
46
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
47
|
-
? await configuration.accessToken()
|
|
48
|
-
: await configuration.accessToken;
|
|
49
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
53
|
-
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
54
|
-
if (configuration && configuration.accessToken) {
|
|
55
|
-
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
56
|
-
? await configuration.accessToken(name, scopes)
|
|
57
|
-
: await configuration.accessToken;
|
|
58
|
-
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
exports.setOAuthToObject = setOAuthToObject;
|
|
62
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
63
|
-
if (parameter == null)
|
|
64
|
-
return;
|
|
65
|
-
if (typeof parameter === "object") {
|
|
66
|
-
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
67
|
-
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
if (urlSearchParams.has(key)) {
|
|
75
|
-
urlSearchParams.append(key, parameter);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
urlSearchParams.set(key, parameter);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const setSearchParams = function (url, ...objects) {
|
|
83
|
-
const searchParams = new URLSearchParams(url.search);
|
|
84
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
85
|
-
url.search = searchParams.toString();
|
|
86
|
-
};
|
|
87
|
-
exports.setSearchParams = setSearchParams;
|
|
88
|
-
/**
|
|
89
|
-
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
90
|
-
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
91
|
-
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
92
|
-
*/
|
|
93
|
-
// @ts-ignore
|
|
94
|
-
const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
95
|
-
if (value instanceof Set) {
|
|
96
|
-
return Array.from(value);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return value;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
|
|
103
|
-
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
104
|
-
const nonString = typeof value !== 'string';
|
|
105
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
106
|
-
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
107
|
-
: nonString;
|
|
108
|
-
return needsSerialization
|
|
109
|
-
? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
|
|
110
|
-
: (value || "");
|
|
111
|
-
};
|
|
112
|
-
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
113
|
-
const toPathString = function (url) {
|
|
114
|
-
return url.pathname + url.search + url.hash;
|
|
115
|
-
};
|
|
116
|
-
exports.toPathString = toPathString;
|
|
117
|
-
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
118
|
-
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
119
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
120
|
-
return axios.request(axiosRequestArgs);
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
exports.createRequestFunction = createRequestFunction;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/**
|
|
4
|
-
* Selling Partner API for Application Management
|
|
5
|
-
* The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 2023-11-30
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.Configuration = void 0;
|
|
16
|
-
class Configuration {
|
|
17
|
-
/**
|
|
18
|
-
* parameter for apiKey security
|
|
19
|
-
* @param name security name
|
|
20
|
-
*/
|
|
21
|
-
apiKey;
|
|
22
|
-
/**
|
|
23
|
-
* parameter for basic security
|
|
24
|
-
*/
|
|
25
|
-
username;
|
|
26
|
-
/**
|
|
27
|
-
* parameter for basic security
|
|
28
|
-
*/
|
|
29
|
-
password;
|
|
30
|
-
/**
|
|
31
|
-
* parameter for oauth2 security
|
|
32
|
-
* @param name security name
|
|
33
|
-
* @param scopes oauth2 scope
|
|
34
|
-
*/
|
|
35
|
-
accessToken;
|
|
36
|
-
/**
|
|
37
|
-
* parameter for aws4 signature security
|
|
38
|
-
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
39
|
-
* @param {string} options.region - aws region
|
|
40
|
-
* @param {string} options.service - name of the service.
|
|
41
|
-
* @param {string} credentials.accessKeyId - aws access key id
|
|
42
|
-
* @param {string} credentials.secretAccessKey - aws access key
|
|
43
|
-
* @param {string} credentials.sessionToken - aws session token
|
|
44
|
-
* @memberof Configuration
|
|
45
|
-
*/
|
|
46
|
-
awsv4;
|
|
47
|
-
/**
|
|
48
|
-
* override base path
|
|
49
|
-
*/
|
|
50
|
-
basePath;
|
|
51
|
-
/**
|
|
52
|
-
* override server index
|
|
53
|
-
*/
|
|
54
|
-
serverIndex;
|
|
55
|
-
/**
|
|
56
|
-
* base options for axios calls
|
|
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.awsv4 = param.awsv4;
|
|
73
|
-
this.basePath = param.basePath;
|
|
74
|
-
this.serverIndex = param.serverIndex;
|
|
75
|
-
this.baseOptions = {
|
|
76
|
-
...param.baseOptions,
|
|
77
|
-
headers: {
|
|
78
|
-
...param.baseOptions?.headers,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
this.formDataCtor = param.formDataCtor;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Check if the given MIME is a JSON MIME.
|
|
85
|
-
* JSON MIME examples:
|
|
86
|
-
* application/json
|
|
87
|
-
* application/json; charset=UTF8
|
|
88
|
-
* APPLICATION/JSON
|
|
89
|
-
* application/vnd.company+json
|
|
90
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
91
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
92
|
-
*/
|
|
93
|
-
isJsonMime(mime) {
|
|
94
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
95
|
-
return mime !== null && jsonMime.test(mime);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.Configuration = Configuration;
|
|
@@ -1,32 +0,0 @@
|
|
|
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);
|
|
@@ -1,15 +0,0 @@
|
|
|
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 });
|
|
@@ -1,18 +0,0 @@
|
|
|
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);
|
|
@@ -1,15 +0,0 @@
|
|
|
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 });
|
package/dist/cjs/client.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationManagementApiClient = exports.clientRateLimits = void 0;
|
|
4
|
-
const common_1 = require("@sp-api-sdk/common");
|
|
5
|
-
const api_model_1 = require("./api-model");
|
|
6
|
-
exports.clientRateLimits = [
|
|
7
|
-
{
|
|
8
|
-
method: 'post',
|
|
9
|
-
// eslint-disable-next-line prefer-regex-literals
|
|
10
|
-
urlRegex: new RegExp('^/applications/2023-11-30/clientSecret$'),
|
|
11
|
-
rate: 0.0167,
|
|
12
|
-
burst: 1,
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
class ApplicationManagementApiClient extends api_model_1.ApplicationManagementApi {
|
|
16
|
-
constructor(configuration) {
|
|
17
|
-
const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
|
|
18
|
-
super(new api_model_1.Configuration(), endpoint, axios);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.ApplicationManagementApiClient = ApplicationManagementApiClient;
|
package/dist/cjs/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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("./client"), exports);
|
|
18
|
-
__exportStar(require("./api-model/api"), exports);
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Selling Partner API for Application Management
|
|
5
|
-
* The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 2023-11-30
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
import globalAxios from 'axios';
|
|
15
|
-
// Some imports not used depending on template conditions
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
import { DUMMY_BASE_URL, setSearchParams, toPathString, createRequestFunction } from '../common';
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
20
|
-
/**
|
|
21
|
-
* ApplicationManagementApi - axios parameter creator
|
|
22
|
-
*/
|
|
23
|
-
export const ApplicationManagementApiAxiosParamCreator = function (configuration) {
|
|
24
|
-
return {
|
|
25
|
-
/**
|
|
26
|
-
* 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).
|
|
27
|
-
* @param {*} [options] Override http request option.
|
|
28
|
-
* @throws {RequiredError}
|
|
29
|
-
*/
|
|
30
|
-
rotateApplicationClientSecret: async (options = {}) => {
|
|
31
|
-
const localVarPath = `/applications/2023-11-30/clientSecret`;
|
|
32
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
33
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
34
|
-
let baseOptions;
|
|
35
|
-
if (configuration) {
|
|
36
|
-
baseOptions = configuration.baseOptions;
|
|
37
|
-
}
|
|
38
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
39
|
-
const localVarHeaderParameter = {};
|
|
40
|
-
const localVarQueryParameter = {};
|
|
41
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
42
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
43
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
44
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
45
|
-
return {
|
|
46
|
-
url: toPathString(localVarUrlObj),
|
|
47
|
-
options: localVarRequestOptions,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* ApplicationManagementApi - functional programming interface
|
|
54
|
-
*/
|
|
55
|
-
export const ApplicationManagementApiFp = function (configuration) {
|
|
56
|
-
const localVarAxiosParamCreator = ApplicationManagementApiAxiosParamCreator(configuration);
|
|
57
|
-
return {
|
|
58
|
-
/**
|
|
59
|
-
* 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).
|
|
60
|
-
* @param {*} [options] Override http request option.
|
|
61
|
-
* @throws {RequiredError}
|
|
62
|
-
*/
|
|
63
|
-
async rotateApplicationClientSecret(options) {
|
|
64
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options);
|
|
65
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
66
|
-
const localVarOperationServerBasePath = operationServerMap['ApplicationManagementApi.rotateApplicationClientSecret']?.[localVarOperationServerIndex]?.url;
|
|
67
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* ApplicationManagementApi - factory interface
|
|
73
|
-
*/
|
|
74
|
-
export const ApplicationManagementApiFactory = function (configuration, basePath, axios) {
|
|
75
|
-
const localVarFp = ApplicationManagementApiFp(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(options) {
|
|
83
|
-
return localVarFp.rotateApplicationClientSecret(options).then((request) => request(axios, basePath));
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* ApplicationManagementApi - object-oriented interface
|
|
89
|
-
*/
|
|
90
|
-
export class ApplicationManagementApi extends BaseAPI {
|
|
91
|
-
/**
|
|
92
|
-
* 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).
|
|
93
|
-
* @param {*} [options] Override http request option.
|
|
94
|
-
* @throws {RequiredError}
|
|
95
|
-
*/
|
|
96
|
-
rotateApplicationClientSecret(options) {
|
|
97
|
-
return ApplicationManagementApiFp(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath));
|
|
98
|
-
}
|
|
99
|
-
}
|