@liujitcn/kratos-admin-system 0.0.49 → 0.0.51
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 +44 -8
- package/dist/package/declarations/src/api/system/admin/v1/base_i18n_custom.d.ts +18 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_output_policy.d.ts +4 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_storage_policy.d.ts +3 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant.d.ts +2 -2
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project.d.ts +23 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project_grant.d.ts +16 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectManager.vue.d.ts +29 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectSelect.vue.d.ts +31 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectText.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager-data.d.ts +14 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager.d.ts +40 -0
- package/dist/package/declarations/src/components/tenant-project-grant/ProjectGrantDialog.vue.d.ts +8 -0
- package/dist/package/declarations/src/index.d.ts +2 -0
- package/dist/package/declarations/src/locales/generated.d.ts +196 -0
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +11 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n_custom.d.ts +105 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_output_policy.d.ts +8 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_storage_policy.d.ts +25 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +10 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project.d.ts +141 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project_grant.d.ts +105 -0
- package/dist/package/declarations/src/views/ai/chat/components/SessionPanel.vue.d.ts +2 -2
- package/dist/package/declarations/src/views/ai/chat/components/speech-recognition.d.ts +33 -0
- package/dist/package/declarations/src/views/base/i18n-custom/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project-grant/index.vue.d.ts +3 -0
- package/dist/package/src/api/system/admin/v1/base_i18n_custom.ts +72 -0
- package/dist/package/src/api/system/admin/v1/base_redact_output_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_redact_storage_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_tenant.ts +3 -2
- package/dist/package/src/api/system/admin/v1/base_tenant_project.ts +94 -0
- package/dist/package/src/api/system/admin/v1/base_tenant_project_grant.ts +63 -0
- package/dist/package/src/components/tenant-project/TenantProjectManager.vue +431 -0
- package/dist/package/src/components/tenant-project/TenantProjectSelect.vue +83 -0
- package/dist/package/src/components/tenant-project/TenantProjectText.vue +37 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager-data.ts +26 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager.ts +48 -0
- package/dist/package/src/components/tenant-project-grant/ProjectGrantDialog.vue +108 -0
- package/dist/package/src/index.ts +12 -0
- package/dist/package/src/locales/README.md +1 -1
- package/dist/package/src/locales/en-US.json +51 -2
- package/dist/package/src/locales/ja-JP.json +51 -2
- package/dist/package/src/locales/zh-CN.json +51 -2
- package/dist/package/src/locales/zh-TW.json +51 -2
- package/dist/package/src/module.ts +3 -3
- package/dist/package/src/rpc/base/v1/config.ts +12 -0
- package/dist/package/src/rpc/system/admin/v1/base_i18n_custom.ts +126 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_output_policy.ts +9 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_storage_policy.ts +30 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +11 -1
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project.ts +166 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project_grant.ts +128 -0
- package/dist/package/src/views/ai/chat/components/XSender.vue +21 -28
- package/dist/package/src/views/ai/chat/components/speech-recognition.ts +156 -0
- package/dist/package/src/views/base/api-log/index.vue +3 -3
- package/dist/package/src/views/base/config/index.vue +3 -3
- package/dist/package/src/views/base/data-access-log/index.vue +3 -3
- package/dist/package/src/views/base/dept/index.vue +10 -45
- package/dist/package/src/views/base/dict/index.vue +3 -3
- package/dist/package/src/views/base/dict/item.vue +3 -3
- package/dist/package/src/views/base/file/index.vue +12 -3
- package/dist/package/src/views/base/i18n-custom/index.vue +321 -0
- package/dist/package/src/views/base/job/index.vue +85 -161
- package/dist/package/src/views/base/login-log/index.vue +13 -4
- package/dist/package/src/views/base/login-policy/index.vue +109 -40
- package/dist/package/src/views/base/menu/index.vue +3 -3
- package/dist/package/src/views/base/message/index.vue +9 -32
- package/dist/package/src/views/base/message-category/index.vue +2 -4
- package/dist/package/src/views/base/oauth-client/index.vue +8 -42
- package/dist/package/src/views/base/online-session/index.vue +8 -27
- package/dist/package/src/views/base/operation-log/index.vue +3 -3
- package/dist/package/src/views/base/permission-log/index.vue +3 -3
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +3 -3
- package/dist/package/src/views/base/post/index.vue +9 -42
- package/dist/package/src/views/base/redact-output-policy/index.vue +19 -7
- package/dist/package/src/views/base/redact-rule/index.vue +70 -53
- package/dist/package/src/views/base/redact-storage-policy/index.vue +18 -7
- package/dist/package/src/views/base/role/index.vue +14 -48
- package/dist/package/src/views/base/tenant/index.vue +163 -19
- package/dist/package/src/views/base/tenant-project/index.vue +12 -0
- package/dist/package/src/views/base/tenant-project-grant/index.vue +338 -0
- package/dist/package/src/views/base/user/index.vue +30 -51
- package/dist/package/src/views/profile/components/login-log.vue +15 -2
- package/dist/package/src/views/profile/components/password.vue +1 -1
- package/dist/package/src/views/profile/components/security.vue +2 -2
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
- package/dist/package/src/views/tool/code-gen/config.ts +2 -1
- package/package.json +2 -2
- /package/dist/package/declarations/src/components/{ChangePasswordForm.vue.d.ts → account/ChangePasswordForm.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{ForcedPasswordDialog.vue.d.ts → account/ForcedPasswordDialog.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Ai.vue.d.ts → ai/Ai.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nCell.vue.d.ts → i18n/DynamicI18nCell.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nEditor.vue.d.ts → i18n/DynamicI18nEditor.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{dynamicI18n.d.ts → i18n/dynamicI18n.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{LogTable.vue.d.ts → log/LogTable.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{log.d.ts → log/log.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Notification.vue.d.ts → notification/Notification.vue.d.ts} +0 -0
- /package/dist/package/src/components/{ChangePasswordForm.vue → account/ChangePasswordForm.vue} +0 -0
- /package/dist/package/src/components/{ForcedPasswordDialog.vue → account/ForcedPasswordDialog.vue} +0 -0
- /package/dist/package/src/components/{Ai.vue → ai/Ai.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nCell.vue → i18n/DynamicI18nCell.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nEditor.vue → i18n/DynamicI18nEditor.vue} +0 -0
- /package/dist/package/src/components/{dynamicI18n.ts → i18n/dynamicI18n.ts} +0 -0
- /package/dist/package/src/components/{LogTable.vue → log/LogTable.vue} +0 -0
- /package/dist/package/src/components/{log.ts → log/log.ts} +0 -0
- /package/dist/package/src/components/{Notification.vue → notification/Notification.vue} +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { SelectOptionResponse } from "../../../common/v1/common";
|
|
2
|
+
import type { Status } from "../../../common/v1/enum";
|
|
3
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
4
|
+
/** 项目选项查询条件 */
|
|
5
|
+
export interface OptionBaseTenantProjectRequest {
|
|
6
|
+
/** 租户ID */
|
|
7
|
+
tenant_id?: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** 项目树查询条件 */
|
|
10
|
+
export interface TreeBaseTenantProjectRequest {
|
|
11
|
+
/** 项目编号或名称关键字 */
|
|
12
|
+
keyword: string;
|
|
13
|
+
}
|
|
14
|
+
/** 项目树响应 */
|
|
15
|
+
export interface TreeBaseTenantProjectResponse {
|
|
16
|
+
/** 租户项目树 */
|
|
17
|
+
list: TreeBaseTenantProjectResponse_Option[];
|
|
18
|
+
}
|
|
19
|
+
/** 项目树节点 */
|
|
20
|
+
export interface TreeBaseTenantProjectResponse_Option {
|
|
21
|
+
/** 节点值 */
|
|
22
|
+
value: string;
|
|
23
|
+
/** 节点名称 */
|
|
24
|
+
label: string;
|
|
25
|
+
/** 节点类型 */
|
|
26
|
+
type: string;
|
|
27
|
+
/** 租户ID */
|
|
28
|
+
tenant_id: number;
|
|
29
|
+
/** 项目ID */
|
|
30
|
+
project_id: number;
|
|
31
|
+
/** 是否禁用 */
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
/** 子节点 */
|
|
34
|
+
children: TreeBaseTenantProjectResponse_Option[];
|
|
35
|
+
}
|
|
36
|
+
/** 项目分页查询条件 */
|
|
37
|
+
export interface PageBaseTenantProjectRequest {
|
|
38
|
+
/** 项目名称 */
|
|
39
|
+
name: string;
|
|
40
|
+
/** 项目编号 */
|
|
41
|
+
code: string;
|
|
42
|
+
/** 租户ID */
|
|
43
|
+
tenant_id?: number | undefined;
|
|
44
|
+
/** 状态 */
|
|
45
|
+
status?: Status | undefined;
|
|
46
|
+
/** 当前页码 */
|
|
47
|
+
page_num: number;
|
|
48
|
+
/** 每一页的行数 */
|
|
49
|
+
page_size: number;
|
|
50
|
+
}
|
|
51
|
+
/** 项目分页响应 */
|
|
52
|
+
export interface PageBaseTenantProjectResponse {
|
|
53
|
+
/** 分页数据 */
|
|
54
|
+
base_tenant_projects: BaseTenantProject[];
|
|
55
|
+
/** 总数 */
|
|
56
|
+
total: number;
|
|
57
|
+
}
|
|
58
|
+
/** 查询项目请求参数 */
|
|
59
|
+
export interface GetBaseTenantProjectRequest {
|
|
60
|
+
/** 项目ID */
|
|
61
|
+
id: number;
|
|
62
|
+
}
|
|
63
|
+
/** 项目表单 */
|
|
64
|
+
export interface BaseTenantProjectForm {
|
|
65
|
+
/** 项目ID */
|
|
66
|
+
id: number;
|
|
67
|
+
/** 租户ID */
|
|
68
|
+
tenant_id: number;
|
|
69
|
+
/** 项目编号 */
|
|
70
|
+
code: string;
|
|
71
|
+
/** 项目名称 */
|
|
72
|
+
name: string;
|
|
73
|
+
/** 状态 */
|
|
74
|
+
status: Status;
|
|
75
|
+
/** 显示顺序 */
|
|
76
|
+
sort: number;
|
|
77
|
+
/** 备注 */
|
|
78
|
+
remark: string;
|
|
79
|
+
}
|
|
80
|
+
/** 创建项目请求参数 */
|
|
81
|
+
export interface CreateBaseTenantProjectRequest {
|
|
82
|
+
/** 项目表单 */
|
|
83
|
+
base_tenant_project: BaseTenantProjectForm | undefined;
|
|
84
|
+
}
|
|
85
|
+
/** 更新项目请求参数 */
|
|
86
|
+
export interface UpdateBaseTenantProjectRequest {
|
|
87
|
+
/** 项目表单 */
|
|
88
|
+
base_tenant_project: BaseTenantProjectForm | undefined;
|
|
89
|
+
}
|
|
90
|
+
/** 删除项目请求参数 */
|
|
91
|
+
export interface DeleteBaseTenantProjectRequest {
|
|
92
|
+
/** 项目ID列表 */
|
|
93
|
+
id: string;
|
|
94
|
+
}
|
|
95
|
+
/** 设置项目状态请求参数 */
|
|
96
|
+
export interface SetBaseTenantProjectStatusRequest {
|
|
97
|
+
/** 项目ID */
|
|
98
|
+
id: number;
|
|
99
|
+
/** 状态 */
|
|
100
|
+
status: number;
|
|
101
|
+
}
|
|
102
|
+
/** 项目 */
|
|
103
|
+
export interface BaseTenantProject {
|
|
104
|
+
/** 项目ID */
|
|
105
|
+
id: number;
|
|
106
|
+
/** 租户ID */
|
|
107
|
+
tenant_id: number;
|
|
108
|
+
/** 项目编号 */
|
|
109
|
+
code: string;
|
|
110
|
+
/** 项目名称 */
|
|
111
|
+
name: string;
|
|
112
|
+
/** 状态 */
|
|
113
|
+
status: Status;
|
|
114
|
+
/** 显示顺序 */
|
|
115
|
+
sort: number;
|
|
116
|
+
/** 备注 */
|
|
117
|
+
remark: string;
|
|
118
|
+
/** 创建时间 */
|
|
119
|
+
created_at: string;
|
|
120
|
+
/** 更新时间 */
|
|
121
|
+
updated_at: string;
|
|
122
|
+
}
|
|
123
|
+
/** Admin项目管理服务 */
|
|
124
|
+
export interface BaseTenantProjectService {
|
|
125
|
+
/** 查询项目下拉选择 */
|
|
126
|
+
OptionBaseTenantProject(request: OptionBaseTenantProjectRequest): Promise<SelectOptionResponse>;
|
|
127
|
+
/** 查询当前账号可用的租户项目树 */
|
|
128
|
+
TreeBaseTenantProject(request: TreeBaseTenantProjectRequest): Promise<TreeBaseTenantProjectResponse>;
|
|
129
|
+
/** 查询项目分页列表 */
|
|
130
|
+
PageBaseTenantProject(request: PageBaseTenantProjectRequest): Promise<PageBaseTenantProjectResponse>;
|
|
131
|
+
/** 查询项目 */
|
|
132
|
+
GetBaseTenantProject(request: GetBaseTenantProjectRequest): Promise<BaseTenantProjectForm>;
|
|
133
|
+
/** 创建项目 */
|
|
134
|
+
CreateBaseTenantProject(request: CreateBaseTenantProjectRequest): Promise<Empty>;
|
|
135
|
+
/** 更新项目 */
|
|
136
|
+
UpdateBaseTenantProject(request: UpdateBaseTenantProjectRequest): Promise<Empty>;
|
|
137
|
+
/** 删除项目 */
|
|
138
|
+
DeleteBaseTenantProject(request: DeleteBaseTenantProjectRequest): Promise<Empty>;
|
|
139
|
+
/** 设置项目状态 */
|
|
140
|
+
SetBaseTenantProjectStatus(request: SetBaseTenantProjectStatusRequest): Promise<Empty>;
|
|
141
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
2
|
+
/** BaseTenantProjectGrantSubjectType 项目授权主体类型。 */
|
|
3
|
+
export declare enum BaseTenantProjectGrantSubjectType {
|
|
4
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_UNSPECIFIED - 未指定 */
|
|
5
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_UNSPECIFIED = 0,
|
|
6
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_POST - 岗位 */
|
|
7
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_POST = 1,
|
|
8
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_ROLE - 角色 */
|
|
9
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_ROLE = 2,
|
|
10
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_DEPT - 部门 */
|
|
11
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_DEPT = 3,
|
|
12
|
+
/** BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_USER - 用户 */
|
|
13
|
+
BASE_TENANT_PROJECT_GRANT_SUBJECT_TYPE_USER = 4
|
|
14
|
+
}
|
|
15
|
+
/** 项目授权主体和目标租户查询条件。 */
|
|
16
|
+
export interface BaseTenantProjectGrantKey {
|
|
17
|
+
/** 授权目标租户ID */
|
|
18
|
+
tenant_id: number;
|
|
19
|
+
/** 授权主体类型 */
|
|
20
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
21
|
+
/** 授权主体ID */
|
|
22
|
+
subject_id: number;
|
|
23
|
+
}
|
|
24
|
+
/** 项目授权记录,project_id 为 [0] 时表示目标租户全部项目,空数组表示无权限。 */
|
|
25
|
+
export interface BaseTenantProjectGrant {
|
|
26
|
+
/** 授权目标租户ID */
|
|
27
|
+
tenant_id: number;
|
|
28
|
+
/** 授权主体类型 */
|
|
29
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
30
|
+
/** 授权主体ID */
|
|
31
|
+
subject_id: number;
|
|
32
|
+
/** 项目主键ID数字数组,[0]全部,[]无权限 */
|
|
33
|
+
project_id: number[];
|
|
34
|
+
/** 租户名称 */
|
|
35
|
+
tenant_name: string;
|
|
36
|
+
/** 授权主体名称 */
|
|
37
|
+
subject_name: string;
|
|
38
|
+
/** 授权主体编码 */
|
|
39
|
+
subject_code: string;
|
|
40
|
+
/** 授权项目名称列表 */
|
|
41
|
+
project_names: string[];
|
|
42
|
+
/** 项目授权联合主键展示值 */
|
|
43
|
+
grant_key: string;
|
|
44
|
+
}
|
|
45
|
+
/** 项目授权分页查询条件。 */
|
|
46
|
+
export interface PageBaseTenantProjectGrantRequest {
|
|
47
|
+
/** 授权目标租户ID */
|
|
48
|
+
tenant_id?: number | undefined;
|
|
49
|
+
/** 授权主体类型 */
|
|
50
|
+
subject_type?: BaseTenantProjectGrantSubjectType | undefined;
|
|
51
|
+
/** 授权主体ID */
|
|
52
|
+
subject_id?: number | undefined;
|
|
53
|
+
/** 当前页码 */
|
|
54
|
+
page_num: number;
|
|
55
|
+
/** 每一页的行数 */
|
|
56
|
+
page_size: number;
|
|
57
|
+
}
|
|
58
|
+
/** 项目授权分页响应。 */
|
|
59
|
+
export interface PageBaseTenantProjectGrantResponse {
|
|
60
|
+
/** 项目授权列表 */
|
|
61
|
+
grants: BaseTenantProjectGrant[];
|
|
62
|
+
/** 总数 */
|
|
63
|
+
total: number;
|
|
64
|
+
}
|
|
65
|
+
/** 查询项目授权请求参数。 */
|
|
66
|
+
export interface GetBaseTenantProjectGrantRequest {
|
|
67
|
+
/** 授权目标租户ID */
|
|
68
|
+
tenant_id: number;
|
|
69
|
+
/** 授权主体类型 */
|
|
70
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
71
|
+
/** 授权主体ID */
|
|
72
|
+
subject_id: number;
|
|
73
|
+
}
|
|
74
|
+
/** 创建项目授权请求参数。 */
|
|
75
|
+
export interface CreateBaseTenantProjectGrantRequest {
|
|
76
|
+
/** 项目授权表单 */
|
|
77
|
+
base_tenant_project_grant: BaseTenantProjectGrant | undefined;
|
|
78
|
+
}
|
|
79
|
+
/** 更新项目授权请求参数。 */
|
|
80
|
+
export interface UpdateBaseTenantProjectGrantRequest {
|
|
81
|
+
/** 项目授权表单 */
|
|
82
|
+
base_tenant_project_grant: BaseTenantProjectGrant | undefined;
|
|
83
|
+
}
|
|
84
|
+
/** 删除项目授权请求参数。 */
|
|
85
|
+
export interface DeleteBaseTenantProjectGrantRequest {
|
|
86
|
+
/** 授权目标租户ID */
|
|
87
|
+
tenant_id: number;
|
|
88
|
+
/** 授权主体类型 */
|
|
89
|
+
subject_type: BaseTenantProjectGrantSubjectType;
|
|
90
|
+
/** 授权主体ID */
|
|
91
|
+
subject_id: number;
|
|
92
|
+
}
|
|
93
|
+
/** BaseTenantProjectGrantService 管理岗位、角色、部门和用户在目标租户下的项目授权。 */
|
|
94
|
+
export interface BaseTenantProjectGrantService {
|
|
95
|
+
/** 查询项目授权分页列表。 */
|
|
96
|
+
PageBaseTenantProjectGrant(request: PageBaseTenantProjectGrantRequest): Promise<PageBaseTenantProjectGrantResponse>;
|
|
97
|
+
/** 查询项目授权详情。 */
|
|
98
|
+
GetBaseTenantProjectGrant(request: GetBaseTenantProjectGrantRequest): Promise<BaseTenantProjectGrant>;
|
|
99
|
+
/** 新增项目授权。 */
|
|
100
|
+
CreateBaseTenantProjectGrant(request: CreateBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
101
|
+
/** 更新项目授权,只修改项目范围,授权主体联合键不可变更。 */
|
|
102
|
+
UpdateBaseTenantProjectGrant(request: UpdateBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
103
|
+
/** 删除项目授权。 */
|
|
104
|
+
DeleteBaseTenantProjectGrant(request: DeleteBaseTenantProjectGrantRequest): Promise<Empty>;
|
|
105
|
+
}
|
|
@@ -10,21 +10,21 @@ type __VLS_Props = {
|
|
|
10
10
|
sessions: AiSession[];
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
change: (item: AiSession) => any;
|
|
13
14
|
action: (payload: {
|
|
14
15
|
action: SessionAction;
|
|
15
16
|
item: AiSession;
|
|
16
17
|
}) => any;
|
|
17
|
-
change: (item: AiSession) => any;
|
|
18
18
|
"update:active": (value: string) => any;
|
|
19
19
|
"update:keyword": (value: string) => any;
|
|
20
20
|
create: () => any;
|
|
21
21
|
toggleCollapse: () => any;
|
|
22
22
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onChange?: ((item: AiSession) => any) | undefined;
|
|
23
24
|
onAction?: ((payload: {
|
|
24
25
|
action: SessionAction;
|
|
25
26
|
item: AiSession;
|
|
26
27
|
}) => any) | undefined;
|
|
27
|
-
onChange?: ((item: AiSession) => any) | undefined;
|
|
28
28
|
"onUpdate:active"?: ((value: string) => any) | undefined;
|
|
29
29
|
"onUpdate:keyword"?: ((value: string) => any) | undefined;
|
|
30
30
|
onCreate?: (() => any) | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** 语音识别结果的最小结构,便于在不同浏览器实现间复用。 */
|
|
2
|
+
export type SpeechResultList = ArrayLike<{
|
|
3
|
+
0?: {
|
|
4
|
+
transcript: string;
|
|
5
|
+
};
|
|
6
|
+
length: number;
|
|
7
|
+
}>;
|
|
8
|
+
/** 语音识别错误的最小结构,兼容浏览器事件和不支持错误。 */
|
|
9
|
+
export type SpeechRecognitionError = {
|
|
10
|
+
code?: number;
|
|
11
|
+
error?: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
type SpeechRecognitionOptions = {
|
|
15
|
+
/** 识别错误回调。 */
|
|
16
|
+
onError?: (error: SpeechRecognitionError) => void;
|
|
17
|
+
/** 识别开始回调。 */
|
|
18
|
+
onStart?: () => void;
|
|
19
|
+
/** 识别结束回调。 */
|
|
20
|
+
onEnd?: (text: string) => void;
|
|
21
|
+
/** 识别结果回调。 */
|
|
22
|
+
onResult?: (text: string) => void;
|
|
23
|
+
};
|
|
24
|
+
/** 收集一次识别事件中的完整文本。 */
|
|
25
|
+
export declare function collectSpeechResultText(results: SpeechResultList): string;
|
|
26
|
+
/** 创建浏览器语音识别实例,并统一结果、状态和卸载处理。 */
|
|
27
|
+
export declare function useSpeechRecognition({ onError, onStart, onEnd, onResult }?: SpeechRecognitionOptions): {
|
|
28
|
+
loading: globalThis.Ref<boolean, boolean>;
|
|
29
|
+
start: () => void;
|
|
30
|
+
stop: () => void;
|
|
31
|
+
value: globalThis.Ref<string, string>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -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,72 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
3
|
+
import type {
|
|
4
|
+
BaseI18nCustomForm,
|
|
5
|
+
BaseI18nCustomService,
|
|
6
|
+
CreateBaseI18nCustomRequest,
|
|
7
|
+
DeleteBaseI18nCustomRequest,
|
|
8
|
+
GetBaseI18nCustomRequest,
|
|
9
|
+
PageBaseI18nCustomRequest,
|
|
10
|
+
PageBaseI18nCustomResponse,
|
|
11
|
+
SetBaseI18nCustomStatusRequest,
|
|
12
|
+
UpdateBaseI18nCustomRequest
|
|
13
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n_custom";
|
|
14
|
+
|
|
15
|
+
const BASE_I18N_CUSTOM_URL = "/v1/admin/base/i18n-custom";
|
|
16
|
+
|
|
17
|
+
/** Admin前端国际化自定义翻译服务。 */
|
|
18
|
+
export class BaseI18nCustomServiceImpl implements BaseI18nCustomService {
|
|
19
|
+
/** 查询国际化自定义翻译分页列表。 */
|
|
20
|
+
PageBaseI18nCustom(request: PageBaseI18nCustomRequest): Promise<PageBaseI18nCustomResponse> {
|
|
21
|
+
return service<PageBaseI18nCustomRequest, PageBaseI18nCustomResponse>({
|
|
22
|
+
url: BASE_I18N_CUSTOM_URL,
|
|
23
|
+
method: "get",
|
|
24
|
+
params: request
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 查询国际化自定义翻译详情。 */
|
|
29
|
+
GetBaseI18nCustom(request: GetBaseI18nCustomRequest): Promise<BaseI18nCustomForm> {
|
|
30
|
+
return service<GetBaseI18nCustomRequest, BaseI18nCustomForm>({
|
|
31
|
+
url: `${BASE_I18N_CUSTOM_URL}/${request.id}`,
|
|
32
|
+
method: "get"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** 创建国际化自定义翻译。 */
|
|
37
|
+
CreateBaseI18nCustom(request: CreateBaseI18nCustomRequest): Promise<Empty> {
|
|
38
|
+
return service<BaseI18nCustomForm | undefined, Empty>({
|
|
39
|
+
url: BASE_I18N_CUSTOM_URL,
|
|
40
|
+
method: "post",
|
|
41
|
+
data: request.i18n_custom
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** 更新国际化自定义翻译。 */
|
|
46
|
+
UpdateBaseI18nCustom(request: UpdateBaseI18nCustomRequest): Promise<Empty> {
|
|
47
|
+
return service<BaseI18nCustomForm | undefined, Empty>({
|
|
48
|
+
url: `${BASE_I18N_CUSTOM_URL}/${request.i18n_custom?.id ?? ""}`,
|
|
49
|
+
method: "put",
|
|
50
|
+
data: request.i18n_custom
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** 删除国际化自定义翻译。 */
|
|
55
|
+
DeleteBaseI18nCustom(request: DeleteBaseI18nCustomRequest): Promise<Empty> {
|
|
56
|
+
return service<DeleteBaseI18nCustomRequest, Empty>({
|
|
57
|
+
url: `${BASE_I18N_CUSTOM_URL}/${request.id}`,
|
|
58
|
+
method: "delete"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** 设置国际化自定义翻译状态。 */
|
|
63
|
+
SetBaseI18nCustomStatus(request: SetBaseI18nCustomStatusRequest): Promise<Empty> {
|
|
64
|
+
return service<SetBaseI18nCustomStatusRequest, Empty>({
|
|
65
|
+
url: `${BASE_I18N_CUSTOM_URL}/${request.id}/status`,
|
|
66
|
+
method: "put",
|
|
67
|
+
data: request
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const defBaseI18nCustomService = new BaseI18nCustomServiceImpl();
|
|
@@ -4,12 +4,14 @@ import type {
|
|
|
4
4
|
BaseRedactOutputPolicyService,
|
|
5
5
|
CreateBaseRedactOutputPolicyRequest,
|
|
6
6
|
DeleteBaseRedactOutputPolicyRequest,
|
|
7
|
+
GetBaseRedactOutputFieldDocRequest,
|
|
7
8
|
GetBaseRedactOutputPolicyRequest,
|
|
8
9
|
PageBaseRedactOutputPolicyRequest,
|
|
9
10
|
PageBaseRedactOutputPolicyResponse,
|
|
10
11
|
SetBaseRedactOutputPolicyStatusRequest,
|
|
11
12
|
UpdateBaseRedactOutputPolicyRequest
|
|
12
13
|
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_redact_output_policy";
|
|
14
|
+
import type { BaseApiDoc } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_api";
|
|
13
15
|
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
14
16
|
|
|
15
17
|
const BASE_REDACT_OUTPUT_POLICY_URL = "/v1/admin/base/redact-output-policy";
|
|
@@ -45,6 +47,11 @@ export class BaseRedactOutputPolicyServiceImpl implements BaseRedactOutputPolicy
|
|
|
45
47
|
SetBaseRedactOutputPolicyStatus(request: SetBaseRedactOutputPolicyStatusRequest): Promise<Empty> {
|
|
46
48
|
return service<SetBaseRedactOutputPolicyStatusRequest, Empty>({ url: `${BASE_REDACT_OUTPUT_POLICY_URL}/${request.id}/status`, method: "put", data: request });
|
|
47
49
|
}
|
|
50
|
+
|
|
51
|
+
/** 查询可出库脱敏的响应字段文档。 */
|
|
52
|
+
GetBaseRedactOutputFieldDoc(request: GetBaseRedactOutputFieldDocRequest): Promise<BaseApiDoc> {
|
|
53
|
+
return service<GetBaseRedactOutputFieldDocRequest, BaseApiDoc>({ url: `${BASE_REDACT_OUTPUT_POLICY_URL}/fields/${request.api_id}`, method: "get" });
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
/** defBaseRedactOutputPolicyService 出库脱敏策略服务实例。 */
|
|
@@ -5,6 +5,8 @@ import type {
|
|
|
5
5
|
CreateBaseRedactStoragePolicyRequest,
|
|
6
6
|
DeleteBaseRedactStoragePolicyRequest,
|
|
7
7
|
GetBaseRedactStoragePolicyRequest,
|
|
8
|
+
ListBaseRedactStorageColumnRequest,
|
|
9
|
+
ListBaseRedactStorageColumnResponse,
|
|
8
10
|
PageBaseRedactStoragePolicyRequest,
|
|
9
11
|
PageBaseRedactStoragePolicyResponse,
|
|
10
12
|
SetBaseRedactStoragePolicyStatusRequest,
|
|
@@ -45,6 +47,11 @@ export class BaseRedactStoragePolicyServiceImpl implements BaseRedactStoragePoli
|
|
|
45
47
|
SetBaseRedactStoragePolicyStatus(request: SetBaseRedactStoragePolicyStatusRequest): Promise<Empty> {
|
|
46
48
|
return service<SetBaseRedactStoragePolicyStatusRequest, Empty>({ url: `${BASE_REDACT_STORAGE_POLICY_URL}/${request.id}/status`, method: "put", data: request });
|
|
47
49
|
}
|
|
50
|
+
|
|
51
|
+
/** 查询可入库脱敏的字符串字段列表。 */
|
|
52
|
+
ListBaseRedactStorageColumn(request: ListBaseRedactStorageColumnRequest): Promise<ListBaseRedactStorageColumnResponse> {
|
|
53
|
+
return service<ListBaseRedactStorageColumnRequest, ListBaseRedactStorageColumnResponse>({ url: `${BASE_REDACT_STORAGE_POLICY_URL}/columns`, method: "get", params: request });
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
/** defBaseRedactStoragePolicyService 入库脱敏策略服务实例。 */
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
type BaseTenantForm,
|
|
4
4
|
type BaseTenantService,
|
|
5
5
|
type CreateBaseTenantRequest,
|
|
6
|
+
type CreateBaseTenantResponse,
|
|
6
7
|
type DeleteBaseTenantRequest,
|
|
7
8
|
type GetBaseTenantRequest,
|
|
8
9
|
type OptionBaseTenantRequest,
|
|
@@ -45,8 +46,8 @@ export class BaseTenantServiceImpl implements BaseTenantService {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
/** 创建租户 */
|
|
48
|
-
CreateBaseTenant(request: CreateBaseTenantRequest): Promise<
|
|
49
|
-
return service<BaseTenantForm | undefined,
|
|
49
|
+
CreateBaseTenant(request: CreateBaseTenantRequest): Promise<CreateBaseTenantResponse> {
|
|
50
|
+
return service<BaseTenantForm | undefined, CreateBaseTenantResponse>({
|
|
50
51
|
url: `${BASE_TENANT_URL}`,
|
|
51
52
|
method: "post",
|
|
52
53
|
data: request.base_tenant
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import {
|
|
3
|
+
type BaseTenantProjectForm,
|
|
4
|
+
type BaseTenantProjectService,
|
|
5
|
+
type CreateBaseTenantProjectRequest,
|
|
6
|
+
type DeleteBaseTenantProjectRequest,
|
|
7
|
+
type GetBaseTenantProjectRequest,
|
|
8
|
+
type OptionBaseTenantProjectRequest,
|
|
9
|
+
type TreeBaseTenantProjectRequest,
|
|
10
|
+
type TreeBaseTenantProjectResponse,
|
|
11
|
+
type PageBaseTenantProjectRequest,
|
|
12
|
+
type PageBaseTenantProjectResponse,
|
|
13
|
+
type SetBaseTenantProjectStatusRequest,
|
|
14
|
+
type UpdateBaseTenantProjectRequest
|
|
15
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_tenant_project";
|
|
16
|
+
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
17
|
+
import type { SelectOptionResponse } from "@liujitcn/kratos-admin-system/rpc/common/v1/common";
|
|
18
|
+
|
|
19
|
+
const BASE_TENANT_PROJECT_URL = "/v1/admin/base/tenant/project";
|
|
20
|
+
|
|
21
|
+
/** Admin项目服务。 */
|
|
22
|
+
export class BaseTenantProjectServiceImpl implements BaseTenantProjectService {
|
|
23
|
+
/** 查询项目下拉选择。 */
|
|
24
|
+
OptionBaseTenantProject(request: OptionBaseTenantProjectRequest): Promise<SelectOptionResponse> {
|
|
25
|
+
return service<OptionBaseTenantProjectRequest, SelectOptionResponse>({
|
|
26
|
+
url: `${BASE_TENANT_PROJECT_URL}/option`,
|
|
27
|
+
method: "get",
|
|
28
|
+
params: request
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** 查询项目分页列表。 */
|
|
33
|
+
PageBaseTenantProject(request: PageBaseTenantProjectRequest): Promise<PageBaseTenantProjectResponse> {
|
|
34
|
+
return service<PageBaseTenantProjectRequest, PageBaseTenantProjectResponse>({
|
|
35
|
+
url: BASE_TENANT_PROJECT_URL,
|
|
36
|
+
method: "get",
|
|
37
|
+
params: request
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** 查询当前账号可用的租户项目树。 */
|
|
42
|
+
TreeBaseTenantProject(request: TreeBaseTenantProjectRequest): Promise<TreeBaseTenantProjectResponse> {
|
|
43
|
+
return service<TreeBaseTenantProjectRequest, TreeBaseTenantProjectResponse>({
|
|
44
|
+
url: `${BASE_TENANT_PROJECT_URL}/tree`,
|
|
45
|
+
method: "get",
|
|
46
|
+
params: request
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 查询项目。 */
|
|
51
|
+
GetBaseTenantProject(request: GetBaseTenantProjectRequest): Promise<BaseTenantProjectForm> {
|
|
52
|
+
return service<GetBaseTenantProjectRequest, BaseTenantProjectForm>({
|
|
53
|
+
url: `${BASE_TENANT_PROJECT_URL}/${request.id}`,
|
|
54
|
+
method: "get"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** 创建项目。 */
|
|
59
|
+
CreateBaseTenantProject(request: CreateBaseTenantProjectRequest): Promise<Empty> {
|
|
60
|
+
return service<BaseTenantProjectForm | undefined, Empty>({
|
|
61
|
+
url: BASE_TENANT_PROJECT_URL,
|
|
62
|
+
method: "post",
|
|
63
|
+
data: request.base_tenant_project
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** 更新项目。 */
|
|
68
|
+
UpdateBaseTenantProject(request: UpdateBaseTenantProjectRequest): Promise<Empty> {
|
|
69
|
+
return service<BaseTenantProjectForm | undefined, Empty>({
|
|
70
|
+
url: `${BASE_TENANT_PROJECT_URL}/${request.base_tenant_project?.id ?? ""}`,
|
|
71
|
+
method: "put",
|
|
72
|
+
data: request.base_tenant_project
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** 删除项目。 */
|
|
77
|
+
DeleteBaseTenantProject(request: DeleteBaseTenantProjectRequest): Promise<Empty> {
|
|
78
|
+
return service<DeleteBaseTenantProjectRequest, Empty>({
|
|
79
|
+
url: `${BASE_TENANT_PROJECT_URL}/${request.id}`,
|
|
80
|
+
method: "delete"
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** 设置项目状态。 */
|
|
85
|
+
SetBaseTenantProjectStatus(request: SetBaseTenantProjectStatusRequest): Promise<Empty> {
|
|
86
|
+
return service<SetBaseTenantProjectStatusRequest, Empty>({
|
|
87
|
+
url: `${BASE_TENANT_PROJECT_URL}/${request.id}/status`,
|
|
88
|
+
method: "put",
|
|
89
|
+
data: request
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const defBaseTenantProjectService = new BaseTenantProjectServiceImpl();
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import service from "@liujitcn/kratos-admin-core/request";
|
|
2
|
+
import {
|
|
3
|
+
type BaseTenantProjectGrant,
|
|
4
|
+
type BaseTenantProjectGrantService,
|
|
5
|
+
type CreateBaseTenantProjectGrantRequest,
|
|
6
|
+
type DeleteBaseTenantProjectGrantRequest,
|
|
7
|
+
type GetBaseTenantProjectGrantRequest,
|
|
8
|
+
type PageBaseTenantProjectGrantRequest,
|
|
9
|
+
type PageBaseTenantProjectGrantResponse,
|
|
10
|
+
type UpdateBaseTenantProjectGrantRequest
|
|
11
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_tenant_project_grant";
|
|
12
|
+
import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
|
|
13
|
+
|
|
14
|
+
const BASE_TENANT_PROJECT_GRANT_URL = "/v1/admin/base/tenant/project/grant";
|
|
15
|
+
|
|
16
|
+
/** Admin项目授权服务。 */
|
|
17
|
+
export class BaseTenantProjectGrantServiceImpl implements BaseTenantProjectGrantService {
|
|
18
|
+
/** 查询项目授权分页列表。 */
|
|
19
|
+
PageBaseTenantProjectGrant(request: PageBaseTenantProjectGrantRequest): Promise<PageBaseTenantProjectGrantResponse> {
|
|
20
|
+
return service<PageBaseTenantProjectGrantRequest, PageBaseTenantProjectGrantResponse>({
|
|
21
|
+
url: BASE_TENANT_PROJECT_GRANT_URL,
|
|
22
|
+
method: "get",
|
|
23
|
+
params: request
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** 查询项目授权详情。 */
|
|
28
|
+
GetBaseTenantProjectGrant(request: GetBaseTenantProjectGrantRequest): Promise<BaseTenantProjectGrant> {
|
|
29
|
+
return service<GetBaseTenantProjectGrantRequest, BaseTenantProjectGrant>({
|
|
30
|
+
url: `${BASE_TENANT_PROJECT_GRANT_URL}/${request.tenant_id}/${request.subject_type}/${request.subject_id}`,
|
|
31
|
+
method: "get"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** 新增项目授权。 */
|
|
36
|
+
CreateBaseTenantProjectGrant(request: CreateBaseTenantProjectGrantRequest): Promise<Empty> {
|
|
37
|
+
return service<BaseTenantProjectGrant | undefined, Empty>({
|
|
38
|
+
url: BASE_TENANT_PROJECT_GRANT_URL,
|
|
39
|
+
method: "post",
|
|
40
|
+
data: request.base_tenant_project_grant
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 更新项目授权的项目范围。 */
|
|
45
|
+
UpdateBaseTenantProjectGrant(request: UpdateBaseTenantProjectGrantRequest): Promise<Empty> {
|
|
46
|
+
const grant = request.base_tenant_project_grant;
|
|
47
|
+
return service<BaseTenantProjectGrant | undefined, Empty>({
|
|
48
|
+
url: `${BASE_TENANT_PROJECT_GRANT_URL}/${grant?.tenant_id ?? 0}/${grant?.subject_type ?? 0}/${grant?.subject_id ?? 0}`,
|
|
49
|
+
method: "put",
|
|
50
|
+
data: grant
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** 删除项目授权。 */
|
|
55
|
+
DeleteBaseTenantProjectGrant(request: DeleteBaseTenantProjectGrantRequest): Promise<Empty> {
|
|
56
|
+
return service<DeleteBaseTenantProjectGrantRequest, Empty>({
|
|
57
|
+
url: `${BASE_TENANT_PROJECT_GRANT_URL}/${request.tenant_id}/${request.subject_type}/${request.subject_id}`,
|
|
58
|
+
method: "delete"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const defBaseTenantProjectGrantService = new BaseTenantProjectGrantServiceImpl();
|