@ysgroup/contracts 0.1.28 → 0.1.30
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 +42 -106
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export type AccountType = "STOCK" | "FUTURES" | "CREDIT" | "STOCK_OPTION" | "GOLD" | "INCOME_SWAP" | "FUTURES_OPTION" | "HUGANGTONG" | "NEW3BOARD" | "SHENGANGTONG";
|
|
5
5
|
export type AppKind = "service" | "link";
|
|
6
6
|
export type AppStatus = "enabled" | "disabled" | "maintenance";
|
|
7
|
-
export type AuthorizationTable = "users" | "teams" | "owners" | "accounts" | "exchange_accounts" | "mount_exchange_accounts" | "bank_cards" | "banks" | "cnaps" | "custodians" | "strategies" | "projects" | "project_owner" | "owner_strategy" | "account_strategy" | "company_employees" | "brokers" | "broker_branches" | "servers" | "
|
|
7
|
+
export type AuthorizationTable = "users" | "teams" | "owners" | "accounts" | "exchange_accounts" | "mount_exchange_accounts" | "bank_cards" | "banks" | "cnaps" | "custodians" | "strategies" | "projects" | "project_owner" | "owner_strategy" | "account_strategy" | "company_employees" | "brokers" | "broker_branches" | "servers" | "trading_counters" | "trading_nodes" | "trading_seats" | "trading_gateways" | "counter_suppliers" | "server_rooms" | "file_metas" | "app_configs";
|
|
8
8
|
export type ChangeOp = "upsert" | "delete";
|
|
9
9
|
export type CounterTier = "low_latency_95" | "low_latency_85" | "low_latency_98" | "apex_99";
|
|
10
10
|
export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE" | "UNKNOWN";
|
|
@@ -286,7 +286,7 @@ export const ENUM_META = {
|
|
|
286
286
|
"label": "服务器表",
|
|
287
287
|
"sort": 170
|
|
288
288
|
},
|
|
289
|
-
"
|
|
289
|
+
"trading_counters": {
|
|
290
290
|
"label": "交易柜台表",
|
|
291
291
|
"sort": 180
|
|
292
292
|
},
|
|
@@ -391,13 +391,6 @@ export interface AccountServerRef {
|
|
|
391
391
|
"port"?: number; /** 端口 */
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
export interface ServerRef {
|
|
395
|
-
"name"?: string; /** 名称 */
|
|
396
|
-
"type"?: ServerType | null; /** 类型 */
|
|
397
|
-
"host"?: string; /** 地址 */
|
|
398
|
-
"port"?: number; /** 端口 */
|
|
399
|
-
}
|
|
400
|
-
|
|
401
394
|
export interface NavCategory {
|
|
402
395
|
"name": string; /** 分类名 */
|
|
403
396
|
"fund_names"?: string[]; /** 基金名称 */
|
|
@@ -609,17 +602,14 @@ export interface Server {
|
|
|
609
602
|
"port": number; /** 端口;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
610
603
|
}
|
|
611
604
|
|
|
612
|
-
export interface
|
|
605
|
+
export interface TradingCounter {
|
|
613
606
|
"_id"?: string; /** 主键 */
|
|
614
607
|
"created_at"?: number; /** 创建时间 */
|
|
615
608
|
"updated_at"?: number; /** 更新时间 */
|
|
616
609
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
617
610
|
"broker_id": string; /** 开户公司ID */
|
|
618
|
-
"counter_supplier_id": string; /** 柜台供应商ID */
|
|
619
|
-
"server_room_id": string; /** 机房ID */
|
|
620
|
-
"server_ips"?: ServerRef[]; /** 服务IP列表;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
621
611
|
"name": string; /** 柜台名称 */
|
|
622
|
-
"
|
|
612
|
+
"counter_supplier_id"?: string; /** 柜台供应商ID */
|
|
623
613
|
"memo"?: string; /** 备注 */
|
|
624
614
|
}
|
|
625
615
|
|
|
@@ -629,9 +619,8 @@ export interface TradingNode {
|
|
|
629
619
|
"updated_at"?: number; /** 更新时间 */
|
|
630
620
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
631
621
|
"broker_id": string; /** 开户公司ID */
|
|
632
|
-
"
|
|
622
|
+
"trading_counter_id": string; /** 交易柜台ID */
|
|
633
623
|
"branch_name": string; /** 营业部名称 */
|
|
634
|
-
"exchange_id": ExchangeType; /** 交易市场 */
|
|
635
624
|
"node_name": string; /** 节点名称 */
|
|
636
625
|
"server_room": string; /** 所在机房 */
|
|
637
626
|
"memo"?: string; /** 备注 */
|
|
@@ -644,6 +633,7 @@ export interface TradingSeat {
|
|
|
644
633
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
645
634
|
"trading_node_id": string; /** 交易节点ID */
|
|
646
635
|
"seat_no": string; /** 席位号 */
|
|
636
|
+
"exchange_id": ExchangeType; /** 交易市场 */
|
|
647
637
|
"memo"?: string; /** 备注 */
|
|
648
638
|
}
|
|
649
639
|
|
|
@@ -827,7 +817,7 @@ export const TABLES = {
|
|
|
827
817
|
"brokers": "Broker",
|
|
828
818
|
"broker_branches": "BrokerBranch",
|
|
829
819
|
"servers": "Server",
|
|
830
|
-
"
|
|
820
|
+
"trading_counters": "TradingCounter",
|
|
831
821
|
"trading_nodes": "TradingNode",
|
|
832
822
|
"trading_seats": "TradingSeat",
|
|
833
823
|
"trading_gateways": "TradingGateway",
|
|
@@ -960,7 +950,7 @@ export const AUTHORIZATION_TABLE_META = {
|
|
|
960
950
|
"scope_mode": "global",
|
|
961
951
|
"description": "授权后提供全部存活记录"
|
|
962
952
|
},
|
|
963
|
-
"
|
|
953
|
+
"trading_counters": {
|
|
964
954
|
"name": "交易柜台表",
|
|
965
955
|
"category": "参考数据",
|
|
966
956
|
"scope_mode": "global",
|
|
@@ -3036,7 +3026,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3036
3026
|
"blocked_reason": ""
|
|
3037
3027
|
}
|
|
3038
3028
|
],
|
|
3039
|
-
"
|
|
3029
|
+
"trading_counters": [
|
|
3040
3030
|
{
|
|
3041
3031
|
"key": "_id",
|
|
3042
3032
|
"title": "主键",
|
|
@@ -3087,36 +3077,6 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3087
3077
|
"system_required": false,
|
|
3088
3078
|
"blocked_reason": ""
|
|
3089
3079
|
},
|
|
3090
|
-
{
|
|
3091
|
-
"key": "counter_supplier_id",
|
|
3092
|
-
"title": "柜台供应商ID",
|
|
3093
|
-
"kind": "original",
|
|
3094
|
-
"type": "<class 'str'>",
|
|
3095
|
-
"sensitivity": "public",
|
|
3096
|
-
"selectable": true,
|
|
3097
|
-
"system_required": false,
|
|
3098
|
-
"blocked_reason": ""
|
|
3099
|
-
},
|
|
3100
|
-
{
|
|
3101
|
-
"key": "server_room_id",
|
|
3102
|
-
"title": "机房ID",
|
|
3103
|
-
"kind": "original",
|
|
3104
|
-
"type": "<class 'str'>",
|
|
3105
|
-
"sensitivity": "public",
|
|
3106
|
-
"selectable": true,
|
|
3107
|
-
"system_required": false,
|
|
3108
|
-
"blocked_reason": ""
|
|
3109
|
-
},
|
|
3110
|
-
{
|
|
3111
|
-
"key": "server_ips",
|
|
3112
|
-
"title": "服务IP列表",
|
|
3113
|
-
"kind": "original",
|
|
3114
|
-
"type": "list[ys_base.contracts.master.ServerRef]",
|
|
3115
|
-
"sensitivity": "restricted",
|
|
3116
|
-
"selectable": true,
|
|
3117
|
-
"system_required": false,
|
|
3118
|
-
"blocked_reason": ""
|
|
3119
|
-
},
|
|
3120
3080
|
{
|
|
3121
3081
|
"key": "name",
|
|
3122
3082
|
"title": "柜台名称",
|
|
@@ -3128,10 +3088,10 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3128
3088
|
"blocked_reason": ""
|
|
3129
3089
|
},
|
|
3130
3090
|
{
|
|
3131
|
-
"key": "
|
|
3132
|
-
"title": "
|
|
3091
|
+
"key": "counter_supplier_id",
|
|
3092
|
+
"title": "柜台供应商ID",
|
|
3133
3093
|
"kind": "original",
|
|
3134
|
-
"type": "
|
|
3094
|
+
"type": "<class 'str'>",
|
|
3135
3095
|
"sensitivity": "public",
|
|
3136
3096
|
"selectable": true,
|
|
3137
3097
|
"system_required": false,
|
|
@@ -3200,10 +3160,10 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3200
3160
|
"blocked_reason": ""
|
|
3201
3161
|
},
|
|
3202
3162
|
{
|
|
3203
|
-
"key": "
|
|
3204
|
-
"title": "
|
|
3163
|
+
"key": "trading_counter_id",
|
|
3164
|
+
"title": "交易柜台ID",
|
|
3205
3165
|
"kind": "original",
|
|
3206
|
-
"type": "<
|
|
3166
|
+
"type": "<class 'str'>",
|
|
3207
3167
|
"sensitivity": "public",
|
|
3208
3168
|
"selectable": true,
|
|
3209
3169
|
"system_required": false,
|
|
@@ -3219,16 +3179,6 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3219
3179
|
"system_required": false,
|
|
3220
3180
|
"blocked_reason": ""
|
|
3221
3181
|
},
|
|
3222
|
-
{
|
|
3223
|
-
"key": "exchange_id",
|
|
3224
|
-
"title": "交易市场",
|
|
3225
|
-
"kind": "original",
|
|
3226
|
-
"type": "<enum 'ExchangeType'>",
|
|
3227
|
-
"sensitivity": "public",
|
|
3228
|
-
"selectable": true,
|
|
3229
|
-
"system_required": false,
|
|
3230
|
-
"blocked_reason": ""
|
|
3231
|
-
},
|
|
3232
3182
|
{
|
|
3233
3183
|
"key": "node_name",
|
|
3234
3184
|
"title": "节点名称",
|
|
@@ -3321,6 +3271,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3321
3271
|
"system_required": false,
|
|
3322
3272
|
"blocked_reason": ""
|
|
3323
3273
|
},
|
|
3274
|
+
{
|
|
3275
|
+
"key": "exchange_id",
|
|
3276
|
+
"title": "交易市场",
|
|
3277
|
+
"kind": "original",
|
|
3278
|
+
"type": "<enum 'ExchangeType'>",
|
|
3279
|
+
"sensitivity": "public",
|
|
3280
|
+
"selectable": true,
|
|
3281
|
+
"system_required": false,
|
|
3282
|
+
"blocked_reason": ""
|
|
3283
|
+
},
|
|
3324
3284
|
{
|
|
3325
3285
|
"key": "memo",
|
|
3326
3286
|
"title": "备注",
|
|
@@ -4607,7 +4567,7 @@ export const FIELD_SPECS = {
|
|
|
4607
4567
|
"sensitivity": "restricted"
|
|
4608
4568
|
}
|
|
4609
4569
|
],
|
|
4610
|
-
"
|
|
4570
|
+
"trading_counters": [
|
|
4611
4571
|
{
|
|
4612
4572
|
"key": "broker_id",
|
|
4613
4573
|
"title": "开户公司ID",
|
|
@@ -4616,30 +4576,6 @@ export const FIELD_SPECS = {
|
|
|
4616
4576
|
"required": true,
|
|
4617
4577
|
"sensitivity": "public"
|
|
4618
4578
|
},
|
|
4619
|
-
{
|
|
4620
|
-
"key": "counter_supplier_id",
|
|
4621
|
-
"title": "柜台供应商ID",
|
|
4622
|
-
"widget": "text",
|
|
4623
|
-
"enum": null,
|
|
4624
|
-
"required": true,
|
|
4625
|
-
"sensitivity": "public"
|
|
4626
|
-
},
|
|
4627
|
-
{
|
|
4628
|
-
"key": "server_room_id",
|
|
4629
|
-
"title": "机房ID",
|
|
4630
|
-
"widget": "text",
|
|
4631
|
-
"enum": null,
|
|
4632
|
-
"required": true,
|
|
4633
|
-
"sensitivity": "public"
|
|
4634
|
-
},
|
|
4635
|
-
{
|
|
4636
|
-
"key": "server_ips",
|
|
4637
|
-
"title": "服务IP列表",
|
|
4638
|
-
"widget": "tags",
|
|
4639
|
-
"enum": null,
|
|
4640
|
-
"required": false,
|
|
4641
|
-
"sensitivity": "restricted"
|
|
4642
|
-
},
|
|
4643
4579
|
{
|
|
4644
4580
|
"key": "name",
|
|
4645
4581
|
"title": "柜台名称",
|
|
@@ -4649,10 +4585,10 @@ export const FIELD_SPECS = {
|
|
|
4649
4585
|
"sensitivity": "public"
|
|
4650
4586
|
},
|
|
4651
4587
|
{
|
|
4652
|
-
"key": "
|
|
4653
|
-
"title": "
|
|
4654
|
-
"widget": "
|
|
4655
|
-
"enum":
|
|
4588
|
+
"key": "counter_supplier_id",
|
|
4589
|
+
"title": "柜台供应商ID",
|
|
4590
|
+
"widget": "text",
|
|
4591
|
+
"enum": null,
|
|
4656
4592
|
"required": false,
|
|
4657
4593
|
"sensitivity": "public"
|
|
4658
4594
|
},
|
|
@@ -4675,10 +4611,10 @@ export const FIELD_SPECS = {
|
|
|
4675
4611
|
"sensitivity": "public"
|
|
4676
4612
|
},
|
|
4677
4613
|
{
|
|
4678
|
-
"key": "
|
|
4679
|
-
"title": "
|
|
4680
|
-
"widget": "
|
|
4681
|
-
"enum":
|
|
4614
|
+
"key": "trading_counter_id",
|
|
4615
|
+
"title": "交易柜台ID",
|
|
4616
|
+
"widget": "text",
|
|
4617
|
+
"enum": null,
|
|
4682
4618
|
"required": true,
|
|
4683
4619
|
"sensitivity": "public"
|
|
4684
4620
|
},
|
|
@@ -4690,14 +4626,6 @@ export const FIELD_SPECS = {
|
|
|
4690
4626
|
"required": true,
|
|
4691
4627
|
"sensitivity": "public"
|
|
4692
4628
|
},
|
|
4693
|
-
{
|
|
4694
|
-
"key": "exchange_id",
|
|
4695
|
-
"title": "交易市场",
|
|
4696
|
-
"widget": "enum",
|
|
4697
|
-
"enum": "ExchangeType",
|
|
4698
|
-
"required": true,
|
|
4699
|
-
"sensitivity": "public"
|
|
4700
|
-
},
|
|
4701
4629
|
{
|
|
4702
4630
|
"key": "node_name",
|
|
4703
4631
|
"title": "节点名称",
|
|
@@ -4740,6 +4668,14 @@ export const FIELD_SPECS = {
|
|
|
4740
4668
|
"required": true,
|
|
4741
4669
|
"sensitivity": "public"
|
|
4742
4670
|
},
|
|
4671
|
+
{
|
|
4672
|
+
"key": "exchange_id",
|
|
4673
|
+
"title": "交易市场",
|
|
4674
|
+
"widget": "enum",
|
|
4675
|
+
"enum": "ExchangeType",
|
|
4676
|
+
"required": true,
|
|
4677
|
+
"sensitivity": "public"
|
|
4678
|
+
},
|
|
4743
4679
|
{
|
|
4744
4680
|
"key": "memo",
|
|
4745
4681
|
"title": "备注",
|