@sp-api-sdk/tokens-api-2021-03-01 3.0.21 → 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.
Files changed (50) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +321 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +323 -0
  5. package/dist/index.d.ts +323 -0
  6. package/dist/index.js +278 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/tokens-api.js +0 -117
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/create-restricted-data-token-request.js +0 -15
  16. package/dist/cjs/api-model/models/create-restricted-data-token-response.js +0 -15
  17. package/dist/cjs/api-model/models/error-list.js +0 -15
  18. package/dist/cjs/api-model/models/index.js +0 -21
  19. package/dist/cjs/api-model/models/model-error.js +0 -15
  20. package/dist/cjs/api-model/models/restricted-resource.js +0 -22
  21. package/dist/cjs/client.js +0 -21
  22. package/dist/cjs/index.js +0 -19
  23. package/dist/es/api-model/api/tokens-api.js +0 -107
  24. package/dist/es/api-model/api.js +0 -14
  25. package/dist/es/api-model/base.js +0 -44
  26. package/dist/es/api-model/common.js +0 -110
  27. package/dist/es/api-model/configuration.js +0 -94
  28. package/dist/es/api-model/index.js +0 -16
  29. package/dist/es/api-model/models/create-restricted-data-token-request.js +0 -14
  30. package/dist/es/api-model/models/create-restricted-data-token-response.js +0 -14
  31. package/dist/es/api-model/models/error-list.js +0 -14
  32. package/dist/es/api-model/models/index.js +0 -5
  33. package/dist/es/api-model/models/model-error.js +0 -14
  34. package/dist/es/api-model/models/restricted-resource.js +0 -19
  35. package/dist/es/client.js +0 -17
  36. package/dist/es/index.js +0 -3
  37. package/dist/types/api-model/api/tokens-api.d.ts +0 -74
  38. package/dist/types/api-model/api.d.ts +0 -12
  39. package/dist/types/api-model/base.d.ts +0 -42
  40. package/dist/types/api-model/common.d.ts +0 -34
  41. package/dist/types/api-model/configuration.d.ts +0 -98
  42. package/dist/types/api-model/index.d.ts +0 -14
  43. package/dist/types/api-model/models/create-restricted-data-token-request.d.ts +0 -25
  44. package/dist/types/api-model/models/create-restricted-data-token-response.d.ts +0 -24
  45. package/dist/types/api-model/models/error-list.d.ts +0 -17
  46. package/dist/types/api-model/models/index.d.ts +0 -5
  47. package/dist/types/api-model/models/model-error.d.ts +0 -28
  48. package/dist/types/api-model/models/restricted-resource.d.ts +0 -35
  49. package/dist/types/client.d.ts +0 -6
  50. package/dist/types/index.d.ts +0 -3
@@ -1,110 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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 { RequiredError } from "./base";
15
- export const DUMMY_BASE_URL = 'https://example.com';
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export const assertParamExists = function (functionName, paramName, paramValue) {
21
- if (paramValue === null || paramValue === undefined) {
22
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
23
- }
24
- };
25
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
26
- if (configuration && configuration.apiKey) {
27
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
28
- ? await configuration.apiKey(keyParamName)
29
- : await configuration.apiKey;
30
- object[keyParamName] = localVarApiKeyValue;
31
- }
32
- };
33
- export const setBasicAuthToObject = function (object, configuration) {
34
- if (configuration && (configuration.username || configuration.password)) {
35
- object["auth"] = { username: configuration.username, password: configuration.password };
36
- }
37
- };
38
- export const setBearerAuthToObject = async function (object, configuration) {
39
- if (configuration && configuration.accessToken) {
40
- const accessToken = typeof configuration.accessToken === 'function'
41
- ? await configuration.accessToken()
42
- : await configuration.accessToken;
43
- object["Authorization"] = "Bearer " + accessToken;
44
- }
45
- };
46
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
47
- if (configuration && configuration.accessToken) {
48
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49
- ? await configuration.accessToken(name, scopes)
50
- : await configuration.accessToken;
51
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
52
- }
53
- };
54
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
55
- if (parameter == null)
56
- return;
57
- if (typeof parameter === "object") {
58
- if (Array.isArray(parameter) || parameter instanceof Set) {
59
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
60
- }
61
- else {
62
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
63
- }
64
- }
65
- else {
66
- if (urlSearchParams.has(key)) {
67
- urlSearchParams.append(key, parameter);
68
- }
69
- else {
70
- urlSearchParams.set(key, parameter);
71
- }
72
- }
73
- }
74
- export const setSearchParams = function (url, ...objects) {
75
- const searchParams = new URLSearchParams(url.search);
76
- setFlattenedQueryParams(searchParams, objects);
77
- url.search = searchParams.toString();
78
- };
79
- /**
80
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
- */
84
- // @ts-ignore
85
- export const replaceWithSerializableTypeIfNeeded = function (key, value) {
86
- if (value instanceof Set) {
87
- return Array.from(value);
88
- }
89
- else {
90
- return value;
91
- }
92
- };
93
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
94
- const nonString = typeof value !== 'string';
95
- const needsSerialization = nonString && configuration && configuration.isJsonMime
96
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
97
- : nonString;
98
- return needsSerialization
99
- ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
100
- : (value || "");
101
- };
102
- export const toPathString = function (url) {
103
- return url.pathname + url.search + url.hash;
104
- };
105
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
106
- return (axios = globalAxios, basePath = BASE_PATH) => {
107
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
108
- return axios.request(axiosRequestArgs);
109
- };
110
- };
@@ -1,94 +0,0 @@
1
- /* tslint:disable */
2
- /**
3
- * Selling Partner API for Tokens
4
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
5
- *
6
- * The version of the OpenAPI document: 2021-03-01
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- export class Configuration {
14
- /**
15
- * parameter for apiKey security
16
- * @param name security name
17
- */
18
- apiKey;
19
- /**
20
- * parameter for basic security
21
- */
22
- username;
23
- /**
24
- * parameter for basic security
25
- */
26
- password;
27
- /**
28
- * parameter for oauth2 security
29
- * @param name security name
30
- * @param scopes oauth2 scope
31
- */
32
- accessToken;
33
- /**
34
- * parameter for aws4 signature security
35
- * @param {Object} AWS4Signature - AWS4 Signature security
36
- * @param {string} options.region - aws region
37
- * @param {string} options.service - name of the service.
38
- * @param {string} credentials.accessKeyId - aws access key id
39
- * @param {string} credentials.secretAccessKey - aws access key
40
- * @param {string} credentials.sessionToken - aws session token
41
- * @memberof Configuration
42
- */
43
- awsv4;
44
- /**
45
- * override base path
46
- */
47
- basePath;
48
- /**
49
- * override server index
50
- */
51
- serverIndex;
52
- /**
53
- * base options for axios calls
54
- */
55
- baseOptions;
56
- /**
57
- * The FormData constructor that will be used to create multipart form data
58
- * requests. You can inject this here so that execution environments that
59
- * do not support the FormData class can still run the generated client.
60
- *
61
- * @type {new () => FormData}
62
- */
63
- formDataCtor;
64
- constructor(param = {}) {
65
- this.apiKey = param.apiKey;
66
- this.username = param.username;
67
- this.password = param.password;
68
- this.accessToken = param.accessToken;
69
- this.awsv4 = param.awsv4;
70
- this.basePath = param.basePath;
71
- this.serverIndex = param.serverIndex;
72
- this.baseOptions = {
73
- ...param.baseOptions,
74
- headers: {
75
- ...param.baseOptions?.headers,
76
- },
77
- };
78
- this.formDataCtor = param.formDataCtor;
79
- }
80
- /**
81
- * Check if the given MIME is a JSON MIME.
82
- * JSON MIME examples:
83
- * application/json
84
- * application/json; charset=UTF8
85
- * APPLICATION/JSON
86
- * application/vnd.company+json
87
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
- * @return True if the given MIME is JSON, false otherwise.
89
- */
90
- isJsonMime(mime) {
91
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
92
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
93
- }
94
- }
@@ -1,16 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export * from "./api";
15
- export * from "./configuration";
16
- export * from "./models";
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export {};
@@ -1,5 +0,0 @@
1
- export * from './create-restricted-data-token-request';
2
- export * from './create-restricted-data-token-response';
3
- export * from './error-list';
4
- export * from './model-error';
5
- export * from './restricted-resource';
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export {};
@@ -1,19 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Selling Partner API for Tokens
5
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
6
- *
7
- * The version of the OpenAPI document: 2021-03-01
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
- export const RestrictedResourceMethodEnum = {
15
- Get: 'GET',
16
- Put: 'PUT',
17
- Post: 'POST',
18
- Delete: 'DELETE'
19
- };
package/dist/es/client.js DELETED
@@ -1,17 +0,0 @@
1
- import { createAxiosInstance } from '@sp-api-sdk/common';
2
- import { Configuration, TokensApi } from './api-model';
3
- export const clientRateLimits = [
4
- {
5
- method: 'post',
6
- // eslint-disable-next-line prefer-regex-literals
7
- urlRegex: new RegExp('^/tokens/2021-03-01/restrictedDataToken$'),
8
- rate: 1,
9
- burst: 10,
10
- },
11
- ];
12
- export class TokensApiClient extends TokensApi {
13
- constructor(configuration) {
14
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
15
- super(new Configuration(), endpoint, axios);
16
- }
17
- }
package/dist/es/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './client';
2
- export * from './api-model/api';
3
- export * from './api-model/models';
@@ -1,74 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from '../configuration';
13
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- import globalAxios from 'axios';
15
- import { type RequestArgs, BaseAPI } from '../base';
16
- import type { CreateRestrictedDataTokenRequest } from '../models';
17
- import type { CreateRestrictedDataTokenResponse } from '../models';
18
- /**
19
- * TokensApi - axios parameter creator
20
- */
21
- export declare const TokensApiAxiosParamCreator: (configuration?: Configuration) => {
22
- /**
23
- * Returns a Restricted Data Token (RDT) for one or more restricted resources that you specify. A restricted resource is the HTTP method and path from a restricted operation that returns Personally Identifiable Information (PII), plus a dataElements value that indicates the type of PII requested. See the Tokens API Use Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent calls to the corresponding restricted operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 10 | 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, see [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).
24
- * @param {CreateRestrictedDataTokenRequest} body The restricted data token request details.
25
- * @param {*} [options] Override http request option.
26
- * @throws {RequiredError}
27
- */
28
- createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
- };
30
- /**
31
- * TokensApi - functional programming interface
32
- */
33
- export declare const TokensApiFp: (configuration?: Configuration) => {
34
- /**
35
- * Returns a Restricted Data Token (RDT) for one or more restricted resources that you specify. A restricted resource is the HTTP method and path from a restricted operation that returns Personally Identifiable Information (PII), plus a dataElements value that indicates the type of PII requested. See the Tokens API Use Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent calls to the corresponding restricted operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 10 | 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, see [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).
36
- * @param {CreateRestrictedDataTokenRequest} body The restricted data token request details.
37
- * @param {*} [options] Override http request option.
38
- * @throws {RequiredError}
39
- */
40
- createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
41
- };
42
- /**
43
- * TokensApi - factory interface
44
- */
45
- export declare const TokensApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
46
- /**
47
- * Returns a Restricted Data Token (RDT) for one or more restricted resources that you specify. A restricted resource is the HTTP method and path from a restricted operation that returns Personally Identifiable Information (PII), plus a dataElements value that indicates the type of PII requested. See the Tokens API Use Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent calls to the corresponding restricted operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 10 | 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, see [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).
48
- * @param {TokensApiCreateRestrictedDataTokenRequest} requestParameters Request parameters.
49
- * @param {*} [options] Override http request option.
50
- * @throws {RequiredError}
51
- */
52
- createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateRestrictedDataTokenResponse>;
53
- };
54
- /**
55
- * Request parameters for createRestrictedDataToken operation in TokensApi.
56
- */
57
- export interface TokensApiCreateRestrictedDataTokenRequest {
58
- /**
59
- * The restricted data token request details.
60
- */
61
- readonly body: CreateRestrictedDataTokenRequest;
62
- }
63
- /**
64
- * TokensApi - object-oriented interface
65
- */
66
- export declare class TokensApi extends BaseAPI {
67
- /**
68
- * Returns a Restricted Data Token (RDT) for one or more restricted resources that you specify. A restricted resource is the HTTP method and path from a restricted operation that returns Personally Identifiable Information (PII), plus a dataElements value that indicates the type of PII requested. See the Tokens API Use Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent calls to the corresponding restricted operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 10 | 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, see [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).
69
- * @param {TokensApiCreateRestrictedDataTokenRequest} requestParameters Request parameters.
70
- * @param {*} [options] Override http request option.
71
- * @throws {RequiredError}
72
- */
73
- createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<CreateRestrictedDataTokenResponse, any, {}>>;
74
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from './api/tokens-api';
@@ -1,42 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- export declare const BASE_PATH: string;
15
- export declare const COLLECTION_FORMATS: {
16
- csv: string;
17
- ssv: string;
18
- tsv: string;
19
- pipes: string;
20
- };
21
- export interface RequestArgs {
22
- url: string;
23
- options: RawAxiosRequestConfig;
24
- }
25
- export declare class BaseAPI {
26
- protected basePath: string;
27
- protected axios: AxiosInstance;
28
- protected configuration: Configuration | undefined;
29
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
- }
31
- export declare class RequiredError extends Error {
32
- field: string;
33
- constructor(field: string, msg?: string);
34
- }
35
- interface ServerMap {
36
- [key: string]: {
37
- url: string;
38
- description: string;
39
- }[];
40
- }
41
- export declare const operationServerMap: ServerMap;
42
- export {};
@@ -1,34 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from "./configuration";
13
- import type { RequestArgs } from "./base";
14
- import type { AxiosInstance, AxiosResponse } from 'axios';
15
- export declare const DUMMY_BASE_URL = "https://example.com";
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
21
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
22
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
23
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
24
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
25
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
26
- /**
27
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
28
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
30
- */
31
- export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
32
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
33
- export declare const toPathString: (url: URL) => string;
34
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -1,98 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- interface AWSv4Configuration {
13
- options?: {
14
- region?: string;
15
- service?: string;
16
- };
17
- credentials?: {
18
- accessKeyId?: string;
19
- secretAccessKey?: string;
20
- sessionToken?: string;
21
- };
22
- }
23
- export interface ConfigurationParameters {
24
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
25
- username?: string;
26
- password?: string;
27
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
28
- awsv4?: AWSv4Configuration;
29
- basePath?: string;
30
- serverIndex?: number;
31
- baseOptions?: any;
32
- formDataCtor?: new () => any;
33
- }
34
- export declare class Configuration {
35
- /**
36
- * parameter for apiKey security
37
- * @param name security name
38
- */
39
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
40
- /**
41
- * parameter for basic security
42
- */
43
- username?: string;
44
- /**
45
- * parameter for basic security
46
- */
47
- password?: string;
48
- /**
49
- * parameter for oauth2 security
50
- * @param name security name
51
- * @param scopes oauth2 scope
52
- */
53
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
54
- /**
55
- * parameter for aws4 signature security
56
- * @param {Object} AWS4Signature - AWS4 Signature security
57
- * @param {string} options.region - aws region
58
- * @param {string} options.service - name of the service.
59
- * @param {string} credentials.accessKeyId - aws access key id
60
- * @param {string} credentials.secretAccessKey - aws access key
61
- * @param {string} credentials.sessionToken - aws session token
62
- * @memberof Configuration
63
- */
64
- awsv4?: AWSv4Configuration;
65
- /**
66
- * override base path
67
- */
68
- basePath?: string;
69
- /**
70
- * override server index
71
- */
72
- serverIndex?: number;
73
- /**
74
- * base options for axios calls
75
- */
76
- baseOptions?: any;
77
- /**
78
- * The FormData constructor that will be used to create multipart form data
79
- * requests. You can inject this here so that execution environments that
80
- * do not support the FormData class can still run the generated client.
81
- *
82
- * @type {new () => FormData}
83
- */
84
- formDataCtor?: new () => any;
85
- constructor(param?: ConfigurationParameters);
86
- /**
87
- * Check if the given MIME is a JSON MIME.
88
- * JSON MIME examples:
89
- * application/json
90
- * application/json; charset=UTF8
91
- * APPLICATION/JSON
92
- * application/vnd.company+json
93
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
94
- * @return True if the given MIME is JSON, false otherwise.
95
- */
96
- isJsonMime(mime: string): boolean;
97
- }
98
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
14
- export * from "./models";
@@ -1,25 +0,0 @@
1
- /**
2
- * Selling Partner API for Tokens
3
- * The Selling Partner API for Tokens provides a secure way to access a customer\'s PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide).
4
- *
5
- * The version of the OpenAPI document: 2021-03-01
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { RestrictedResource } from './restricted-resource';
13
- /**
14
- * The request schema for the createRestrictedDataToken operation.
15
- */
16
- export interface CreateRestrictedDataTokenRequest {
17
- /**
18
- * The application ID for the target application to which access is being delegated.
19
- */
20
- 'targetApplication'?: string;
21
- /**
22
- * A list of restricted resources. Maximum: 50
23
- */
24
- 'restrictedResources': Array<RestrictedResource>;
25
- }