@liujitcn/kratos-admin-system 0.0.28 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- package/dist/package/declarations/src/api/base/notification.d.ts +24 -0
- package/dist/package/declarations/src/api/system/base_audit_log.d.ts +55 -0
- package/dist/package/declarations/src/api/system/base_dashboard.d.ts +14 -0
- package/dist/package/declarations/src/api/system/base_file.d.ts +13 -0
- package/dist/package/declarations/src/api/system/base_i18n.d.ts +5 -5
- package/dist/package/declarations/src/api/system/base_login_policy.d.ts +10 -0
- package/dist/package/declarations/src/api/system/base_message.d.ts +24 -0
- package/dist/package/declarations/src/api/system/base_message_category.d.ts +21 -0
- package/dist/package/declarations/src/api/system/base_session.d.ts +11 -0
- package/dist/package/declarations/src/api/system/oauth_client.d.ts +24 -0
- package/dist/package/declarations/src/components/AuditLogTable.vue.d.ts +45 -0
- package/dist/package/declarations/src/components/DynamicI18nCell.vue.d.ts +16 -0
- package/dist/package/declarations/src/components/DynamicI18nEditor.vue.d.ts +20 -0
- package/dist/package/declarations/src/components/auditLog.d.ts +9 -0
- package/dist/package/declarations/src/components/dynamicI18n.d.ts +38 -0
- package/dist/package/declarations/src/locales/generated.d.ts +1364 -68
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +149 -0
- package/dist/package/declarations/src/rpc/base/v1/notification.d.ts +281 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth_client.d.ts +23 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_audit_log.d.ts +640 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +3 -3
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dashboard.d.ts +60 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +4 -4
- package/dist/package/declarations/src/rpc/system/admin/v1/base_file.d.ts +73 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +27 -23
- package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +5 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_login_policy.d.ts +51 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +2 -2
- package/dist/package/declarations/src/rpc/system/admin/v1/base_message.d.ts +193 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_message_category.d.ts +125 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_session.d.ts +33 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +3 -3
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +1 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/oauth_client.d.ts +145 -0
- package/dist/package/declarations/src/views/base/api-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/dashboard/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/data-access-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/file/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/login-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/login-policy/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/message/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/message-category/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/oauth-client/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/operation-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/permission-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/policy-evaluation-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/message/inbox/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/profile/components/session.vue.d.ts +3 -0
- package/dist/package/src/api/base/notification.ts +69 -0
- package/dist/package/src/api/base/sse.ts +4 -4
- package/dist/package/src/api/system/auth.ts +1 -0
- package/dist/package/src/api/system/base_audit_log.ts +168 -0
- package/dist/package/src/api/system/base_dashboard.ts +55 -0
- package/dist/package/src/api/system/base_file.ts +43 -0
- package/dist/package/src/api/system/base_i18n.ts +12 -12
- package/dist/package/src/api/system/base_login_policy.ts +32 -0
- package/dist/package/src/api/system/base_message.ts +70 -0
- package/dist/package/src/api/system/base_message_category.ts +57 -0
- package/dist/package/src/api/system/base_session.ts +33 -0
- package/dist/package/src/api/system/oauth_client.ts +102 -0
- package/dist/package/src/components/AuditLogTable.vue +105 -0
- package/dist/package/src/components/{DynamicTranslationCell.vue → DynamicI18nCell.vue} +50 -50
- package/dist/package/src/components/{DynamicTranslationEditor.vue → DynamicI18nEditor.vue} +45 -45
- package/dist/package/src/components/Notification.vue +196 -0
- package/dist/package/src/components/auditLog.ts +46 -0
- package/dist/package/src/components/{dynamicTranslation.ts → dynamicI18n.ts} +15 -15
- package/dist/package/src/locales/README.md +5 -3
- package/dist/package/src/locales/en-US.json +345 -21
- package/dist/package/src/locales/ja-JP.json +347 -23
- package/dist/package/src/locales/zh-CN.json +343 -19
- package/dist/package/src/locales/zh-TW.json +346 -22
- package/dist/package/src/module.ts +5 -2
- package/dist/package/src/rpc/base/v1/login.ts +172 -0
- package/dist/package/src/rpc/base/v1/notification.ts +315 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +25 -0
- package/dist/package/src/rpc/base/v1/oauth_client.ts +33 -0
- package/dist/package/src/rpc/system/admin/v1/base_audit_log.ts +737 -0
- package/dist/package/src/rpc/system/admin/v1/base_config.ts +3 -3
- package/dist/package/src/rpc/system/admin/v1/base_dashboard.ts +81 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +4 -4
- package/dist/package/src/rpc/system/admin/v1/base_file.ts +88 -0
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +27 -23
- package/dist/package/src/rpc/system/admin/v1/base_job.ts +5 -0
- package/dist/package/src/rpc/system/admin/v1/base_login_policy.ts +63 -0
- package/dist/package/src/rpc/system/admin/v1/base_menu.ts +2 -2
- package/dist/package/src/rpc/system/admin/v1/base_message.ts +236 -0
- package/dist/package/src/rpc/system/admin/v1/base_message_category.ts +149 -0
- package/dist/package/src/rpc/system/admin/v1/base_session.ts +44 -0
- package/dist/package/src/rpc/system/admin/v1/base_user.ts +3 -3
- package/dist/package/src/rpc/system/admin/v1/code_gen.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/oauth_client.ts +174 -0
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +2 -2
- package/dist/package/src/views/ai/chat/message.ts +7 -3
- package/dist/package/src/views/base/api-log/index.vue +83 -0
- package/dist/package/src/views/base/config/index.vue +41 -41
- package/dist/package/src/views/base/dashboard/index.vue +200 -0
- package/dist/package/src/views/base/data-access-log/index.vue +84 -0
- package/dist/package/src/views/base/dict/index.vue +23 -23
- package/dist/package/src/views/base/dict/item.vue +25 -25
- package/dist/package/src/views/base/file/index.vue +119 -0
- package/dist/package/src/views/base/job/index.vue +62 -7
- package/dist/package/src/views/base/language/index.vue +2 -1
- package/dist/package/src/views/base/login-log/index.vue +92 -0
- package/dist/package/src/views/base/login-policy/index.vue +219 -0
- package/dist/package/src/views/base/menu/index.vue +23 -23
- package/dist/package/src/views/base/message/index.vue +582 -0
- package/dist/package/src/views/base/message-category/index.vue +356 -0
- package/dist/package/src/views/base/oauth-client/index.vue +411 -0
- package/dist/package/src/views/base/operation-log/index.vue +82 -0
- package/dist/package/src/views/base/permission-log/index.vue +85 -0
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +82 -0
- package/dist/package/src/views/message/inbox/index.vue +249 -0
- package/dist/package/src/views/profile/components/base.vue +6 -5
- package/dist/package/src/views/profile/components/password.vue +2 -2
- package/dist/package/src/views/profile/components/security.vue +475 -62
- package/dist/package/src/views/profile/components/session.vue +153 -0
- package/dist/package/src/views/profile/index.vue +35 -22
- package/dist/package/src/views/tool/code-gen/code-preview/index.vue +9 -9
- package/dist/package/src/views/tool/code-gen/columns/index.vue +1 -1
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +8 -8
- package/dist/package/src/views/tool/code-gen/config.ts +1 -0
- package/dist/package/src/views/tool/code-gen/table/index.vue +7 -7
- package/dist/package/src/views/tool/ops-monitoring/index.vue +25 -21
- package/package.json +2 -2
- package/dist/package/declarations/src/api/system/base_log.d.ts +0 -9
- package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +0 -16
- package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +0 -20
- package/dist/package/declarations/src/components/dynamicTranslation.d.ts +0 -38
- package/dist/package/declarations/src/rpc/system/admin/v1/base_log.d.ts +0 -87
- package/dist/package/src/api/system/base_log.ts +0 -32
- package/dist/package/src/rpc/system/admin/v1/base_log.ts +0 -101
- package/dist/package/src/views/base/log/index.vue +0 -339
- /package/dist/package/declarations/src/{views/base/log/index.vue.d.ts → components/Notification.vue.d.ts} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
2
|
+
/** 查询当前会话请求参数。 */
|
|
3
|
+
export interface GetCurrentBaseSessionRequest {
|
|
4
|
+
}
|
|
5
|
+
/** 撤销全部会话请求参数。 */
|
|
6
|
+
export interface RevokeAllBaseSessionsRequest {
|
|
7
|
+
}
|
|
8
|
+
/** 当前会话信息。 */
|
|
9
|
+
export interface BaseSession {
|
|
10
|
+
/** 用户ID */
|
|
11
|
+
user_id: number;
|
|
12
|
+
/** 用户账号 */
|
|
13
|
+
user_name: string;
|
|
14
|
+
/** 租户编码 */
|
|
15
|
+
tenant_code: string;
|
|
16
|
+
/** 客户端IP */
|
|
17
|
+
client_ip: string;
|
|
18
|
+
/** 登录设备 */
|
|
19
|
+
device: string;
|
|
20
|
+
/** 用户代理 */
|
|
21
|
+
user_agent: string;
|
|
22
|
+
/** 签发时间 */
|
|
23
|
+
issued_at: string;
|
|
24
|
+
/** 令牌有效期(秒) */
|
|
25
|
+
expires_in: number;
|
|
26
|
+
}
|
|
27
|
+
/** Admin会话管理服务。 */
|
|
28
|
+
export interface BaseSessionService {
|
|
29
|
+
/** 查询当前用户会话。 */
|
|
30
|
+
GetCurrentBaseSession(request: GetCurrentBaseSessionRequest): Promise<BaseSession>;
|
|
31
|
+
/** 撤销当前用户全部会话。 */
|
|
32
|
+
RevokeAllBaseSessions(request: RevokeAllBaseSessionsRequest): Promise<Empty>;
|
|
33
|
+
}
|
|
@@ -184,12 +184,12 @@ export interface SummaryBaseUserRequest {
|
|
|
184
184
|
export interface SummaryBaseUserResponse {
|
|
185
185
|
/** 用户总数 */
|
|
186
186
|
total: number;
|
|
187
|
-
/**
|
|
187
|
+
/** 用户注册时间维度汇总 */
|
|
188
188
|
summaries: BaseUserSummaryItem[];
|
|
189
189
|
}
|
|
190
|
-
/**
|
|
190
|
+
/** 用户注册时间维度汇总项 */
|
|
191
191
|
export interface BaseUserSummaryItem {
|
|
192
|
-
/**
|
|
192
|
+
/** 统计周期值:按周统计时1至7依次表示星期一至星期日,按月统计时表示日期1至31,按年统计时表示月份1至12 */
|
|
193
193
|
key: number;
|
|
194
194
|
/** 用户数 */
|
|
195
195
|
count: number;
|
|
@@ -67,7 +67,7 @@ export interface PreviewCodeGenResponse {
|
|
|
67
67
|
/** 本次生效输出路径 */
|
|
68
68
|
output_paths: CodeGenOutputPaths | undefined;
|
|
69
69
|
/** 正式生成前必须补齐的翻译配置 */
|
|
70
|
-
|
|
70
|
+
missing_i18ns: string[];
|
|
71
71
|
}
|
|
72
72
|
/** 启动代码生成任务条件 */
|
|
73
73
|
export interface StartCodeGenTaskRequest {
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { Status } from "../../../common/v1/enum";
|
|
2
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
3
|
+
import type { BaseApi } from "./base_api";
|
|
4
|
+
/**
|
|
5
|
+
* OauthClientCryptoType 定义开放授权客户端请求和响应使用的加密算法。
|
|
6
|
+
* 生产环境仅允许具备完整性保护的 AES-GCM 或 SM4-GCM,历史 3DES 值已禁用。
|
|
7
|
+
*/
|
|
8
|
+
export declare enum OauthClientCryptoType {
|
|
9
|
+
OAUTH_CLIENT_CRYPTO_TYPE_UNSPECIFIED = 0,
|
|
10
|
+
OAUTH_CLIENT_CRYPTO_TYPE_SM4 = 1,
|
|
11
|
+
OAUTH_CLIENT_CRYPTO_TYPE_AES = 2
|
|
12
|
+
}
|
|
13
|
+
/** 可授权 API 选项查询条件。 */
|
|
14
|
+
export interface OptionOauthClientApiRequest {
|
|
15
|
+
}
|
|
16
|
+
/** 可授权 API 选项响应。 */
|
|
17
|
+
export interface OptionOauthClientApiResponse {
|
|
18
|
+
/** 可授权的开发接口列表 */
|
|
19
|
+
base_apis: BaseApi[];
|
|
20
|
+
}
|
|
21
|
+
/** 开放授权客户端分页查询条件。 */
|
|
22
|
+
export interface PageOauthClientRequest {
|
|
23
|
+
/** 客户端名称 */
|
|
24
|
+
client_name?: string | undefined;
|
|
25
|
+
/** 客户端状态 */
|
|
26
|
+
status?: Status | undefined;
|
|
27
|
+
/** 绑定租户ID */
|
|
28
|
+
tenant_id?: number | undefined;
|
|
29
|
+
/** 页码 */
|
|
30
|
+
page_num: number;
|
|
31
|
+
/** 每页数量 */
|
|
32
|
+
page_size: number;
|
|
33
|
+
}
|
|
34
|
+
/** 开放授权客户端分页响应。 */
|
|
35
|
+
export interface PageOauthClientResponse {
|
|
36
|
+
/** 客户端列表 */
|
|
37
|
+
oauth_clients: OauthClient[];
|
|
38
|
+
/** 总数 */
|
|
39
|
+
total: number;
|
|
40
|
+
}
|
|
41
|
+
/** 开放授权客户端查询条件。 */
|
|
42
|
+
export interface GetOauthClientRequest {
|
|
43
|
+
/** 客户端ID */
|
|
44
|
+
id: number;
|
|
45
|
+
}
|
|
46
|
+
/** 开放授权客户端凭据查询条件。 */
|
|
47
|
+
export interface GetOauthClientCredentialsRequest {
|
|
48
|
+
/** 客户端ID */
|
|
49
|
+
id: number;
|
|
50
|
+
}
|
|
51
|
+
/** 开放授权客户端凭据轮换条件。 */
|
|
52
|
+
export interface RotateOauthClientCredentialsRequest {
|
|
53
|
+
/** 客户端ID */
|
|
54
|
+
id: number;
|
|
55
|
+
}
|
|
56
|
+
/** 创建开放授权客户端请求。 */
|
|
57
|
+
export interface CreateOauthClientRequest {
|
|
58
|
+
/** 客户端表单 */
|
|
59
|
+
oauth_client: OauthClientForm | undefined;
|
|
60
|
+
}
|
|
61
|
+
/** 更新开放授权客户端请求。 */
|
|
62
|
+
export interface UpdateOauthClientRequest {
|
|
63
|
+
/** 客户端表单 */
|
|
64
|
+
oauth_client: OauthClientForm | undefined;
|
|
65
|
+
}
|
|
66
|
+
/** 删除开放授权客户端请求。 */
|
|
67
|
+
export interface DeleteOauthClientRequest {
|
|
68
|
+
/** 客户端ID列表 */
|
|
69
|
+
id: string;
|
|
70
|
+
}
|
|
71
|
+
/** 设置开放授权客户端状态请求。 */
|
|
72
|
+
export interface SetOauthClientStatusRequest {
|
|
73
|
+
/** 客户端ID */
|
|
74
|
+
id: number;
|
|
75
|
+
/** 状态 */
|
|
76
|
+
status: Status;
|
|
77
|
+
}
|
|
78
|
+
/** 开放授权客户端表单。 */
|
|
79
|
+
export interface OauthClientForm {
|
|
80
|
+
/** 客户端ID */
|
|
81
|
+
id: number;
|
|
82
|
+
/** 绑定租户ID */
|
|
83
|
+
tenant_id: number;
|
|
84
|
+
/** 客户端名称 */
|
|
85
|
+
client_name: string;
|
|
86
|
+
/** 协议加密类型 */
|
|
87
|
+
crypto_type: OauthClientCryptoType;
|
|
88
|
+
/** IP白名单 */
|
|
89
|
+
ip_whitelist: string;
|
|
90
|
+
/** 允许访问的 API operation 列表 */
|
|
91
|
+
api: string[];
|
|
92
|
+
/** 状态 */
|
|
93
|
+
status: Status;
|
|
94
|
+
}
|
|
95
|
+
/** 开放授权客户端非敏感信息。 */
|
|
96
|
+
export interface OauthClient {
|
|
97
|
+
/** 客户端ID */
|
|
98
|
+
id: number;
|
|
99
|
+
/** 客户端标识 */
|
|
100
|
+
client_id: string;
|
|
101
|
+
/** 客户端名称 */
|
|
102
|
+
client_name: string;
|
|
103
|
+
/** 绑定租户ID */
|
|
104
|
+
tenant_id: number;
|
|
105
|
+
/** 协议加密类型 */
|
|
106
|
+
crypto_type: OauthClientCryptoType;
|
|
107
|
+
/** IP白名单 */
|
|
108
|
+
ip_whitelist: string;
|
|
109
|
+
/** 允许访问的 API operation 列表 */
|
|
110
|
+
api: string[];
|
|
111
|
+
/** 状态 */
|
|
112
|
+
status: Status;
|
|
113
|
+
}
|
|
114
|
+
/** 开放授权客户端凭据元数据;敏感密钥字段始终为空,仅保留协议类型和客户端标识。 */
|
|
115
|
+
export interface OauthClientCredentials {
|
|
116
|
+
/** 客户端标识 */
|
|
117
|
+
client_id: string;
|
|
118
|
+
/** 客户端密钥 */
|
|
119
|
+
client_secret: string;
|
|
120
|
+
/** 协议加密类型 */
|
|
121
|
+
crypto_type: OauthClientCryptoType;
|
|
122
|
+
/** 协议加密密钥 */
|
|
123
|
+
crypto_key: string;
|
|
124
|
+
}
|
|
125
|
+
/** 开放授权客户端管理服务。 */
|
|
126
|
+
export interface OauthClientService {
|
|
127
|
+
/** 查询可授权的开发接口选项。 */
|
|
128
|
+
OptionOauthClientApi(request: OptionOauthClientApiRequest): Promise<OptionOauthClientApiResponse>;
|
|
129
|
+
/** 分页查询开放授权客户端。 */
|
|
130
|
+
PageOauthClient(request: PageOauthClientRequest): Promise<PageOauthClientResponse>;
|
|
131
|
+
/** 查询开放授权客户端详情。 */
|
|
132
|
+
GetOauthClient(request: GetOauthClientRequest): Promise<OauthClientForm>;
|
|
133
|
+
/** 查询客户端凭据元数据;客户端密钥和协议密钥不会通过接口回传。 */
|
|
134
|
+
GetOauthClientCredentials(request: GetOauthClientCredentialsRequest): Promise<OauthClientCredentials>;
|
|
135
|
+
/** 轮换客户端密钥并一次性返回新凭据。 */
|
|
136
|
+
RotateOauthClientCredentials(request: RotateOauthClientCredentialsRequest): Promise<OauthClientCredentials>;
|
|
137
|
+
/** 创建开放授权客户端。 */
|
|
138
|
+
CreateOauthClient(request: CreateOauthClientRequest): Promise<Empty>;
|
|
139
|
+
/** 更新开放授权客户端。 */
|
|
140
|
+
UpdateOauthClient(request: UpdateOauthClientRequest): Promise<Empty>;
|
|
141
|
+
/** 删除开放授权客户端。 */
|
|
142
|
+
DeleteOauthClient(request: DeleteOauthClientRequest): Promise<Empty>;
|
|
143
|
+
/** 设置开放授权客户端状态。 */
|
|
144
|
+
SetOauthClientStatus(request: SetOauthClientStatusRequest): Promise<Empty>;
|
|
145
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import type {
|
|
3
|
+
ArchiveNotificationRequest,
|
|
4
|
+
DeleteNotificationRequest,
|
|
5
|
+
GetNotificationRequest,
|
|
6
|
+
GetNotificationSummaryRequest,
|
|
7
|
+
MarkAllNotificationReadRequest,
|
|
8
|
+
MarkNotificationReadRequest,
|
|
9
|
+
MarkNotificationUnreadRequest,
|
|
10
|
+
Notification,
|
|
11
|
+
NotificationService,
|
|
12
|
+
NotificationSummary,
|
|
13
|
+
PageNotificationRequest,
|
|
14
|
+
PageNotificationResponse,
|
|
15
|
+
RestoreNotificationRequest
|
|
16
|
+
} from "@liujitcn/kratos-admin-system/rpc/base/v1/notification";
|
|
17
|
+
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
18
|
+
|
|
19
|
+
const NOTIFICATION_URL = "/v1/base/notification";
|
|
20
|
+
|
|
21
|
+
/** 当前用户站内信服务实现。 */
|
|
22
|
+
export class NotificationServiceImpl implements NotificationService {
|
|
23
|
+
/** 分页查询当前用户收件箱。 */
|
|
24
|
+
PageNotification(request: PageNotificationRequest): Promise<PageNotificationResponse> {
|
|
25
|
+
return service({ url: NOTIFICATION_URL, method: "get", params: request });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 查询当前用户消息详情。 */
|
|
29
|
+
GetNotification(request: GetNotificationRequest): Promise<Notification> {
|
|
30
|
+
return service({ url: `${NOTIFICATION_URL}/${request.id}`, method: "get" });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 查询当前用户未读汇总。 */
|
|
34
|
+
GetNotificationSummary(request: GetNotificationSummaryRequest): Promise<NotificationSummary> {
|
|
35
|
+
return service({ url: `${NOTIFICATION_URL}/summary`, method: "get", params: request });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** 标记消息为已读。 */
|
|
39
|
+
MarkNotificationRead(request: MarkNotificationReadRequest): Promise<Empty> {
|
|
40
|
+
return service({ url: `${NOTIFICATION_URL}/read`, method: "put", data: request });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** 标记消息为未读。 */
|
|
44
|
+
MarkNotificationUnread(request: MarkNotificationUnreadRequest): Promise<Empty> {
|
|
45
|
+
return service({ url: `${NOTIFICATION_URL}/unread`, method: "put", data: request });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** 标记全部消息为已读。 */
|
|
49
|
+
MarkAllNotificationRead(request: MarkAllNotificationReadRequest): Promise<Empty> {
|
|
50
|
+
return service({ url: `${NOTIFICATION_URL}/read/all`, method: "put", data: request });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** 归档消息。 */
|
|
54
|
+
ArchiveNotification(request: ArchiveNotificationRequest): Promise<Empty> {
|
|
55
|
+
return service({ url: `${NOTIFICATION_URL}/${request.id}/archive`, method: "put", data: request });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** 恢复已归档消息。 */
|
|
59
|
+
RestoreNotification(request: RestoreNotificationRequest): Promise<Empty> {
|
|
60
|
+
return service({ url: `${NOTIFICATION_URL}/${request.id}/restore`, method: "put", data: request });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** 从个人收件箱删除消息。 */
|
|
64
|
+
DeleteNotification(request: DeleteNotificationRequest): Promise<Empty> {
|
|
65
|
+
return service({ url: `${NOTIFICATION_URL}/${request.id}`, method: "delete" });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const defNotificationService = new NotificationServiceImpl();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventStreamContentType, fetchEventSource, type EventSourceMessage } from "@microsoft/fetch-event-source";
|
|
2
2
|
import type { SubscribeSseRequest } from "@liujitcn/kratos-admin-system/rpc/base/v1/sse";
|
|
3
3
|
import { getRequestAccessToken, handleAuthExpired } from "@liujitcn/kratos-admin-core/request";
|
|
4
|
-
import { getLocaleRequestHeaders } from "@liujitcn/kratos-admin-core";
|
|
4
|
+
import { getLocaleRequestHeaders, t } from "@liujitcn/kratos-admin-core";
|
|
5
5
|
|
|
6
6
|
const SSE_URL = "/events";
|
|
7
7
|
|
|
@@ -116,9 +116,9 @@ export class SseServiceImpl {
|
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
if (response.status === 401 || response.status === 403) {
|
|
119
|
-
throw new SseFatalError("
|
|
119
|
+
throw new SseFatalError(t("system.sse.error.auth_expired"));
|
|
120
120
|
}
|
|
121
|
-
throw new SseRetriableError(
|
|
121
|
+
throw new SseRetriableError(t("system.sse.error.connection_failed", { status: response.status }));
|
|
122
122
|
},
|
|
123
123
|
onmessage: message => {
|
|
124
124
|
const eventName = message.event || "";
|
|
@@ -132,7 +132,7 @@ export class SseServiceImpl {
|
|
|
132
132
|
eventListeners.forEach(listener => listener(message));
|
|
133
133
|
},
|
|
134
134
|
onclose: () => {
|
|
135
|
-
throw new SseRetriableError("
|
|
135
|
+
throw new SseRetriableError(t("system.sse.error.connection_closed"));
|
|
136
136
|
},
|
|
137
137
|
onerror: error => {
|
|
138
138
|
if (controller.signal.aborted) {
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import type {
|
|
3
|
+
BaseApiLog,
|
|
4
|
+
BaseDataAccessLog,
|
|
5
|
+
BaseLoginLog,
|
|
6
|
+
BaseOperationLog,
|
|
7
|
+
BasePermissionLog,
|
|
8
|
+
BasePolicyEvaluationLog,
|
|
9
|
+
BaseApiLogService,
|
|
10
|
+
BaseDataAccessLogService,
|
|
11
|
+
BaseLoginLogService,
|
|
12
|
+
BaseOperationLogService,
|
|
13
|
+
BasePermissionLogService,
|
|
14
|
+
BasePolicyEvaluationLogService,
|
|
15
|
+
GetBaseApiLogRequest,
|
|
16
|
+
GetBaseDataAccessLogRequest,
|
|
17
|
+
GetBaseLoginLogRequest,
|
|
18
|
+
GetBaseOperationLogRequest,
|
|
19
|
+
GetBasePermissionLogRequest,
|
|
20
|
+
GetBasePolicyEvaluationLogRequest,
|
|
21
|
+
PageBaseApiLogRequest,
|
|
22
|
+
PageBaseApiLogResponse,
|
|
23
|
+
PageBaseDataAccessLogRequest,
|
|
24
|
+
PageBaseDataAccessLogResponse,
|
|
25
|
+
PageBaseLoginLogRequest,
|
|
26
|
+
PageBaseLoginLogResponse,
|
|
27
|
+
PageBaseOperationLogRequest,
|
|
28
|
+
PageBaseOperationLogResponse,
|
|
29
|
+
PageBasePermissionLogRequest,
|
|
30
|
+
PageBasePermissionLogResponse,
|
|
31
|
+
PageBasePolicyEvaluationLogRequest,
|
|
32
|
+
PageBasePolicyEvaluationLogResponse
|
|
33
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_audit_log";
|
|
34
|
+
|
|
35
|
+
const BASE_AUDIT_LOG_URL = "/v1/admin/base";
|
|
36
|
+
|
|
37
|
+
/** Admin 登录日志服务。 */
|
|
38
|
+
export class BaseLoginLogServiceImpl implements BaseLoginLogService {
|
|
39
|
+
/** 查询登录日志分页列表。 */
|
|
40
|
+
PageBaseLoginLog(request: PageBaseLoginLogRequest): Promise<PageBaseLoginLogResponse> {
|
|
41
|
+
return service<PageBaseLoginLogRequest, PageBaseLoginLogResponse>({
|
|
42
|
+
url: `${BASE_AUDIT_LOG_URL}/login-log`,
|
|
43
|
+
method: "get",
|
|
44
|
+
params: request
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** 查询登录日志详情。 */
|
|
49
|
+
GetBaseLoginLog(request: GetBaseLoginLogRequest): Promise<BaseLoginLog> {
|
|
50
|
+
return service<GetBaseLoginLogRequest, BaseLoginLog>({
|
|
51
|
+
url: `${BASE_AUDIT_LOG_URL}/login-log/${request.id}`,
|
|
52
|
+
method: "get"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Admin API 访问日志服务。 */
|
|
58
|
+
export class BaseApiLogServiceImpl implements BaseApiLogService {
|
|
59
|
+
/** 查询 API 访问日志分页列表。 */
|
|
60
|
+
PageBaseApiLog(request: PageBaseApiLogRequest): Promise<PageBaseApiLogResponse> {
|
|
61
|
+
return service<PageBaseApiLogRequest, PageBaseApiLogResponse>({
|
|
62
|
+
url: `${BASE_AUDIT_LOG_URL}/api-log`,
|
|
63
|
+
method: "get",
|
|
64
|
+
params: request
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** 查询 API 访问日志详情。 */
|
|
69
|
+
GetBaseApiLog(request: GetBaseApiLogRequest): Promise<BaseApiLog> {
|
|
70
|
+
return service<GetBaseApiLogRequest, BaseApiLog>({
|
|
71
|
+
url: `${BASE_AUDIT_LOG_URL}/api-log/${request.id}`,
|
|
72
|
+
method: "get"
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Admin 业务操作日志服务。 */
|
|
78
|
+
export class BaseOperationLogServiceImpl implements BaseOperationLogService {
|
|
79
|
+
/** 查询业务操作日志分页列表。 */
|
|
80
|
+
PageBaseOperationLog(request: PageBaseOperationLogRequest): Promise<PageBaseOperationLogResponse> {
|
|
81
|
+
return service<PageBaseOperationLogRequest, PageBaseOperationLogResponse>({
|
|
82
|
+
url: `${BASE_AUDIT_LOG_URL}/operation-log`,
|
|
83
|
+
method: "get",
|
|
84
|
+
params: request
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** 查询业务操作日志详情。 */
|
|
89
|
+
GetBaseOperationLog(request: GetBaseOperationLogRequest): Promise<BaseOperationLog> {
|
|
90
|
+
return service<GetBaseOperationLogRequest, BaseOperationLog>({
|
|
91
|
+
url: `${BASE_AUDIT_LOG_URL}/operation-log/${request.id}`,
|
|
92
|
+
method: "get"
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Admin 数据访问日志服务。 */
|
|
98
|
+
export class BaseDataAccessLogServiceImpl implements BaseDataAccessLogService {
|
|
99
|
+
/** 查询数据访问日志分页列表。 */
|
|
100
|
+
PageBaseDataAccessLog(request: PageBaseDataAccessLogRequest): Promise<PageBaseDataAccessLogResponse> {
|
|
101
|
+
return service<PageBaseDataAccessLogRequest, PageBaseDataAccessLogResponse>({
|
|
102
|
+
url: `${BASE_AUDIT_LOG_URL}/data-access-log`,
|
|
103
|
+
method: "get",
|
|
104
|
+
params: request
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** 查询数据访问日志详情。 */
|
|
109
|
+
GetBaseDataAccessLog(request: GetBaseDataAccessLogRequest): Promise<BaseDataAccessLog> {
|
|
110
|
+
return service<GetBaseDataAccessLogRequest, BaseDataAccessLog>({
|
|
111
|
+
url: `${BASE_AUDIT_LOG_URL}/data-access-log/${request.id}`,
|
|
112
|
+
method: "get"
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Admin 权限日志服务。 */
|
|
118
|
+
export class BasePermissionLogServiceImpl implements BasePermissionLogService {
|
|
119
|
+
/** 查询权限日志分页列表。 */
|
|
120
|
+
PageBasePermissionLog(request: PageBasePermissionLogRequest): Promise<PageBasePermissionLogResponse> {
|
|
121
|
+
return service<PageBasePermissionLogRequest, PageBasePermissionLogResponse>({
|
|
122
|
+
url: `${BASE_AUDIT_LOG_URL}/permission-log`,
|
|
123
|
+
method: "get",
|
|
124
|
+
params: request
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** 查询权限日志详情。 */
|
|
129
|
+
GetBasePermissionLog(request: GetBasePermissionLogRequest): Promise<BasePermissionLog> {
|
|
130
|
+
return service<GetBasePermissionLogRequest, BasePermissionLog>({
|
|
131
|
+
url: `${BASE_AUDIT_LOG_URL}/permission-log/${request.id}`,
|
|
132
|
+
method: "get"
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Admin 策略评估日志服务。 */
|
|
138
|
+
export class BasePolicyEvaluationLogServiceImpl implements BasePolicyEvaluationLogService {
|
|
139
|
+
/** 查询策略评估日志分页列表。 */
|
|
140
|
+
PageBasePolicyEvaluationLog(request: PageBasePolicyEvaluationLogRequest): Promise<PageBasePolicyEvaluationLogResponse> {
|
|
141
|
+
return service<PageBasePolicyEvaluationLogRequest, PageBasePolicyEvaluationLogResponse>({
|
|
142
|
+
url: `${BASE_AUDIT_LOG_URL}/policy-evaluation-log`,
|
|
143
|
+
method: "get",
|
|
144
|
+
params: request
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** 查询策略评估日志详情。 */
|
|
149
|
+
GetBasePolicyEvaluationLog(request: GetBasePolicyEvaluationLogRequest): Promise<BasePolicyEvaluationLog> {
|
|
150
|
+
return service<GetBasePolicyEvaluationLogRequest, BasePolicyEvaluationLog>({
|
|
151
|
+
url: `${BASE_AUDIT_LOG_URL}/policy-evaluation-log/${request.id}`,
|
|
152
|
+
method: "get"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** 默认登录日志服务。 */
|
|
158
|
+
export const defBaseLoginLogService = new BaseLoginLogServiceImpl();
|
|
159
|
+
/** 默认 API 访问日志服务。 */
|
|
160
|
+
export const defBaseApiLogService = new BaseApiLogServiceImpl();
|
|
161
|
+
/** 默认业务操作日志服务。 */
|
|
162
|
+
export const defBaseOperationLogService = new BaseOperationLogServiceImpl();
|
|
163
|
+
/** 默认数据访问日志服务。 */
|
|
164
|
+
export const defBaseDataAccessLogService = new BaseDataAccessLogServiceImpl();
|
|
165
|
+
/** 默认权限日志服务。 */
|
|
166
|
+
export const defBasePermissionLogService = new BasePermissionLogServiceImpl();
|
|
167
|
+
/** 默认策略评估日志服务。 */
|
|
168
|
+
export const defBasePolicyEvaluationLogService = new BasePolicyEvaluationLogServiceImpl();
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import type {
|
|
3
|
+
BaseDashboardDistributionResponse,
|
|
4
|
+
GetBaseDashboardLoginDistributionRequest,
|
|
5
|
+
GetBaseDashboardLoginTrendRequest,
|
|
6
|
+
GetBaseDashboardOperationDistributionRequest,
|
|
7
|
+
GetBaseDashboardOverviewRequest,
|
|
8
|
+
BaseDashboardOverview,
|
|
9
|
+
BaseDashboardService,
|
|
10
|
+
BaseDashboardTrendResponse
|
|
11
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_dashboard";
|
|
12
|
+
|
|
13
|
+
const BASE_DASHBOARD_URL = "/v1/admin/base/dashboard";
|
|
14
|
+
|
|
15
|
+
/** Admin首页业务统计服务。 */
|
|
16
|
+
export class BaseDashboardServiceImpl implements BaseDashboardService {
|
|
17
|
+
/** 查询首页概览统计。 */
|
|
18
|
+
GetBaseDashboardOverview(request: GetBaseDashboardOverviewRequest): Promise<BaseDashboardOverview> {
|
|
19
|
+
return service<GetBaseDashboardOverviewRequest, BaseDashboardOverview>({
|
|
20
|
+
url: `${BASE_DASHBOARD_URL}/overview`,
|
|
21
|
+
method: "get",
|
|
22
|
+
params: request
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 查询登录趋势。 */
|
|
27
|
+
GetBaseDashboardLoginTrend(request: GetBaseDashboardLoginTrendRequest): Promise<BaseDashboardTrendResponse> {
|
|
28
|
+
return service<GetBaseDashboardLoginTrendRequest, BaseDashboardTrendResponse>({
|
|
29
|
+
url: `${BASE_DASHBOARD_URL}/login-trend`,
|
|
30
|
+
method: "get",
|
|
31
|
+
params: request
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** 查询操作动作分布。 */
|
|
36
|
+
GetBaseDashboardOperationDistribution(request: GetBaseDashboardOperationDistributionRequest): Promise<BaseDashboardDistributionResponse> {
|
|
37
|
+
return service<GetBaseDashboardOperationDistributionRequest, BaseDashboardDistributionResponse>({
|
|
38
|
+
url: `${BASE_DASHBOARD_URL}/operation-distribution`,
|
|
39
|
+
method: "get",
|
|
40
|
+
params: request
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 查询登录结果分布。 */
|
|
45
|
+
GetBaseDashboardLoginDistribution(request: GetBaseDashboardLoginDistributionRequest): Promise<BaseDashboardDistributionResponse> {
|
|
46
|
+
return service<GetBaseDashboardLoginDistributionRequest, BaseDashboardDistributionResponse>({
|
|
47
|
+
url: `${BASE_DASHBOARD_URL}/login-distribution`,
|
|
48
|
+
method: "get",
|
|
49
|
+
params: request
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** 默认首页业务统计服务实例。 */
|
|
55
|
+
export const defBaseDashboardService = new BaseDashboardServiceImpl();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import type {
|
|
3
|
+
BaseFile,
|
|
4
|
+
BaseFileService,
|
|
5
|
+
DeleteBaseFileRequest,
|
|
6
|
+
GetBaseFileRequest,
|
|
7
|
+
PageBaseFileRequest,
|
|
8
|
+
PageBaseFileResponse
|
|
9
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_file";
|
|
10
|
+
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
11
|
+
|
|
12
|
+
const BASE_FILE_URL = "/v1/admin/base/file";
|
|
13
|
+
|
|
14
|
+
/** Admin文件资产管理服务。 */
|
|
15
|
+
export class BaseFileServiceImpl implements BaseFileService {
|
|
16
|
+
/** 分页查询文件资产。 */
|
|
17
|
+
PageBaseFile(request: PageBaseFileRequest): Promise<PageBaseFileResponse> {
|
|
18
|
+
return service<PageBaseFileRequest, PageBaseFileResponse>({
|
|
19
|
+
url: BASE_FILE_URL,
|
|
20
|
+
method: "get",
|
|
21
|
+
params: request
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 查询文件资产详情。 */
|
|
26
|
+
GetBaseFile(request: GetBaseFileRequest): Promise<BaseFile> {
|
|
27
|
+
return service<GetBaseFileRequest, BaseFile>({
|
|
28
|
+
url: `${BASE_FILE_URL}/${request.id}`,
|
|
29
|
+
method: "get"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 删除文件资产及其对象。 */
|
|
34
|
+
DeleteBaseFile(request: DeleteBaseFileRequest): Promise<Empty> {
|
|
35
|
+
return service<DeleteBaseFileRequest, Empty>({
|
|
36
|
+
url: `${BASE_FILE_URL}/${request.id}`,
|
|
37
|
+
method: "delete"
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 默认文件资产管理服务实例。 */
|
|
43
|
+
export const defBaseFileService = new BaseFileServiceImpl();
|