/* tslint:disable */ /* eslint-disable */ /** * EMIL AuthService * The EMIL AuthService API description * * The version of the OpenAPI document: 1.0 * Contact: kontakt@emil.de * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { InlineResponse200 } from '../models'; // @ts-ignore import { InlineResponse503 } from '../models'; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; const FormData = require('form-data'); /** * HealthApi - axios parameter creator * @export */ export const HealthApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available. * @summary Health Check * @param {*} [options] Override http request option. * @throws {RequiredError} */ check: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/authservice/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; let baseAccessToken; if (configuration) { baseOptions = configuration.baseOptions; baseAccessToken = configuration.accessToken; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * HealthApi - functional programming interface * @export */ export const HealthApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration) return { /** * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available. * @summary Health Check * @param {*} [options] Override http request option. * @throws {RequiredError} */ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.check(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * HealthApi - factory interface * @export */ export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = HealthApiFp(configuration) return { /** * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available. * @summary Health Check * @param {*} [options] Override http request option. * @throws {RequiredError} */ check(options?: any): AxiosPromise { return localVarFp.check(options).then((request) => request(axios, basePath)); }, }; }; /** * HealthApi - object-oriented interface * @export * @class HealthApi * @extends {BaseAPI} */ export class HealthApi extends BaseAPI { /** * Returns the health status of the auth service. This endpoint is used to monitor the operational status of the auth service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available. * @summary Health Check * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HealthApi */ public check(options?: AxiosRequestConfig) { return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath)); } }