@sp-api-sdk/tokens-api-2021-03-01 1.10.4 → 1.10.7
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/dist/cjs/src/api-model/api/tokens-api.js +1 -1
- package/dist/cjs/src/api-model/models/restricted-resource.js +6 -11
- package/dist/es/src/api-model/api/tokens-api.js +1 -1
- package/dist/es/src/api-model/models/restricted-resource.js +6 -11
- package/dist/types/src/api-model/api/tokens-api.d.ts +7 -7
- package/dist/types/src/api-model/base.d.ts +2 -2
- package/dist/types/src/api-model/common.d.ts +7 -7
- package/dist/types/src/api-model/models/create-restricted-data-token-request.d.ts +2 -2
- package/dist/types/src/api-model/models/create-restricted-data-token-response.d.ts +2 -2
- package/dist/types/src/api-model/models/error-list.d.ts +1 -1
- package/dist/types/src/api-model/models/model-error.d.ts +3 -3
- package/dist/types/src/api-model/models/restricted-resource.d.ts +10 -13
- package/package.json +4 -4
|
@@ -47,7 +47,7 @@ const TokensApiAxiosParamCreator = function (configuration) {
|
|
|
47
47
|
const localVarHeaderParameter = {};
|
|
48
48
|
const localVarQueryParameter = {};
|
|
49
49
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
50
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter
|
|
50
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
51
51
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
52
52
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
53
53
|
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
@@ -14,14 +14,9 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.RestrictedResourceMethodEnum = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
RestrictedResourceMethodEnum["Get"] = "GET";
|
|
24
|
-
RestrictedResourceMethodEnum["Put"] = "PUT";
|
|
25
|
-
RestrictedResourceMethodEnum["Post"] = "POST";
|
|
26
|
-
RestrictedResourceMethodEnum["Delete"] = "DELETE";
|
|
27
|
-
})(RestrictedResourceMethodEnum = exports.RestrictedResourceMethodEnum || (exports.RestrictedResourceMethodEnum = {}));
|
|
17
|
+
exports.RestrictedResourceMethodEnum = {
|
|
18
|
+
Get: 'GET',
|
|
19
|
+
Put: 'PUT',
|
|
20
|
+
Post: 'POST',
|
|
21
|
+
Delete: 'DELETE'
|
|
22
|
+
};
|
|
@@ -43,7 +43,7 @@ export const TokensApiAxiosParamCreator = function (configuration) {
|
|
|
43
43
|
const localVarHeaderParameter = {};
|
|
44
44
|
const localVarQueryParameter = {};
|
|
45
45
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
46
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter
|
|
46
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
47
47
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
48
48
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
49
49
|
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
@@ -11,14 +11,9 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
RestrictedResourceMethodEnum["Get"] = "GET";
|
|
21
|
-
RestrictedResourceMethodEnum["Put"] = "PUT";
|
|
22
|
-
RestrictedResourceMethodEnum["Post"] = "POST";
|
|
23
|
-
RestrictedResourceMethodEnum["Delete"] = "DELETE";
|
|
24
|
-
})(RestrictedResourceMethodEnum || (RestrictedResourceMethodEnum = {}));
|
|
14
|
+
export const RestrictedResourceMethodEnum = {
|
|
15
|
+
Get: 'GET',
|
|
16
|
+
Put: 'PUT',
|
|
17
|
+
Post: 'POST',
|
|
18
|
+
Delete: 'DELETE'
|
|
19
|
+
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { AxiosPromise, AxiosInstance } from 'axios';
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { CreateRestrictedDataTokenRequest } from '../models';
|
|
@@ -18,33 +18,33 @@ import { CreateRestrictedDataTokenResponse } from '../models';
|
|
|
18
18
|
* TokensApi - axios parameter creator
|
|
19
19
|
* @export
|
|
20
20
|
*/
|
|
21
|
-
export declare const TokensApiAxiosParamCreator: (configuration?: Configuration
|
|
21
|
+
export declare const TokensApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
22
|
/**
|
|
23
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 Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
24
24
|
* @param {CreateRestrictedDataTokenRequest} body The restricted data token request details.
|
|
25
25
|
* @param {*} [options] Override http request option.
|
|
26
26
|
* @throws {RequiredError}
|
|
27
27
|
*/
|
|
28
|
-
createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?:
|
|
28
|
+
createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* TokensApi - functional programming interface
|
|
32
32
|
* @export
|
|
33
33
|
*/
|
|
34
|
-
export declare const TokensApiFp: (configuration?: Configuration
|
|
34
|
+
export declare const TokensApiFp: (configuration?: Configuration) => {
|
|
35
35
|
/**
|
|
36
36
|
* 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 Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
37
37
|
* @param {CreateRestrictedDataTokenRequest} body The restricted data token request details.
|
|
38
38
|
* @param {*} [options] Override http request option.
|
|
39
39
|
* @throws {RequiredError}
|
|
40
40
|
*/
|
|
41
|
-
createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?:
|
|
41
|
+
createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* TokensApi - factory interface
|
|
45
45
|
* @export
|
|
46
46
|
*/
|
|
47
|
-
export declare const TokensApiFactory: (configuration?: Configuration
|
|
47
|
+
export declare const TokensApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
48
48
|
/**
|
|
49
49
|
* 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 Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 1 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
50
50
|
* @param {CreateRestrictedDataTokenRequest} body The restricted data token request details.
|
|
@@ -80,5 +80,5 @@ export declare class TokensApi extends BaseAPI {
|
|
|
80
80
|
* @throws {RequiredError}
|
|
81
81
|
* @memberof TokensApi
|
|
82
82
|
*/
|
|
83
|
-
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?:
|
|
83
|
+
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateRestrictedDataTokenResponse, any>>;
|
|
84
84
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { Configuration } from "./configuration";
|
|
13
|
-
import { AxiosInstance } from 'axios';
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
14
|
export declare const BASE_PATH: string;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
29
29
|
*/
|
|
30
30
|
export interface RequestArgs {
|
|
31
31
|
url: string;
|
|
32
|
-
options:
|
|
32
|
+
options: AxiosRequestConfig;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { Configuration } from "./configuration";
|
|
13
13
|
import { RequestArgs } from "./base";
|
|
14
|
-
import { AxiosInstance } from 'axios';
|
|
14
|
+
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @export
|
|
@@ -27,22 +27,22 @@ export declare const assertParamExists: (functionName: string, paramName: string
|
|
|
27
27
|
*
|
|
28
28
|
* @export
|
|
29
29
|
*/
|
|
30
|
-
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration
|
|
30
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
* @export
|
|
34
34
|
*/
|
|
35
|
-
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration
|
|
35
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @export
|
|
39
39
|
*/
|
|
40
|
-
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration
|
|
40
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @export
|
|
44
44
|
*/
|
|
45
|
-
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration
|
|
45
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @export
|
|
@@ -52,7 +52,7 @@ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
|
52
52
|
*
|
|
53
53
|
* @export
|
|
54
54
|
*/
|
|
55
|
-
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration
|
|
55
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
58
58
|
* @export
|
|
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -21,11 +21,11 @@ export interface CreateRestrictedDataTokenRequest {
|
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof CreateRestrictedDataTokenRequest
|
|
23
23
|
*/
|
|
24
|
-
targetApplication?: string;
|
|
24
|
+
'targetApplication'?: string;
|
|
25
25
|
/**
|
|
26
26
|
* A list of restricted resources. Maximum: 50
|
|
27
27
|
* @type {Array<RestrictedResource>}
|
|
28
28
|
* @memberof CreateRestrictedDataTokenRequest
|
|
29
29
|
*/
|
|
30
|
-
restrictedResources: Array<RestrictedResource>;
|
|
30
|
+
'restrictedResources': Array<RestrictedResource>;
|
|
31
31
|
}
|
|
@@ -20,11 +20,11 @@ export interface CreateRestrictedDataTokenResponse {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof CreateRestrictedDataTokenResponse
|
|
22
22
|
*/
|
|
23
|
-
restrictedDataToken?: string;
|
|
23
|
+
'restrictedDataToken'?: string;
|
|
24
24
|
/**
|
|
25
25
|
* The lifetime of the Restricted Data Token, in seconds.
|
|
26
26
|
* @type {number}
|
|
27
27
|
* @memberof CreateRestrictedDataTokenResponse
|
|
28
28
|
*/
|
|
29
|
-
expiresIn?: number;
|
|
29
|
+
'expiresIn'?: number;
|
|
30
30
|
}
|
|
@@ -20,17 +20,17 @@ export interface ModelError {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof ModelError
|
|
22
22
|
*/
|
|
23
|
-
code: string;
|
|
23
|
+
'code': string;
|
|
24
24
|
/**
|
|
25
25
|
* A message that describes the error condition.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof ModelError
|
|
28
28
|
*/
|
|
29
|
-
message: string;
|
|
29
|
+
'message': string;
|
|
30
30
|
/**
|
|
31
31
|
* Additional details that can help the caller understand or fix the issue.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof ModelError
|
|
34
34
|
*/
|
|
35
|
-
details?: string;
|
|
35
|
+
'details'?: string;
|
|
36
36
|
}
|
|
@@ -20,27 +20,24 @@ export interface RestrictedResource {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof RestrictedResource
|
|
22
22
|
*/
|
|
23
|
-
method: RestrictedResourceMethodEnum;
|
|
23
|
+
'method': RestrictedResourceMethodEnum;
|
|
24
24
|
/**
|
|
25
25
|
* The path in the restricted resource. Here are some path examples: - ```/orders/v0/orders```. For getting an RDT for the getOrders operation of the Orders API. For bulk orders. - ```/orders/v0/orders/123-1234567-1234567```. For getting an RDT for the getOrder operation of the Orders API. For a specific order. - ```/orders/v0/orders/123-1234567-1234567/orderItems```. For getting an RDT for the getOrderItems operation of the Orders API. For the order items in a specific order. - ```/mfn/v0/shipments/FBA1234ABC5D```. For getting an RDT for the getShipment operation of the Shipping API. For a specific shipment. - ```/mfn/v0/shipments/{shipmentId}```. For getting an RDT for the getShipment operation of the Shipping API. For any of a selling partner\'s shipments that you specify when you call the getShipment operation.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof RestrictedResource
|
|
28
28
|
*/
|
|
29
|
-
path: string;
|
|
29
|
+
'path': string;
|
|
30
30
|
/**
|
|
31
31
|
* Indicates the type of Personally Identifiable Information requested. This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API. For more information, see the [Tokens API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/tokens-api-use-case-guide). Possible values include: - **buyerInfo**. On the order level this includes general identifying information about the buyer and tax-related information. On the order item level this includes gift wrap information and custom order information, if available. - **shippingAddress**. This includes information for fulfilling orders. - **buyerTaxInformation**. This includes information for issuing tax invoices.
|
|
32
32
|
* @type {Array<string>}
|
|
33
33
|
* @memberof RestrictedResource
|
|
34
34
|
*/
|
|
35
|
-
dataElements?: Array<string>;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @export
|
|
39
|
-
* @enum {string}
|
|
40
|
-
*/
|
|
41
|
-
export declare enum RestrictedResourceMethodEnum {
|
|
42
|
-
Get = "GET",
|
|
43
|
-
Put = "PUT",
|
|
44
|
-
Post = "POST",
|
|
45
|
-
Delete = "DELETE"
|
|
35
|
+
'dataElements'?: Array<string>;
|
|
46
36
|
}
|
|
37
|
+
export declare const RestrictedResourceMethodEnum: {
|
|
38
|
+
readonly Get: "GET";
|
|
39
|
+
readonly Put: "PUT";
|
|
40
|
+
readonly Post: "POST";
|
|
41
|
+
readonly Delete: "DELETE";
|
|
42
|
+
};
|
|
43
|
+
export declare type RestrictedResourceMethodEnum = typeof RestrictedResourceMethodEnum[keyof typeof RestrictedResourceMethodEnum];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/tokens-api-2021-03-01",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
4
|
"description": "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.",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.7",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"test": "jest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sp-api-sdk/auth": "^1.9.
|
|
31
|
-
"@sp-api-sdk/common": "^1.9.
|
|
30
|
+
"@sp-api-sdk/auth": "^1.9.19",
|
|
31
|
+
"@sp-api-sdk/common": "^1.9.5",
|
|
32
32
|
"axios": "^0.27.2"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"sp sdk",
|
|
51
51
|
"tokens api"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "72808979582d663f043688f24d519b604f7fd2df"
|
|
54
54
|
}
|