forked from loafle/openapi-generator-original
[typescript-axios][client] Allow apiKey type Promise. (#5953)
* change apiKey type * recreate sample
This commit is contained in:
parent
41664b3ba8
commit
efae171054
@ -35,7 +35,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): RequestArgs {
|
||||
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise<RequestArgs> => {
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify required parameter '{{paramName}}' is not null or undefined
|
||||
@ -62,16 +62,16 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
{{#isKeyInHeader}}
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("{{keyParamName}}")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("{{keyParamName}}")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["{{keyParamName}}"] = localVarApiKeyValue;
|
||||
}
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("{{keyParamName}}")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("{{keyParamName}}")
|
||||
: await configuration.apiKey;
|
||||
localVarQueryParameter["{{keyParamName}}"] = localVarApiKeyValue;
|
||||
}
|
||||
{{/isKeyInQuery}}
|
||||
@ -228,8 +228,8 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
||||
const localVarAxiosArgs = {{classname}}AxiosParamCreator(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> {
|
||||
const localVarAxiosArgs = await {{classname}}AxiosParamCreator(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -259,7 +259,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
||||
return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(axios, basePath);
|
||||
return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/operation}}
|
||||
};
|
||||
@ -319,7 +319,7 @@ export class {{classname}} extends BaseAPI {
|
||||
* @memberof {{classname}}
|
||||
*/
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(this.axios, this.basePath);
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
{{/operation}}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{>licenseInfo}}
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -16,7 +16,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options: any = {}): RequestArgs {
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling addPet.');
|
||||
@ -308,7 +308,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -357,7 +357,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -405,7 +405,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -453,7 +453,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -472,8 +472,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling updatePet.');
|
||||
@ -547,7 +547,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -606,7 +606,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -672,8 +672,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -687,8 +687,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -701,8 +701,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -715,8 +715,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -729,8 +729,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -743,8 +743,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -759,8 +759,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -775,8 +775,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -799,7 +799,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -810,7 +810,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -820,7 +820,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -830,7 +830,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -840,7 +840,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -850,7 +850,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -874,7 +874,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -908,7 +908,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -920,7 +920,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -932,7 +932,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -944,7 +944,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -956,7 +956,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -970,7 +970,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -984,7 +984,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -1038,7 +1038,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1052,8 +1052,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -1077,7 +1077,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -1113,7 +1113,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.');
|
||||
@ -1161,8 +1161,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1174,8 +1174,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1188,8 +1188,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1202,8 +1202,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1226,7 +1226,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1235,7 +1235,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1245,7 +1245,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(body, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1276,7 +1276,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1287,7 +1287,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1299,7 +1299,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1311,7 +1311,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1330,7 +1330,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options: any = {}): RequestArgs {
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUser.');
|
||||
@ -1369,7 +1369,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -1408,7 +1408,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
@ -1447,7 +1447,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -1566,7 +1566,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1598,7 +1598,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -1651,8 +1651,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1665,8 +1665,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1679,8 +1679,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1693,8 +1693,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1707,8 +1707,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1722,8 +1722,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1735,8 +1735,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1750,8 +1750,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1774,7 +1774,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1784,7 +1784,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1794,7 +1794,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1804,7 +1804,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1814,7 +1814,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1825,7 +1825,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1834,7 +1834,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1845,7 +1845,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1866,7 +1866,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1878,7 +1878,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1890,7 +1890,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1902,7 +1902,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1914,7 +1914,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1927,7 +1927,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1938,7 +1938,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1951,7 +1951,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options: any = {}): RequestArgs {
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling addPet.');
|
||||
@ -308,7 +308,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -357,7 +357,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -405,7 +405,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -453,7 +453,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -472,8 +472,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling updatePet.');
|
||||
@ -547,7 +547,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -606,7 +606,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -672,8 +672,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -687,8 +687,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -701,8 +701,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -715,8 +715,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -729,8 +729,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -743,8 +743,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -759,8 +759,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -775,8 +775,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -799,7 +799,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -810,7 +810,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -820,7 +820,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -830,7 +830,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -840,7 +840,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -850,7 +850,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -874,7 +874,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -908,7 +908,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -920,7 +920,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -932,7 +932,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -944,7 +944,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -956,7 +956,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -970,7 +970,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -984,7 +984,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -1038,7 +1038,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1052,8 +1052,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -1077,7 +1077,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -1113,7 +1113,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.');
|
||||
@ -1161,8 +1161,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1174,8 +1174,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1188,8 +1188,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1202,8 +1202,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1226,7 +1226,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1235,7 +1235,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1245,7 +1245,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(body, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1276,7 +1276,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1287,7 +1287,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1299,7 +1299,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1311,7 +1311,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1330,7 +1330,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options: any = {}): RequestArgs {
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUser.');
|
||||
@ -1369,7 +1369,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -1408,7 +1408,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
@ -1447,7 +1447,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -1566,7 +1566,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1598,7 +1598,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -1651,8 +1651,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1665,8 +1665,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1679,8 +1679,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1693,8 +1693,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1707,8 +1707,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1722,8 +1722,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1735,8 +1735,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1750,8 +1750,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1774,7 +1774,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1784,7 +1784,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1794,7 +1794,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1804,7 +1804,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1814,7 +1814,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1825,7 +1825,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1834,7 +1834,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1845,7 +1845,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1866,7 +1866,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1878,7 +1878,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1890,7 +1890,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1902,7 +1902,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1914,7 +1914,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1927,7 +1927,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1938,7 +1938,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1951,7 +1951,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -299,7 +299,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options: any = {}): RequestArgs {
|
||||
addPet: async (pet: Pet, header1?: Pet, header2?: Array<Pet>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pet' is not null or undefined
|
||||
if (pet === null || pet === undefined) {
|
||||
throw new RequiredError('pet','Required parameter pet was null or undefined when calling addPet.');
|
||||
@ -357,7 +357,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -406,7 +406,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -454,7 +454,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -502,7 +502,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -521,8 +521,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(pet: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (pet: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pet' is not null or undefined
|
||||
if (pet === null || pet === undefined) {
|
||||
throw new RequiredError('pet','Required parameter pet was null or undefined when calling updatePet.');
|
||||
@ -596,7 +596,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -655,7 +655,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -723,8 +723,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, header1, header2, options);
|
||||
async addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(pet, header1, header2, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -738,8 +738,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -752,8 +752,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -766,8 +766,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -780,8 +780,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -794,8 +794,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||
async updatePet(pet: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -810,8 +810,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -826,8 +826,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -852,7 +852,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(pet, header1, header2, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(pet, header1, header2, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -863,7 +863,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -873,7 +873,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -883,7 +883,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -893,7 +893,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -903,7 +903,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(pet: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(pet, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(pet, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -915,7 +915,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -927,7 +927,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -950,7 +950,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(pet, header1, header2, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(pet, header1, header2, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -963,7 +963,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -975,7 +975,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -987,7 +987,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -999,7 +999,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1011,7 +1011,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(pet: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(pet, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1025,7 +1025,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1039,7 +1039,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1058,7 +1058,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -1093,7 +1093,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1107,8 +1107,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -1132,7 +1132,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -1168,7 +1168,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(order: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (order: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'order' is not null or undefined
|
||||
if (order === null || order === undefined) {
|
||||
throw new RequiredError('order','Required parameter order was null or undefined when calling placeOrder.');
|
||||
@ -1216,8 +1216,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1229,8 +1229,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1243,8 +1243,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1257,8 +1257,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(order: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||
async placeOrder(order: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1281,7 +1281,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1290,7 +1290,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1300,7 +1300,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1310,7 +1310,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(order: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(order, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(order, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1331,7 +1331,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1342,7 +1342,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1354,7 +1354,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1366,7 +1366,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(order: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(order, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1385,7 +1385,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(user: User, options: any = {}): RequestArgs {
|
||||
createUser: async (user: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
if (user === null || user === undefined) {
|
||||
throw new RequiredError('user','Required parameter user was null or undefined when calling createUser.');
|
||||
@ -1424,7 +1424,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(user: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (user: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
if (user === null || user === undefined) {
|
||||
throw new RequiredError('user','Required parameter user was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -1463,7 +1463,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(user: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (user: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
if (user === null || user === undefined) {
|
||||
throw new RequiredError('user','Required parameter user was null or undefined when calling createUsersWithListInput.');
|
||||
@ -1502,7 +1502,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -1538,7 +1538,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -1575,7 +1575,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -1621,7 +1621,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1653,7 +1653,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, user: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, user: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -1706,8 +1706,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||
async createUser(user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1720,8 +1720,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||
async createUsersWithArrayInput(user: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1734,8 +1734,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||
async createUsersWithListInput(user: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1748,8 +1748,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1762,8 +1762,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1777,8 +1777,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1790,8 +1790,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1805,8 +1805,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||
async updateUser(username: string, user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1829,7 +1829,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(user: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(user, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(user, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1839,7 +1839,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(user: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1849,7 +1849,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(user: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(user, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(user, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1859,7 +1859,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1869,7 +1869,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1880,7 +1880,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1889,7 +1889,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1900,7 +1900,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, user: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, user, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, user, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1921,7 +1921,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(user: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(user, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1933,7 +1933,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1945,7 +1945,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1957,7 +1957,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1969,7 +1969,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1982,7 +1982,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1993,7 +1993,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2006,7 +2006,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, user: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, user, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options: any = {}): RequestArgs {
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling addPet.');
|
||||
@ -308,7 +308,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -357,7 +357,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -405,7 +405,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -453,7 +453,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -472,8 +472,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling updatePet.');
|
||||
@ -547,7 +547,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -606,7 +606,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -672,8 +672,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -687,8 +687,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -701,8 +701,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -715,8 +715,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -729,8 +729,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -743,8 +743,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -759,8 +759,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -775,8 +775,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -799,7 +799,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -810,7 +810,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -820,7 +820,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -830,7 +830,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -840,7 +840,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -850,7 +850,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -874,7 +874,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -988,7 +988,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1001,7 +1001,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1013,7 +1013,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1025,7 +1025,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1037,7 +1037,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1049,7 +1049,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1063,7 +1063,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1077,7 +1077,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1096,7 +1096,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -1131,7 +1131,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1145,8 +1145,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -1170,7 +1170,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -1206,7 +1206,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.');
|
||||
@ -1254,8 +1254,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1267,8 +1267,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1281,8 +1281,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1295,8 +1295,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1319,7 +1319,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1328,7 +1328,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1338,7 +1338,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1348,7 +1348,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(body, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1416,7 +1416,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1427,7 +1427,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1439,7 +1439,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1451,7 +1451,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1470,7 +1470,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options: any = {}): RequestArgs {
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUser.');
|
||||
@ -1509,7 +1509,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -1548,7 +1548,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
@ -1587,7 +1587,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -1623,7 +1623,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -1660,7 +1660,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -1706,7 +1706,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1738,7 +1738,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -1791,8 +1791,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1805,8 +1805,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1819,8 +1819,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1833,8 +1833,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1847,8 +1847,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1862,8 +1862,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1875,8 +1875,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1890,8 +1890,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1914,7 +1914,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1924,7 +1924,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1934,7 +1934,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1944,7 +1944,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1954,7 +1954,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1965,7 +1965,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1974,7 +1974,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1985,7 +1985,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -2095,7 +2095,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2107,7 +2107,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2119,7 +2119,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2131,7 +2131,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2143,7 +2143,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2156,7 +2156,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2167,7 +2167,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2180,7 +2180,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -35,7 +35,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options: any = {}): RequestArgs {
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling addPet.');
|
||||
@ -84,7 +84,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -133,7 +133,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -181,7 +181,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -229,7 +229,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -248,8 +248,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling updatePet.');
|
||||
@ -323,7 +323,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -382,7 +382,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -448,8 +448,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -463,8 +463,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -477,8 +477,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -491,8 +491,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -505,8 +505,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -519,8 +519,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -535,8 +535,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -551,8 +551,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -575,7 +575,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -586,7 +586,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -596,7 +596,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -606,7 +606,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -616,7 +616,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -626,7 +626,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -638,7 +638,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -650,7 +650,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -671,7 +671,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -684,7 +684,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -696,7 +696,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -708,7 +708,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -720,7 +720,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -732,7 +732,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -746,7 +746,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -760,7 +760,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -68,7 +68,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -82,8 +82,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -143,7 +143,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.');
|
||||
@ -191,8 +191,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -204,8 +204,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -218,8 +218,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -232,8 +232,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -256,7 +256,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -265,7 +265,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -275,7 +275,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -285,7 +285,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(body, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -306,7 +306,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -317,7 +317,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -329,7 +329,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -341,7 +341,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options: any = {}): RequestArgs {
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUser.');
|
||||
@ -72,7 +72,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -111,7 +111,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
@ -150,7 +150,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -186,7 +186,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -223,7 +223,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -269,7 +269,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -301,7 +301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -354,8 +354,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -368,8 +368,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -382,8 +382,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -396,8 +396,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -410,8 +410,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -425,8 +425,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -438,8 +438,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -453,8 +453,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -477,7 +477,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -487,7 +487,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -497,7 +497,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -507,7 +507,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -517,7 +517,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -528,7 +528,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -537,7 +537,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -548,7 +548,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -569,7 +569,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -581,7 +581,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -593,7 +593,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -605,7 +605,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -617,7 +617,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -630,7 +630,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -641,7 +641,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -654,7 +654,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options: any = {}): RequestArgs {
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling addPet.');
|
||||
@ -308,7 +308,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options: any = {}): RequestArgs {
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.');
|
||||
@ -357,7 +357,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options: any = {}): RequestArgs {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
@ -405,7 +405,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options: any = {}): RequestArgs {
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
@ -453,7 +453,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options: any = {}): RequestArgs {
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.');
|
||||
@ -472,8 +472,8 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options: any = {}): RequestArgs {
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling updatePet.');
|
||||
@ -547,7 +547,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options: any = {}): RequestArgs {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.');
|
||||
@ -606,7 +606,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options: any = {}): RequestArgs {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
if (petId === null || petId === undefined) {
|
||||
throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.');
|
||||
@ -672,8 +672,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -687,8 +687,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -701,8 +701,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -715,8 +715,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -729,8 +729,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -743,8 +743,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -759,8 +759,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -775,8 +775,8 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -799,7 +799,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).addPet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -810,7 +810,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||
return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -820,7 +820,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -830,7 +830,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||
return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -840,7 +840,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet> {
|
||||
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||
return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -850,7 +850,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePet(body, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void> {
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -874,7 +874,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse> {
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).addPet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -908,7 +908,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -920,7 +920,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -932,7 +932,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -944,7 +944,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -956,7 +956,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -970,7 +970,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -984,7 +984,7 @@ export class PetApi extends BaseAPI {
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1003,7 +1003,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options: any = {}): RequestArgs {
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.');
|
||||
@ -1038,7 +1038,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options: any = {}): RequestArgs {
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/store/inventory`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1052,8 +1052,8 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// authentication api_key required
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? configuration.apiKey("api_key")
|
||||
: configuration.apiKey;
|
||||
? await configuration.apiKey("api_key")
|
||||
: await configuration.apiKey;
|
||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||
}
|
||||
|
||||
@ -1077,7 +1077,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options: any = {}): RequestArgs {
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
if (orderId === null || orderId === undefined) {
|
||||
throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.');
|
||||
@ -1113,7 +1113,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options: any = {}): RequestArgs {
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.');
|
||||
@ -1161,8 +1161,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1174,8 +1174,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1188,8 +1188,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1202,8 +1202,8 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1226,7 +1226,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void> {
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1235,7 +1235,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> {
|
||||
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1245,7 +1245,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order> {
|
||||
return StoreApiFp(configuration).placeOrder(body, options)(axios, basePath);
|
||||
return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1276,7 +1276,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1287,7 +1287,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1299,7 +1299,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1311,7 +1311,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options)(this.axios, this.basePath);
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1330,7 +1330,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options: any = {}): RequestArgs {
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUser.');
|
||||
@ -1369,7 +1369,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
@ -1408,7 +1408,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options: any = {}): RequestArgs {
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new RequiredError('body','Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
@ -1447,7 +1447,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options: any = {}): RequestArgs {
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.');
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options: any = {}): RequestArgs {
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.');
|
||||
@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options: any = {}): RequestArgs {
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.');
|
||||
@ -1566,7 +1566,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options: any = {}): RequestArgs {
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/user/logout`;
|
||||
const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
|
||||
let baseOptions;
|
||||
@ -1598,7 +1598,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options: any = {}): RequestArgs {
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.');
|
||||
@ -1651,8 +1651,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1665,8 +1665,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1679,8 +1679,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1693,8 +1693,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1707,8 +1707,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1722,8 +1722,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1735,8 +1735,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1750,8 +1750,8 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void> {
|
||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1774,7 +1774,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUser(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1784,7 +1784,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1794,7 +1794,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1804,7 +1804,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1814,7 +1814,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User> {
|
||||
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||
return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1825,7 +1825,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string> {
|
||||
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||
return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1834,7 +1834,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||
return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1845,7 +1845,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void> {
|
||||
return UserApiFp(configuration).updateUser(username, body, options)(axios, basePath);
|
||||
return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -1866,7 +1866,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).createUser(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1878,7 +1878,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1890,7 +1890,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1902,7 +1902,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1914,7 +1914,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1927,7 +1927,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1938,7 +1938,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1951,7 +1951,7 @@ export class UserApi extends BaseAPI {
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options)(this.axios, this.basePath);
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
||||
@ -27,7 +27,7 @@ export class Configuration {
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | ((name: string) => string);
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user