/* tslint:disable */ /* eslint-disable */ /** * openfilz-api * API for Document Management System * * The version of the OpenAPI document: 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 type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; /** * McpDiscoveryControllerApi - axios parameter creator */ export const McpDiscoveryControllerApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ authorizationServerMetadata: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/.well-known/oauth-authorization-server`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ protectedResourceMetadata: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/.well-known/oauth-protected-resource`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication keycloak_auth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Accept'] = '*/*'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * McpDiscoveryControllerApi - functional programming interface */ export const McpDiscoveryControllerApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = McpDiscoveryControllerApiAxiosParamCreator(configuration) return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async authorizationServerMetadata(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.authorizationServerMetadata(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['McpDiscoveryControllerApi.authorizationServerMetadata']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async protectedResourceMetadata(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.protectedResourceMetadata(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['McpDiscoveryControllerApi.protectedResourceMetadata']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * McpDiscoveryControllerApi - factory interface */ export const McpDiscoveryControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = McpDiscoveryControllerApiFp(configuration) return { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ authorizationServerMetadata(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.authorizationServerMetadata(options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ protectedResourceMetadata(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> { return localVarFp.protectedResourceMetadata(options).then((request) => request(axios, basePath)); }, }; }; /** * McpDiscoveryControllerApi - object-oriented interface */ export class McpDiscoveryControllerApi extends BaseAPI { /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ public authorizationServerMetadata(options?: RawAxiosRequestConfig) { return McpDiscoveryControllerApiFp(this.configuration).authorizationServerMetadata(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ public protectedResourceMetadata(options?: RawAxiosRequestConfig) { return McpDiscoveryControllerApiFp(this.configuration).protectedResourceMetadata(options).then((request) => request(this.axios, this.basePath)); } }