Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sp-api-sdk/tokens-api-2021-03-01

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sp-api-sdk/tokens-api-2021-03-01 - npm Package Compare versions

Comparing version 2.0.7 to 2.1.0

4

dist/cjs/src/api-model/api/tokens-api.js

@@ -79,3 +79,5 @@ "use strict";

const localVarAxiosArgs = await localVarAxiosParamCreator.createRestrictedDataToken(body, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['TokensApi.createRestrictedDataToken']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},

@@ -82,0 +84,0 @@ };

@@ -19,3 +19,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
const axios_1 = __importDefault(require("axios"));

@@ -47,3 +47,3 @@ exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");

this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
this.basePath = configuration.basePath ?? basePath;
}

@@ -69,1 +69,6 @@ }

exports.RequiredError = RequiredError;
/**
*
* @export
*/
exports.operationServerMap = {};

@@ -141,3 +141,3 @@ "use strict";

return (axios = globalAxios, basePath = BASE_PATH) => {
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
return axios.request(axiosRequestArgs);

@@ -144,0 +144,0 @@ };

@@ -53,2 +53,9 @@ "use strict";

/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex;
/**
* base options for axios calls

@@ -74,2 +81,3 @@ *

this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
this.baseOptions = param.baseOptions;

@@ -76,0 +84,0 @@ this.formDataCtor = param.formDataCtor;

@@ -19,3 +19,3 @@ /* tslint:disable */

// @ts-ignore
import { BASE_PATH, BaseAPI } from '../base';
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
/**

@@ -73,3 +73,5 @@ * TokensApi - axios parameter creator

const localVarAxiosArgs = await localVarAxiosParamCreator.createRestrictedDataToken(body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['TokensApi.createRestrictedDataToken']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},

@@ -76,0 +78,0 @@ };

@@ -40,3 +40,3 @@ /* tslint:disable */

this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
this.basePath = configuration.basePath ?? basePath;
}

@@ -60,1 +60,6 @@ }

}
/**
*
* @export
*/
export const operationServerMap = {};

@@ -130,5 +130,5 @@ /* tslint:disable */

return (axios = globalAxios, basePath = BASE_PATH) => {
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
return axios.request(axiosRequestArgs);
};
};

@@ -50,2 +50,9 @@ /* tslint:disable */

/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex;
/**
* base options for axios calls

@@ -71,2 +78,3 @@ *

this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
this.baseOptions = param.baseOptions;

@@ -73,0 +81,0 @@ this.formDataCtor = param.formDataCtor;

@@ -13,7 +13,7 @@ /**

import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { CreateRestrictedDataTokenRequest } from '../models';
import { CreateRestrictedDataTokenResponse } from '../models';
import { type RequestArgs, BaseAPI } from '../base';
import type { CreateRestrictedDataTokenRequest } from '../models';
import type { CreateRestrictedDataTokenResponse } from '../models';
/**

@@ -30,3 +30,3 @@ * TokensApi - axios parameter creator

*/
createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
createRestrictedDataToken: (body: CreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};

@@ -44,3 +44,3 @@ /**

*/
createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
createRestrictedDataToken(body: CreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRestrictedDataTokenResponse>>;
};

@@ -58,3 +58,3 @@ /**

*/
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: AxiosRequestConfig): AxiosPromise<CreateRestrictedDataTokenResponse>;
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateRestrictedDataTokenResponse>;
};

@@ -88,3 +88,3 @@ /**

*/
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<CreateRestrictedDataTokenResponse, any>>;
createRestrictedDataToken(requestParameters: TokensApiCreateRestrictedDataTokenRequest, options?: RawAxiosRequestConfig): Promise<globalAxios.AxiosResponse<CreateRestrictedDataTokenResponse, any>>;
}

@@ -13,3 +13,3 @@ /**

import type { Configuration } from './configuration';
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
export declare const BASE_PATH: string;

@@ -33,3 +33,3 @@ /**

url: string;
options: AxiosRequestConfig;
options: RawAxiosRequestConfig;
}

@@ -57,1 +57,13 @@ /**

}
interface ServerMap {
[key: string]: {
url: string;
description: string;
}[];
}
/**
*
* @export
*/
export declare const operationServerMap: ServerMap;
export {};

@@ -18,2 +18,3 @@ /**

basePath?: string;
serverIndex?: number;
baseOptions?: any;

@@ -58,2 +59,9 @@ formDataCtor?: new () => any;

/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls

@@ -60,0 +68,0 @@ *

@@ -12,3 +12,3 @@ /**

*/
import { RestrictedResource } from './restricted-resource';
import type { RestrictedResource } from './restricted-resource';
/**

@@ -15,0 +15,0 @@ * The request schema for the createRestrictedDataToken operation.

@@ -5,3 +5,3 @@ {

"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.",
"version": "2.0.7",
"version": "2.1.0",
"main": "dist/cjs/index.js",

@@ -22,4 +22,4 @@ "module": "dist/es/index.js",

"dependencies": {
"@sp-api-sdk/common": "2.0.7",
"axios": "^1.6.8"
"@sp-api-sdk/common": "2.0.8",
"axios": "^1.7.0"
},

@@ -45,3 +45,3 @@ "repository": {

],
"gitHead": "556cf5234c43b36ddaffa12f795a925b1c7fc63b"
"gitHead": "5a245a25a9f1765c825e2178668d4b0f4e44689b"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc