@ysgroup/contracts 0.1.4 → 0.1.5
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 +5 -24
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,8 +5,6 @@ export type AccessTable = "USER" | "TEAM" | "OWNER" | "ACCOUNT" | "CUSTODIAN" |
|
|
|
5
5
|
export type AccountType = "STOCK" | "FUTURES" | "CREDIT" | "STOCK_OPTION" | "GOLD" | "INCOME_SWAP" | "FUTURES_OPTION" | "HUGANGTONG" | "NEW3BOARD" | "SHENGANGTONG";
|
|
6
6
|
export type AppKind = "service" | "link";
|
|
7
7
|
export type AppStatus = "enabled" | "disabled" | "maintenance";
|
|
8
|
-
export type AppUserRole = "Admin" | "Manager" | "Member" | "Viewer";
|
|
9
|
-
export type AuthUserRole = "Root" | "Admin" | "Manager" | "Member" | "Viewer";
|
|
10
8
|
export type ChangeOp = "upsert" | "delete";
|
|
11
9
|
export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE" | "UNKNOWN";
|
|
12
10
|
export type FieldGrant = "public" | "restricted" | "credential";
|
|
@@ -16,10 +14,11 @@ export type Sensitivity = "public" | "restricted" | "credential";
|
|
|
16
14
|
export type ServerType = "td" | "md";
|
|
17
15
|
export type TeamType = "Manager" | "Commoner";
|
|
18
16
|
export type TradeEnvType = "LIVE" | "TEST";
|
|
17
|
+
export type UserRole = "Root" | "Admin" | "Manager" | "Member" | "Viewer";
|
|
19
18
|
|
|
20
19
|
// ---------- 枚举展示元数据 ----------
|
|
21
20
|
export const ENUM_META = {
|
|
22
|
-
"
|
|
21
|
+
"UserRole": {
|
|
23
22
|
"Root": {
|
|
24
23
|
"label": "超级管理员",
|
|
25
24
|
"sort": 100
|
|
@@ -41,24 +40,6 @@ export const ENUM_META = {
|
|
|
41
40
|
"sort": 20
|
|
42
41
|
}
|
|
43
42
|
},
|
|
44
|
-
"AppUserRole": {
|
|
45
|
-
"Admin": {
|
|
46
|
-
"label": "系统管理员",
|
|
47
|
-
"sort": 80
|
|
48
|
-
},
|
|
49
|
-
"Manager": {
|
|
50
|
-
"label": "业务管理员",
|
|
51
|
-
"sort": 60
|
|
52
|
-
},
|
|
53
|
-
"Member": {
|
|
54
|
-
"label": "普通成员",
|
|
55
|
-
"sort": 40
|
|
56
|
-
},
|
|
57
|
-
"Viewer": {
|
|
58
|
-
"label": "只读成员",
|
|
59
|
-
"sort": 20
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
43
|
"TeamType": {
|
|
63
44
|
"Manager": {
|
|
64
45
|
"name": "管理人",
|
|
@@ -416,7 +397,7 @@ export interface User {
|
|
|
416
397
|
"name"?: string; /** 姓名 */
|
|
417
398
|
"phone"?: string; /** 手机 */
|
|
418
399
|
"email"?: string; /** 邮箱 */
|
|
419
|
-
"role":
|
|
400
|
+
"role": string; /** 角色 */
|
|
420
401
|
"max_sessions"?: number; /** 会话数 */
|
|
421
402
|
"is_human"?: boolean; /** 是否人类 */
|
|
422
403
|
"memo"?: string; /** 备注 */
|
|
@@ -1314,8 +1295,8 @@ export const FIELD_SPECS = {
|
|
|
1314
1295
|
{
|
|
1315
1296
|
"key": "role",
|
|
1316
1297
|
"title": "角色",
|
|
1317
|
-
"widget": "
|
|
1318
|
-
"enum":
|
|
1298
|
+
"widget": "text",
|
|
1299
|
+
"enum": null,
|
|
1319
1300
|
"required": true,
|
|
1320
1301
|
"sensitivity": "public"
|
|
1321
1302
|
},
|