@ysgroup/contracts 0.1.27 → 0.1.29
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 +157 -38
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
|
},
|
|
@@ -298,6 +298,10 @@ export const ENUM_META = {
|
|
|
298
298
|
"label": "交易席位表",
|
|
299
299
|
"sort": 186
|
|
300
300
|
},
|
|
301
|
+
"trading_gateways": {
|
|
302
|
+
"label": "交易网关表",
|
|
303
|
+
"sort": 187
|
|
304
|
+
},
|
|
301
305
|
"counter_suppliers": {
|
|
302
306
|
"label": "柜台供应商表",
|
|
303
307
|
"sort": 190
|
|
@@ -605,16 +609,16 @@ export interface Server {
|
|
|
605
609
|
"port": number; /** 端口;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
606
610
|
}
|
|
607
611
|
|
|
608
|
-
export interface
|
|
612
|
+
export interface TradingCounter {
|
|
609
613
|
"_id"?: string; /** 主键 */
|
|
610
614
|
"created_at"?: number; /** 创建时间 */
|
|
611
615
|
"updated_at"?: number; /** 更新时间 */
|
|
612
616
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
613
617
|
"broker_id": string; /** 开户公司ID */
|
|
614
|
-
"counter_supplier_id": string; /** 柜台供应商ID */
|
|
615
|
-
"server_room_id": string; /** 机房ID */
|
|
616
|
-
"server_ips"?: ServerRef[]; /** 服务IP列表;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
617
618
|
"name": string; /** 柜台名称 */
|
|
619
|
+
"counter_supplier_id"?: string; /** 柜台供应商ID */
|
|
620
|
+
"server_room_id"?: string; /** 机房ID */
|
|
621
|
+
"server_ips"?: ServerRef[]; /** 服务IP列表;sensitivity=restricted(仅风险提示,不决定应用授权) */
|
|
618
622
|
"exchanges"?: ExchangeType[]; /** 支持交易所 */
|
|
619
623
|
"memo"?: string; /** 备注 */
|
|
620
624
|
}
|
|
@@ -625,7 +629,7 @@ export interface TradingNode {
|
|
|
625
629
|
"updated_at"?: number; /** 更新时间 */
|
|
626
630
|
"deleted_at"?: null | number; /** 软删除时间 */
|
|
627
631
|
"broker_id": string; /** 开户公司ID */
|
|
628
|
-
"
|
|
632
|
+
"trading_counter_id": string; /** 交易柜台ID */
|
|
629
633
|
"branch_name": string; /** 营业部名称 */
|
|
630
634
|
"exchange_id": ExchangeType; /** 交易市场 */
|
|
631
635
|
"node_name": string; /** 节点名称 */
|
|
@@ -643,6 +647,16 @@ export interface TradingSeat {
|
|
|
643
647
|
"memo"?: string; /** 备注 */
|
|
644
648
|
}
|
|
645
649
|
|
|
650
|
+
export interface TradingGateway {
|
|
651
|
+
"_id"?: string; /** 主键 */
|
|
652
|
+
"created_at"?: number; /** 创建时间 */
|
|
653
|
+
"updated_at"?: number; /** 更新时间 */
|
|
654
|
+
"deleted_at"?: null | number; /** 软删除时间 */
|
|
655
|
+
"trading_seat_id": string; /** 交易席位ID */
|
|
656
|
+
"gateway_no": string; /** 网关号 */
|
|
657
|
+
"memo"?: string; /** 备注 */
|
|
658
|
+
}
|
|
659
|
+
|
|
646
660
|
export interface CounterSupplier {
|
|
647
661
|
"_id"?: string; /** 主键 */
|
|
648
662
|
"created_at"?: number; /** 创建时间 */
|
|
@@ -813,9 +827,10 @@ export const TABLES = {
|
|
|
813
827
|
"brokers": "Broker",
|
|
814
828
|
"broker_branches": "BrokerBranch",
|
|
815
829
|
"servers": "Server",
|
|
816
|
-
"
|
|
830
|
+
"trading_counters": "TradingCounter",
|
|
817
831
|
"trading_nodes": "TradingNode",
|
|
818
832
|
"trading_seats": "TradingSeat",
|
|
833
|
+
"trading_gateways": "TradingGateway",
|
|
819
834
|
"counter_suppliers": "CounterSupplier",
|
|
820
835
|
"server_rooms": "ServerRoom",
|
|
821
836
|
"user_app": "UserApp",
|
|
@@ -945,7 +960,7 @@ export const AUTHORIZATION_TABLE_META = {
|
|
|
945
960
|
"scope_mode": "global",
|
|
946
961
|
"description": "授权后提供全部存活记录"
|
|
947
962
|
},
|
|
948
|
-
"
|
|
963
|
+
"trading_counters": {
|
|
949
964
|
"name": "交易柜台表",
|
|
950
965
|
"category": "参考数据",
|
|
951
966
|
"scope_mode": "global",
|
|
@@ -963,6 +978,12 @@ export const AUTHORIZATION_TABLE_META = {
|
|
|
963
978
|
"scope_mode": "global",
|
|
964
979
|
"description": "授权后提供全部存活记录"
|
|
965
980
|
},
|
|
981
|
+
"trading_gateways": {
|
|
982
|
+
"name": "交易网关表",
|
|
983
|
+
"category": "参考数据",
|
|
984
|
+
"scope_mode": "global",
|
|
985
|
+
"description": "授权后提供全部存活记录"
|
|
986
|
+
},
|
|
966
987
|
"counter_suppliers": {
|
|
967
988
|
"name": "柜台供应商表",
|
|
968
989
|
"category": "参考数据",
|
|
@@ -3015,7 +3036,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3015
3036
|
"blocked_reason": ""
|
|
3016
3037
|
}
|
|
3017
3038
|
],
|
|
3018
|
-
"
|
|
3039
|
+
"trading_counters": [
|
|
3019
3040
|
{
|
|
3020
3041
|
"key": "_id",
|
|
3021
3042
|
"title": "主键",
|
|
@@ -3066,6 +3087,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3066
3087
|
"system_required": false,
|
|
3067
3088
|
"blocked_reason": ""
|
|
3068
3089
|
},
|
|
3090
|
+
{
|
|
3091
|
+
"key": "name",
|
|
3092
|
+
"title": "柜台名称",
|
|
3093
|
+
"kind": "original",
|
|
3094
|
+
"type": "<class 'str'>",
|
|
3095
|
+
"sensitivity": "public",
|
|
3096
|
+
"selectable": true,
|
|
3097
|
+
"system_required": false,
|
|
3098
|
+
"blocked_reason": ""
|
|
3099
|
+
},
|
|
3069
3100
|
{
|
|
3070
3101
|
"key": "counter_supplier_id",
|
|
3071
3102
|
"title": "柜台供应商ID",
|
|
@@ -3096,16 +3127,6 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3096
3127
|
"system_required": false,
|
|
3097
3128
|
"blocked_reason": ""
|
|
3098
3129
|
},
|
|
3099
|
-
{
|
|
3100
|
-
"key": "name",
|
|
3101
|
-
"title": "柜台名称",
|
|
3102
|
-
"kind": "original",
|
|
3103
|
-
"type": "<class 'str'>",
|
|
3104
|
-
"sensitivity": "public",
|
|
3105
|
-
"selectable": true,
|
|
3106
|
-
"system_required": false,
|
|
3107
|
-
"blocked_reason": ""
|
|
3108
|
-
},
|
|
3109
3130
|
{
|
|
3110
3131
|
"key": "exchanges",
|
|
3111
3132
|
"title": "支持交易所",
|
|
@@ -3179,10 +3200,10 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3179
3200
|
"blocked_reason": ""
|
|
3180
3201
|
},
|
|
3181
3202
|
{
|
|
3182
|
-
"key": "
|
|
3183
|
-
"title": "
|
|
3203
|
+
"key": "trading_counter_id",
|
|
3204
|
+
"title": "交易柜台ID",
|
|
3184
3205
|
"kind": "original",
|
|
3185
|
-
"type": "<
|
|
3206
|
+
"type": "<class 'str'>",
|
|
3186
3207
|
"sensitivity": "public",
|
|
3187
3208
|
"selectable": true,
|
|
3188
3209
|
"system_required": false,
|
|
@@ -3311,6 +3332,78 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
3311
3332
|
"blocked_reason": ""
|
|
3312
3333
|
}
|
|
3313
3334
|
],
|
|
3335
|
+
"trading_gateways": [
|
|
3336
|
+
{
|
|
3337
|
+
"key": "_id",
|
|
3338
|
+
"title": "主键",
|
|
3339
|
+
"kind": "original",
|
|
3340
|
+
"type": "<class 'str'>",
|
|
3341
|
+
"sensitivity": "public",
|
|
3342
|
+
"selectable": true,
|
|
3343
|
+
"system_required": true,
|
|
3344
|
+
"blocked_reason": ""
|
|
3345
|
+
},
|
|
3346
|
+
{
|
|
3347
|
+
"key": "created_at",
|
|
3348
|
+
"title": "创建时间",
|
|
3349
|
+
"kind": "original",
|
|
3350
|
+
"type": "<class 'float'>",
|
|
3351
|
+
"sensitivity": "public",
|
|
3352
|
+
"selectable": true,
|
|
3353
|
+
"system_required": false,
|
|
3354
|
+
"blocked_reason": ""
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
"key": "updated_at",
|
|
3358
|
+
"title": "更新时间",
|
|
3359
|
+
"kind": "original",
|
|
3360
|
+
"type": "<class 'float'>",
|
|
3361
|
+
"sensitivity": "public",
|
|
3362
|
+
"selectable": true,
|
|
3363
|
+
"system_required": false,
|
|
3364
|
+
"blocked_reason": ""
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
"key": "deleted_at",
|
|
3368
|
+
"title": "软删除时间",
|
|
3369
|
+
"kind": "original",
|
|
3370
|
+
"type": "float | None",
|
|
3371
|
+
"sensitivity": "public",
|
|
3372
|
+
"selectable": false,
|
|
3373
|
+
"system_required": false,
|
|
3374
|
+
"blocked_reason": "系统安全字段,禁止进入同步流"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
"key": "trading_seat_id",
|
|
3378
|
+
"title": "交易席位ID",
|
|
3379
|
+
"kind": "original",
|
|
3380
|
+
"type": "<class 'str'>",
|
|
3381
|
+
"sensitivity": "public",
|
|
3382
|
+
"selectable": true,
|
|
3383
|
+
"system_required": false,
|
|
3384
|
+
"blocked_reason": ""
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
"key": "gateway_no",
|
|
3388
|
+
"title": "网关号",
|
|
3389
|
+
"kind": "original",
|
|
3390
|
+
"type": "<class 'str'>",
|
|
3391
|
+
"sensitivity": "public",
|
|
3392
|
+
"selectable": true,
|
|
3393
|
+
"system_required": false,
|
|
3394
|
+
"blocked_reason": ""
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
"key": "memo",
|
|
3398
|
+
"title": "备注",
|
|
3399
|
+
"kind": "original",
|
|
3400
|
+
"type": "<class 'str'>",
|
|
3401
|
+
"sensitivity": "public",
|
|
3402
|
+
"selectable": true,
|
|
3403
|
+
"system_required": false,
|
|
3404
|
+
"blocked_reason": ""
|
|
3405
|
+
}
|
|
3406
|
+
],
|
|
3314
3407
|
"counter_suppliers": [
|
|
3315
3408
|
{
|
|
3316
3409
|
"key": "_id",
|
|
@@ -4514,7 +4607,7 @@ export const FIELD_SPECS = {
|
|
|
4514
4607
|
"sensitivity": "restricted"
|
|
4515
4608
|
}
|
|
4516
4609
|
],
|
|
4517
|
-
"
|
|
4610
|
+
"trading_counters": [
|
|
4518
4611
|
{
|
|
4519
4612
|
"key": "broker_id",
|
|
4520
4613
|
"title": "开户公司ID",
|
|
@@ -4523,12 +4616,20 @@ export const FIELD_SPECS = {
|
|
|
4523
4616
|
"required": true,
|
|
4524
4617
|
"sensitivity": "public"
|
|
4525
4618
|
},
|
|
4619
|
+
{
|
|
4620
|
+
"key": "name",
|
|
4621
|
+
"title": "柜台名称",
|
|
4622
|
+
"widget": "text",
|
|
4623
|
+
"enum": null,
|
|
4624
|
+
"required": true,
|
|
4625
|
+
"sensitivity": "public"
|
|
4626
|
+
},
|
|
4526
4627
|
{
|
|
4527
4628
|
"key": "counter_supplier_id",
|
|
4528
4629
|
"title": "柜台供应商ID",
|
|
4529
4630
|
"widget": "text",
|
|
4530
4631
|
"enum": null,
|
|
4531
|
-
"required":
|
|
4632
|
+
"required": false,
|
|
4532
4633
|
"sensitivity": "public"
|
|
4533
4634
|
},
|
|
4534
4635
|
{
|
|
@@ -4536,7 +4637,7 @@ export const FIELD_SPECS = {
|
|
|
4536
4637
|
"title": "机房ID",
|
|
4537
4638
|
"widget": "text",
|
|
4538
4639
|
"enum": null,
|
|
4539
|
-
"required":
|
|
4640
|
+
"required": false,
|
|
4540
4641
|
"sensitivity": "public"
|
|
4541
4642
|
},
|
|
4542
4643
|
{
|
|
@@ -4547,14 +4648,6 @@ export const FIELD_SPECS = {
|
|
|
4547
4648
|
"required": false,
|
|
4548
4649
|
"sensitivity": "restricted"
|
|
4549
4650
|
},
|
|
4550
|
-
{
|
|
4551
|
-
"key": "name",
|
|
4552
|
-
"title": "柜台名称",
|
|
4553
|
-
"widget": "text",
|
|
4554
|
-
"enum": null,
|
|
4555
|
-
"required": true,
|
|
4556
|
-
"sensitivity": "public"
|
|
4557
|
-
},
|
|
4558
4651
|
{
|
|
4559
4652
|
"key": "exchanges",
|
|
4560
4653
|
"title": "支持交易所",
|
|
@@ -4582,10 +4675,10 @@ export const FIELD_SPECS = {
|
|
|
4582
4675
|
"sensitivity": "public"
|
|
4583
4676
|
},
|
|
4584
4677
|
{
|
|
4585
|
-
"key": "
|
|
4586
|
-
"title": "
|
|
4587
|
-
"widget": "
|
|
4588
|
-
"enum":
|
|
4678
|
+
"key": "trading_counter_id",
|
|
4679
|
+
"title": "交易柜台ID",
|
|
4680
|
+
"widget": "text",
|
|
4681
|
+
"enum": null,
|
|
4589
4682
|
"required": true,
|
|
4590
4683
|
"sensitivity": "public"
|
|
4591
4684
|
},
|
|
@@ -4656,6 +4749,32 @@ export const FIELD_SPECS = {
|
|
|
4656
4749
|
"sensitivity": "public"
|
|
4657
4750
|
}
|
|
4658
4751
|
],
|
|
4752
|
+
"trading_gateways": [
|
|
4753
|
+
{
|
|
4754
|
+
"key": "trading_seat_id",
|
|
4755
|
+
"title": "交易席位ID",
|
|
4756
|
+
"widget": "text",
|
|
4757
|
+
"enum": null,
|
|
4758
|
+
"required": true,
|
|
4759
|
+
"sensitivity": "public"
|
|
4760
|
+
},
|
|
4761
|
+
{
|
|
4762
|
+
"key": "gateway_no",
|
|
4763
|
+
"title": "网关号",
|
|
4764
|
+
"widget": "text",
|
|
4765
|
+
"enum": null,
|
|
4766
|
+
"required": true,
|
|
4767
|
+
"sensitivity": "public"
|
|
4768
|
+
},
|
|
4769
|
+
{
|
|
4770
|
+
"key": "memo",
|
|
4771
|
+
"title": "备注",
|
|
4772
|
+
"widget": "text",
|
|
4773
|
+
"enum": null,
|
|
4774
|
+
"required": false,
|
|
4775
|
+
"sensitivity": "public"
|
|
4776
|
+
}
|
|
4777
|
+
],
|
|
4659
4778
|
"counter_suppliers": [
|
|
4660
4779
|
{
|
|
4661
4780
|
"key": "type",
|