Skip to content

Commit

Permalink
feat: update api-client
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiinaKin committed Nov 18, 2024
1 parent 2daa5ed commit 129c405
Show file tree
Hide file tree
Showing 8 changed files with 411 additions and 0 deletions.
93 changes: 93 additions & 0 deletions app/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2599,6 +2599,28 @@
"JWT" : [ ]
} ]
}
},
"/api/system/overview" : {
"get" : {
"tags" : [ "system" ],
"parameters" : [ ],
"responses" : {
"200" : {
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/CommonResponse_SystemOverviewVO"
}
}
}
}
},
"deprecated" : false,
"security" : [ {
"JWT" : [ ]
} ]
}
}
},
"components" : {
Expand Down Expand Up @@ -4171,6 +4193,77 @@
}
},
"required" : [ "code", "isSuccessful", "message" ]
},
"SystemOverviewVO" : {
"type" : "object",
"properties" : {
"hoshizoraStatus" : {
"$ref" : "#/components/schemas/HoshizoraStatusVO"
},
"systemStatus" : {
"$ref" : "#/components/schemas/SystemStatusVO"
}
},
"required" : [ "hoshizoraStatus", "systemStatus" ]
},
"HoshizoraStatusVO" : {
"type" : "object",
"properties" : {
"buildTime" : {
"type" : "string"
},
"commitId" : {
"type" : "string"
},
"version" : {
"type" : "string"
}
},
"required" : [ "buildTime", "commitId", "version" ]
},
"SystemStatusVO" : {
"type" : "object",
"properties" : {
"databaseVersion" : {
"type" : "string"
},
"javaVersion" : {
"type" : "string"
},
"operatingSystem" : {
"type" : "string"
},
"serverLanguage" : {
"type" : "string"
},
"serverTimeZone" : {
"type" : "string"
}
},
"required" : [ "databaseVersion", "javaVersion", "operatingSystem", "serverLanguage", "serverTimeZone" ]
},
"CommonResponse_SystemOverviewVO" : {
"type" : "object",
"properties" : {
"code" : {
"type" : "integer",
"format" : "int32"
},
"data" : {
"oneOf" : [ {
"type" : "null"
}, {
"$ref" : "#/components/schemas/SystemOverviewVO"
} ]
},
"isSuccessful" : {
"type" : "boolean"
},
"message" : {
"type" : "string"
}
},
"required" : [ "code", "isSuccessful", "message" ]
}
},
"examples" : { },
Expand Down
1 change: 1 addition & 0 deletions ui/packages/api-client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ export * from './apis/personal-access-token-api';
export * from './apis/role-api';
export * from './apis/setting-api';
export * from './apis/strategy-api';
export * from './apis/system-api';
export * from './apis/user-api';

124 changes: 124 additions & 0 deletions ui/packages/api-client/src/apis/system-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/* tslint:disable */
/* eslint-disable */
/**
* HoshizoraPics API
* API for testing and demonstration purposes.
*
* The version of the OpenAPI document: latest
*
*
* 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 { CommonResponseSystemOverviewVO } from '../models';
/**
* SystemApi - axios parameter creator
* @export
*/
export const SystemApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSystemOverviewGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/system/overview`;
// 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 JWT required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};

/**
* SystemApi - functional programming interface
* @export
*/
export const SystemApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = SystemApiAxiosParamCreator(configuration)
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSystemOverviewGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonResponseSystemOverviewVO>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSystemOverviewGet(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SystemApi.apiSystemOverviewGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};

/**
* SystemApi - factory interface
* @export
*/
export const SystemApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = SystemApiFp(configuration)
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSystemOverviewGet(options?: RawAxiosRequestConfig): AxiosPromise<CommonResponseSystemOverviewVO> {
return localVarFp.apiSystemOverviewGet(options).then((request) => request(axios, basePath));
},
};
};

/**
* SystemApi - object-oriented interface
* @export
* @class SystemApi
* @extends {BaseAPI}
*/
export class SystemApi extends BaseAPI {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SystemApi
*/
public apiSystemOverviewGet(options?: RawAxiosRequestConfig) {
return SystemApiFp(this.configuration).apiSystemOverviewGet(options).then((request) => request(this.axios, this.basePath));
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* tslint:disable */
/* eslint-disable */
/**
* HoshizoraPics API
* API for testing and demonstration purposes.
*
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


// May contain unused imports in some cases
// @ts-ignore
import type { SystemOverviewVO } from './system-overview-vo';

/**
*
* @export
* @interface CommonResponseSystemOverviewVO
*/
export interface CommonResponseSystemOverviewVO {
/**
*
* @type {number}
* @memberof CommonResponseSystemOverviewVO
*/
'code': number;
/**
*
* @type {SystemOverviewVO}
* @memberof CommonResponseSystemOverviewVO
*/
'data'?: SystemOverviewVO | null;
/**
*
* @type {boolean}
* @memberof CommonResponseSystemOverviewVO
*/
'isSuccessful': boolean;
/**
*
* @type {string}
* @memberof CommonResponseSystemOverviewVO
*/
'message': string;
}

42 changes: 42 additions & 0 deletions ui/packages/api-client/src/models/hoshizora-status-vo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* tslint:disable */
/* eslint-disable */
/**
* HoshizoraPics API
* API for testing and demonstration purposes.
*
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



/**
*
* @export
* @interface HoshizoraStatusVO
*/
export interface HoshizoraStatusVO {
/**
*
* @type {string}
* @memberof HoshizoraStatusVO
*/
'buildTime': string;
/**
*
* @type {string}
* @memberof HoshizoraStatusVO
*/
'commitId': string;
/**
*
* @type {string}
* @memberof HoshizoraStatusVO
*/
'version': string;
}

4 changes: 4 additions & 0 deletions ui/packages/api-client/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export * from './common-response-page-result-strategy-page-vo';
export * from './common-response-page-result-user-manage-vo';
export * from './common-response-setting-vomap';
export * from './common-response-strategy-vo';
export * from './common-response-system-overview-vo';
export * from './common-response-user-vo';
export * from './common-site-setting';
export * from './group-allowed-image-type';
Expand All @@ -32,6 +33,7 @@ export * from './group-page-vo';
export * from './group-patch-request';
export * from './group-strategy-config';
export * from './group-vo';
export * from './hoshizora-status-vo';
export * from './image-manage-patch-request';
export * from './image-manage-vo';
export * from './image-page-vo';
Expand Down Expand Up @@ -69,6 +71,8 @@ export * from './strategy-request-s3-strategy-config';
export * from './strategy-setting-patch-request';
export * from './strategy-type-enum';
export * from './strategy-vo';
export * from './system-overview-vo';
export * from './system-status-vo';
export * from './user-insert-request';
export * from './user-login-request';
export * from './user-manage-insert-request';
Expand Down
Loading

0 comments on commit 129c405

Please sign in to comment.