重构获取公共参数

This commit is contained in:
ryan
2026-06-09 15:54:16 +08:00
parent bff09241d3
commit 40e8a7cfa3
18 changed files with 313 additions and 315 deletions
+6
View File
@@ -10,6 +10,8 @@ export interface SystemConfig {
value: string;
/** 配置类型:'system' | 'business' */
type: 'system' | 'business';
/** 是否对公共配置接口可见:0 不可见,1 可见 */
visibility: 0 | 1;
/** 配置描述 */
description: string;
/** 创建时间 */
@@ -28,6 +30,8 @@ export interface CreateSystemConfigRequest {
value: string;
/** 配置类型:'system' | 'business' */
type: 'system' | 'business';
/** 是否对公共配置接口可见:0 不可见,1 可见 */
visibility?: 0 | 1;
/** 配置描述(最大255字符,可选) */
description?: string;
}
@@ -38,6 +42,8 @@ export interface CreateSystemConfigRequest {
export interface UpdateSystemConfigRequest {
/** 配置值(最大255字符) */
value: string;
/** 是否对公共配置接口可见:0 不可见,1 可见 */
visibility?: 0 | 1;
/** 配置描述(最大255字符,可选) */
description?: string;
}
+2 -31
View File
@@ -1,31 +1,2 @@
/**
* 公共配置响应
*/
export interface PublicConfigResponse {
/** 允许上传的图片扩展名 */
upload_allowed_extensions: string;
/** 站点名称 */
site_name: string;
/** 是否允许密码登录 */
password_login_enabled: boolean;
/** 是否允许注册 */
registration_enabled: boolean;
/** 是否允许密码注册 */
password_register_enabled: boolean;
/** 是否允许 OIDC 登录 */
oidc_login_enabled: boolean;
/** 每个用户最大 API Key 数量 */
max_api_keys_per_user: number;
/** 是否启用 Cap 人机验证 */
cap_login_enabled: boolean;
/** 是否自动解题 */
cap_auto_solve: boolean;
/** 是否启用邮箱登录验证 */
email_login_verification_enabled: boolean;
/** 是否启用邮箱注册验证 */
email_register_verification_enabled: boolean;
/** 目录显示配置 */
menu_display_config?: Record<string, boolean>;
/** 是否允许搜索引擎检索 */
search_engine_indexing_enabled?: boolean;
}
/** 公共配置响应:key 为系统配置键,value 为配置表中保存的字符串值 */
export type PublicConfigResponse = Record<string, string | undefined>;