forked from loafle/openapi-generator-original
[typescript] add call-time middleware support (#20430)
* add call-time middleware * update dependencies to run on current tsc * exclude middleware from inversify * update samples * update service * space * inversify exclude * braces * import in objectparamapi * add integration test for middleware * switch to configuration options merge * enable options on non inversify builds * remove unused middlware export * remove merge strategy from inversify * gen samples * remove old middlware imports * tab to space * separate promise and observable options * gen samples * use allmiddleware var across inversify * generate encode samples again * add middleware call-order tests for default typescript build * type refactor * add semicolons, default replace, let to const --------- Co-authored-by: david <david@dmba.local>
This commit is contained in:
parent
60bae732d3
commit
b3f11963c3
@ -183,7 +183,7 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
|
||||
{{/authMethods}}
|
||||
|
||||
{{^useInversify}}
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -11,13 +11,25 @@ import { JQueryHttpLibrary as DefaultHttpLibrary } from "./http/jquery";
|
||||
import { BaseServerConfiguration, server1 } from "./servers{{importFileExtension}}";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth{{importFileExtension}}";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -86,4 +98,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ export * from "./auth/auth{{importFileExtension}}";
|
||||
export * from "./models/all{{importFileExtension}}";
|
||||
{{/models.0}}
|
||||
export { createConfiguration } from "./configuration{{importFileExtension}}"
|
||||
export type { Configuration } from "./configuration{{importFileExtension}}"
|
||||
export type { Configuration{{^useInversify}}, ConfigurationOptions, PromiseConfigurationOptions{{/useInversify}} } from "./configuration{{importFileExtension}}"
|
||||
export * from "./apis/exception{{importFileExtension}}";
|
||||
export * from "./servers{{importFileExtension}}";
|
||||
export { RequiredError } from "./apis/baseapi{{importFileExtension}}";
|
||||
@ -13,7 +13,8 @@ export { RequiredError } from "./apis/baseapi{{importFileExtension}}";
|
||||
export { Middleware } from './middleware{{importFileExtension}}';
|
||||
{{/useRxJS}}
|
||||
{{^useRxJS}}
|
||||
export type { PromiseMiddleware as Middleware } from './middleware{{importFileExtension}}';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware{{importFileExtension}}';
|
||||
export { Observable } from './rxjsStub{{importFileExtension}}';
|
||||
{{/useRxJS}}
|
||||
{{#useObjectParameters}}
|
||||
export { {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}type {{classname}}{{operationIdCamelCase}}Request, {{/operation}}Object{{classname}} as {{classname}}{{^-last}}, {{/-last}} {{/operations}}{{/apis}}{{/apiInfo}}} from './types/ObjectParamAPI{{importFileExtension}}';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { HttpFile } from "../http/http";
|
||||
import type { Observable } from {{#useRxJS}}"rxjs"{{/useRxJS}}{{^useRxJS}}"../rxjsStub"{{/useRxJS}};
|
||||
import type { Configuration } from "../configuration";
|
||||
import type { Configuration{{^useInversify}}Options{{/useInversify}} } from "../configuration";
|
||||
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
@ -14,10 +14,10 @@ import { {{{ classname }}} } from "{{{ importPath }}}";
|
||||
|
||||
export abstract class AbstractObservable{{classname}} {
|
||||
{{#operation}}
|
||||
public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration{{^useInversify}}Options{{/useInversify}}): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
{{/apiInfo}}
|
||||
{{/apiInfo}}
|
||||
|
@ -1,5 +1,8 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http{{importFileExtension}}';
|
||||
import { Configuration} from '../configuration{{importFileExtension}}'
|
||||
import { Configuration{{^useInversify}}, ConfigurationOptions{{/useInversify}} } from '../configuration{{importFileExtension}}'
|
||||
{{^useInversify}}
|
||||
import type { Middleware } from "../middleware";
|
||||
{{/useInversify}}
|
||||
{{#useRxJS}}
|
||||
import { Observable } from 'rxjs';
|
||||
{{/useRxJS}}
|
||||
@ -55,7 +58,7 @@ export class Object{{classname}} {
|
||||
{{/summary}}
|
||||
* @param param the request object
|
||||
*/
|
||||
public {{nickname}}WithHttpInfo(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
public {{nickname}}WithHttpInfo(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration{{^useInversify}}Options{{/useInversify}}): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
return this.api.{{nickname}}WithHttpInfo({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}};
|
||||
}
|
||||
|
||||
@ -68,7 +71,7 @@ export class Object{{classname}} {
|
||||
{{/summary}}
|
||||
* @param param the request object
|
||||
*/
|
||||
public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, options?: Configuration{{^useInversify}}Options{{/useInversify}}): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}};
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http{{importFileExtension}}';
|
||||
import { Configuration} from '../configuration{{importFileExtension}}'
|
||||
import { Configuration{{^useInversify}}, ConfigurationOptions{{/useInversify}} } from '../configuration{{importFileExtension}}'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
|
||||
import {mergeMap, map} from {{#useRxJS}}'rxjs/operators'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
|
||||
{{#useInversify}}
|
||||
@ -61,19 +62,56 @@ export class Observable{{classname}} {
|
||||
* @param {{#required}}{{paramName}}{{/required}}{{^required}}[{{paramName}}]{{/required}}{{#description}} {{description}}{{/description}}
|
||||
{{/allParams}}
|
||||
*/
|
||||
public {{nickname}}WithHttpInfo({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Observable<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const requestContextPromise = this.requestFactory.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}_options);
|
||||
public {{nickname}}WithHttpInfo({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration{{^useInversify}}Options{{/useInversify}}): Observable<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
{{#useInversify}}
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
{{/useInversify}}
|
||||
{{^useInversify}}
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
{{/useInversify}}
|
||||
|
||||
const requestContextPromise = this.requestFactory.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}{{#useInversify}}_options{{/useInversify}}{{^useInversify}}_config{{/useInversify}});
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.{{nickname}}WithHttpInfo(rsp)));
|
||||
@ -91,7 +129,7 @@ export class Observable{{classname}} {
|
||||
* @param {{#required}}{{paramName}}{{/required}}{{^required}}[{{paramName}}]{{/required}}{{#description}} {{description}}{{/description}}
|
||||
{{/allParams}}
|
||||
*/
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration{{^useInversify}}Options{{/useInversify}}): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return this.{{nickname}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}_options).pipe(map((apiResponse: HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>) => apiResponse.data));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http{{importFileExtension}}';
|
||||
import { Configuration} from '../configuration{{importFileExtension}}'
|
||||
import { Configuration{{^useInversify}}, ConfigurationOptions, PromiseConfigurationOptions{{/useInversify}} } from '../configuration{{importFileExtension}}'
|
||||
{{^useInversify}}
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
{{/useInversify}}
|
||||
{{#useInversify}}
|
||||
import { injectable, inject, optional } from "inversify";
|
||||
import { AbstractConfiguration } from "../services/configuration";
|
||||
@ -51,8 +54,22 @@ export class Promise{{classname}} {
|
||||
* @param {{#required}}{{paramName}}{{/required}}{{^required}}[{{paramName}}]{{/required}}{{#description}} {{description}}{{/description}}
|
||||
{{/allParams}}
|
||||
*/
|
||||
public {{nickname}}WithHttpInfo({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Promise<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const result = this.api.{{nickname}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}_options);
|
||||
public {{nickname}}WithHttpInfo({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: {{#useInversify}}Configuration{{/useInversify}}{{^useInversify}}PromiseConfigurationOptions{{/useInversify}}): Promise<HttpInfo<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
let observableOptions: undefined | Configuration{{^useInversify}}Options{{/useInversify}}{{#useInversify}} = _options{{/useInversify}}
|
||||
{{^useInversify}}
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
{{/useInversify}}
|
||||
const result = this.api.{{nickname}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -67,8 +84,22 @@ export class Promise{{classname}} {
|
||||
* @param {{#required}}{{paramName}}{{/required}}{{^required}}[{{paramName}}]{{/required}}{{#description}} {{description}}{{/description}}
|
||||
{{/allParams}}
|
||||
*/
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
const result = this.api.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}_options);
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: {{#useInversify}}Configuration{{/useInversify}}{{^useInversify}}PromiseConfigurationOptions{{/useInversify}}): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
let observableOptions: undefined | Configuration{{^useInversify}}Options{{/useInversify}}{{#useInversify}} = _options{{/useInversify}}
|
||||
{{^useInversify}}
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
{{/useInversify}}
|
||||
const result = this.api.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI';
|
||||
|
||||
|
43
samples/client/others/typescript/builds/array-of-lists/package-lock.json
generated
Normal file
43
samples/client/others/typescript/builds/array-of-lists/package-lock.json
generated
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "array-of-lists",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"license": "Unlicense",
|
||||
"dependencies": {
|
||||
"es6-promise": "^4.2.4",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-fetch": {
|
||||
"version": "3.6.20",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
|
||||
"integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { List } from '../models/List';
|
||||
import { ListPaged } from '../models/ListPaged';
|
||||
@ -20,14 +21,14 @@ export class ObjectDefaultApi {
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public listWithHttpInfo(param: DefaultApiListRequest = {}, options?: Configuration): Promise<HttpInfo<ListPaged>> {
|
||||
public listWithHttpInfo(param: DefaultApiListRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<ListPaged>> {
|
||||
return this.api.listWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public list(param: DefaultApiListRequest = {}, options?: Configuration): Promise<ListPaged> {
|
||||
public list(param: DefaultApiListRequest = {}, options?: ConfigurationOptions): Promise<ListPaged> {
|
||||
return this.api.list( options).toPromise();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { List } from '../models/List';
|
||||
@ -23,19 +24,48 @@ export class ObservableDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public listWithHttpInfo(_options?: Configuration): Observable<HttpInfo<ListPaged>> {
|
||||
const requestContextPromise = this.requestFactory.list(_options);
|
||||
public listWithHttpInfo(_options?: ConfigurationOptions): Observable<HttpInfo<ListPaged>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
|
||||
const requestContextPromise = this.requestFactory.list(_config);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.listWithHttpInfo(rsp)));
|
||||
@ -44,7 +74,7 @@ export class ObservableDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public list(_options?: Configuration): Observable<ListPaged> {
|
||||
public list(_options?: ConfigurationOptions): Observable<ListPaged> {
|
||||
return this.listWithHttpInfo(_options).pipe(map((apiResponse: HttpInfo<ListPaged>) => apiResponse.data));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { List } from '../models/List';
|
||||
import { ListPaged } from '../models/ListPaged';
|
||||
@ -19,15 +20,39 @@ export class PromiseDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public listWithHttpInfo(_options?: Configuration): Promise<HttpInfo<ListPaged>> {
|
||||
const result = this.api.listWithHttpInfo(_options);
|
||||
public listWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<ListPaged>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.listWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public list(_options?: Configuration): Promise<ListPaged> {
|
||||
const result = this.api.list(_options);
|
||||
public list(_options?: PromiseConfigurationOptions): Promise<ListPaged> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.list(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { } from './types/PromiseAPI';
|
||||
|
||||
|
36
samples/client/others/typescript/builds/enum-single-value/models/SomeObject.ts
generated
Normal file
36
samples/client/others/typescript/builds/enum-single-value/models/SomeObject.ts
generated
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class SomeObject {
|
||||
'data'?: string;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "data",
|
||||
"baseName": "data",
|
||||
"type": "string",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return SomeObject.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
51
samples/client/others/typescript/builds/enum-single-value/models/WithNullableType.ts
generated
Normal file
51
samples/client/others/typescript/builds/enum-single-value/models/WithNullableType.ts
generated
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SomeObject } from '../models/SomeObject';
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class WithNullableType {
|
||||
'arrayDataOrNull': Array<SomeObject> | null;
|
||||
'stringDataOrNull': string | null;
|
||||
'oneofOrNull': SomeObject | null;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "arrayDataOrNull",
|
||||
"baseName": "arrayDataOrNull",
|
||||
"type": "Array<SomeObject>",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "stringDataOrNull",
|
||||
"baseName": "stringDataOrNull",
|
||||
"type": "string",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "oneofOrNull",
|
||||
"baseName": "oneofOrNull",
|
||||
"type": "SomeObject",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return WithNullableType.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { SingleValueEnum30 } from '../models/SingleValueEnum30';
|
||||
import { SingleValueEnum31 } from '../models/SingleValueEnum31';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { SingleValueEnum30 } from '../models/SingleValueEnum30';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { SingleValueEnum30 } from '../models/SingleValueEnum30';
|
||||
import { SingleValueEnum31 } from '../models/SingleValueEnum31';
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { } from './types/PromiseAPI';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { SomeObject } from '../models/SomeObject';
|
||||
import { WithNullableType } from '../models/WithNullableType';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { SomeObject } from '../models/SomeObject';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { SomeObject } from '../models/SomeObject';
|
||||
import { WithNullableType } from '../models/WithNullableType';
|
||||
|
@ -29,7 +29,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { Response } from '../models/Response';
|
||||
|
||||
@ -19,14 +20,14 @@ export class ObjectDefaultApi {
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public uniqueItemsWithHttpInfo(param: DefaultApiUniqueItemsRequest = {}, options?: Configuration): Promise<HttpInfo<Response>> {
|
||||
public uniqueItemsWithHttpInfo(param: DefaultApiUniqueItemsRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Response>> {
|
||||
return this.api.uniqueItemsWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public uniqueItems(param: DefaultApiUniqueItemsRequest = {}, options?: Configuration): Promise<Response> {
|
||||
public uniqueItems(param: DefaultApiUniqueItemsRequest = {}, options?: ConfigurationOptions): Promise<Response> {
|
||||
return this.api.uniqueItems( options).toPromise();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { Response } from '../models/Response';
|
||||
@ -22,19 +23,48 @@ export class ObservableDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public uniqueItemsWithHttpInfo(_options?: Configuration): Observable<HttpInfo<Response>> {
|
||||
const requestContextPromise = this.requestFactory.uniqueItems(_options);
|
||||
public uniqueItemsWithHttpInfo(_options?: ConfigurationOptions): Observable<HttpInfo<Response>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
|
||||
const requestContextPromise = this.requestFactory.uniqueItems(_config);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uniqueItemsWithHttpInfo(rsp)));
|
||||
@ -43,7 +73,7 @@ export class ObservableDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public uniqueItems(_options?: Configuration): Observable<Response> {
|
||||
public uniqueItems(_options?: ConfigurationOptions): Observable<Response> {
|
||||
return this.uniqueItemsWithHttpInfo(_options).pipe(map((apiResponse: HttpInfo<Response>) => apiResponse.data));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { Response } from '../models/Response';
|
||||
import { ObservableDefaultApi } from './ObservableAPI';
|
||||
@ -18,15 +19,39 @@ export class PromiseDefaultApi {
|
||||
|
||||
/**
|
||||
*/
|
||||
public uniqueItemsWithHttpInfo(_options?: Configuration): Promise<HttpInfo<Response>> {
|
||||
const result = this.api.uniqueItemsWithHttpInfo(_options);
|
||||
public uniqueItemsWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<Response>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uniqueItemsWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public uniqueItems(_options?: Configuration): Promise<Response> {
|
||||
const result = this.api.uniqueItems(_options);
|
||||
public uniqueItems(_options?: PromiseConfigurationOptions): Promise<Response> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uniqueItems(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -54,7 +54,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -76,7 +76,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -98,7 +98,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -120,7 +120,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -142,7 +142,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -164,7 +164,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -186,7 +186,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -208,7 +208,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -230,7 +230,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -252,7 +252,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -274,7 +274,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -296,7 +296,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -318,7 +318,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -340,7 +340,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -362,7 +362,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -402,7 +402,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -442,7 +442,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -482,7 +482,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -522,7 +522,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -562,7 +562,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -602,7 +602,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -642,7 +642,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -682,7 +682,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -722,7 +722,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -757,7 +757,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -792,7 +792,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -832,7 +832,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -872,7 +872,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -912,7 +912,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -952,7 +952,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -992,7 +992,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI';
|
||||
|
||||
|
41
samples/client/others/typescript/encode-decode/build/models/SingleValueEnum30.ts
generated
Normal file
41
samples/client/others/typescript/encode-decode/build/models/SingleValueEnum30.ts
generated
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class SingleValueEnum30 {
|
||||
'type': SingleValueEnum30TypeEnum;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "SingleValueEnum30TypeEnum",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return SingleValueEnum30.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
export enum SingleValueEnum30TypeEnum {
|
||||
ThisIsMyOnlyValue = 'this-is-my-only-value'
|
||||
}
|
||||
|
41
samples/client/others/typescript/encode-decode/build/models/SingleValueEnum31.ts
generated
Normal file
41
samples/client/others/typescript/encode-decode/build/models/SingleValueEnum31.ts
generated
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class SingleValueEnum31 {
|
||||
'type': SingleValueEnum31TypeEnum;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "SingleValueEnum31TypeEnum",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return SingleValueEnum31.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
export enum SingleValueEnum31TypeEnum {
|
||||
ThisIsMyOnlyValue = 'this-is-my-only-value'
|
||||
}
|
||||
|
36
samples/client/others/typescript/encode-decode/build/models/SomeObject.ts
generated
Normal file
36
samples/client/others/typescript/encode-decode/build/models/SomeObject.ts
generated
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class SomeObject {
|
||||
'data'?: string;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "data",
|
||||
"baseName": "data",
|
||||
"type": "string",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return SomeObject.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
51
samples/client/others/typescript/encode-decode/build/models/WithNullableType.ts
generated
Normal file
51
samples/client/others/typescript/encode-decode/build/models/WithNullableType.ts
generated
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SomeObject } from '../models/SomeObject';
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class WithNullableType {
|
||||
'arrayDataOrNull': Array<SomeObject> | null;
|
||||
'stringDataOrNull': string | null;
|
||||
'oneofOrNull': SomeObject | null;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "arrayDataOrNull",
|
||||
"baseName": "arrayDataOrNull",
|
||||
"type": "Array<SomeObject>",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "stringDataOrNull",
|
||||
"baseName": "stringDataOrNull",
|
||||
"type": "string",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "oneofOrNull",
|
||||
"baseName": "oneofOrNull",
|
||||
"type": "SomeObject",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return WithNullableType.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
@ -13,28 +13,24 @@
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"es6-promise": "^4.2.4",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"url-parse": "^1.4.3"
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/url-parse": "1.4.4",
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.7.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.6.tgz",
|
||||
"integrity": "sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==",
|
||||
"license": "MIT",
|
||||
"version": "22.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.12.0.tgz",
|
||||
"integrity": "sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
"undici-types": "~6.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
"version": "2.6.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
|
||||
"integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
|
||||
"license": "MIT",
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz",
|
||||
"integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"form-data": "^4.0.0"
|
||||
@ -44,7 +40,6 @@
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
|
||||
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
@ -54,24 +49,15 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
@ -83,7 +69,6 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
@ -91,14 +76,12 @@
|
||||
"node_modules/es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.2.tgz",
|
||||
"integrity": "sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
@ -113,7 +96,6 @@
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@ -122,7 +104,6 @@
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
@ -134,7 +115,6 @@
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
@ -150,18 +130,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
@ -179,21 +147,18 @@
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
]
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@ -203,32 +168,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/url-parse": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
|
||||
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"querystringify": "^2.1.1",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
"version": "6.20.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
||||
"license": "BSD-2-Clause"
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { ComplexObject } from '../models/ComplexObject';
|
||||
import { CompositeObject } from '../models/CompositeObject';
|
||||
@ -209,448 +210,448 @@ export class ObjectDefaultApi {
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfArraysGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfArraysGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<Array<string>>>> {
|
||||
public testDecodeArrayOfArraysGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfArraysGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<Array<string>>>> {
|
||||
return this.api.testDecodeArrayOfArraysGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfArraysGet(param: DefaultApiTestDecodeArrayOfArraysGetRequest = {}, options?: Configuration): Promise<Array<Array<string>>> {
|
||||
public testDecodeArrayOfArraysGet(param: DefaultApiTestDecodeArrayOfArraysGetRequest = {}, options?: ConfigurationOptions): Promise<Array<Array<string>>> {
|
||||
return this.api.testDecodeArrayOfArraysGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<string>>> {
|
||||
public testDecodeArrayOfGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<string>>> {
|
||||
return this.api.testDecodeArrayOfGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfGet(param: DefaultApiTestDecodeArrayOfGetRequest = {}, options?: Configuration): Promise<Array<string>> {
|
||||
public testDecodeArrayOfGet(param: DefaultApiTestDecodeArrayOfGetRequest = {}, options?: ConfigurationOptions): Promise<Array<string>> {
|
||||
return this.api.testDecodeArrayOfGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfMapsOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfMapsOfObjectsGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<{ [key: string]: ComplexObject; }>>> {
|
||||
public testDecodeArrayOfMapsOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfMapsOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<{ [key: string]: ComplexObject; }>>> {
|
||||
return this.api.testDecodeArrayOfMapsOfObjectsGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfMapsOfObjectsGet(param: DefaultApiTestDecodeArrayOfMapsOfObjectsGetRequest = {}, options?: Configuration): Promise<Array<{ [key: string]: ComplexObject; }>> {
|
||||
public testDecodeArrayOfMapsOfObjectsGet(param: DefaultApiTestDecodeArrayOfMapsOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<Array<{ [key: string]: ComplexObject; }>> {
|
||||
return this.api.testDecodeArrayOfMapsOfObjectsGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfNullableGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfNullableGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<string | null>>> {
|
||||
public testDecodeArrayOfNullableGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfNullableGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<string | null>>> {
|
||||
return this.api.testDecodeArrayOfNullableGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfNullableGet(param: DefaultApiTestDecodeArrayOfNullableGetRequest = {}, options?: Configuration): Promise<Array<string | null>> {
|
||||
public testDecodeArrayOfNullableGet(param: DefaultApiTestDecodeArrayOfNullableGetRequest = {}, options?: ConfigurationOptions): Promise<Array<string | null>> {
|
||||
return this.api.testDecodeArrayOfNullableGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfNullableObjectsGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfNullableObjectsGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<ComplexObject>>> {
|
||||
public testDecodeArrayOfNullableObjectsGetWithHttpInfo(param: DefaultApiTestDecodeArrayOfNullableObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<ComplexObject>>> {
|
||||
return this.api.testDecodeArrayOfNullableObjectsGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeArrayOfNullableObjectsGet(param: DefaultApiTestDecodeArrayOfNullableObjectsGetRequest = {}, options?: Configuration): Promise<Array<ComplexObject>> {
|
||||
public testDecodeArrayOfNullableObjectsGet(param: DefaultApiTestDecodeArrayOfNullableObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<Array<ComplexObject>> {
|
||||
return this.api.testDecodeArrayOfNullableObjectsGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeCompositeObjectsGetWithHttpInfo(param: DefaultApiTestDecodeCompositeObjectsGetRequest = {}, options?: Configuration): Promise<HttpInfo<CompositeObject>> {
|
||||
public testDecodeCompositeObjectsGetWithHttpInfo(param: DefaultApiTestDecodeCompositeObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<CompositeObject>> {
|
||||
return this.api.testDecodeCompositeObjectsGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeCompositeObjectsGet(param: DefaultApiTestDecodeCompositeObjectsGetRequest = {}, options?: Configuration): Promise<CompositeObject> {
|
||||
public testDecodeCompositeObjectsGet(param: DefaultApiTestDecodeCompositeObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<CompositeObject> {
|
||||
return this.api.testDecodeCompositeObjectsGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfMapsOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeMapOfMapsOfObjectsGetRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: { [key: string]: ComplexObject; }; }>> {
|
||||
public testDecodeMapOfMapsOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeMapOfMapsOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: { [key: string]: ComplexObject; }; }>> {
|
||||
return this.api.testDecodeMapOfMapsOfObjectsGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfMapsOfObjectsGet(param: DefaultApiTestDecodeMapOfMapsOfObjectsGetRequest = {}, options?: Configuration): Promise<{ [key: string]: { [key: string]: ComplexObject; }; }> {
|
||||
public testDecodeMapOfMapsOfObjectsGet(param: DefaultApiTestDecodeMapOfMapsOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: { [key: string]: ComplexObject; }; }> {
|
||||
return this.api.testDecodeMapOfMapsOfObjectsGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeMapOfObjectsGetRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: ComplexObject | null; }>> {
|
||||
public testDecodeMapOfObjectsGetWithHttpInfo(param: DefaultApiTestDecodeMapOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: ComplexObject | null; }>> {
|
||||
return this.api.testDecodeMapOfObjectsGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfObjectsGet(param: DefaultApiTestDecodeMapOfObjectsGetRequest = {}, options?: Configuration): Promise<{ [key: string]: ComplexObject | null; }> {
|
||||
public testDecodeMapOfObjectsGet(param: DefaultApiTestDecodeMapOfObjectsGetRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: ComplexObject | null; }> {
|
||||
return this.api.testDecodeMapOfObjectsGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfPrimitiveGetWithHttpInfo(param: DefaultApiTestDecodeMapOfPrimitiveGetRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: string; }>> {
|
||||
public testDecodeMapOfPrimitiveGetWithHttpInfo(param: DefaultApiTestDecodeMapOfPrimitiveGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: string; }>> {
|
||||
return this.api.testDecodeMapOfPrimitiveGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeMapOfPrimitiveGet(param: DefaultApiTestDecodeMapOfPrimitiveGetRequest = {}, options?: Configuration): Promise<{ [key: string]: string; }> {
|
||||
public testDecodeMapOfPrimitiveGet(param: DefaultApiTestDecodeMapOfPrimitiveGetRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: string; }> {
|
||||
return this.api.testDecodeMapOfPrimitiveGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeNullableArrayGetWithHttpInfo(param: DefaultApiTestDecodeNullableArrayGetRequest = {}, options?: Configuration): Promise<HttpInfo<Array<string>>> {
|
||||
public testDecodeNullableArrayGetWithHttpInfo(param: DefaultApiTestDecodeNullableArrayGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<Array<string>>> {
|
||||
return this.api.testDecodeNullableArrayGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeNullableArrayGet(param: DefaultApiTestDecodeNullableArrayGetRequest = {}, options?: Configuration): Promise<Array<string>> {
|
||||
public testDecodeNullableArrayGet(param: DefaultApiTestDecodeNullableArrayGetRequest = {}, options?: ConfigurationOptions): Promise<Array<string>> {
|
||||
return this.api.testDecodeNullableArrayGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeNullableGetWithHttpInfo(param: DefaultApiTestDecodeNullableGetRequest = {}, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public testDecodeNullableGetWithHttpInfo(param: DefaultApiTestDecodeNullableGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.testDecodeNullableGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeNullableGet(param: DefaultApiTestDecodeNullableGetRequest = {}, options?: Configuration): Promise<string> {
|
||||
public testDecodeNullableGet(param: DefaultApiTestDecodeNullableGetRequest = {}, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.testDecodeNullableGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeObjectGetWithHttpInfo(param: DefaultApiTestDecodeObjectGetRequest = {}, options?: Configuration): Promise<HttpInfo<ComplexObject>> {
|
||||
public testDecodeObjectGetWithHttpInfo(param: DefaultApiTestDecodeObjectGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<ComplexObject>> {
|
||||
return this.api.testDecodeObjectGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodeObjectGet(param: DefaultApiTestDecodeObjectGetRequest = {}, options?: Configuration): Promise<ComplexObject> {
|
||||
public testDecodeObjectGet(param: DefaultApiTestDecodeObjectGetRequest = {}, options?: ConfigurationOptions): Promise<ComplexObject> {
|
||||
return this.api.testDecodeObjectGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveBooleanGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveBooleanGetRequest = {}, options?: Configuration): Promise<HttpInfo<boolean>> {
|
||||
public testDecodePrimitiveBooleanGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveBooleanGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<boolean>> {
|
||||
return this.api.testDecodePrimitiveBooleanGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveBooleanGet(param: DefaultApiTestDecodePrimitiveBooleanGetRequest = {}, options?: Configuration): Promise<boolean> {
|
||||
public testDecodePrimitiveBooleanGet(param: DefaultApiTestDecodePrimitiveBooleanGetRequest = {}, options?: ConfigurationOptions): Promise<boolean> {
|
||||
return this.api.testDecodePrimitiveBooleanGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveIntegerGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveIntegerGetRequest = {}, options?: Configuration): Promise<HttpInfo<number>> {
|
||||
public testDecodePrimitiveIntegerGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveIntegerGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<number>> {
|
||||
return this.api.testDecodePrimitiveIntegerGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveIntegerGet(param: DefaultApiTestDecodePrimitiveIntegerGetRequest = {}, options?: Configuration): Promise<number> {
|
||||
public testDecodePrimitiveIntegerGet(param: DefaultApiTestDecodePrimitiveIntegerGetRequest = {}, options?: ConfigurationOptions): Promise<number> {
|
||||
return this.api.testDecodePrimitiveIntegerGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveNumberGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveNumberGetRequest = {}, options?: Configuration): Promise<HttpInfo<number>> {
|
||||
public testDecodePrimitiveNumberGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveNumberGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<number>> {
|
||||
return this.api.testDecodePrimitiveNumberGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveNumberGet(param: DefaultApiTestDecodePrimitiveNumberGetRequest = {}, options?: Configuration): Promise<number> {
|
||||
public testDecodePrimitiveNumberGet(param: DefaultApiTestDecodePrimitiveNumberGetRequest = {}, options?: ConfigurationOptions): Promise<number> {
|
||||
return this.api.testDecodePrimitiveNumberGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveStringGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveStringGetRequest = {}, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public testDecodePrimitiveStringGetWithHttpInfo(param: DefaultApiTestDecodePrimitiveStringGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.testDecodePrimitiveStringGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testDecodePrimitiveStringGet(param: DefaultApiTestDecodePrimitiveStringGetRequest = {}, options?: Configuration): Promise<string> {
|
||||
public testDecodePrimitiveStringGet(param: DefaultApiTestDecodePrimitiveStringGetRequest = {}, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.testDecodePrimitiveStringGet( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfArraysPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfArraysPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeArrayOfArraysPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfArraysPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeArrayOfArraysPostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfArraysPost(param: DefaultApiTestEncodeArrayOfArraysPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeArrayOfArraysPost(param: DefaultApiTestEncodeArrayOfArraysPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeArrayOfArraysPost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfMapsOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfMapsOfObjectsPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeArrayOfMapsOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfMapsOfObjectsPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeArrayOfMapsOfObjectsPostWithHttpInfo(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfMapsOfObjectsPost(param: DefaultApiTestEncodeArrayOfMapsOfObjectsPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeArrayOfMapsOfObjectsPost(param: DefaultApiTestEncodeArrayOfMapsOfObjectsPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeArrayOfMapsOfObjectsPost(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfNullableObjectsPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfNullableObjectsPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeArrayOfNullableObjectsPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfNullableObjectsPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeArrayOfNullableObjectsPostWithHttpInfo(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfNullableObjectsPost(param: DefaultApiTestEncodeArrayOfNullableObjectsPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeArrayOfNullableObjectsPost(param: DefaultApiTestEncodeArrayOfNullableObjectsPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeArrayOfNullableObjectsPost(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfNullablePostWithHttpInfo(param: DefaultApiTestEncodeArrayOfNullablePostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeArrayOfNullablePostWithHttpInfo(param: DefaultApiTestEncodeArrayOfNullablePostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeArrayOfNullablePostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfNullablePost(param: DefaultApiTestEncodeArrayOfNullablePostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeArrayOfNullablePost(param: DefaultApiTestEncodeArrayOfNullablePostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeArrayOfNullablePost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeArrayOfPostWithHttpInfo(param: DefaultApiTestEncodeArrayOfPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeArrayOfPostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeArrayOfPost(param: DefaultApiTestEncodeArrayOfPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeArrayOfPost(param: DefaultApiTestEncodeArrayOfPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeArrayOfPost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeCompositeObjectsPostWithHttpInfo(param: DefaultApiTestEncodeCompositeObjectsPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeCompositeObjectsPostWithHttpInfo(param: DefaultApiTestEncodeCompositeObjectsPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeCompositeObjectsPostWithHttpInfo(param.compositeObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeCompositeObjectsPost(param: DefaultApiTestEncodeCompositeObjectsPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeCompositeObjectsPost(param: DefaultApiTestEncodeCompositeObjectsPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeCompositeObjectsPost(param.compositeObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfMapsOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeMapOfMapsOfObjectsPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeMapOfMapsOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeMapOfMapsOfObjectsPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeMapOfMapsOfObjectsPostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfMapsOfObjectsPost(param: DefaultApiTestEncodeMapOfMapsOfObjectsPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeMapOfMapsOfObjectsPost(param: DefaultApiTestEncodeMapOfMapsOfObjectsPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeMapOfMapsOfObjectsPost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeMapOfObjectsPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeMapOfObjectsPostWithHttpInfo(param: DefaultApiTestEncodeMapOfObjectsPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeMapOfObjectsPostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfObjectsPost(param: DefaultApiTestEncodeMapOfObjectsPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeMapOfObjectsPost(param: DefaultApiTestEncodeMapOfObjectsPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeMapOfObjectsPost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfPrimitivePostWithHttpInfo(param: DefaultApiTestEncodeMapOfPrimitivePostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeMapOfPrimitivePostWithHttpInfo(param: DefaultApiTestEncodeMapOfPrimitivePostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeMapOfPrimitivePostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeMapOfPrimitivePost(param: DefaultApiTestEncodeMapOfPrimitivePostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeMapOfPrimitivePost(param: DefaultApiTestEncodeMapOfPrimitivePostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeMapOfPrimitivePost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeNullableArrayPostWithHttpInfo(param: DefaultApiTestEncodeNullableArrayPostRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeNullableArrayPostWithHttpInfo(param: DefaultApiTestEncodeNullableArrayPostRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeNullableArrayPostWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeNullableArrayPost(param: DefaultApiTestEncodeNullableArrayPostRequest = {}, options?: Configuration): Promise<void> {
|
||||
public testEncodeNullableArrayPost(param: DefaultApiTestEncodeNullableArrayPostRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeNullableArrayPost(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeNullablePostWithHttpInfo(param: DefaultApiTestEncodeNullablePostRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeNullablePostWithHttpInfo(param: DefaultApiTestEncodeNullablePostRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeNullablePostWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeNullablePost(param: DefaultApiTestEncodeNullablePostRequest = {}, options?: Configuration): Promise<void> {
|
||||
public testEncodeNullablePost(param: DefaultApiTestEncodeNullablePostRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeNullablePost(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeObjectPostWithHttpInfo(param: DefaultApiTestEncodeObjectPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodeObjectPostWithHttpInfo(param: DefaultApiTestEncodeObjectPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodeObjectPostWithHttpInfo(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodeObjectPost(param: DefaultApiTestEncodeObjectPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodeObjectPost(param: DefaultApiTestEncodeObjectPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodeObjectPost(param.complexObject, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveBooleanPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveBooleanPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodePrimitiveBooleanPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveBooleanPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodePrimitiveBooleanPostWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveBooleanPost(param: DefaultApiTestEncodePrimitiveBooleanPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodePrimitiveBooleanPost(param: DefaultApiTestEncodePrimitiveBooleanPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodePrimitiveBooleanPost(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveIntegerPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveIntegerPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodePrimitiveIntegerPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveIntegerPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodePrimitiveIntegerPostWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveIntegerPost(param: DefaultApiTestEncodePrimitiveIntegerPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodePrimitiveIntegerPost(param: DefaultApiTestEncodePrimitiveIntegerPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodePrimitiveIntegerPost(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveNumberPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveNumberPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodePrimitiveNumberPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveNumberPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodePrimitiveNumberPostWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveNumberPost(param: DefaultApiTestEncodePrimitiveNumberPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodePrimitiveNumberPost(param: DefaultApiTestEncodePrimitiveNumberPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodePrimitiveNumberPost(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveStringPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveStringPostRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEncodePrimitiveStringPostWithHttpInfo(param: DefaultApiTestEncodePrimitiveStringPostRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEncodePrimitiveStringPostWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEncodePrimitiveStringPost(param: DefaultApiTestEncodePrimitiveStringPostRequest, options?: Configuration): Promise<void> {
|
||||
public testEncodePrimitiveStringPost(param: DefaultApiTestEncodePrimitiveStringPostRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEncodePrimitiveStringPost(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
||||
"chai": "^4.3.0",
|
||||
"mocha": "^10.2.0",
|
||||
"ts-node": "^10.9.0",
|
||||
"typescript": "^5.2.2"
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
},
|
||||
"../build": {
|
||||
@ -29,11 +29,9 @@
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"es6-promise": "^4.2.4",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"url-parse": "^1.4.3"
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/url-parse": "1.4.4",
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
@ -1011,9 +1009,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||
"version": "5.7.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
|
||||
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
@ -58,7 +58,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -223,7 +223,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -273,7 +273,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -344,7 +344,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -417,7 +417,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -69,7 +69,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -151,7 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -189,7 +189,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -221,7 +221,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -269,7 +269,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -299,7 +299,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -355,7 +355,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse';
|
||||
import { Category } from '../models/Category';
|
||||
@ -136,7 +137,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.addPetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -145,7 +146,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise<Pet> {
|
||||
public addPet(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.addPet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -154,7 +155,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deletePetWithHttpInfo(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise<void> {
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deletePet(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -172,7 +173,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByStatusWithHttpInfo(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByStatus(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -190,7 +191,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByTagsWithHttpInfo(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -199,7 +200,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByTags(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -208,7 +209,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.getPetByIdWithHttpInfo(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -217,7 +218,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<Pet> {
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.getPetById(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -226,7 +227,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.updatePetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -235,7 +236,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise<Pet> {
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.updatePet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -244,7 +245,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithFormWithHttpInfo(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<void> {
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -262,7 +263,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithHttpInfo(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -271,7 +272,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -326,7 +327,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteOrderWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -335,7 +336,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<void> {
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteOrder(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -344,7 +345,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
return this.api.getInventoryWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
return this.api.getInventory( options).toPromise();
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.getOrderByIdWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -371,7 +372,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<Order> {
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.getOrderById(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -380,7 +381,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.placeOrderWithHttpInfo(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -389,7 +390,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<Order> {
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.placeOrder(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -493,7 +494,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUserWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -502,7 +503,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise<void> {
|
||||
public createUser(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUser(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -511,7 +512,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithArrayInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -520,7 +521,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithArrayInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -529,7 +530,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithListInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -538,7 +539,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithListInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -547,7 +548,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteUserWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -556,7 +557,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise<void> {
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteUser(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -565,7 +566,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<HttpInfo<User>> {
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
return this.api.getUserByNameWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -574,7 +575,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<User> {
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<User> {
|
||||
return this.api.getUserByName(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -583,7 +584,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.loginUserWithHttpInfo(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -592,7 +593,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise<string> {
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.loginUser(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -601,7 +602,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.logoutUserWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -610,7 +611,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<void> {
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.logoutUser( options).toPromise();
|
||||
}
|
||||
|
||||
@ -619,7 +620,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updateUserWithHttpInfo(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -628,7 +629,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise<void> {
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updateUser(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse';
|
||||
import { Category } from '../models/Category';
|
||||
@ -26,8 +27,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.addPetWithHttpInfo(pet, _options);
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -36,8 +49,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.addPet(pet, _options);
|
||||
public addPet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -47,8 +72,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, _options);
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -58,8 +95,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deletePet(petId, apiKey, _options);
|
||||
public deletePet(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePet(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -68,8 +117,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, _options);
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -78,8 +139,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByStatus(status, _options);
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatus(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -88,8 +161,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, _options);
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -98,8 +183,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByTags(tags, _options);
|
||||
public findPetsByTags(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTags(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -108,8 +205,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, _options);
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -118,8 +227,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.getPetById(petId, _options);
|
||||
public getPetById(petId: number, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetById(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -128,8 +249,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.updatePetWithHttpInfo(pet, _options);
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -138,8 +271,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.updatePet(pet, _options);
|
||||
public updatePet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -150,8 +295,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, _options);
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -162,8 +319,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updatePetWithForm(petId, name, status, _options);
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithForm(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -174,8 +343,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, _options);
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -186,8 +367,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<ApiResponse> {
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, _options);
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<ApiResponse> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -215,8 +408,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, _options);
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -225,8 +430,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteOrder(orderId, _options);
|
||||
public deleteOrder(orderId: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrder(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -234,8 +451,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventoryWithHttpInfo(_options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
const result = this.api.getInventoryWithHttpInfo(_options);
|
||||
public getInventoryWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventoryWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -243,8 +472,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(_options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
const result = this.api.getInventory(_options);
|
||||
public getInventory(_options?: PromiseConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventory(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -253,8 +494,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, _options);
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -263,8 +516,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: number, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.getOrderById(orderId, _options);
|
||||
public getOrderById(orderId: number, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderById(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -273,8 +538,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.placeOrderWithHttpInfo(order, _options);
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrderWithHttpInfo(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -283,8 +560,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(order: Order, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.placeOrder(order, _options);
|
||||
public placeOrder(order: Order, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrder(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -312,8 +601,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUserWithHttpInfo(user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUserWithHttpInfo(user, _options);
|
||||
public createUserWithHttpInfo(user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUserWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -322,8 +623,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUser(user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUser(user, _options);
|
||||
public createUser(user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUser(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -332,8 +645,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, _options);
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -342,8 +667,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithArrayInput(user, _options);
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -352,8 +689,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, _options);
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -362,8 +711,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithListInput(user, _options);
|
||||
public createUsersWithListInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -372,8 +733,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUserWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteUserWithHttpInfo(username, _options);
|
||||
public deleteUserWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUserWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -382,8 +755,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteUser(username, _options);
|
||||
public deleteUser(username: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUser(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -392,8 +777,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<User>> {
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, _options);
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -402,8 +799,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string, _options?: Configuration): Promise<User> {
|
||||
const result = this.api.getUserByName(username, _options);
|
||||
public getUserByName(username: string, _options?: PromiseConfigurationOptions): Promise<User> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByName(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -413,8 +822,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: Configuration): Promise<HttpInfo<string>> {
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, _options);
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -424,8 +845,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username: string, password: string, _options?: Configuration): Promise<string> {
|
||||
const result = this.api.loginUser(username, password, _options);
|
||||
public loginUser(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<string> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUser(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -433,8 +866,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUserWithHttpInfo(_options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.logoutUserWithHttpInfo(_options);
|
||||
public logoutUserWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUserWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -442,8 +887,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(_options?: Configuration): Promise<void> {
|
||||
const result = this.api.logoutUser(_options);
|
||||
public logoutUser(_options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUser(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -453,8 +910,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, _options);
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -464,8 +933,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUser(username: string, user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updateUser(username, user, _options);
|
||||
public updateUser(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUser(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -79,7 +79,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -114,7 +114,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromiseDefaultApi as DefaultApi } from './types/PromiseAPI';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { Cat } from '../models/Cat';
|
||||
import { Dog } from '../models/Dog';
|
||||
@ -49,42 +50,42 @@ export class ObjectDefaultApi {
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public filePostWithHttpInfo(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public filePostWithHttpInfo(param: DefaultApiFilePostRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.filePostWithHttpInfo(param.filePostRequest, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public filePost(param: DefaultApiFilePostRequest = {}, options?: Configuration): Promise<void> {
|
||||
public filePost(param: DefaultApiFilePostRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.filePost(param.filePostRequest, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public petsFilteredPatchWithHttpInfo(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public petsFilteredPatchWithHttpInfo(param: DefaultApiPetsFilteredPatchRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.petsFilteredPatchWithHttpInfo(param.petsFilteredPatchRequest, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: Configuration): Promise<void> {
|
||||
public petsFilteredPatch(param: DefaultApiPetsFilteredPatchRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.petsFilteredPatch(param.petsFilteredPatchRequest, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public petsPatchWithHttpInfo(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public petsPatchWithHttpInfo(param: DefaultApiPetsPatchRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.petsPatchWithHttpInfo(param.petsPatchRequest, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: Configuration): Promise<void> {
|
||||
public petsPatch(param: DefaultApiPetsPatchRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.petsPatch(param.petsPatchRequest, options).toPromise();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { Cat } from '../models/Cat';
|
||||
@ -29,19 +30,48 @@ export class ObservableDefaultApi {
|
||||
/**
|
||||
* @param [filePostRequest]
|
||||
*/
|
||||
public filePostWithHttpInfo(filePostRequest?: FilePostRequest, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.filePost(filePostRequest, _options);
|
||||
public filePostWithHttpInfo(filePostRequest?: FilePostRequest, _options?: ConfigurationOptions): Observable<HttpInfo<void>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
|
||||
const requestContextPromise = this.requestFactory.filePost(filePostRequest, _config);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.filePostWithHttpInfo(rsp)));
|
||||
@ -51,26 +81,55 @@ export class ObservableDefaultApi {
|
||||
/**
|
||||
* @param [filePostRequest]
|
||||
*/
|
||||
public filePost(filePostRequest?: FilePostRequest, _options?: Configuration): Observable<void> {
|
||||
public filePost(filePostRequest?: FilePostRequest, _options?: ConfigurationOptions): Observable<void> {
|
||||
return this.filePostWithHttpInfo(filePostRequest, _options).pipe(map((apiResponse: HttpInfo<void>) => apiResponse.data));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsFilteredPatchRequest]
|
||||
*/
|
||||
public petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.petsFilteredPatch(petsFilteredPatchRequest, _options);
|
||||
public petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: ConfigurationOptions): Observable<HttpInfo<void>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
|
||||
const requestContextPromise = this.requestFactory.petsFilteredPatch(petsFilteredPatchRequest, _config);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.petsFilteredPatchWithHttpInfo(rsp)));
|
||||
@ -80,26 +139,55 @@ export class ObservableDefaultApi {
|
||||
/**
|
||||
* @param [petsFilteredPatchRequest]
|
||||
*/
|
||||
public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: Configuration): Observable<void> {
|
||||
public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: ConfigurationOptions): Observable<void> {
|
||||
return this.petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest, _options).pipe(map((apiResponse: HttpInfo<void>) => apiResponse.data));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsPatchRequest]
|
||||
*/
|
||||
public petsPatchWithHttpInfo(petsPatchRequest?: PetsPatchRequest, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.petsPatch(petsPatchRequest, _options);
|
||||
public petsPatchWithHttpInfo(petsPatchRequest?: PetsPatchRequest, _options?: ConfigurationOptions): Observable<HttpInfo<void>> {
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options && _options.middleware){
|
||||
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace' // default to replace behavior
|
||||
// call-time middleware provided
|
||||
const calltimeMiddleware: Middleware[] = _options.middleware;
|
||||
|
||||
switch(middlewareMergeStrategy){
|
||||
case 'append':
|
||||
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
||||
break;
|
||||
case 'prepend':
|
||||
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware)
|
||||
break;
|
||||
case 'replace':
|
||||
allMiddleware = calltimeMiddleware
|
||||
break;
|
||||
default:
|
||||
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`)
|
||||
}
|
||||
}
|
||||
if (_options){
|
||||
_config = {
|
||||
baseServer: _options.baseServer || this.configuration.baseServer,
|
||||
httpApi: _options.httpApi || this.configuration.httpApi,
|
||||
authMethods: _options.authMethods || this.configuration.authMethods,
|
||||
middleware: allMiddleware || this.configuration.middleware
|
||||
};
|
||||
}
|
||||
|
||||
const requestContextPromise = this.requestFactory.petsPatch(petsPatchRequest, _config);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.petsPatchWithHttpInfo(rsp)));
|
||||
@ -109,7 +197,7 @@ export class ObservableDefaultApi {
|
||||
/**
|
||||
* @param [petsPatchRequest]
|
||||
*/
|
||||
public petsPatch(petsPatchRequest?: PetsPatchRequest, _options?: Configuration): Observable<void> {
|
||||
public petsPatch(petsPatchRequest?: PetsPatchRequest, _options?: ConfigurationOptions): Observable<void> {
|
||||
return this.petsPatchWithHttpInfo(petsPatchRequest, _options).pipe(map((apiResponse: HttpInfo<void>) => apiResponse.data));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { Cat } from '../models/Cat';
|
||||
import { Dog } from '../models/Dog';
|
||||
@ -25,48 +26,120 @@ export class PromiseDefaultApi {
|
||||
/**
|
||||
* @param [filePostRequest]
|
||||
*/
|
||||
public filePostWithHttpInfo(filePostRequest?: FilePostRequest, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.filePostWithHttpInfo(filePostRequest, _options);
|
||||
public filePostWithHttpInfo(filePostRequest?: FilePostRequest, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.filePostWithHttpInfo(filePostRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [filePostRequest]
|
||||
*/
|
||||
public filePost(filePostRequest?: FilePostRequest, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.filePost(filePostRequest, _options);
|
||||
public filePost(filePostRequest?: FilePostRequest, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.filePost(filePostRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsFilteredPatchRequest]
|
||||
*/
|
||||
public petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest, _options);
|
||||
public petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.petsFilteredPatchWithHttpInfo(petsFilteredPatchRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsFilteredPatchRequest]
|
||||
*/
|
||||
public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.petsFilteredPatch(petsFilteredPatchRequest, _options);
|
||||
public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.petsFilteredPatch(petsFilteredPatchRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsPatchRequest]
|
||||
*/
|
||||
public petsPatchWithHttpInfo(petsPatchRequest?: PetsPatchRequest, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.petsPatchWithHttpInfo(petsPatchRequest, _options);
|
||||
public petsPatchWithHttpInfo(petsPatchRequest?: PetsPatchRequest, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.petsPatchWithHttpInfo(petsPatchRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [petsPatchRequest]
|
||||
*/
|
||||
public petsPatch(petsPatchRequest?: PetsPatchRequest, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.petsPatch(petsPatchRequest, _options);
|
||||
public petsPatch(petsPatchRequest?: PetsPatchRequest, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.petsPatch(petsPatchRequest, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -145,7 +145,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -187,7 +187,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -225,7 +225,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -275,7 +275,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -346,7 +346,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -419,7 +419,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -71,7 +71,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -145,7 +145,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -105,7 +105,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -153,7 +153,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -191,7 +191,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -223,7 +223,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -271,7 +271,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -301,7 +301,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -357,7 +357,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI';
|
||||
|
||||
|
@ -13,11 +13,9 @@
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"es6-promise": "^4.2.4",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"url-parse": "^1.4.3"
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/url-parse": "1.4.4",
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
@ -48,12 +46,6 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -123,16 +115,6 @@
|
||||
"node": "4.x || >=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz",
|
||||
"integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg=="
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.7.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
||||
@ -145,15 +127,6 @@
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/url-parse": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz",
|
||||
"integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==",
|
||||
"dependencies": {
|
||||
"querystringify": "^2.0.0",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
@ -183,12 +156,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -240,30 +207,11 @@
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"querystringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz",
|
||||
"integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg=="
|
||||
},
|
||||
"requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.7.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
||||
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"url-parse": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz",
|
||||
"integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==",
|
||||
"requires": {
|
||||
"querystringify": "^2.0.0",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse';
|
||||
import { Category } from '../models/Category';
|
||||
@ -136,7 +137,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.addPetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -145,7 +146,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise<Pet> {
|
||||
public addPet(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.addPet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -154,7 +155,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deletePetWithHttpInfo(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise<void> {
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deletePet(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -172,7 +173,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByStatusWithHttpInfo(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByStatus(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -190,7 +191,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByTagsWithHttpInfo(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -199,7 +200,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByTags(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -208,7 +209,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.getPetByIdWithHttpInfo(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -217,7 +218,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<Pet> {
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.getPetById(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -226,7 +227,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.updatePetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -235,7 +236,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise<Pet> {
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.updatePet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -244,7 +245,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithFormWithHttpInfo(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<void> {
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -262,7 +263,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithHttpInfo(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -271,7 +272,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -326,7 +327,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteOrderWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -335,7 +336,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<void> {
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteOrder(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -344,7 +345,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
return this.api.getInventoryWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
return this.api.getInventory( options).toPromise();
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.getOrderByIdWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -371,7 +372,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<Order> {
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.getOrderById(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -380,7 +381,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.placeOrderWithHttpInfo(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -389,7 +390,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<Order> {
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.placeOrder(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -493,7 +494,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUserWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -502,7 +503,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise<void> {
|
||||
public createUser(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUser(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -511,7 +512,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithArrayInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -520,7 +521,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithArrayInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -529,7 +530,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithListInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -538,7 +539,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithListInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -547,7 +548,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteUserWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -556,7 +557,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise<void> {
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteUser(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -565,7 +566,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<HttpInfo<User>> {
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
return this.api.getUserByNameWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -574,7 +575,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<User> {
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<User> {
|
||||
return this.api.getUserByName(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -583,7 +584,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.loginUserWithHttpInfo(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -592,7 +593,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise<string> {
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.loginUser(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -601,7 +602,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.logoutUserWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -610,7 +611,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<void> {
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.logoutUser( options).toPromise();
|
||||
}
|
||||
|
||||
@ -619,7 +620,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updateUserWithHttpInfo(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -628,7 +629,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise<void> {
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updateUser(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse';
|
||||
import { Category } from '../models/Category';
|
||||
@ -26,8 +27,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.addPetWithHttpInfo(pet, _options);
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -36,8 +49,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.addPet(pet, _options);
|
||||
public addPet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -47,8 +72,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, _options);
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -58,8 +95,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deletePet(petId, apiKey, _options);
|
||||
public deletePet(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePet(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -68,8 +117,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, _options);
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -78,8 +139,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByStatus(status, _options);
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatus(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -88,8 +161,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, _options);
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -98,8 +183,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByTags(tags, _options);
|
||||
public findPetsByTags(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTags(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -108,8 +205,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, _options);
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -118,8 +227,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.getPetById(petId, _options);
|
||||
public getPetById(petId: number, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetById(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -128,8 +249,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.updatePetWithHttpInfo(pet, _options);
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -138,8 +271,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.updatePet(pet, _options);
|
||||
public updatePet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -150,8 +295,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, _options);
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -162,8 +319,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updatePetWithForm(petId, name, status, _options);
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithForm(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -174,8 +343,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, _options);
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -186,8 +367,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<ApiResponse> {
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, _options);
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<ApiResponse> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -215,8 +408,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, _options);
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -225,8 +430,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteOrder(orderId, _options);
|
||||
public deleteOrder(orderId: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrder(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -234,8 +451,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventoryWithHttpInfo(_options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
const result = this.api.getInventoryWithHttpInfo(_options);
|
||||
public getInventoryWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventoryWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -243,8 +472,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(_options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
const result = this.api.getInventory(_options);
|
||||
public getInventory(_options?: PromiseConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventory(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -253,8 +494,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, _options);
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -263,8 +516,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: number, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.getOrderById(orderId, _options);
|
||||
public getOrderById(orderId: number, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderById(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -273,8 +538,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.placeOrderWithHttpInfo(order, _options);
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrderWithHttpInfo(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -283,8 +560,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(order: Order, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.placeOrder(order, _options);
|
||||
public placeOrder(order: Order, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrder(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -312,8 +601,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUserWithHttpInfo(user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUserWithHttpInfo(user, _options);
|
||||
public createUserWithHttpInfo(user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUserWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -322,8 +623,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUser(user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUser(user, _options);
|
||||
public createUser(user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUser(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -332,8 +645,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, _options);
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -342,8 +667,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithArrayInput(user, _options);
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -352,8 +689,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, _options);
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -362,8 +711,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithListInput(user, _options);
|
||||
public createUsersWithListInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -372,8 +733,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUserWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteUserWithHttpInfo(username, _options);
|
||||
public deleteUserWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUserWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -382,8 +755,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteUser(username, _options);
|
||||
public deleteUser(username: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUser(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -392,8 +777,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<User>> {
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, _options);
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -402,8 +799,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string, _options?: Configuration): Promise<User> {
|
||||
const result = this.api.getUserByName(username, _options);
|
||||
public getUserByName(username: string, _options?: PromiseConfigurationOptions): Promise<User> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByName(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -413,8 +822,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: Configuration): Promise<HttpInfo<string>> {
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, _options);
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -424,8 +845,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username: string, password: string, _options?: Configuration): Promise<string> {
|
||||
const result = this.api.loginUser(username, password, _options);
|
||||
public loginUser(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<string> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUser(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -433,8 +866,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUserWithHttpInfo(_options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.logoutUserWithHttpInfo(_options);
|
||||
public logoutUserWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUserWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -442,8 +887,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(_options?: Configuration): Promise<void> {
|
||||
const result = this.api.logoutUser(_options);
|
||||
public logoutUser(_options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUser(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -453,8 +910,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, _options);
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -464,8 +933,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUser(username: string, user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updateUser(username, user, _options);
|
||||
public updateUser(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUser(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -223,7 +223,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -273,7 +273,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -344,7 +344,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -417,7 +417,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -69,7 +69,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -151,7 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -189,7 +189,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -221,7 +221,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -269,7 +269,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -299,7 +299,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -355,7 +355,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers.ts";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth.ts";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http.ts";
|
||||
export * from "./auth/auth.ts";
|
||||
export * from "./models/all.ts";
|
||||
export { createConfiguration } from "./configuration.ts"
|
||||
export type { Configuration } from "./configuration.ts"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration.ts"
|
||||
export * from "./apis/exception.ts";
|
||||
export * from "./servers.ts";
|
||||
export { RequiredError } from "./apis/baseapi.ts";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware.ts';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware.ts';
|
||||
export { Observable } from './rxjsStub.ts';
|
||||
export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI.ts';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.ts';
|
||||
import { Configuration} from '../configuration.ts'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration.ts'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse.ts';
|
||||
import { Category } from '../models/Category.ts';
|
||||
@ -136,7 +137,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.addPetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -145,7 +146,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise<Pet> {
|
||||
public addPet(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.addPet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -154,7 +155,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deletePetWithHttpInfo(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise<void> {
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deletePet(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -172,7 +173,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByStatusWithHttpInfo(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByStatus(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -190,7 +191,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByTagsWithHttpInfo(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -199,7 +200,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByTags(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -208,7 +209,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.getPetByIdWithHttpInfo(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -217,7 +218,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<Pet> {
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.getPetById(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -226,7 +227,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.updatePetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -235,7 +236,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise<Pet> {
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.updatePet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -244,7 +245,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithFormWithHttpInfo(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<void> {
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -262,7 +263,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithHttpInfo(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -271,7 +272,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -326,7 +327,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteOrderWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -335,7 +336,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<void> {
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteOrder(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -344,7 +345,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
return this.api.getInventoryWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
return this.api.getInventory( options).toPromise();
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.getOrderByIdWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -371,7 +372,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<Order> {
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.getOrderById(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -380,7 +381,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.placeOrderWithHttpInfo(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -389,7 +390,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<Order> {
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.placeOrder(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -493,7 +494,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUserWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -502,7 +503,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise<void> {
|
||||
public createUser(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUser(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -511,7 +512,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithArrayInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -520,7 +521,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithArrayInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -529,7 +530,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithListInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -538,7 +539,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithListInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -547,7 +548,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteUserWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -556,7 +557,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise<void> {
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteUser(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -565,7 +566,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<HttpInfo<User>> {
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
return this.api.getUserByNameWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -574,7 +575,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<User> {
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<User> {
|
||||
return this.api.getUserByName(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -583,7 +584,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.loginUserWithHttpInfo(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -592,7 +593,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise<string> {
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.loginUser(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -601,7 +602,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.logoutUserWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -610,7 +611,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<void> {
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.logoutUser( options).toPromise();
|
||||
}
|
||||
|
||||
@ -619,7 +620,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updateUserWithHttpInfo(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -628,7 +629,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise<void> {
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updateUser(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.ts';
|
||||
import { Configuration} from '../configuration.ts'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration.ts'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse.ts';
|
||||
import { Category } from '../models/Category.ts';
|
||||
@ -26,8 +27,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.addPetWithHttpInfo(pet, _options);
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -36,8 +49,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.addPet(pet, _options);
|
||||
public addPet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -47,8 +72,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, _options);
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -58,8 +95,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deletePet(petId, apiKey, _options);
|
||||
public deletePet(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePet(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -68,8 +117,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, _options);
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -78,8 +139,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByStatus(status, _options);
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatus(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -88,8 +161,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, _options);
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -98,8 +183,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByTags(tags, _options);
|
||||
public findPetsByTags(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTags(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -108,8 +205,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, _options);
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -118,8 +227,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.getPetById(petId, _options);
|
||||
public getPetById(petId: number, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetById(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -128,8 +249,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.updatePetWithHttpInfo(pet, _options);
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -138,8 +271,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.updatePet(pet, _options);
|
||||
public updatePet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -150,8 +295,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, _options);
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -162,8 +319,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updatePetWithForm(petId, name, status, _options);
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithForm(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -174,8 +343,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, _options);
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -186,8 +367,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<ApiResponse> {
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, _options);
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<ApiResponse> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -215,8 +408,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, _options);
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -225,8 +430,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteOrder(orderId, _options);
|
||||
public deleteOrder(orderId: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrder(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -234,8 +451,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventoryWithHttpInfo(_options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
const result = this.api.getInventoryWithHttpInfo(_options);
|
||||
public getInventoryWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventoryWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -243,8 +472,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(_options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
const result = this.api.getInventory(_options);
|
||||
public getInventory(_options?: PromiseConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventory(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -253,8 +494,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, _options);
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -263,8 +516,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: number, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.getOrderById(orderId, _options);
|
||||
public getOrderById(orderId: number, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderById(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -273,8 +538,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.placeOrderWithHttpInfo(order, _options);
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrderWithHttpInfo(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -283,8 +560,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(order: Order, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.placeOrder(order, _options);
|
||||
public placeOrder(order: Order, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrder(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -312,8 +601,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUserWithHttpInfo(user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUserWithHttpInfo(user, _options);
|
||||
public createUserWithHttpInfo(user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUserWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -322,8 +623,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUser(user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUser(user, _options);
|
||||
public createUser(user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUser(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -332,8 +645,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, _options);
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -342,8 +667,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithArrayInput(user, _options);
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -352,8 +689,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, _options);
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -362,8 +711,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithListInput(user, _options);
|
||||
public createUsersWithListInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -372,8 +733,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUserWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteUserWithHttpInfo(username, _options);
|
||||
public deleteUserWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUserWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -382,8 +755,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteUser(username, _options);
|
||||
public deleteUser(username: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUser(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -392,8 +777,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<User>> {
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, _options);
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -402,8 +799,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string, _options?: Configuration): Promise<User> {
|
||||
const result = this.api.getUserByName(username, _options);
|
||||
public getUserByName(username: string, _options?: PromiseConfigurationOptions): Promise<User> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByName(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -413,8 +822,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: Configuration): Promise<HttpInfo<string>> {
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, _options);
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -424,8 +845,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username: string, password: string, _options?: Configuration): Promise<string> {
|
||||
const result = this.api.loginUser(username, password, _options);
|
||||
public loginUser(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<string> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUser(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -433,8 +866,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUserWithHttpInfo(_options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.logoutUserWithHttpInfo(_options);
|
||||
public logoutUserWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUserWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -442,8 +887,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(_options?: Configuration): Promise<void> {
|
||||
const result = this.api.logoutUser(_options);
|
||||
public logoutUser(_options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUser(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -453,8 +910,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, _options);
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -464,8 +933,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUser(username: string, user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updateUser(username, user, _options);
|
||||
public updateUser(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUser(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -223,7 +223,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -273,7 +273,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -344,7 +344,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -417,7 +417,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -69,7 +69,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -101,7 +101,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -143,7 +143,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -151,7 +151,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -189,7 +189,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -221,7 +221,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -269,7 +269,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -299,7 +299,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -355,7 +355,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers.ts";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth.ts";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http.ts";
|
||||
export * from "./auth/auth.ts";
|
||||
export * from "./models/all.ts";
|
||||
export { createConfiguration } from "./configuration.ts"
|
||||
export type { Configuration } from "./configuration.ts"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration.ts"
|
||||
export * from "./apis/exception.ts";
|
||||
export * from "./servers.ts";
|
||||
export { RequiredError } from "./apis/baseapi.ts";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware.ts';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware.ts';
|
||||
export { Observable } from './rxjsStub.ts';
|
||||
export { type PetApiAddPetRequest, type PetApiDeletePetRequest, type PetApiFindPetsByStatusRequest, type PetApiFindPetsByTagsRequest, type PetApiGetPetByIdRequest, type PetApiUpdatePetRequest, type PetApiUpdatePetWithFormRequest, type PetApiUploadFileRequest, ObjectPetApi as PetApi, type StoreApiDeleteOrderRequest, type StoreApiGetInventoryRequest, type StoreApiGetOrderByIdRequest, type StoreApiPlaceOrderRequest, ObjectStoreApi as StoreApi, type UserApiCreateUserRequest, type UserApiCreateUsersWithArrayInputRequest, type UserApiCreateUsersWithListInputRequest, type UserApiDeleteUserRequest, type UserApiGetUserByNameRequest, type UserApiLoginUserRequest, type UserApiLogoutUserRequest, type UserApiUpdateUserRequest, ObjectUserApi as UserApi } from './types/ObjectParamAPI.ts';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.ts';
|
||||
import { Configuration} from '../configuration.ts'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration.ts'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse.ts';
|
||||
import { Category } from '../models/Category.ts';
|
||||
@ -136,7 +137,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.addPetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -145,7 +146,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise<Pet> {
|
||||
public addPet(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.addPet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -154,7 +155,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deletePetWithHttpInfo(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise<void> {
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deletePet(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -172,7 +173,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByStatusWithHttpInfo(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByStatus(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -190,7 +191,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByTagsWithHttpInfo(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -199,7 +200,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByTags(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -208,7 +209,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.getPetByIdWithHttpInfo(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -217,7 +218,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<Pet> {
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.getPetById(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -226,7 +227,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.updatePetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -235,7 +236,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise<Pet> {
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.updatePet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -244,7 +245,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithFormWithHttpInfo(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<void> {
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -262,7 +263,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithHttpInfo(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -271,7 +272,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -326,7 +327,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteOrderWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -335,7 +336,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<void> {
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteOrder(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -344,7 +345,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
return this.api.getInventoryWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
return this.api.getInventory( options).toPromise();
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.getOrderByIdWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -371,7 +372,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<Order> {
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.getOrderById(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -380,7 +381,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.placeOrderWithHttpInfo(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -389,7 +390,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<Order> {
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.placeOrder(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -493,7 +494,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUserWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -502,7 +503,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise<void> {
|
||||
public createUser(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUser(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -511,7 +512,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithArrayInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -520,7 +521,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithArrayInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -529,7 +530,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithListInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -538,7 +539,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithListInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -547,7 +548,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteUserWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -556,7 +557,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise<void> {
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteUser(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -565,7 +566,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<HttpInfo<User>> {
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
return this.api.getUserByNameWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -574,7 +575,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<User> {
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<User> {
|
||||
return this.api.getUserByName(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -583,7 +584,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.loginUserWithHttpInfo(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -592,7 +593,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise<string> {
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.loginUser(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -601,7 +602,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.logoutUserWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -610,7 +611,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<void> {
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.logoutUser( options).toPromise();
|
||||
}
|
||||
|
||||
@ -619,7 +620,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updateUserWithHttpInfo(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -628,7 +629,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise<void> {
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updateUser(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http.ts';
|
||||
import { Configuration} from '../configuration.ts'
|
||||
import { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from '../configuration.ts'
|
||||
import { PromiseMiddleware, Middleware, PromiseMiddlewareWrapper } from "../middleware";
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse.ts';
|
||||
import { Category } from '../models/Category.ts';
|
||||
@ -26,8 +27,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.addPetWithHttpInfo(pet, _options);
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -36,8 +49,20 @@ export class PromisePetApi {
|
||||
* Add a new pet to the store
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.addPet(pet, _options);
|
||||
public addPet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.addPet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -47,8 +72,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, _options);
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePetWithHttpInfo(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -58,8 +95,20 @@ export class PromisePetApi {
|
||||
* @param petId Pet id to delete
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deletePet(petId, apiKey, _options);
|
||||
public deletePet(petId: number, apiKey?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deletePet(petId, apiKey, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -68,8 +117,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, _options);
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatusWithHttpInfo(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -78,8 +139,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByStatus(status, _options);
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByStatus(status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -88,8 +161,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, _options);
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTagsWithHttpInfo(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -98,8 +183,20 @@ export class PromisePetApi {
|
||||
* Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, _options?: Configuration): Promise<Array<Pet>> {
|
||||
const result = this.api.findPetsByTags(tags, _options);
|
||||
public findPetsByTags(tags: Array<string>, _options?: PromiseConfigurationOptions): Promise<Array<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.findPetsByTags(tags, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -108,8 +205,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, _options);
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetByIdWithHttpInfo(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -118,8 +227,20 @@ export class PromisePetApi {
|
||||
* Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.getPetById(petId, _options);
|
||||
public getPetById(petId: number, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getPetById(petId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -128,8 +249,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
const result = this.api.updatePetWithHttpInfo(pet, _options);
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithHttpInfo(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -138,8 +271,20 @@ export class PromisePetApi {
|
||||
* Update an existing pet
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(pet: Pet, _options?: Configuration): Promise<Pet> {
|
||||
const result = this.api.updatePet(pet, _options);
|
||||
public updatePet(pet: Pet, _options?: PromiseConfigurationOptions): Promise<Pet> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePet(pet, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -150,8 +295,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, _options);
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithFormWithHttpInfo(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -162,8 +319,20 @@ export class PromisePetApi {
|
||||
* @param [name] Updated name of the pet
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updatePetWithForm(petId, name, status, _options);
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updatePetWithForm(petId, name, status, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -174,8 +343,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, _options);
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFileWithHttpInfo(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -186,8 +367,20 @@ export class PromisePetApi {
|
||||
* @param [additionalMetadata] Additional data to pass to server
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Promise<ApiResponse> {
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, _options);
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: PromiseConfigurationOptions): Promise<ApiResponse> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.uploadFile(petId, additionalMetadata, file, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -215,8 +408,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, _options);
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrderWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -225,8 +430,20 @@ export class PromiseStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteOrder(orderId, _options);
|
||||
public deleteOrder(orderId: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteOrder(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -234,8 +451,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventoryWithHttpInfo(_options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
const result = this.api.getInventoryWithHttpInfo(_options);
|
||||
public getInventoryWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventoryWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -243,8 +472,20 @@ export class PromiseStoreApi {
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(_options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
const result = this.api.getInventory(_options);
|
||||
public getInventory(_options?: PromiseConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getInventory(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -253,8 +494,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, _options);
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderByIdWithHttpInfo(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -263,8 +516,20 @@ export class PromiseStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: number, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.getOrderById(orderId, _options);
|
||||
public getOrderById(orderId: number, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getOrderById(orderId, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -273,8 +538,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
const result = this.api.placeOrderWithHttpInfo(order, _options);
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: PromiseConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrderWithHttpInfo(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -283,8 +560,20 @@ export class PromiseStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(order: Order, _options?: Configuration): Promise<Order> {
|
||||
const result = this.api.placeOrder(order, _options);
|
||||
public placeOrder(order: Order, _options?: PromiseConfigurationOptions): Promise<Order> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.placeOrder(order, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -312,8 +601,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUserWithHttpInfo(user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUserWithHttpInfo(user, _options);
|
||||
public createUserWithHttpInfo(user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUserWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -322,8 +623,20 @@ export class PromiseUserApi {
|
||||
* Create user
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUser(user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUser(user, _options);
|
||||
public createUser(user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUser(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -332,8 +645,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, _options);
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -342,8 +667,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithArrayInput(user, _options);
|
||||
public createUsersWithArrayInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithArrayInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -352,8 +689,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, _options);
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInputWithHttpInfo(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -362,8 +711,20 @@ export class PromiseUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.createUsersWithListInput(user, _options);
|
||||
public createUsersWithListInput(user: Array<User>, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.createUsersWithListInput(user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -372,8 +733,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUserWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.deleteUserWithHttpInfo(username, _options);
|
||||
public deleteUserWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUserWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -382,8 +755,20 @@ export class PromiseUserApi {
|
||||
* Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.deleteUser(username, _options);
|
||||
public deleteUser(username: string, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.deleteUser(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -392,8 +777,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: Configuration): Promise<HttpInfo<User>> {
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, _options);
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByNameWithHttpInfo(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -402,8 +799,20 @@ export class PromiseUserApi {
|
||||
* Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string, _options?: Configuration): Promise<User> {
|
||||
const result = this.api.getUserByName(username, _options);
|
||||
public getUserByName(username: string, _options?: PromiseConfigurationOptions): Promise<User> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.getUserByName(username, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -413,8 +822,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: Configuration): Promise<HttpInfo<string>> {
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, _options);
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUserWithHttpInfo(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -424,8 +845,20 @@ export class PromiseUserApi {
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username: string, password: string, _options?: Configuration): Promise<string> {
|
||||
const result = this.api.loginUser(username, password, _options);
|
||||
public loginUser(username: string, password: string, _options?: PromiseConfigurationOptions): Promise<string> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.loginUser(username, password, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -433,8 +866,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUserWithHttpInfo(_options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.logoutUserWithHttpInfo(_options);
|
||||
public logoutUserWithHttpInfo(_options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUserWithHttpInfo(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -442,8 +887,20 @@ export class PromiseUserApi {
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(_options?: Configuration): Promise<void> {
|
||||
const result = this.api.logoutUser(_options);
|
||||
public logoutUser(_options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.logoutUser(observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -453,8 +910,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: Configuration): Promise<HttpInfo<void>> {
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, _options);
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUserWithHttpInfo(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
@ -464,8 +933,20 @@ export class PromiseUserApi {
|
||||
* @param username name that need to be deleted
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUser(username: string, user: User, _options?: Configuration): Promise<void> {
|
||||
const result = this.api.updateUser(username, user, _options);
|
||||
public updateUser(username: string, user: User, _options?: PromiseConfigurationOptions): Promise<void> {
|
||||
let observableOptions: undefined | ConfigurationOptions
|
||||
if (_options){
|
||||
observableOptions = {
|
||||
baseServer: _options.baseServer,
|
||||
httpApi: _options.httpApi,
|
||||
middleware: _options.middleware?.map(
|
||||
m => new PromiseMiddlewareWrapper(m)
|
||||
),
|
||||
middlewareMergeStrategy: _options.middlewareMergeStrategy,
|
||||
authMethods: _options.authMethods
|
||||
}
|
||||
}
|
||||
const result = this.api.updateUser(username, user, observableOptions);
|
||||
return result.toPromise();
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ export class AnotherFakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -63,7 +63,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -124,7 +124,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -160,7 +160,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -196,7 +196,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -232,7 +232,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -268,7 +268,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -309,7 +309,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -350,7 +350,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -391,7 +391,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -443,7 +443,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -485,7 +485,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -642,7 +642,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -750,7 +750,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
}
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -833,7 +833,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -875,7 +875,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -942,7 +942,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
}
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -1050,7 +1050,7 @@ export class FakeApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export class FakeClassnameTags123ApiRequestFactory extends BaseAPIRequestFactory
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -145,7 +145,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -187,7 +187,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -225,7 +225,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -275,7 +275,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -346,7 +346,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -419,7 +419,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -497,7 +497,7 @@ export class PetApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -71,7 +71,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
await authMethod?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -145,7 +145,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -93,7 +93,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -135,7 +135,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -167,7 +167,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -199,7 +199,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -247,7 +247,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -271,7 +271,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
@ -321,7 +321,7 @@ export class UserApiRequestFactory extends BaseAPIRequestFactory {
|
||||
requestContext.setBody(serializedBody);
|
||||
|
||||
|
||||
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
||||
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
|
||||
if (defaultAuth?.applySecurityAuthentication) {
|
||||
await defaultAuth?.applySecurityAuthentication(requestContext);
|
||||
}
|
||||
|
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,12 @@ export * from "./http/http";
|
||||
export * from "./auth/auth";
|
||||
export * from "./models/all";
|
||||
export { createConfiguration } from "./configuration"
|
||||
export type { Configuration } from "./configuration"
|
||||
export type { Configuration, ConfigurationOptions, PromiseConfigurationOptions } from "./configuration"
|
||||
export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromiseAnotherFakeApi as AnotherFakeApi, PromiseDefaultApi as DefaultApi, PromiseFakeApi as FakeApi, PromiseFakeClassnameTags123Api as FakeClassnameTags123Api, PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration, ConfigurationOptions } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
|
||||
import { AdditionalPropertiesClass } from '../models/AdditionalPropertiesClass';
|
||||
import { AllOfWithSingleRef } from '../models/AllOfWithSingleRef';
|
||||
@ -73,7 +74,7 @@ export class ObjectAnotherFakeApi {
|
||||
* To test special tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public _123testSpecialTagsWithHttpInfo(param: AnotherFakeApi123testSpecialTagsRequest, options?: Configuration): Promise<HttpInfo<Client>> {
|
||||
public _123testSpecialTagsWithHttpInfo(param: AnotherFakeApi123testSpecialTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Client>> {
|
||||
return this.api._123testSpecialTagsWithHttpInfo(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -82,7 +83,7 @@ export class ObjectAnotherFakeApi {
|
||||
* To test special tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public _123testSpecialTags(param: AnotherFakeApi123testSpecialTagsRequest, options?: Configuration): Promise<Client> {
|
||||
public _123testSpecialTags(param: AnotherFakeApi123testSpecialTagsRequest, options?: ConfigurationOptions): Promise<Client> {
|
||||
return this.api._123testSpecialTags(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -104,14 +105,14 @@ export class ObjectDefaultApi {
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public fooGetWithHttpInfo(param: DefaultApiFooGetRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public fooGetWithHttpInfo(param: DefaultApiFooGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.fooGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public fooGet(param: DefaultApiFooGetRequest = {}, options?: Configuration): Promise<void> {
|
||||
public fooGet(param: DefaultApiFooGetRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.fooGet( options).toPromise();
|
||||
}
|
||||
|
||||
@ -547,7 +548,7 @@ export class ObjectFakeApi {
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeBigDecimalMapWithHttpInfo(param: FakeApiFakeBigDecimalMapRequest = {}, options?: Configuration): Promise<HttpInfo<FakeBigDecimalMap200Response>> {
|
||||
public fakeBigDecimalMapWithHttpInfo(param: FakeApiFakeBigDecimalMapRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<FakeBigDecimalMap200Response>> {
|
||||
return this.api.fakeBigDecimalMapWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -555,7 +556,7 @@ export class ObjectFakeApi {
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeBigDecimalMap(param: FakeApiFakeBigDecimalMapRequest = {}, options?: Configuration): Promise<FakeBigDecimalMap200Response> {
|
||||
public fakeBigDecimalMap(param: FakeApiFakeBigDecimalMapRequest = {}, options?: ConfigurationOptions): Promise<FakeBigDecimalMap200Response> {
|
||||
return this.api.fakeBigDecimalMap( options).toPromise();
|
||||
}
|
||||
|
||||
@ -563,7 +564,7 @@ export class ObjectFakeApi {
|
||||
* Health check endpoint
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeHealthGetWithHttpInfo(param: FakeApiFakeHealthGetRequest = {}, options?: Configuration): Promise<HttpInfo<HealthCheckResult>> {
|
||||
public fakeHealthGetWithHttpInfo(param: FakeApiFakeHealthGetRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<HealthCheckResult>> {
|
||||
return this.api.fakeHealthGetWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -571,7 +572,7 @@ export class ObjectFakeApi {
|
||||
* Health check endpoint
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeHealthGet(param: FakeApiFakeHealthGetRequest = {}, options?: Configuration): Promise<HealthCheckResult> {
|
||||
public fakeHealthGet(param: FakeApiFakeHealthGetRequest = {}, options?: ConfigurationOptions): Promise<HealthCheckResult> {
|
||||
return this.api.fakeHealthGet( options).toPromise();
|
||||
}
|
||||
|
||||
@ -579,7 +580,7 @@ export class ObjectFakeApi {
|
||||
* test http signature authentication
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeHttpSignatureTestWithHttpInfo(param: FakeApiFakeHttpSignatureTestRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public fakeHttpSignatureTestWithHttpInfo(param: FakeApiFakeHttpSignatureTestRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.fakeHttpSignatureTestWithHttpInfo(param.pet, param.query1, param.header1, options).toPromise();
|
||||
}
|
||||
|
||||
@ -587,7 +588,7 @@ export class ObjectFakeApi {
|
||||
* test http signature authentication
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeHttpSignatureTest(param: FakeApiFakeHttpSignatureTestRequest, options?: Configuration): Promise<void> {
|
||||
public fakeHttpSignatureTest(param: FakeApiFakeHttpSignatureTestRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.fakeHttpSignatureTest(param.pet, param.query1, param.header1, options).toPromise();
|
||||
}
|
||||
|
||||
@ -595,7 +596,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer boolean types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterBooleanSerializeWithHttpInfo(param: FakeApiFakeOuterBooleanSerializeRequest = {}, options?: Configuration): Promise<HttpInfo<boolean>> {
|
||||
public fakeOuterBooleanSerializeWithHttpInfo(param: FakeApiFakeOuterBooleanSerializeRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<boolean>> {
|
||||
return this.api.fakeOuterBooleanSerializeWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -603,7 +604,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer boolean types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterBooleanSerialize(param: FakeApiFakeOuterBooleanSerializeRequest = {}, options?: Configuration): Promise<boolean> {
|
||||
public fakeOuterBooleanSerialize(param: FakeApiFakeOuterBooleanSerializeRequest = {}, options?: ConfigurationOptions): Promise<boolean> {
|
||||
return this.api.fakeOuterBooleanSerialize(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -611,7 +612,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of object with outer number type
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterCompositeSerializeWithHttpInfo(param: FakeApiFakeOuterCompositeSerializeRequest = {}, options?: Configuration): Promise<HttpInfo<OuterComposite>> {
|
||||
public fakeOuterCompositeSerializeWithHttpInfo(param: FakeApiFakeOuterCompositeSerializeRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<OuterComposite>> {
|
||||
return this.api.fakeOuterCompositeSerializeWithHttpInfo(param.outerComposite, options).toPromise();
|
||||
}
|
||||
|
||||
@ -619,7 +620,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of object with outer number type
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterCompositeSerialize(param: FakeApiFakeOuterCompositeSerializeRequest = {}, options?: Configuration): Promise<OuterComposite> {
|
||||
public fakeOuterCompositeSerialize(param: FakeApiFakeOuterCompositeSerializeRequest = {}, options?: ConfigurationOptions): Promise<OuterComposite> {
|
||||
return this.api.fakeOuterCompositeSerialize(param.outerComposite, options).toPromise();
|
||||
}
|
||||
|
||||
@ -627,7 +628,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer number types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterNumberSerializeWithHttpInfo(param: FakeApiFakeOuterNumberSerializeRequest = {}, options?: Configuration): Promise<HttpInfo<number>> {
|
||||
public fakeOuterNumberSerializeWithHttpInfo(param: FakeApiFakeOuterNumberSerializeRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<number>> {
|
||||
return this.api.fakeOuterNumberSerializeWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -635,7 +636,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer number types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterNumberSerialize(param: FakeApiFakeOuterNumberSerializeRequest = {}, options?: Configuration): Promise<number> {
|
||||
public fakeOuterNumberSerialize(param: FakeApiFakeOuterNumberSerializeRequest = {}, options?: ConfigurationOptions): Promise<number> {
|
||||
return this.api.fakeOuterNumberSerialize(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -643,7 +644,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer string types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterStringSerializeWithHttpInfo(param: FakeApiFakeOuterStringSerializeRequest = {}, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public fakeOuterStringSerializeWithHttpInfo(param: FakeApiFakeOuterStringSerializeRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.fakeOuterStringSerializeWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -651,7 +652,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of outer string types
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakeOuterStringSerialize(param: FakeApiFakeOuterStringSerializeRequest = {}, options?: Configuration): Promise<string> {
|
||||
public fakeOuterStringSerialize(param: FakeApiFakeOuterStringSerializeRequest = {}, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.fakeOuterStringSerialize(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -659,7 +660,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of enum (int) properties with examples
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakePropertyEnumIntegerSerializeWithHttpInfo(param: FakeApiFakePropertyEnumIntegerSerializeRequest, options?: Configuration): Promise<HttpInfo<OuterObjectWithEnumProperty>> {
|
||||
public fakePropertyEnumIntegerSerializeWithHttpInfo(param: FakeApiFakePropertyEnumIntegerSerializeRequest, options?: ConfigurationOptions): Promise<HttpInfo<OuterObjectWithEnumProperty>> {
|
||||
return this.api.fakePropertyEnumIntegerSerializeWithHttpInfo(param.outerObjectWithEnumProperty, options).toPromise();
|
||||
}
|
||||
|
||||
@ -667,7 +668,7 @@ export class ObjectFakeApi {
|
||||
* Test serialization of enum (int) properties with examples
|
||||
* @param param the request object
|
||||
*/
|
||||
public fakePropertyEnumIntegerSerialize(param: FakeApiFakePropertyEnumIntegerSerializeRequest, options?: Configuration): Promise<OuterObjectWithEnumProperty> {
|
||||
public fakePropertyEnumIntegerSerialize(param: FakeApiFakePropertyEnumIntegerSerializeRequest, options?: ConfigurationOptions): Promise<OuterObjectWithEnumProperty> {
|
||||
return this.api.fakePropertyEnumIntegerSerialize(param.outerObjectWithEnumProperty, options).toPromise();
|
||||
}
|
||||
|
||||
@ -675,7 +676,7 @@ export class ObjectFakeApi {
|
||||
* For this test, the body has to be a binary file.
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithBinaryWithHttpInfo(param: FakeApiTestBodyWithBinaryRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testBodyWithBinaryWithHttpInfo(param: FakeApiTestBodyWithBinaryRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testBodyWithBinaryWithHttpInfo(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -683,7 +684,7 @@ export class ObjectFakeApi {
|
||||
* For this test, the body has to be a binary file.
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithBinary(param: FakeApiTestBodyWithBinaryRequest, options?: Configuration): Promise<void> {
|
||||
public testBodyWithBinary(param: FakeApiTestBodyWithBinaryRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testBodyWithBinary(param.body, options).toPromise();
|
||||
}
|
||||
|
||||
@ -691,7 +692,7 @@ export class ObjectFakeApi {
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithFileSchemaWithHttpInfo(param: FakeApiTestBodyWithFileSchemaRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testBodyWithFileSchemaWithHttpInfo(param: FakeApiTestBodyWithFileSchemaRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testBodyWithFileSchemaWithHttpInfo(param.fileSchemaTestClass, options).toPromise();
|
||||
}
|
||||
|
||||
@ -699,21 +700,21 @@ export class ObjectFakeApi {
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithFileSchema(param: FakeApiTestBodyWithFileSchemaRequest, options?: Configuration): Promise<void> {
|
||||
public testBodyWithFileSchema(param: FakeApiTestBodyWithFileSchemaRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testBodyWithFileSchema(param.fileSchemaTestClass, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithQueryParamsWithHttpInfo(param: FakeApiTestBodyWithQueryParamsRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testBodyWithQueryParamsWithHttpInfo(param: FakeApiTestBodyWithQueryParamsRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testBodyWithQueryParamsWithHttpInfo(param.query, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param param the request object
|
||||
*/
|
||||
public testBodyWithQueryParams(param: FakeApiTestBodyWithQueryParamsRequest, options?: Configuration): Promise<void> {
|
||||
public testBodyWithQueryParams(param: FakeApiTestBodyWithQueryParamsRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testBodyWithQueryParams(param.query, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -722,7 +723,7 @@ export class ObjectFakeApi {
|
||||
* To test \"client\" model
|
||||
* @param param the request object
|
||||
*/
|
||||
public testClientModelWithHttpInfo(param: FakeApiTestClientModelRequest, options?: Configuration): Promise<HttpInfo<Client>> {
|
||||
public testClientModelWithHttpInfo(param: FakeApiTestClientModelRequest, options?: ConfigurationOptions): Promise<HttpInfo<Client>> {
|
||||
return this.api.testClientModelWithHttpInfo(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -731,7 +732,7 @@ export class ObjectFakeApi {
|
||||
* To test \"client\" model
|
||||
* @param param the request object
|
||||
*/
|
||||
public testClientModel(param: FakeApiTestClientModelRequest, options?: Configuration): Promise<Client> {
|
||||
public testClientModel(param: FakeApiTestClientModelRequest, options?: ConfigurationOptions): Promise<Client> {
|
||||
return this.api.testClientModel(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -740,7 +741,7 @@ export class ObjectFakeApi {
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEndpointParametersWithHttpInfo(param: FakeApiTestEndpointParametersRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEndpointParametersWithHttpInfo(param: FakeApiTestEndpointParametersRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEndpointParametersWithHttpInfo(param.number, param._double, param.patternWithoutDelimiter, param._byte, param.integer, param.int32, param.int64, param._float, param.string, param.binary, param.date, param.dateTime, param.password, param.callback, options).toPromise();
|
||||
}
|
||||
|
||||
@ -749,7 +750,7 @@ export class ObjectFakeApi {
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEndpointParameters(param: FakeApiTestEndpointParametersRequest, options?: Configuration): Promise<void> {
|
||||
public testEndpointParameters(param: FakeApiTestEndpointParametersRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEndpointParameters(param.number, param._double, param.patternWithoutDelimiter, param._byte, param.integer, param.int32, param.int64, param._float, param.string, param.binary, param.date, param.dateTime, param.password, param.callback, options).toPromise();
|
||||
}
|
||||
|
||||
@ -758,7 +759,7 @@ export class ObjectFakeApi {
|
||||
* To test enum parameters
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEnumParametersWithHttpInfo(param: FakeApiTestEnumParametersRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testEnumParametersWithHttpInfo(param: FakeApiTestEnumParametersRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testEnumParametersWithHttpInfo(param.enumHeaderStringArray, param.enumHeaderString, param.enumQueryStringArray, param.enumQueryString, param.enumQueryInteger, param.enumQueryDouble, param.enumQueryModelArray, param.enumFormStringArray, param.enumFormString, options).toPromise();
|
||||
}
|
||||
|
||||
@ -767,7 +768,7 @@ export class ObjectFakeApi {
|
||||
* To test enum parameters
|
||||
* @param param the request object
|
||||
*/
|
||||
public testEnumParameters(param: FakeApiTestEnumParametersRequest = {}, options?: Configuration): Promise<void> {
|
||||
public testEnumParameters(param: FakeApiTestEnumParametersRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testEnumParameters(param.enumHeaderStringArray, param.enumHeaderString, param.enumQueryStringArray, param.enumQueryString, param.enumQueryInteger, param.enumQueryDouble, param.enumQueryModelArray, param.enumFormStringArray, param.enumFormString, options).toPromise();
|
||||
}
|
||||
|
||||
@ -776,7 +777,7 @@ export class ObjectFakeApi {
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param param the request object
|
||||
*/
|
||||
public testGroupParametersWithHttpInfo(param: FakeApiTestGroupParametersRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testGroupParametersWithHttpInfo(param: FakeApiTestGroupParametersRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testGroupParametersWithHttpInfo(param.requiredStringGroup, param.requiredBooleanGroup, param.requiredInt64Group, param.stringGroup, param.booleanGroup, param.int64Group, options).toPromise();
|
||||
}
|
||||
|
||||
@ -785,7 +786,7 @@ export class ObjectFakeApi {
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param param the request object
|
||||
*/
|
||||
public testGroupParameters(param: FakeApiTestGroupParametersRequest, options?: Configuration): Promise<void> {
|
||||
public testGroupParameters(param: FakeApiTestGroupParametersRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testGroupParameters(param.requiredStringGroup, param.requiredBooleanGroup, param.requiredInt64Group, param.stringGroup, param.booleanGroup, param.int64Group, options).toPromise();
|
||||
}
|
||||
|
||||
@ -794,7 +795,7 @@ export class ObjectFakeApi {
|
||||
* test inline additionalProperties
|
||||
* @param param the request object
|
||||
*/
|
||||
public testInlineAdditionalPropertiesWithHttpInfo(param: FakeApiTestInlineAdditionalPropertiesRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testInlineAdditionalPropertiesWithHttpInfo(param: FakeApiTestInlineAdditionalPropertiesRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testInlineAdditionalPropertiesWithHttpInfo(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
@ -803,7 +804,7 @@ export class ObjectFakeApi {
|
||||
* test inline additionalProperties
|
||||
* @param param the request object
|
||||
*/
|
||||
public testInlineAdditionalProperties(param: FakeApiTestInlineAdditionalPropertiesRequest, options?: Configuration): Promise<void> {
|
||||
public testInlineAdditionalProperties(param: FakeApiTestInlineAdditionalPropertiesRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testInlineAdditionalProperties(param.requestBody, options).toPromise();
|
||||
}
|
||||
|
||||
@ -812,7 +813,7 @@ export class ObjectFakeApi {
|
||||
* test json serialization of form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public testJsonFormDataWithHttpInfo(param: FakeApiTestJsonFormDataRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testJsonFormDataWithHttpInfo(param: FakeApiTestJsonFormDataRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testJsonFormDataWithHttpInfo(param.param, param.param2, options).toPromise();
|
||||
}
|
||||
|
||||
@ -821,7 +822,7 @@ export class ObjectFakeApi {
|
||||
* test json serialization of form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public testJsonFormData(param: FakeApiTestJsonFormDataRequest, options?: Configuration): Promise<void> {
|
||||
public testJsonFormData(param: FakeApiTestJsonFormDataRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testJsonFormData(param.param, param.param2, options).toPromise();
|
||||
}
|
||||
|
||||
@ -829,7 +830,7 @@ export class ObjectFakeApi {
|
||||
* To test the collection format in query parameters
|
||||
* @param param the request object
|
||||
*/
|
||||
public testQueryParameterCollectionFormatWithHttpInfo(param: FakeApiTestQueryParameterCollectionFormatRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public testQueryParameterCollectionFormatWithHttpInfo(param: FakeApiTestQueryParameterCollectionFormatRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.testQueryParameterCollectionFormatWithHttpInfo(param.pipe, param.ioutil, param.http, param.url, param.context, param.allowEmpty, param.language, options).toPromise();
|
||||
}
|
||||
|
||||
@ -837,7 +838,7 @@ export class ObjectFakeApi {
|
||||
* To test the collection format in query parameters
|
||||
* @param param the request object
|
||||
*/
|
||||
public testQueryParameterCollectionFormat(param: FakeApiTestQueryParameterCollectionFormatRequest, options?: Configuration): Promise<void> {
|
||||
public testQueryParameterCollectionFormat(param: FakeApiTestQueryParameterCollectionFormatRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.testQueryParameterCollectionFormat(param.pipe, param.ioutil, param.http, param.url, param.context, param.allowEmpty, param.language, options).toPromise();
|
||||
}
|
||||
|
||||
@ -867,7 +868,7 @@ export class ObjectFakeClassnameTags123Api {
|
||||
* To test class name in snake case
|
||||
* @param param the request object
|
||||
*/
|
||||
public testClassnameWithHttpInfo(param: FakeClassnameTags123ApiTestClassnameRequest, options?: Configuration): Promise<HttpInfo<Client>> {
|
||||
public testClassnameWithHttpInfo(param: FakeClassnameTags123ApiTestClassnameRequest, options?: ConfigurationOptions): Promise<HttpInfo<Client>> {
|
||||
return this.api.testClassnameWithHttpInfo(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -876,7 +877,7 @@ export class ObjectFakeClassnameTags123Api {
|
||||
* To test class name in snake case
|
||||
* @param param the request object
|
||||
*/
|
||||
public testClassname(param: FakeClassnameTags123ApiTestClassnameRequest, options?: Configuration): Promise<Client> {
|
||||
public testClassname(param: FakeClassnameTags123ApiTestClassnameRequest, options?: ConfigurationOptions): Promise<Client> {
|
||||
return this.api.testClassname(param.client, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1034,7 +1035,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public addPetWithHttpInfo(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.addPetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1043,7 +1044,7 @@ export class ObjectPetApi {
|
||||
* Add a new pet to the store
|
||||
* @param param the request object
|
||||
*/
|
||||
public addPet(param: PetApiAddPetRequest, options?: Configuration): Promise<void> {
|
||||
public addPet(param: PetApiAddPetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.addPet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1052,7 +1053,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deletePetWithHttpInfo(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deletePetWithHttpInfo(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1061,7 +1062,7 @@ export class ObjectPetApi {
|
||||
* Deletes a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: Configuration): Promise<void> {
|
||||
public deletePet(param: PetApiDeletePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deletePet(param.petId, param.apiKey, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1070,7 +1071,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<HttpInfo<Array<Pet>>> {
|
||||
public findPetsByStatusWithHttpInfo(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<HttpInfo<Array<Pet>>> {
|
||||
return this.api.findPetsByStatusWithHttpInfo(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1079,7 +1080,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: Configuration): Promise<Array<Pet>> {
|
||||
public findPetsByStatus(param: PetApiFindPetsByStatusRequest, options?: ConfigurationOptions): Promise<Array<Pet>> {
|
||||
return this.api.findPetsByStatus(param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1088,7 +1089,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<HttpInfo<Set<Pet>>> {
|
||||
public findPetsByTagsWithHttpInfo(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<HttpInfo<Set<Pet>>> {
|
||||
return this.api.findPetsByTagsWithHttpInfo(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1097,7 +1098,7 @@ export class ObjectPetApi {
|
||||
* Finds Pets by tags
|
||||
* @param param the request object
|
||||
*/
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: Configuration): Promise<Set<Pet>> {
|
||||
public findPetsByTags(param: PetApiFindPetsByTagsRequest, options?: ConfigurationOptions): Promise<Set<Pet>> {
|
||||
return this.api.findPetsByTags(param.tags, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1106,7 +1107,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<HttpInfo<Pet>> {
|
||||
public getPetByIdWithHttpInfo(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Pet>> {
|
||||
return this.api.getPetByIdWithHttpInfo(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1115,7 +1116,7 @@ export class ObjectPetApi {
|
||||
* Find pet by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: Configuration): Promise<Pet> {
|
||||
public getPetById(param: PetApiGetPetByIdRequest, options?: ConfigurationOptions): Promise<Pet> {
|
||||
return this.api.getPetById(param.petId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1124,7 +1125,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithHttpInfo(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithHttpInfo(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1133,7 +1134,7 @@ export class ObjectPetApi {
|
||||
* Update an existing pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: Configuration): Promise<void> {
|
||||
public updatePet(param: PetApiUpdatePetRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePet(param.pet, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1142,7 +1143,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updatePetWithFormWithHttpInfo(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updatePetWithFormWithHttpInfo(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1151,7 +1152,7 @@ export class ObjectPetApi {
|
||||
* Updates a pet in the store with form data
|
||||
* @param param the request object
|
||||
*/
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: Configuration): Promise<void> {
|
||||
public updatePetWithForm(param: PetApiUpdatePetWithFormRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updatePetWithForm(param.petId, param.name, param.status, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1160,7 +1161,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithHttpInfo(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithHttpInfo(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1169,7 +1170,7 @@ export class ObjectPetApi {
|
||||
* uploads an image
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFile(param: PetApiUploadFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFile(param.petId, param.additionalMetadata, param.file, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1178,7 +1179,7 @@ export class ObjectPetApi {
|
||||
* uploads an image (required)
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithRequiredFileWithHttpInfo(param: PetApiUploadFileWithRequiredFileRequest, options?: Configuration): Promise<HttpInfo<ApiResponse>> {
|
||||
public uploadFileWithRequiredFileWithHttpInfo(param: PetApiUploadFileWithRequiredFileRequest, options?: ConfigurationOptions): Promise<HttpInfo<ApiResponse>> {
|
||||
return this.api.uploadFileWithRequiredFileWithHttpInfo(param.petId, param.requiredFile, param.additionalMetadata, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1187,7 +1188,7 @@ export class ObjectPetApi {
|
||||
* uploads an image (required)
|
||||
* @param param the request object
|
||||
*/
|
||||
public uploadFileWithRequiredFile(param: PetApiUploadFileWithRequiredFileRequest, options?: Configuration): Promise<ApiResponse> {
|
||||
public uploadFileWithRequiredFile(param: PetApiUploadFileWithRequiredFileRequest, options?: ConfigurationOptions): Promise<ApiResponse> {
|
||||
return this.api.uploadFileWithRequiredFile(param.petId, param.requiredFile, param.additionalMetadata, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1242,7 +1243,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteOrderWithHttpInfo(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteOrderWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1251,7 +1252,7 @@ export class ObjectStoreApi {
|
||||
* Delete purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: Configuration): Promise<void> {
|
||||
public deleteOrder(param: StoreApiDeleteOrderRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteOrder(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1260,7 +1261,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
public getInventoryWithHttpInfo(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<{ [key: string]: number; }>> {
|
||||
return this.api.getInventoryWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -1269,7 +1270,7 @@ export class ObjectStoreApi {
|
||||
* Returns pet inventories by status
|
||||
* @param param the request object
|
||||
*/
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: Configuration): Promise<{ [key: string]: number; }> {
|
||||
public getInventory(param: StoreApiGetInventoryRequest = {}, options?: ConfigurationOptions): Promise<{ [key: string]: number; }> {
|
||||
return this.api.getInventory( options).toPromise();
|
||||
}
|
||||
|
||||
@ -1278,7 +1279,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public getOrderByIdWithHttpInfo(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.getOrderByIdWithHttpInfo(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1287,7 +1288,7 @@ export class ObjectStoreApi {
|
||||
* Find purchase order by ID
|
||||
* @param param the request object
|
||||
*/
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: Configuration): Promise<Order> {
|
||||
public getOrderById(param: StoreApiGetOrderByIdRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.getOrderById(param.orderId, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1296,7 +1297,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<HttpInfo<Order>> {
|
||||
public placeOrderWithHttpInfo(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<HttpInfo<Order>> {
|
||||
return this.api.placeOrderWithHttpInfo(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1305,7 +1306,7 @@ export class ObjectStoreApi {
|
||||
* Place an order for a pet
|
||||
* @param param the request object
|
||||
*/
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: Configuration): Promise<Order> {
|
||||
public placeOrder(param: StoreApiPlaceOrderRequest, options?: ConfigurationOptions): Promise<Order> {
|
||||
return this.api.placeOrder(param.order, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1409,7 +1410,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUserWithHttpInfo(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUserWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1418,7 +1419,7 @@ export class ObjectUserApi {
|
||||
* Create user
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUser(param: UserApiCreateUserRequest, options?: Configuration): Promise<void> {
|
||||
public createUser(param: UserApiCreateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUser(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1427,7 +1428,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithArrayInputWithHttpInfo(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithArrayInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1436,7 +1437,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithArrayInput(param: UserApiCreateUsersWithArrayInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithArrayInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1445,7 +1446,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public createUsersWithListInputWithHttpInfo(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.createUsersWithListInputWithHttpInfo(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1454,7 +1455,7 @@ export class ObjectUserApi {
|
||||
* Creates list of users with given input array
|
||||
* @param param the request object
|
||||
*/
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: Configuration): Promise<void> {
|
||||
public createUsersWithListInput(param: UserApiCreateUsersWithListInputRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.createUsersWithListInput(param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1463,7 +1464,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public deleteUserWithHttpInfo(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.deleteUserWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1472,7 +1473,7 @@ export class ObjectUserApi {
|
||||
* Delete user
|
||||
* @param param the request object
|
||||
*/
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: Configuration): Promise<void> {
|
||||
public deleteUser(param: UserApiDeleteUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.deleteUser(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1481,7 +1482,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<HttpInfo<User>> {
|
||||
public getUserByNameWithHttpInfo(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<HttpInfo<User>> {
|
||||
return this.api.getUserByNameWithHttpInfo(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1490,7 +1491,7 @@ export class ObjectUserApi {
|
||||
* Get user by user name
|
||||
* @param param the request object
|
||||
*/
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: Configuration): Promise<User> {
|
||||
public getUserByName(param: UserApiGetUserByNameRequest, options?: ConfigurationOptions): Promise<User> {
|
||||
return this.api.getUserByName(param.username, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1499,7 +1500,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: Configuration): Promise<HttpInfo<string>> {
|
||||
public loginUserWithHttpInfo(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<string>> {
|
||||
return this.api.loginUserWithHttpInfo(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1508,7 +1509,7 @@ export class ObjectUserApi {
|
||||
* Logs user into the system
|
||||
* @param param the request object
|
||||
*/
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: Configuration): Promise<string> {
|
||||
public loginUser(param: UserApiLoginUserRequest, options?: ConfigurationOptions): Promise<string> {
|
||||
return this.api.loginUser(param.username, param.password, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1517,7 +1518,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public logoutUserWithHttpInfo(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.logoutUserWithHttpInfo( options).toPromise();
|
||||
}
|
||||
|
||||
@ -1526,7 +1527,7 @@ export class ObjectUserApi {
|
||||
* Logs out current logged in user session
|
||||
* @param param the request object
|
||||
*/
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: Configuration): Promise<void> {
|
||||
public logoutUser(param: UserApiLogoutUserRequest = {}, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.logoutUser( options).toPromise();
|
||||
}
|
||||
|
||||
@ -1535,7 +1536,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: Configuration): Promise<HttpInfo<void>> {
|
||||
public updateUserWithHttpInfo(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<HttpInfo<void>> {
|
||||
return this.api.updateUserWithHttpInfo(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
@ -1544,7 +1545,7 @@ export class ObjectUserApi {
|
||||
* Updated user
|
||||
* @param param the request object
|
||||
*/
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: Configuration): Promise<void> {
|
||||
public updateUser(param: UserApiUpdateUserRequest, options?: ConfigurationOptions): Promise<void> {
|
||||
return this.api.updateUser(param.username, param.user, options).toPromise();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,13 +4,25 @@ import { IsomorphicFetchHttpLibrary as DefaultHttpLibrary } from "./http/isomorp
|
||||
import { BaseServerConfiguration, server1 } from "./servers";
|
||||
import { configureAuthMethods, AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
||||
|
||||
export interface Configuration {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: Middleware[];
|
||||
readonly authMethods: AuthMethods;
|
||||
export interface Configuration<M = Middleware> {
|
||||
readonly baseServer: BaseServerConfiguration;
|
||||
readonly httpApi: HttpLibrary;
|
||||
readonly middleware: M[];
|
||||
readonly authMethods: AuthMethods;
|
||||
}
|
||||
|
||||
// Additional option specific to middleware merge strategy
|
||||
export interface MiddlewareMergeOptions {
|
||||
// default is `'replace'` for backwards compatibility
|
||||
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
||||
}
|
||||
|
||||
// Unify configuration options using Partial plus extra merge strategy
|
||||
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
||||
|
||||
// aliases for convenience
|
||||
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
||||
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
||||
|
||||
/**
|
||||
* Interface with which a configuration object can be configured.
|
||||
@ -79,4 +91,4 @@ export function createConfiguration(conf: ConfigurationParameters = {}): Configu
|
||||
);
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,8 @@ export * from "./apis/exception";
|
||||
export * from "./servers";
|
||||
export { RequiredError } from "./apis/baseapi";
|
||||
|
||||
export type { PromiseMiddleware as Middleware } from './middleware';
|
||||
export type { PromiseMiddleware as Middleware, Middleware as ObservableMiddleware } from './middleware';
|
||||
export { Observable } from './rxjsStub';
|
||||
export { PromisePetApi as PetApi, PromiseStoreApi as StoreApi, PromiseUserApi as UserApi } from './types/PromiseAPI';
|
||||
|
||||
export * from "./services/index";
|
||||
|
@ -9,23 +9,25 @@
|
||||
"version": "1.0.0",
|
||||
"license": "Unlicense",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"es6-promise": "^4.2.4",
|
||||
"form-data": "^2.5.0",
|
||||
"inversify": "^6.0.1",
|
||||
"node-fetch": "^2.6.0",
|
||||
"url-parse": "^1.4.3"
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/url-parse": "1.4.4",
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "14.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.11.tgz",
|
||||
"integrity": "sha512-lCvvI24L21ZVeIiyIUHZ5Oflv1hhHQ5E1S25IRlKIXaRkVgmXpJMI3wUJkmym2bTbCe+WoIibQnMVAU3FguaOg=="
|
||||
"version": "22.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
|
||||
"integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
"version": "2.5.7",
|
||||
@ -49,12 +51,6 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -130,16 +126,6 @@
|
||||
"node": "4.x || >=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
|
||||
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA=="
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
@ -153,21 +139,21 @@
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/url-parse": {
|
||||
"version": "1.4.7",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
|
||||
"integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
|
||||
"dependencies": {
|
||||
"querystringify": "^2.1.1",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.20.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
|
||||
"license": "MIT"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "14.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.11.tgz",
|
||||
"integrity": "sha512-lCvvI24L21ZVeIiyIUHZ5Oflv1hhHQ5E1S25IRlKIXaRkVgmXpJMI3wUJkmym2bTbCe+WoIibQnMVAU3FguaOg=="
|
||||
"version": "22.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
|
||||
"integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
|
||||
"requires": {
|
||||
"undici-types": "~6.20.0"
|
||||
}
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
"version": "2.5.7",
|
||||
@ -190,12 +176,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -252,30 +232,16 @@
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"querystringify": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
|
||||
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA=="
|
||||
},
|
||||
"requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"dev": true
|
||||
},
|
||||
"url-parse": {
|
||||
"version": "1.4.7",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
|
||||
"integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
|
||||
"requires": {
|
||||
"querystringify": "^2.1.1",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
"undici-types": {
|
||||
"version": "6.20.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration } from '../configuration'
|
||||
|
||||
import { ApiResponse } from '../models/ApiResponse';
|
||||
import { Category } from '../models/Category';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
||||
import { Configuration} from '../configuration'
|
||||
import { Configuration } from '../configuration'
|
||||
import type { Middleware } from "../middleware";
|
||||
import { Observable, of, from } from '../rxjsStub';
|
||||
import {mergeMap, map} from '../rxjsStub';
|
||||
import { injectable, inject, optional } from "inversify";
|
||||
@ -36,18 +37,24 @@ export class ObservablePetApi {
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPetWithHttpInfo(pet: Pet, _options?: Configuration): Observable<HttpInfo<Pet>> {
|
||||
const requestContextPromise = this.requestFactory.addPet(pet, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.addPet(pet, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPetWithHttpInfo(rsp)));
|
||||
@ -70,18 +77,24 @@ export class ObservablePetApi {
|
||||
* @param [apiKey]
|
||||
*/
|
||||
public deletePetWithHttpInfo(petId: number, apiKey?: string, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.deletePet(petId, apiKey, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.deletePet(petId, apiKey, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePetWithHttpInfo(rsp)));
|
||||
@ -104,18 +117,24 @@ export class ObservablePetApi {
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, _options?: Configuration): Observable<HttpInfo<Array<Pet>>> {
|
||||
const requestContextPromise = this.requestFactory.findPetsByStatus(status, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.findPetsByStatus(status, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatusWithHttpInfo(rsp)));
|
||||
@ -137,18 +156,24 @@ export class ObservablePetApi {
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTagsWithHttpInfo(tags: Array<string>, _options?: Configuration): Observable<HttpInfo<Array<Pet>>> {
|
||||
const requestContextPromise = this.requestFactory.findPetsByTags(tags, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.findPetsByTags(tags, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTagsWithHttpInfo(rsp)));
|
||||
@ -170,18 +195,24 @@ export class ObservablePetApi {
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetByIdWithHttpInfo(petId: number, _options?: Configuration): Observable<HttpInfo<Pet>> {
|
||||
const requestContextPromise = this.requestFactory.getPetById(petId, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.getPetById(petId, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetByIdWithHttpInfo(rsp)));
|
||||
@ -203,18 +234,24 @@ export class ObservablePetApi {
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePetWithHttpInfo(pet: Pet, _options?: Configuration): Observable<HttpInfo<Pet>> {
|
||||
const requestContextPromise = this.requestFactory.updatePet(pet, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.updatePet(pet, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithHttpInfo(rsp)));
|
||||
@ -238,18 +275,24 @@ export class ObservablePetApi {
|
||||
* @param [status] Updated status of the pet
|
||||
*/
|
||||
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.updatePetWithForm(petId, name, status, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.updatePetWithForm(petId, name, status, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithFormWithHttpInfo(rsp)));
|
||||
@ -275,18 +318,24 @@ export class ObservablePetApi {
|
||||
* @param [file] file to upload
|
||||
*/
|
||||
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: HttpFile, _options?: Configuration): Observable<HttpInfo<ApiResponse>> {
|
||||
const requestContextPromise = this.requestFactory.uploadFile(petId, additionalMetadata, file, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.uploadFile(petId, additionalMetadata, file, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFileWithHttpInfo(rsp)));
|
||||
@ -331,18 +380,24 @@ export class ObservableStoreApi {
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrderWithHttpInfo(orderId: string, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.deleteOrder(orderId, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.deleteOrder(orderId, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrderWithHttpInfo(rsp)));
|
||||
@ -363,18 +418,24 @@ export class ObservableStoreApi {
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
public getInventoryWithHttpInfo(_options?: Configuration): Observable<HttpInfo<{ [key: string]: number; }>> {
|
||||
const requestContextPromise = this.requestFactory.getInventory(_options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.getInventory(_options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventoryWithHttpInfo(rsp)));
|
||||
@ -395,18 +456,24 @@ export class ObservableStoreApi {
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderByIdWithHttpInfo(orderId: number, _options?: Configuration): Observable<HttpInfo<Order>> {
|
||||
const requestContextPromise = this.requestFactory.getOrderById(orderId, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.getOrderById(orderId, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderByIdWithHttpInfo(rsp)));
|
||||
@ -428,18 +495,24 @@ export class ObservableStoreApi {
|
||||
* @param order order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrderWithHttpInfo(order: Order, _options?: Configuration): Observable<HttpInfo<Order>> {
|
||||
const requestContextPromise = this.requestFactory.placeOrder(order, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.placeOrder(order, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrderWithHttpInfo(rsp)));
|
||||
@ -482,18 +555,24 @@ export class ObservableUserApi {
|
||||
* @param user Created user object
|
||||
*/
|
||||
public createUserWithHttpInfo(user: User, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.createUser(user, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.createUser(user, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUserWithHttpInfo(rsp)));
|
||||
@ -515,18 +594,24 @@ export class ObservableUserApi {
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithArrayInputWithHttpInfo(user: Array<User>, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.createUsersWithArrayInput(user, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.createUsersWithArrayInput(user, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInputWithHttpInfo(rsp)));
|
||||
@ -548,18 +633,24 @@ export class ObservableUserApi {
|
||||
* @param user List of user object
|
||||
*/
|
||||
public createUsersWithListInputWithHttpInfo(user: Array<User>, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.createUsersWithListInput(user, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.createUsersWithListInput(user, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInputWithHttpInfo(rsp)));
|
||||
@ -581,18 +672,24 @@ export class ObservableUserApi {
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUserWithHttpInfo(username: string, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.deleteUser(username, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.deleteUser(username, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUserWithHttpInfo(rsp)));
|
||||
@ -614,18 +711,24 @@ export class ObservableUserApi {
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByNameWithHttpInfo(username: string, _options?: Configuration): Observable<HttpInfo<User>> {
|
||||
const requestContextPromise = this.requestFactory.getUserByName(username, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.getUserByName(username, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByNameWithHttpInfo(rsp)));
|
||||
@ -648,18 +751,24 @@ export class ObservableUserApi {
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUserWithHttpInfo(username: string, password: string, _options?: Configuration): Observable<HttpInfo<string>> {
|
||||
const requestContextPromise = this.requestFactory.loginUser(username, password, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.loginUser(username, password, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUserWithHttpInfo(rsp)));
|
||||
@ -681,18 +790,24 @@ export class ObservableUserApi {
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
public logoutUserWithHttpInfo(_options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.logoutUser(_options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.logoutUser(_options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUserWithHttpInfo(rsp)));
|
||||
@ -714,18 +829,24 @@ export class ObservableUserApi {
|
||||
* @param user Updated user object
|
||||
*/
|
||||
public updateUserWithHttpInfo(username: string, user: User, _options?: Configuration): Observable<HttpInfo<void>> {
|
||||
const requestContextPromise = this.requestFactory.updateUser(username, user, _options);
|
||||
let _config = this.configuration;
|
||||
let allMiddleware: Middleware[] = [];
|
||||
if (_options){
|
||||
_config = _options;
|
||||
}
|
||||
allMiddleware = _config?.middleware;
|
||||
|
||||
const requestContextPromise = this.requestFactory.updateUser(username, user, _options);
|
||||
// build promise chain
|
||||
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware) {
|
||||
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
||||
}
|
||||
|
||||
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
||||
pipe(mergeMap((response: ResponseContext) => {
|
||||
let middlewarePostObservable = of(response);
|
||||
for (const middleware of this.configuration.middleware) {
|
||||
for (const middleware of allMiddleware.reverse()) {
|
||||
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
||||
}
|
||||
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUserWithHttpInfo(rsp)));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user