/* tslint:disable */ /* eslint-disable */ /** * Cardano Wallet Backend API *

* * OpenAPI spec version: 2021.3.4 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { BadRequest } from '../models'; import { InlineResponse20016 } from '../models'; import { NotAcceptable } from '../models'; /** * UtilsApi - axios parameter creator * @export */ export const UtilsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Get health status of the currently active SMASH server. * @summary Current SMASH health * @param {string} [url] check this url for health instead of the currently configured one * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentSmashHealth: async (url?: string, options: any = {}): Promise => { const localVarPath = `/smash/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (url !== undefined) { localVarQueryParameter['url'] = url; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * UtilsApi - functional programming interface * @export */ export const UtilsApiFp = function(configuration?: Configuration) { return { /** * Get health status of the currently active SMASH server. * @summary Current SMASH health * @param {string} [url] check this url for health instead of the currently configured one * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCurrentSmashHealth(url?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UtilsApiAxiosParamCreator(configuration).getCurrentSmashHealth(url, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * UtilsApi - factory interface * @export */ export const UtilsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Get health status of the currently active SMASH server. * @summary Current SMASH health * @param {string} [url] check this url for health instead of the currently configured one * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentSmashHealth(url?: string, options?: any): AxiosPromise { return UtilsApiFp(configuration).getCurrentSmashHealth(url, options).then((request) => request(axios, basePath)); }, }; }; /** * UtilsApi - object-oriented interface * @export * @class UtilsApi * @extends {BaseAPI} */ export class UtilsApi extends BaseAPI { /** * Get health status of the currently active SMASH server. * @summary Current SMASH health * @param {string} [url] check this url for health instead of the currently configured one * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UtilsApi */ public getCurrentSmashHealth(url?: string, options?: any) { return UtilsApiFp(this.configuration).getCurrentSmashHealth(url, options).then((request) => request(this.axios, this.basePath)); } }