/* tslint:disable */ /* eslint-disable */ /** * Apicurio Registry API [v2] * Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. The supported artifact types include: - Apache Avro schema - AsyncAPI specification - Google protocol buffers - GraphQL schema - JSON Schema - Kafka Connect schema - OpenAPI specification - Web Services Description Language - XML Schema Definition **Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. * * The version of the OpenAPI document: 2.4.x * Contact: apicurio@lists.jboss.org * * 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 { UserInfo } from '../model'; /** * UsersApi - axios parameter creator * @export */ export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns information about the currently authenticated user. * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentUserInfo: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/users/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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * UsersApi - functional programming interface * @export */ export const UsersApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) return { /** * Returns information about the currently authenticated user. * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCurrentUserInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUserInfo(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * UsersApi - factory interface * @export */ export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = UsersApiFp(configuration) return { /** * Returns information about the currently authenticated user. * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentUserInfo(options?: any): AxiosPromise { return localVarFp.getCurrentUserInfo(options).then((request) => request(axios, basePath)); }, }; }; /** * UsersApi - interface * @export * @interface UsersApi */ export interface UsersApiInterface { /** * Returns information about the currently authenticated user. * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApiInterface */ getCurrentUserInfo(options?: AxiosRequestConfig): AxiosPromise; } /** * UsersApi - object-oriented interface * @export * @class UsersApi * @extends {BaseAPI} */ export class UsersApi extends BaseAPI implements UsersApiInterface { /** * Returns information about the currently authenticated user. * @summary Get current user * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public getCurrentUserInfo(options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).getCurrentUserInfo(options).then((request) => request(this.axios, this.basePath)); } }