@ysgroup/contracts 0.1.24 → 0.1.25
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 +12 -43
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -15,7 +15,6 @@ export type Sensitivity = "public" | "restricted" | "credential";
|
|
|
15
15
|
export type ServerType = "td" | "md";
|
|
16
16
|
export type TeamType = "Manager" | "Commoner";
|
|
17
17
|
export type TradeEnvType = "LIVE" | "TEST";
|
|
18
|
-
export type TradeSource = "jy" | "xt";
|
|
19
18
|
export type UserRole = "Root" | "Admin" | "Manager" | "Editor" | "Viewer" | "Initiate";
|
|
20
19
|
|
|
21
20
|
// ---------- 枚举展示元数据 ----------
|
|
@@ -46,16 +45,6 @@ export const ENUM_META = {
|
|
|
46
45
|
"sort": 0
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
|
-
"TradeSource": {
|
|
50
|
-
"jy": {
|
|
51
|
-
"label": "反采",
|
|
52
|
-
"sort": 0
|
|
53
|
-
},
|
|
54
|
-
"xt": {
|
|
55
|
-
"label": "迅投",
|
|
56
|
-
"sort": 10
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
48
|
"TeamType": {
|
|
60
49
|
"Manager": {
|
|
61
50
|
"name": "管理人",
|
|
@@ -365,18 +354,17 @@ export const ENUM_META = {
|
|
|
365
354
|
} as const;
|
|
366
355
|
|
|
367
356
|
// ---------- 实体 ----------
|
|
368
|
-
export interface
|
|
357
|
+
export interface AccountServerRef {
|
|
369
358
|
"name"?: string; /** 名称 */
|
|
370
|
-
"type"?: ServerType | null; /** 类型 */
|
|
371
359
|
"host"?: string; /** 地址 */
|
|
372
360
|
"port"?: number; /** 端口 */
|
|
373
361
|
}
|
|
374
362
|
|
|
375
|
-
export interface
|
|
376
|
-
"
|
|
377
|
-
"
|
|
378
|
-
"
|
|
379
|
-
"
|
|
363
|
+
export interface ServerRef {
|
|
364
|
+
"name"?: string; /** 名称 */
|
|
365
|
+
"type"?: ServerType | null; /** 类型 */
|
|
366
|
+
"host"?: string; /** 地址 */
|
|
367
|
+
"port"?: number; /** 端口 */
|
|
380
368
|
}
|
|
381
369
|
|
|
382
370
|
export interface NavCategory {
|
|
@@ -441,10 +429,9 @@ export interface Account {
|
|
|
441
429
|
"cfmmc_username"?: string; /** CFMMC用户名;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
442
430
|
"futures_app_id"?: string; /** 期货app_id;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
443
431
|
"futures_auth_code"?: string; /** 期货auth_code;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
444
|
-
"futures_td_server"?:
|
|
445
|
-
"futures_md_server"?:
|
|
446
|
-
"stock_td_server"?:
|
|
447
|
-
"trade_servers"?: TradeServer[]; /** 交易网关;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
432
|
+
"futures_td_server"?: AccountServerRef | null; /** 期货交易服务器;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
433
|
+
"futures_md_server"?: AccountServerRef | null; /** 期货行情服务器;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
434
|
+
"stock_td_server"?: AccountServerRef | null; /** 证券交易服务器;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
448
435
|
"trade_counter"?: string; /** 交易柜台;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
449
436
|
"bank_card_id"?: string; /** 银行卡ID;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
450
437
|
"broker_branch_id"?: string; /** 营业部ID;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
@@ -1663,7 +1650,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
1663
1650
|
"key": "futures_td_server",
|
|
1664
1651
|
"title": "期货交易服务器",
|
|
1665
1652
|
"kind": "original",
|
|
1666
|
-
"type": "ys_base.contracts.master.
|
|
1653
|
+
"type": "ys_base.contracts.master.AccountServerRef | None",
|
|
1667
1654
|
"sensitivity": "restricted",
|
|
1668
1655
|
"selectable": true,
|
|
1669
1656
|
"system_required": false,
|
|
@@ -1673,7 +1660,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
1673
1660
|
"key": "futures_md_server",
|
|
1674
1661
|
"title": "期货行情服务器",
|
|
1675
1662
|
"kind": "original",
|
|
1676
|
-
"type": "ys_base.contracts.master.
|
|
1663
|
+
"type": "ys_base.contracts.master.AccountServerRef | None",
|
|
1677
1664
|
"sensitivity": "restricted",
|
|
1678
1665
|
"selectable": true,
|
|
1679
1666
|
"system_required": false,
|
|
@@ -1683,17 +1670,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
1683
1670
|
"key": "stock_td_server",
|
|
1684
1671
|
"title": "证券交易服务器",
|
|
1685
1672
|
"kind": "original",
|
|
1686
|
-
"type": "ys_base.contracts.master.
|
|
1687
|
-
"sensitivity": "restricted",
|
|
1688
|
-
"selectable": true,
|
|
1689
|
-
"system_required": false,
|
|
1690
|
-
"blocked_reason": ""
|
|
1691
|
-
},
|
|
1692
|
-
{
|
|
1693
|
-
"key": "trade_servers",
|
|
1694
|
-
"title": "交易网关",
|
|
1695
|
-
"kind": "original",
|
|
1696
|
-
"type": "list[ys_base.contracts.master.TradeServer]",
|
|
1673
|
+
"type": "ys_base.contracts.master.AccountServerRef | None",
|
|
1697
1674
|
"sensitivity": "restricted",
|
|
1698
1675
|
"selectable": true,
|
|
1699
1676
|
"system_required": false,
|
|
@@ -3772,14 +3749,6 @@ export const FIELD_SPECS = {
|
|
|
3772
3749
|
"required": false,
|
|
3773
3750
|
"sensitivity": "restricted"
|
|
3774
3751
|
},
|
|
3775
|
-
{
|
|
3776
|
-
"key": "trade_servers",
|
|
3777
|
-
"title": "交易网关",
|
|
3778
|
-
"widget": "tags",
|
|
3779
|
-
"enum": null,
|
|
3780
|
-
"required": false,
|
|
3781
|
-
"sensitivity": "restricted"
|
|
3782
|
-
},
|
|
3783
3752
|
{
|
|
3784
3753
|
"key": "trade_counter",
|
|
3785
3754
|
"title": "交易柜台",
|