UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

114 lines • 8.86 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Application Management * The Selling Partner API for Application Management lets you programmatically update the client secret on registered applications. * * The version of the OpenAPI document: 2023-11-30 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationsApi = exports.ApplicationsApiFactory = exports.ApplicationsApiFp = exports.ApplicationsApiAxiosParamCreator = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("./common"); // @ts-ignore const base_1 = require("./base"); /** * ApplicationsApi - axios parameter creator * @export */ const ApplicationsApiAxiosParamCreator = function (configuration) { return { /** * 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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ rotateApplicationClientSecret: async (options = {}) => { const localVarPath = `/applications/2023-11-30/clientSecret`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.ApplicationsApiAxiosParamCreator = ApplicationsApiAxiosParamCreator; /** * ApplicationsApi - functional programming interface * @export */ const ApplicationsApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.ApplicationsApiAxiosParamCreator)(configuration); return { /** * 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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rotateApplicationClientSecret(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.rotateApplicationClientSecret(options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.ApplicationsApiFp = ApplicationsApiFp; /** * ApplicationsApi - factory interface * @export */ const ApplicationsApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.ApplicationsApiFp)(configuration); return { /** * 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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ rotateApplicationClientSecret(options) { return localVarFp.rotateApplicationClientSecret(options).then((request) => request(axios, basePath)); }, }; }; exports.ApplicationsApiFactory = ApplicationsApiFactory; /** * ApplicationsApi - object-oriented interface * @export * @class ApplicationsApi * @extends {BaseAPI} */ class ApplicationsApi extends base_1.BaseAPI { /** * 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). * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApplicationsApi */ rotateApplicationClientSecret(options) { return (0, exports.ApplicationsApiFp)(this.configuration).rotateApplicationClientSecret(options).then((request) => request(this.axios, this.basePath)); } } exports.ApplicationsApi = ApplicationsApi; //# sourceMappingURL=api.js.map