/* 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'; // @ts-ignore import type { MetadataKeySuggestion } from '../models'; /** * MetadataKeyControllerApi - axios parameter creator */ export const MetadataKeyControllerApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Metadata keys found on the documents the caller can see, most frequent first, with the number of documents carrying each (at most 200). Meant for autocompletion of the metadata search filter: the list is cached for a short time and is empty when it cannot be computed in time. 404 when key suggestions are disabled. * @summary List metadata keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ listMetadataKeys: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/documents/metadata-keys`; // 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, }; }, } }; /** * MetadataKeyControllerApi - functional programming interface */ export const MetadataKeyControllerApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = MetadataKeyControllerApiAxiosParamCreator(configuration) return { /** * Metadata keys found on the documents the caller can see, most frequent first, with the number of documents carrying each (at most 200). Meant for autocompletion of the metadata search filter: the list is cached for a short time and is empty when it cannot be computed in time. 404 when key suggestions are disabled. * @summary List metadata keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listMetadataKeys(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listMetadataKeys(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MetadataKeyControllerApi.listMetadataKeys']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * MetadataKeyControllerApi - factory interface */ export const MetadataKeyControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = MetadataKeyControllerApiFp(configuration) return { /** * Metadata keys found on the documents the caller can see, most frequent first, with the number of documents carrying each (at most 200). Meant for autocompletion of the metadata search filter: the list is cached for a short time and is empty when it cannot be computed in time. 404 when key suggestions are disabled. * @summary List metadata keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ listMetadataKeys(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listMetadataKeys(options).then((request) => request(axios, basePath)); }, }; }; /** * MetadataKeyControllerApi - object-oriented interface */ export class MetadataKeyControllerApi extends BaseAPI { /** * Metadata keys found on the documents the caller can see, most frequent first, with the number of documents carrying each (at most 200). Meant for autocompletion of the metadata search filter: the list is cached for a short time and is empty when it cannot be computed in time. 404 when key suggestions are disabled. * @summary List metadata keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ public listMetadataKeys(options?: RawAxiosRequestConfig) { return MetadataKeyControllerApiFp(this.configuration).listMetadataKeys(options).then((request) => request(this.axios, this.basePath)); } }