/* tslint:disable */ /* eslint-disable */ /** * Admin API * The Admin API is used to manage the ApeCloud platform. * * The version of the OpenAPI document: 1.0.0 * Contact: support@apecloud.com * * 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 } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { APIErrorResponse } from '../models'; // @ts-ignore import type { ClusterJarConfig } from '../models'; // @ts-ignore import type { ClusterJarKind } from '../models'; // @ts-ignore import type { ClusterJarList } from '../models'; // @ts-ignore import type { ClusterJarPackage } from '../models'; // @ts-ignore import type { ClusterJarPublish } from '../models'; // @ts-ignore import type { ClusterJarTask } from '../models'; /** * ClusterJarApi - axios parameter creator * @export */ export const ClusterJarApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Delete an unpublished JAR version * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteClusterJar: async (engineName: string, orgName: string, clusterName: string, jarId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('deleteClusterJar', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('deleteClusterJar', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('deleteClusterJar', 'clusterName', clusterName) // verify required parameter 'jarId' is not null or undefined assertParamExists('deleteClusterJar', 'jarId', jarId) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars/{jarId}` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"jarId"}}`, encodeURIComponent(String(jarId))); // 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: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Publish a JAR with optimistic manifest version checking * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {ClusterJarPublish} clusterJarPublish * @param {*} [options] Override http request option. * @throws {RequiredError} */ distributeClusterJar: async (engineName: string, orgName: string, clusterName: string, jarId: string, clusterJarPublish: ClusterJarPublish, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('distributeClusterJar', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('distributeClusterJar', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('distributeClusterJar', 'clusterName', clusterName) // verify required parameter 'jarId' is not null or undefined assertParamExists('distributeClusterJar', 'jarId', jarId) // verify required parameter 'clusterJarPublish' is not null or undefined assertParamExists('distributeClusterJar', 'clusterJarPublish', clusterJarPublish) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars/{jarId}/distribute` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"jarId"}}`, encodeURIComponent(String(jarId))); // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(clusterJarPublish, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Download the original JAR * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadClusterJar: async (engineName: string, orgName: string, clusterName: string, jarId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('downloadClusterJar', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('downloadClusterJar', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('downloadClusterJar', 'clusterName', clusterName) // verify required parameter 'jarId' is not null or undefined assertParamExists('downloadClusterJar', 'jarId', jarId) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars/{jarId}/download` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"jarId"}}`, encodeURIComponent(String(jarId))); // 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 BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get external JAR capability and configuration * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ getClusterJarConfig: async (engineName: string, orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('getClusterJarConfig', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('getClusterJarConfig', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('getClusterJarConfig', 'clusterName', clusterName) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars/config` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List external JAR versions with metadata and per-instance synchronization state * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ listClusterJars: async (engineName: string, orgName: string, clusterName: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('listClusterJars', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('listClusterJars', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('listClusterJars', 'clusterName', clusterName) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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 BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Retry synchronization of published JARs * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retryClusterJar: async (engineName: string, orgName: string, clusterName: string, jarId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('retryClusterJar', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('retryClusterJar', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('retryClusterJar', 'clusterName', clusterName) // verify required parameter 'jarId' is not null or undefined assertParamExists('retryClusterJar', 'jarId', jarId) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars/{jarId}/retry` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))) .replace(`{${"jarId"}}`, encodeURIComponent(String(jarId))); // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Upload an immutable JAR version * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} idempotencyKey * @param {string} name * @param {ClusterJarKind} kind * @param {File} file * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadClusterJar: async (engineName: string, orgName: string, clusterName: string, idempotencyKey: string, name: string, kind: ClusterJarKind, file: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'engineName' is not null or undefined assertParamExists('uploadClusterJar', 'engineName', engineName) // verify required parameter 'orgName' is not null or undefined assertParamExists('uploadClusterJar', 'orgName', orgName) // verify required parameter 'clusterName' is not null or undefined assertParamExists('uploadClusterJar', 'clusterName', clusterName) // verify required parameter 'idempotencyKey' is not null or undefined assertParamExists('uploadClusterJar', 'idempotencyKey', idempotencyKey) // verify required parameter 'name' is not null or undefined assertParamExists('uploadClusterJar', 'name', name) // verify required parameter 'kind' is not null or undefined assertParamExists('uploadClusterJar', 'kind', kind) // verify required parameter 'file' is not null or undefined assertParamExists('uploadClusterJar', 'file', file) const localVarPath = `/admin/v1/data/{engineName}/organizations/{orgName}/clusters/{clusterName}/jars` .replace(`{${"engineName"}}`, encodeURIComponent(String(engineName))) .replace(`{${"orgName"}}`, encodeURIComponent(String(orgName))) .replace(`{${"clusterName"}}`, encodeURIComponent(String(clusterName))); // 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: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication BearerToken required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) // authentication DigestAuth required await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration) if (name !== undefined) { localVarFormParams.append('name', name as any); } if (kind !== undefined) { localVarFormParams.append('kind', kind as any); } if (file !== undefined) { localVarFormParams.append('file', file as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ClusterJarApi - functional programming interface * @export */ export const ClusterJarApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ClusterJarApiAxiosParamCreator(configuration) return { /** * * @summary Delete an unpublished JAR version * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteClusterJar(engineName: string, orgName: string, clusterName: string, jarId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteClusterJar(engineName, orgName, clusterName, jarId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.deleteClusterJar']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Publish a JAR with optimistic manifest version checking * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {ClusterJarPublish} clusterJarPublish * @param {*} [options] Override http request option. * @throws {RequiredError} */ async distributeClusterJar(engineName: string, orgName: string, clusterName: string, jarId: string, clusterJarPublish: ClusterJarPublish, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.distributeClusterJar(engineName, orgName, clusterName, jarId, clusterJarPublish, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.distributeClusterJar']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Download the original JAR * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async downloadClusterJar(engineName: string, orgName: string, clusterName: string, jarId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.downloadClusterJar(engineName, orgName, clusterName, jarId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.downloadClusterJar']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get external JAR capability and configuration * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getClusterJarConfig(engineName: string, orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getClusterJarConfig(engineName, orgName, clusterName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.getClusterJarConfig']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List external JAR versions with metadata and per-instance synchronization state * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listClusterJars(engineName: string, orgName: string, clusterName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listClusterJars(engineName, orgName, clusterName, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.listClusterJars']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Retry synchronization of published JARs * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} jarId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retryClusterJar(engineName: string, orgName: string, clusterName: string, jarId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.retryClusterJar(engineName, orgName, clusterName, jarId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.retryClusterJar']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Upload an immutable JAR version * @param {string} engineName Doris or SelectDB engine of the target cluster. * @param {string} orgName * @param {string} clusterName * @param {string} idempotencyKey * @param {string} name * @param {ClusterJarKind} kind * @param {File} file * @param {*} [options] Override http request option. * @throws {RequiredError} */ async uploadClusterJar(engineName: string, orgName: string, clusterName: string, idempotencyKey: string, name: string, kind: ClusterJarKind, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadClusterJar(engineName, orgName, clusterName, idempotencyKey, name, kind, file, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ClusterJarApi.uploadClusterJar']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * ClusterJarApi - factory interface * @export */ export const ClusterJarApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ClusterJarApiFp(configuration) return { /** * * @summary Delete an unpublished JAR version * @param {ClusterJarApiDeleteClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteClusterJar(requestParameters: ClusterJarApiDeleteClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(axios, basePath)); }, /** * * @summary Publish a JAR with optimistic manifest version checking * @param {ClusterJarApiDistributeClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ distributeClusterJar(requestParameters: ClusterJarApiDistributeClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.distributeClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, requestParameters.clusterJarPublish, options).then((request) => request(axios, basePath)); }, /** * * @summary Download the original JAR * @param {ClusterJarApiDownloadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ downloadClusterJar(requestParameters: ClusterJarApiDownloadClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.downloadClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get external JAR capability and configuration * @param {ClusterJarApiGetClusterJarConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getClusterJarConfig(requestParameters: ClusterJarApiGetClusterJarConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getClusterJarConfig(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath)); }, /** * * @summary List external JAR versions with metadata and per-instance synchronization state * @param {ClusterJarApiListClusterJarsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listClusterJars(requestParameters: ClusterJarApiListClusterJarsRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listClusterJars(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(axios, basePath)); }, /** * * @summary Retry synchronization of published JARs * @param {ClusterJarApiRetryClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ retryClusterJar(requestParameters: ClusterJarApiRetryClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.retryClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(axios, basePath)); }, /** * * @summary Upload an immutable JAR version * @param {ClusterJarApiUploadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadClusterJar(requestParameters: ClusterJarApiUploadClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.uploadClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.idempotencyKey, requestParameters.name, requestParameters.kind, requestParameters.file, options).then((request) => request(axios, basePath)); }, }; }; /** * ClusterJarApi - interface * @export * @interface ClusterJarApi */ export interface ClusterJarApiInterface { /** * * @summary Delete an unpublished JAR version * @param {ClusterJarApiDeleteClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ deleteClusterJar(requestParameters: ClusterJarApiDeleteClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Publish a JAR with optimistic manifest version checking * @param {ClusterJarApiDistributeClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ distributeClusterJar(requestParameters: ClusterJarApiDistributeClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Download the original JAR * @param {ClusterJarApiDownloadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ downloadClusterJar(requestParameters: ClusterJarApiDownloadClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Get external JAR capability and configuration * @param {ClusterJarApiGetClusterJarConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ getClusterJarConfig(requestParameters: ClusterJarApiGetClusterJarConfigRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary List external JAR versions with metadata and per-instance synchronization state * @param {ClusterJarApiListClusterJarsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ listClusterJars(requestParameters: ClusterJarApiListClusterJarsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Retry synchronization of published JARs * @param {ClusterJarApiRetryClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ retryClusterJar(requestParameters: ClusterJarApiRetryClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * * @summary Upload an immutable JAR version * @param {ClusterJarApiUploadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApiInterface */ uploadClusterJar(requestParameters: ClusterJarApiUploadClusterJarRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for deleteClusterJar operation in ClusterJarApi. * @export * @interface ClusterJarApiDeleteClusterJarRequest */ export interface ClusterJarApiDeleteClusterJarRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiDeleteClusterJar */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiDeleteClusterJar */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiDeleteClusterJar */ readonly clusterName: string /** * * @type {string} * @memberof ClusterJarApiDeleteClusterJar */ readonly jarId: string } /** * Request parameters for distributeClusterJar operation in ClusterJarApi. * @export * @interface ClusterJarApiDistributeClusterJarRequest */ export interface ClusterJarApiDistributeClusterJarRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiDistributeClusterJar */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiDistributeClusterJar */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiDistributeClusterJar */ readonly clusterName: string /** * * @type {string} * @memberof ClusterJarApiDistributeClusterJar */ readonly jarId: string /** * * @type {ClusterJarPublish} * @memberof ClusterJarApiDistributeClusterJar */ readonly clusterJarPublish: ClusterJarPublish } /** * Request parameters for downloadClusterJar operation in ClusterJarApi. * @export * @interface ClusterJarApiDownloadClusterJarRequest */ export interface ClusterJarApiDownloadClusterJarRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiDownloadClusterJar */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiDownloadClusterJar */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiDownloadClusterJar */ readonly clusterName: string /** * * @type {string} * @memberof ClusterJarApiDownloadClusterJar */ readonly jarId: string } /** * Request parameters for getClusterJarConfig operation in ClusterJarApi. * @export * @interface ClusterJarApiGetClusterJarConfigRequest */ export interface ClusterJarApiGetClusterJarConfigRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiGetClusterJarConfig */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiGetClusterJarConfig */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiGetClusterJarConfig */ readonly clusterName: string } /** * Request parameters for listClusterJars operation in ClusterJarApi. * @export * @interface ClusterJarApiListClusterJarsRequest */ export interface ClusterJarApiListClusterJarsRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiListClusterJars */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiListClusterJars */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiListClusterJars */ readonly clusterName: string } /** * Request parameters for retryClusterJar operation in ClusterJarApi. * @export * @interface ClusterJarApiRetryClusterJarRequest */ export interface ClusterJarApiRetryClusterJarRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiRetryClusterJar */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiRetryClusterJar */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiRetryClusterJar */ readonly clusterName: string /** * * @type {string} * @memberof ClusterJarApiRetryClusterJar */ readonly jarId: string } /** * Request parameters for uploadClusterJar operation in ClusterJarApi. * @export * @interface ClusterJarApiUploadClusterJarRequest */ export interface ClusterJarApiUploadClusterJarRequest { /** * Doris or SelectDB engine of the target cluster. * @type {string} * @memberof ClusterJarApiUploadClusterJar */ readonly engineName: string /** * * @type {string} * @memberof ClusterJarApiUploadClusterJar */ readonly orgName: string /** * * @type {string} * @memberof ClusterJarApiUploadClusterJar */ readonly clusterName: string /** * * @type {string} * @memberof ClusterJarApiUploadClusterJar */ readonly idempotencyKey: string /** * * @type {string} * @memberof ClusterJarApiUploadClusterJar */ readonly name: string /** * * @type {ClusterJarKind} * @memberof ClusterJarApiUploadClusterJar */ readonly kind: ClusterJarKind /** * * @type {File} * @memberof ClusterJarApiUploadClusterJar */ readonly file: File } /** * ClusterJarApi - object-oriented interface * @export * @class ClusterJarApi * @extends {BaseAPI} */ export class ClusterJarApi extends BaseAPI implements ClusterJarApiInterface { /** * * @summary Delete an unpublished JAR version * @param {ClusterJarApiDeleteClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public deleteClusterJar(requestParameters: ClusterJarApiDeleteClusterJarRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).deleteClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Publish a JAR with optimistic manifest version checking * @param {ClusterJarApiDistributeClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public distributeClusterJar(requestParameters: ClusterJarApiDistributeClusterJarRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).distributeClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, requestParameters.clusterJarPublish, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Download the original JAR * @param {ClusterJarApiDownloadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public downloadClusterJar(requestParameters: ClusterJarApiDownloadClusterJarRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).downloadClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get external JAR capability and configuration * @param {ClusterJarApiGetClusterJarConfigRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public getClusterJarConfig(requestParameters: ClusterJarApiGetClusterJarConfigRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).getClusterJarConfig(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List external JAR versions with metadata and per-instance synchronization state * @param {ClusterJarApiListClusterJarsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public listClusterJars(requestParameters: ClusterJarApiListClusterJarsRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).listClusterJars(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Retry synchronization of published JARs * @param {ClusterJarApiRetryClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public retryClusterJar(requestParameters: ClusterJarApiRetryClusterJarRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).retryClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.jarId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Upload an immutable JAR version * @param {ClusterJarApiUploadClusterJarRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClusterJarApi */ public uploadClusterJar(requestParameters: ClusterJarApiUploadClusterJarRequest, options?: RawAxiosRequestConfig) { return ClusterJarApiFp(this.configuration).uploadClusterJar(requestParameters.engineName, requestParameters.orgName, requestParameters.clusterName, requestParameters.idempotencyKey, requestParameters.name, requestParameters.kind, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); } }