/* tslint:disable */ /* eslint-disable */ /** * Argo Workflows API * Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. For more information, please see https://argoproj.github.io/argo-workflows/ * * OpenAPI spec version: VERSION * * * 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, { AxiosResponse, AxiosInstance, AxiosRequestConfig } 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 { GrpcGatewayRuntimeError } from '../models'; import { IoArgoprojWorkflowV1alpha1CollectEventRequest } from '../models'; import { IoArgoprojWorkflowV1alpha1CollectEventResponse } from '../models'; import { IoArgoprojWorkflowV1alpha1GetUserInfoResponse } from '../models'; import { IoArgoprojWorkflowV1alpha1InfoResponse } from '../models'; import { IoArgoprojWorkflowV1alpha1Version } from '../models'; /** * InfoServiceApi - axios parameter creator * @export */ export const InfoServiceApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {IoArgoprojWorkflowV1alpha1CollectEventRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ infoServiceCollectEvent: async (body: IoArgoprojWorkflowV1alpha1CollectEventRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError('body','Required parameter body was null or undefined when calling infoServiceCollectEvent.'); } const localVarPath = `/api/v1/tracking/event`; // 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 :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required if (configuration && configuration.apiKey) { const localVarApiKeyValue = typeof configuration.apiKey === 'function' ? await configuration.apiKey("Authorization") : await configuration.apiKey; localVarHeaderParameter["Authorization"] = localVarApiKeyValue; } localVarHeaderParameter['Content-Type'] = 'application/json'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ infoServiceGetInfo: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/info`; // 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 :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required if (configuration && configuration.apiKey) { const localVarApiKeyValue = typeof configuration.apiKey === 'function' ? await configuration.apiKey("Authorization") : await configuration.apiKey; localVarHeaderParameter["Authorization"] = localVarApiKeyValue; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[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, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ infoServiceGetUserInfo: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/userinfo`; // 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 :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required if (configuration && configuration.apiKey) { const localVarApiKeyValue = typeof configuration.apiKey === 'function' ? await configuration.apiKey("Authorization") : await configuration.apiKey; localVarHeaderParameter["Authorization"] = localVarApiKeyValue; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[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, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ infoServiceGetVersion: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/version`; // 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 :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required if (configuration && configuration.apiKey) { const localVarApiKeyValue = typeof configuration.apiKey === 'function' ? await configuration.apiKey("Authorization") : await configuration.apiKey; localVarHeaderParameter["Authorization"] = localVarApiKeyValue; } const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.params) { query.set(key, options.params[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, }; }, } }; /** * InfoServiceApi - functional programming interface * @export */ export const InfoServiceApiFp = function(configuration?: Configuration) { return { /** * * @param {IoArgoprojWorkflowV1alpha1CollectEventRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceCollectEvent(body: IoArgoprojWorkflowV1alpha1CollectEventRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await InfoServiceApiAxiosParamCreator(configuration).infoServiceCollectEvent(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await InfoServiceApiAxiosParamCreator(configuration).infoServiceGetInfo(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetUserInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await InfoServiceApiAxiosParamCreator(configuration).infoServiceGetUserInfo(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await InfoServiceApiAxiosParamCreator(configuration).infoServiceGetVersion(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * InfoServiceApi - factory interface * @export */ export const InfoServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * * @param {IoArgoprojWorkflowV1alpha1CollectEventRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceCollectEvent(body: IoArgoprojWorkflowV1alpha1CollectEventRequest, options?: AxiosRequestConfig): Promise> { return InfoServiceApiFp(configuration).infoServiceCollectEvent(body, options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetInfo(options?: AxiosRequestConfig): Promise> { return InfoServiceApiFp(configuration).infoServiceGetInfo(options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetUserInfo(options?: AxiosRequestConfig): Promise> { return InfoServiceApiFp(configuration).infoServiceGetUserInfo(options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async infoServiceGetVersion(options?: AxiosRequestConfig): Promise> { return InfoServiceApiFp(configuration).infoServiceGetVersion(options).then((request) => request(axios, basePath)); }, }; }; /** * InfoServiceApi - object-oriented interface * @export * @class InfoServiceApi * @extends {BaseAPI} */ export class InfoServiceApi extends BaseAPI { /** * * @param {IoArgoprojWorkflowV1alpha1CollectEventRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InfoServiceApi */ public async infoServiceCollectEvent(body: IoArgoprojWorkflowV1alpha1CollectEventRequest, options?: AxiosRequestConfig) : Promise> { return InfoServiceApiFp(this.configuration).infoServiceCollectEvent(body, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InfoServiceApi */ public async infoServiceGetInfo(options?: AxiosRequestConfig) : Promise> { return InfoServiceApiFp(this.configuration).infoServiceGetInfo(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InfoServiceApi */ public async infoServiceGetUserInfo(options?: AxiosRequestConfig) : Promise> { return InfoServiceApiFp(this.configuration).infoServiceGetUserInfo(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InfoServiceApi */ public async infoServiceGetVersion(options?: AxiosRequestConfig) : Promise> { return InfoServiceApiFp(this.configuration).infoServiceGetVersion(options).then((request) => request(this.axios, this.basePath)); } }