@ysgroup/contracts 0.1.2 → 0.1.3
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/package.json +1 -1
- package/src/index.ts +27 -10
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -14,25 +14,25 @@ export type Sensitivity = "public" | "restricted" | "credential";
|
|
|
14
14
|
export type ServerType = "td" | "md";
|
|
15
15
|
export type TeamType = "Manager" | "Commoner";
|
|
16
16
|
export type TradeEnvType = "LIVE" | "TEST";
|
|
17
|
-
export type UserRole = "
|
|
17
|
+
export type UserRole = "Root" | "Admin" | "Manager" | "Member" | "Viewer";
|
|
18
18
|
|
|
19
19
|
// ---------- 枚举展示元数据 ----------
|
|
20
20
|
export const ENUM_META = {
|
|
21
21
|
"UserRole": {
|
|
22
|
-
"
|
|
22
|
+
"Viewer": {
|
|
23
23
|
"name": "观察员",
|
|
24
24
|
"sort": 0
|
|
25
25
|
},
|
|
26
|
-
"
|
|
27
|
-
"name": "
|
|
26
|
+
"Member": {
|
|
27
|
+
"name": "成员",
|
|
28
28
|
"sort": 1
|
|
29
29
|
},
|
|
30
|
-
"Operator": {
|
|
31
|
-
"name": "运维员",
|
|
32
|
-
"sort": 2
|
|
33
|
-
},
|
|
34
30
|
"Manager": {
|
|
35
31
|
"name": "管理员",
|
|
32
|
+
"sort": 2
|
|
33
|
+
},
|
|
34
|
+
"Admin": {
|
|
35
|
+
"name": "系统管理员",
|
|
36
36
|
"sort": 3
|
|
37
37
|
},
|
|
38
38
|
"Root": {
|
|
@@ -392,6 +392,7 @@ export interface User {
|
|
|
392
392
|
"enabled"?: boolean; /** 启用 */
|
|
393
393
|
"username": string; /** 用户名 */
|
|
394
394
|
"password_hash"?: string; /** 密码哈希;sensitivity=credential(按授权可能被剔除) */
|
|
395
|
+
"auth_version"?: number; /** 身份凭据版本 */
|
|
395
396
|
"owner_id"?: string; /** 主体ID */
|
|
396
397
|
"name"?: string; /** 姓名 */
|
|
397
398
|
"phone"?: string; /** 手机 */
|
|
@@ -507,6 +508,7 @@ export interface UserApp {
|
|
|
507
508
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
508
509
|
"user_id": string; /** 用户ID */
|
|
509
510
|
"app_id": string; /** 应用ID */
|
|
511
|
+
"admin"?: boolean; /** 应用管理员 */
|
|
510
512
|
}
|
|
511
513
|
|
|
512
514
|
export interface AccountApp {
|
|
@@ -635,8 +637,7 @@ export const TABLES = {
|
|
|
635
637
|
} as const;
|
|
636
638
|
export const ACCESS_TABLES = {
|
|
637
639
|
"USER": [
|
|
638
|
-
"users"
|
|
639
|
-
"user_app"
|
|
640
|
+
"users"
|
|
640
641
|
],
|
|
641
642
|
"TEAM": [
|
|
642
643
|
"teams"
|
|
@@ -1251,6 +1252,14 @@ export const FIELD_SPECS = {
|
|
|
1251
1252
|
"required": false,
|
|
1252
1253
|
"sensitivity": "credential"
|
|
1253
1254
|
},
|
|
1255
|
+
{
|
|
1256
|
+
"key": "auth_version",
|
|
1257
|
+
"title": "身份凭据版本",
|
|
1258
|
+
"widget": "number",
|
|
1259
|
+
"enum": null,
|
|
1260
|
+
"required": false,
|
|
1261
|
+
"sensitivity": "public"
|
|
1262
|
+
},
|
|
1254
1263
|
{
|
|
1255
1264
|
"key": "owner_id",
|
|
1256
1265
|
"title": "主体ID",
|
|
@@ -1630,6 +1639,14 @@ export const FIELD_SPECS = {
|
|
|
1630
1639
|
"enum": null,
|
|
1631
1640
|
"required": true,
|
|
1632
1641
|
"sensitivity": "public"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"key": "admin",
|
|
1645
|
+
"title": "应用管理员",
|
|
1646
|
+
"widget": "switch",
|
|
1647
|
+
"enum": null,
|
|
1648
|
+
"required": false,
|
|
1649
|
+
"sensitivity": "public"
|
|
1633
1650
|
}
|
|
1634
1651
|
],
|
|
1635
1652
|
"account_app": [
|