/* eslint-disable */ /* tslint:disable */ /* * --------------------------------------------------------------- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## * ## ## * ## AUTHOR: acacode ## * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## * --------------------------------------------------------------- */ export declare type QueryParamsType = Record; export declare type ResponseFormat = keyof Omit; export interface FullRequestParams extends Omit { /** set parameter to `true` for call `securityWorker` for this request */ secure?: boolean; /** request path */ path: string; /** content type of request body */ type?: ContentType; /** query params */ query?: QueryParamsType; /** format of response (i.e. response.json() -> format: "json") */ format?: ResponseFormat; /** request body */ body?: unknown; /** base url */ baseUrl?: string; /** request cancellation token */ cancelToken?: CancelToken; } export declare type RequestParams = Omit; export interface ApiConfig { baseUrl?: string; baseApiParams?: Omit; securityWorker?: ( securityData: SecurityDataType | null, ) => Promise | RequestParams | void; customFetch?: typeof fetch; } export interface HttpResponse extends Response { data: D; error: E; } declare type CancelToken = Symbol | string | number; export declare enum ContentType { Json = 'application/json', FormData = 'multipart/form-data', UrlEncoded = 'application/x-www-form-urlencoded', Text = 'text/plain', } export declare class HttpClient { baseUrl: string; private securityData; private securityWorker?; private abortControllers; private customFetch; private baseApiParams; constructor(apiConfig?: ApiConfig); setSecurityData: (data: SecurityDataType | null) => void; protected encodeQueryParam(key: string, value: any): string; protected addQueryParam(query: QueryParamsType, key: string): string; protected addArrayQueryParam(query: QueryParamsType, key: string): any; protected toQueryString(rawQuery?: QueryParamsType): string; protected addQueryParams(rawQuery?: QueryParamsType): string; private contentFormatters; protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams; protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined; abortRequest: (cancelToken: CancelToken) => void; request: ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise; } export {};