feat(web,server): server features (#3756)

* feat: server features

* chore: open api

* icon size

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2023-08-18 00:55:26 -04:00
committed by GitHub
parent 28d3d3e679
commit 2b839088c7
40 changed files with 805 additions and 187 deletions

View File

@@ -2087,6 +2087,43 @@ export interface SearchResponseDto {
*/
'assets': SearchAssetResponseDto;
}
/**
*
* @export
* @interface ServerFeaturesDto
*/
export interface ServerFeaturesDto {
/**
*
* @type {boolean}
* @memberof ServerFeaturesDto
*/
'machineLearning': boolean;
/**
*
* @type {boolean}
* @memberof ServerFeaturesDto
*/
'oauth': boolean;
/**
*
* @type {boolean}
* @memberof ServerFeaturesDto
*/
'oauthAutoLaunch': boolean;
/**
*
* @type {boolean}
* @memberof ServerFeaturesDto
*/
'passwordLogin': boolean;
/**
*
* @type {boolean}
* @memberof ServerFeaturesDto
*/
'search': boolean;
}
/**
*
* @export
@@ -2208,25 +2245,25 @@ export interface ServerStatsResponseDto {
/**
*
* @export
* @interface ServerVersionReponseDto
* @interface ServerVersionResponseDto
*/
export interface ServerVersionReponseDto {
export interface ServerVersionResponseDto {
/**
*
* @type {number}
* @memberof ServerVersionReponseDto
* @memberof ServerVersionResponseDto
*/
'major': number;
/**
*
* @type {number}
* @memberof ServerVersionReponseDto
* @memberof ServerVersionResponseDto
*/
'minor': number;
/**
*
* @type {number}
* @memberof ServerVersionReponseDto
* @memberof ServerVersionResponseDto
*/
'patch': number;
}
@@ -10156,6 +10193,35 @@ export class SearchApi extends BaseAPI {
*/
export const ServerInfoApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServerFeatures: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/server-info/features`;
// 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,
};
},
/**
*
* @param {*} [options] Override http request option.
@@ -10329,6 +10395,15 @@ export const ServerInfoApiAxiosParamCreator = function (configuration?: Configur
export const ServerInfoApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ServerInfoApiAxiosParamCreator(configuration)
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getServerFeatures(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerFeaturesDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getServerFeatures(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
@@ -10343,7 +10418,7 @@ export const ServerInfoApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getServerVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerVersionReponseDto>> {
async getServerVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerVersionResponseDto>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getServerVersion(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
@@ -10384,6 +10459,14 @@ export const ServerInfoApiFp = function(configuration?: Configuration) {
export const ServerInfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ServerInfoApiFp(configuration)
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServerFeatures(options?: AxiosRequestConfig): AxiosPromise<ServerFeaturesDto> {
return localVarFp.getServerFeatures(options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
@@ -10397,7 +10480,7 @@ export const ServerInfoApiFactory = function (configuration?: Configuration, bas
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getServerVersion(options?: AxiosRequestConfig): AxiosPromise<ServerVersionReponseDto> {
getServerVersion(options?: AxiosRequestConfig): AxiosPromise<ServerVersionResponseDto> {
return localVarFp.getServerVersion(options).then((request) => request(axios, basePath));
},
/**
@@ -10434,6 +10517,16 @@ export const ServerInfoApiFactory = function (configuration?: Configuration, bas
* @extends {BaseAPI}
*/
export class ServerInfoApi extends BaseAPI {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ServerInfoApi
*/
public getServerFeatures(options?: AxiosRequestConfig) {
return ServerInfoApiFp(this.configuration).getServerFeatures(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.