@ysgroup/contracts 0.1.25 → 0.1.27

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +353 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -4,8 +4,9 @@
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" | "trading_platforms" | "counter_suppliers" | "server_rooms" | "file_metas" | "app_configs";
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_platforms" | "trading_nodes" | "trading_seats" | "counter_suppliers" | "server_rooms" | "file_metas" | "app_configs";
8
8
  export type ChangeOp = "upsert" | "delete";
9
+ export type CounterTier = "low_latency_95" | "low_latency_85" | "low_latency_98" | "apex_99";
9
10
  export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE" | "UNKNOWN";
10
11
  export type FieldGroupStatus = "draft" | "published" | "archived";
11
12
  export type GatewayMode = "db" | "flow";
@@ -114,6 +115,24 @@ export const ENUM_META = {
114
115
  "market": "UNKNOWN"
115
116
  }
116
117
  },
118
+ "CounterTier": {
119
+ "low_latency_95": {
120
+ "name": "低延时95柜台",
121
+ "sort": 0
122
+ },
123
+ "low_latency_85": {
124
+ "name": "低延时85柜台",
125
+ "sort": 1
126
+ },
127
+ "low_latency_98": {
128
+ "name": "低延时98柜台",
129
+ "sort": 2
130
+ },
131
+ "apex_99": {
132
+ "name": "顶点99柜台",
133
+ "sort": 3
134
+ }
135
+ },
117
136
  "AccountType": {
118
137
  "STOCK": {
119
138
  "name": "股票账户",
@@ -271,6 +290,14 @@ export const ENUM_META = {
271
290
  "label": "交易柜台表",
272
291
  "sort": 180
273
292
  },
293
+ "trading_nodes": {
294
+ "label": "交易节点表",
295
+ "sort": 185
296
+ },
297
+ "trading_seats": {
298
+ "label": "交易席位表",
299
+ "sort": 186
300
+ },
274
301
  "counter_suppliers": {
275
302
  "label": "柜台供应商表",
276
303
  "sort": 190
@@ -448,6 +475,7 @@ export interface ExchangeAccount {
448
475
  "type": string; /** 股卡类型 */
449
476
  "exchange_id": ExchangeType; /** 交易所 */
450
477
  "exchange_account": string; /** 交易编码 */
478
+ "trading_seat_id"?: string; /** 交易席位ID */
451
479
  }
452
480
 
453
481
  export interface MountExchangeAccount {
@@ -591,6 +619,30 @@ export interface TradingPlatform {
591
619
  "memo"?: string; /** 备注 */
592
620
  }
593
621
 
622
+ export interface TradingNode {
623
+ "_id"?: string; /** 主键 */
624
+ "created_at"?: number; /** 创建时间 */
625
+ "updated_at"?: number; /** 更新时间 */
626
+ "deleted_at"?: null | number; /** 软删除时间 */
627
+ "broker_id": string; /** 开户公司ID */
628
+ "counter_tier": CounterTier; /** 柜台档位 */
629
+ "branch_name": string; /** 营业部名称 */
630
+ "exchange_id": ExchangeType; /** 交易市场 */
631
+ "node_name": string; /** 节点名称 */
632
+ "server_room": string; /** 所在机房 */
633
+ "memo"?: string; /** 备注 */
634
+ }
635
+
636
+ export interface TradingSeat {
637
+ "_id"?: string; /** 主键 */
638
+ "created_at"?: number; /** 创建时间 */
639
+ "updated_at"?: number; /** 更新时间 */
640
+ "deleted_at"?: null | number; /** 软删除时间 */
641
+ "trading_node_id": string; /** 交易节点ID */
642
+ "seat_no": string; /** 席位号 */
643
+ "memo"?: string; /** 备注 */
644
+ }
645
+
594
646
  export interface CounterSupplier {
595
647
  "_id"?: string; /** 主键 */
596
648
  "created_at"?: number; /** 创建时间 */
@@ -762,6 +814,8 @@ export const TABLES = {
762
814
  "broker_branches": "BrokerBranch",
763
815
  "servers": "Server",
764
816
  "trading_platforms": "TradingPlatform",
817
+ "trading_nodes": "TradingNode",
818
+ "trading_seats": "TradingSeat",
765
819
  "counter_suppliers": "CounterSupplier",
766
820
  "server_rooms": "ServerRoom",
767
821
  "user_app": "UserApp",
@@ -897,6 +951,18 @@ export const AUTHORIZATION_TABLE_META = {
897
951
  "scope_mode": "global",
898
952
  "description": "授权后提供全部存活记录"
899
953
  },
954
+ "trading_nodes": {
955
+ "name": "交易节点表",
956
+ "category": "参考数据",
957
+ "scope_mode": "global",
958
+ "description": "授权后提供全部存活记录"
959
+ },
960
+ "trading_seats": {
961
+ "name": "交易席位表",
962
+ "category": "参考数据",
963
+ "scope_mode": "global",
964
+ "description": "授权后提供全部存活记录"
965
+ },
900
966
  "counter_suppliers": {
901
967
  "name": "柜台供应商表",
902
968
  "category": "参考数据",
@@ -1859,6 +1925,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1859
1925
  "selectable": true,
1860
1926
  "system_required": false,
1861
1927
  "blocked_reason": ""
1928
+ },
1929
+ {
1930
+ "key": "trading_seat_id",
1931
+ "title": "交易席位ID",
1932
+ "kind": "original",
1933
+ "type": "<class 'str'>",
1934
+ "sensitivity": "public",
1935
+ "selectable": true,
1936
+ "system_required": false,
1937
+ "blocked_reason": ""
1862
1938
  }
1863
1939
  ],
1864
1940
  "mount_exchange_accounts": [
@@ -3051,6 +3127,190 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3051
3127
  "blocked_reason": ""
3052
3128
  }
3053
3129
  ],
3130
+ "trading_nodes": [
3131
+ {
3132
+ "key": "_id",
3133
+ "title": "主键",
3134
+ "kind": "original",
3135
+ "type": "<class 'str'>",
3136
+ "sensitivity": "public",
3137
+ "selectable": true,
3138
+ "system_required": true,
3139
+ "blocked_reason": ""
3140
+ },
3141
+ {
3142
+ "key": "created_at",
3143
+ "title": "创建时间",
3144
+ "kind": "original",
3145
+ "type": "<class 'float'>",
3146
+ "sensitivity": "public",
3147
+ "selectable": true,
3148
+ "system_required": false,
3149
+ "blocked_reason": ""
3150
+ },
3151
+ {
3152
+ "key": "updated_at",
3153
+ "title": "更新时间",
3154
+ "kind": "original",
3155
+ "type": "<class 'float'>",
3156
+ "sensitivity": "public",
3157
+ "selectable": true,
3158
+ "system_required": false,
3159
+ "blocked_reason": ""
3160
+ },
3161
+ {
3162
+ "key": "deleted_at",
3163
+ "title": "软删除时间",
3164
+ "kind": "original",
3165
+ "type": "float | None",
3166
+ "sensitivity": "public",
3167
+ "selectable": false,
3168
+ "system_required": false,
3169
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3170
+ },
3171
+ {
3172
+ "key": "broker_id",
3173
+ "title": "开户公司ID",
3174
+ "kind": "original",
3175
+ "type": "<class 'str'>",
3176
+ "sensitivity": "public",
3177
+ "selectable": true,
3178
+ "system_required": false,
3179
+ "blocked_reason": ""
3180
+ },
3181
+ {
3182
+ "key": "counter_tier",
3183
+ "title": "柜台档位",
3184
+ "kind": "original",
3185
+ "type": "<enum 'CounterTier'>",
3186
+ "sensitivity": "public",
3187
+ "selectable": true,
3188
+ "system_required": false,
3189
+ "blocked_reason": ""
3190
+ },
3191
+ {
3192
+ "key": "branch_name",
3193
+ "title": "营业部名称",
3194
+ "kind": "original",
3195
+ "type": "<class 'str'>",
3196
+ "sensitivity": "public",
3197
+ "selectable": true,
3198
+ "system_required": false,
3199
+ "blocked_reason": ""
3200
+ },
3201
+ {
3202
+ "key": "exchange_id",
3203
+ "title": "交易市场",
3204
+ "kind": "original",
3205
+ "type": "<enum 'ExchangeType'>",
3206
+ "sensitivity": "public",
3207
+ "selectable": true,
3208
+ "system_required": false,
3209
+ "blocked_reason": ""
3210
+ },
3211
+ {
3212
+ "key": "node_name",
3213
+ "title": "节点名称",
3214
+ "kind": "original",
3215
+ "type": "<class 'str'>",
3216
+ "sensitivity": "public",
3217
+ "selectable": true,
3218
+ "system_required": false,
3219
+ "blocked_reason": ""
3220
+ },
3221
+ {
3222
+ "key": "server_room",
3223
+ "title": "所在机房",
3224
+ "kind": "original",
3225
+ "type": "<class 'str'>",
3226
+ "sensitivity": "public",
3227
+ "selectable": true,
3228
+ "system_required": false,
3229
+ "blocked_reason": ""
3230
+ },
3231
+ {
3232
+ "key": "memo",
3233
+ "title": "备注",
3234
+ "kind": "original",
3235
+ "type": "<class 'str'>",
3236
+ "sensitivity": "public",
3237
+ "selectable": true,
3238
+ "system_required": false,
3239
+ "blocked_reason": ""
3240
+ }
3241
+ ],
3242
+ "trading_seats": [
3243
+ {
3244
+ "key": "_id",
3245
+ "title": "主键",
3246
+ "kind": "original",
3247
+ "type": "<class 'str'>",
3248
+ "sensitivity": "public",
3249
+ "selectable": true,
3250
+ "system_required": true,
3251
+ "blocked_reason": ""
3252
+ },
3253
+ {
3254
+ "key": "created_at",
3255
+ "title": "创建时间",
3256
+ "kind": "original",
3257
+ "type": "<class 'float'>",
3258
+ "sensitivity": "public",
3259
+ "selectable": true,
3260
+ "system_required": false,
3261
+ "blocked_reason": ""
3262
+ },
3263
+ {
3264
+ "key": "updated_at",
3265
+ "title": "更新时间",
3266
+ "kind": "original",
3267
+ "type": "<class 'float'>",
3268
+ "sensitivity": "public",
3269
+ "selectable": true,
3270
+ "system_required": false,
3271
+ "blocked_reason": ""
3272
+ },
3273
+ {
3274
+ "key": "deleted_at",
3275
+ "title": "软删除时间",
3276
+ "kind": "original",
3277
+ "type": "float | None",
3278
+ "sensitivity": "public",
3279
+ "selectable": false,
3280
+ "system_required": false,
3281
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3282
+ },
3283
+ {
3284
+ "key": "trading_node_id",
3285
+ "title": "交易节点ID",
3286
+ "kind": "original",
3287
+ "type": "<class 'str'>",
3288
+ "sensitivity": "public",
3289
+ "selectable": true,
3290
+ "system_required": false,
3291
+ "blocked_reason": ""
3292
+ },
3293
+ {
3294
+ "key": "seat_no",
3295
+ "title": "席位号",
3296
+ "kind": "original",
3297
+ "type": "<class 'str'>",
3298
+ "sensitivity": "public",
3299
+ "selectable": true,
3300
+ "system_required": false,
3301
+ "blocked_reason": ""
3302
+ },
3303
+ {
3304
+ "key": "memo",
3305
+ "title": "备注",
3306
+ "kind": "original",
3307
+ "type": "<class 'str'>",
3308
+ "sensitivity": "public",
3309
+ "selectable": true,
3310
+ "system_required": false,
3311
+ "blocked_reason": ""
3312
+ }
3313
+ ],
3054
3314
  "counter_suppliers": [
3055
3315
  {
3056
3316
  "key": "_id",
@@ -3822,6 +4082,14 @@ export const FIELD_SPECS = {
3822
4082
  "enum": null,
3823
4083
  "required": true,
3824
4084
  "sensitivity": "public"
4085
+ },
4086
+ {
4087
+ "key": "trading_seat_id",
4088
+ "title": "交易席位ID",
4089
+ "widget": "text",
4090
+ "enum": null,
4091
+ "required": false,
4092
+ "sensitivity": "public"
3825
4093
  }
3826
4094
  ],
3827
4095
  "mount_exchange_accounts": [
@@ -4304,6 +4572,90 @@ export const FIELD_SPECS = {
4304
4572
  "sensitivity": "public"
4305
4573
  }
4306
4574
  ],
4575
+ "trading_nodes": [
4576
+ {
4577
+ "key": "broker_id",
4578
+ "title": "开户公司ID",
4579
+ "widget": "text",
4580
+ "enum": null,
4581
+ "required": true,
4582
+ "sensitivity": "public"
4583
+ },
4584
+ {
4585
+ "key": "counter_tier",
4586
+ "title": "柜台档位",
4587
+ "widget": "enum",
4588
+ "enum": "CounterTier",
4589
+ "required": true,
4590
+ "sensitivity": "public"
4591
+ },
4592
+ {
4593
+ "key": "branch_name",
4594
+ "title": "营业部名称",
4595
+ "widget": "text",
4596
+ "enum": null,
4597
+ "required": true,
4598
+ "sensitivity": "public"
4599
+ },
4600
+ {
4601
+ "key": "exchange_id",
4602
+ "title": "交易市场",
4603
+ "widget": "enum",
4604
+ "enum": "ExchangeType",
4605
+ "required": true,
4606
+ "sensitivity": "public"
4607
+ },
4608
+ {
4609
+ "key": "node_name",
4610
+ "title": "节点名称",
4611
+ "widget": "text",
4612
+ "enum": null,
4613
+ "required": true,
4614
+ "sensitivity": "public"
4615
+ },
4616
+ {
4617
+ "key": "server_room",
4618
+ "title": "所在机房",
4619
+ "widget": "text",
4620
+ "enum": null,
4621
+ "required": true,
4622
+ "sensitivity": "public"
4623
+ },
4624
+ {
4625
+ "key": "memo",
4626
+ "title": "备注",
4627
+ "widget": "text",
4628
+ "enum": null,
4629
+ "required": false,
4630
+ "sensitivity": "public"
4631
+ }
4632
+ ],
4633
+ "trading_seats": [
4634
+ {
4635
+ "key": "trading_node_id",
4636
+ "title": "交易节点ID",
4637
+ "widget": "text",
4638
+ "enum": null,
4639
+ "required": true,
4640
+ "sensitivity": "public"
4641
+ },
4642
+ {
4643
+ "key": "seat_no",
4644
+ "title": "席位号",
4645
+ "widget": "text",
4646
+ "enum": null,
4647
+ "required": true,
4648
+ "sensitivity": "public"
4649
+ },
4650
+ {
4651
+ "key": "memo",
4652
+ "title": "备注",
4653
+ "widget": "text",
4654
+ "enum": null,
4655
+ "required": false,
4656
+ "sensitivity": "public"
4657
+ }
4658
+ ],
4307
4659
  "counter_suppliers": [
4308
4660
  {
4309
4661
  "key": "type",