@sp-api-sdk/tokens-api-2021-03-01 1.10.2 → 1.10.5

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.
@@ -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, options.query);
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
- * @export
19
- * @enum {string}
20
- */
21
- var RestrictedResourceMethodEnum;
22
- (function (RestrictedResourceMethodEnum) {
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, options.query);
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
- * @export
16
- * @enum {string}
17
- */
18
- export var RestrictedResourceMethodEnum;
19
- (function (RestrictedResourceMethodEnum) {
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';
@@ -25,7 +25,7 @@ export declare const TokensApiAxiosParamCreator: (configuration?: Configuration
25
25
  * @param {*} [options] Override http request option.
26
26
  * @throws {RequiredError}
27
27
  */
28
- createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: any) => Promise<RequestArgs>;
28
+ createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
29
  };
30
30
  /**
31
31
  * TokensApi - functional programming interface
@@ -38,7 +38,7 @@ export declare const TokensApiFp: (configuration?: Configuration | undefined) =>
38
38
  * @param {*} [options] Override http request option.
39
39
  * @throws {RequiredError}
40
40
  */
41
- createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
41
+ createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
42
42
  };
43
43
  /**
44
44
  * TokensApi - factory interface
@@ -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?: any): Promise<import("axios").AxiosResponse<CreateRestrictedDataTokenResponse, any>>;
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: any;
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
@@ -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 | undefined) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any, any>>;
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration | undefined) => <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,5 +20,5 @@ export interface ErrorList {
20
20
  * @type {Array<Error>}
21
21
  * @memberof ErrorList
22
22
  */
23
- errors?: Array<Error>;
23
+ 'errors'?: Array<Error>;
24
24
  }
@@ -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.2",
5
+ "version": "1.10.5",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -24,11 +24,11 @@
24
24
  "build:es": "tsc -p tsconfig.es.json",
25
25
  "build": "yarn build:cjs && yarn build:es",
26
26
  "clean": "rimraf dist",
27
- "test": "NODE_ENV='test' yarn jest"
27
+ "test": "jest"
28
28
  },
29
29
  "dependencies": {
30
- "@sp-api-sdk/auth": "^1.9.15",
31
- "@sp-api-sdk/common": "^1.9.1",
30
+ "@sp-api-sdk/auth": "^1.9.17",
31
+ "@sp-api-sdk/common": "^1.9.3",
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": "e49e4267a61beba2869d509719731bea6cc2c6d8"
53
+ "gitHead": "d4f265d3c6a4e05e45025a46effa023a56a54e9c"
54
54
  }