/* 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 { MyStorageQuota } from '../models'; /** * QuotasApi - axios parameter creator */ export const QuotasApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit. * @summary Get my storage quota * @param {*} [options] Override http request option. * @throws {RequiredError} */ myQuota: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/quotas/me`; // 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, }; }, } }; /** * QuotasApi - functional programming interface */ export const QuotasApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = QuotasApiAxiosParamCreator(configuration) return { /** * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit. * @summary Get my storage quota * @param {*} [options] Override http request option. * @throws {RequiredError} */ async myQuota(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.myQuota(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['QuotasApi.myQuota']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * QuotasApi - factory interface */ export const QuotasApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = QuotasApiFp(configuration) return { /** * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit. * @summary Get my storage quota * @param {*} [options] Override http request option. * @throws {RequiredError} */ myQuota(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.myQuota(options).then((request) => request(axios, basePath)); }, }; }; /** * QuotasApi - object-oriented interface */ export class QuotasApi extends BaseAPI { /** * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit. * @summary Get my storage quota * @param {*} [options] Override http request option. * @throws {RequiredError} */ public myQuota(options?: RawAxiosRequestConfig) { return QuotasApiFp(this.configuration).myQuota(options).then((request) => request(this.axios, this.basePath)); } }