@sp-api-sdk/application-management-api-2023-11-30 4.0.0 → 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.
- package/README.md +3 -4
- package/dist/index.cjs +231 -254
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +142 -149
- package/dist/index.d.ts +142 -149
- package/dist/index.js +208 -218
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -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
CHANGED
|
@@ -1,279 +1,256 @@
|
|
|
1
|
-
"
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
ApplicationManagementApi: () => ApplicationManagementApi,
|
|
34
|
-
ApplicationManagementApiAxiosParamCreator: () => ApplicationManagementApiAxiosParamCreator,
|
|
35
|
-
ApplicationManagementApiClient: () => ApplicationManagementApiClient,
|
|
36
|
-
ApplicationManagementApiFactory: () => ApplicationManagementApiFactory,
|
|
37
|
-
ApplicationManagementApiFp: () => ApplicationManagementApiFp,
|
|
38
|
-
clientRateLimits: () => clientRateLimits
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(index_exports);
|
|
41
|
-
|
|
42
|
-
// src/client.ts
|
|
43
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
44
|
-
|
|
45
|
-
// src/api-model/api/application-management-api.ts
|
|
46
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
47
|
-
|
|
48
|
-
// src/api-model/base.ts
|
|
49
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
50
|
-
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _sp_api_sdk_common = require("@sp-api-sdk/common");
|
|
25
|
+
let axios = require("axios");
|
|
26
|
+
axios = __toESM(axios, 1);
|
|
27
|
+
//#region src/api-model/base.ts
|
|
28
|
+
const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
51
29
|
var BaseAPI = class {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
+
}
|
|
63
41
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
const operationServerMap = {};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/api-model/common.ts
|
|
45
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
68
46
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Object.keys(parameter).forEach(
|
|
75
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
if (urlSearchParams.has(key)) {
|
|
80
|
-
urlSearchParams.append(key, parameter);
|
|
81
|
-
} else {
|
|
82
|
-
urlSearchParams.set(key, parameter);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
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);
|
|
85
52
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
53
|
+
const setSearchParams = function(url, ...objects) {
|
|
54
|
+
const searchParams = new URLSearchParams(url.search);
|
|
55
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
56
|
+
url.search = searchParams.toString();
|
|
90
57
|
};
|
|
91
|
-
|
|
92
|
-
|
|
58
|
+
const toPathString = function(url) {
|
|
59
|
+
return url.pathname + url.search + url.hash;
|
|
93
60
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
+
};
|
|
99
69
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
+
} };
|
|
129
106
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
+
} };
|
|
145
124
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
+
} };
|
|
158
139
|
};
|
|
140
|
+
/**
|
|
141
|
+
* ApplicationManagementApi - object-oriented interface
|
|
142
|
+
*/
|
|
159
143
|
var ApplicationManagementApi = class extends BaseAPI {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
+
}
|
|
168
152
|
};
|
|
169
|
-
|
|
170
|
-
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/api-model/configuration.ts
|
|
171
155
|
var Configuration = class {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
250
|
-
return mime !== null && jsonMime.test(mime);
|
|
251
|
-
}
|
|
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
|
+
}
|
|
252
233
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
burst: 1
|
|
262
|
-
}
|
|
263
|
-
];
|
|
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
|
+
}];
|
|
264
242
|
var ApplicationManagementApiClient = class extends ApplicationManagementApi {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
243
|
+
constructor(configuration) {
|
|
244
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
245
|
+
super(new Configuration(), endpoint, axios);
|
|
246
|
+
}
|
|
269
247
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
});
|
|
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
|
+
|
|
279
256
|
//# sourceMappingURL=index.cjs.map
|