@ysgroup/contracts 0.1.25 → 0.1.26

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 +215 -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.26",
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" | "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,10 @@ export const ENUM_META = {
271
290
  "label": "交易柜台表",
272
291
  "sort": 180
273
292
  },
293
+ "trading_nodes": {
294
+ "label": "交易节点表",
295
+ "sort": 185
296
+ },
274
297
  "counter_suppliers": {
275
298
  "label": "柜台供应商表",
276
299
  "sort": 190
@@ -591,6 +614,20 @@ export interface TradingPlatform {
591
614
  "memo"?: string; /** 备注 */
592
615
  }
593
616
 
617
+ export interface TradingNode {
618
+ "_id"?: string; /** 主键 */
619
+ "created_at"?: number; /** 创建时间 */
620
+ "updated_at"?: number; /** 更新时间 */
621
+ "deleted_at"?: null | number; /** 软删除时间 */
622
+ "broker_id": string; /** 开户公司ID */
623
+ "counter_tier": CounterTier; /** 柜台档位 */
624
+ "branch_name": string; /** 营业部名称 */
625
+ "exchange_id": ExchangeType; /** 交易市场 */
626
+ "node_name": string; /** 节点名称 */
627
+ "server_room": string; /** 所在机房 */
628
+ "memo"?: string; /** 备注 */
629
+ }
630
+
594
631
  export interface CounterSupplier {
595
632
  "_id"?: string; /** 主键 */
596
633
  "created_at"?: number; /** 创建时间 */
@@ -762,6 +799,7 @@ export const TABLES = {
762
799
  "broker_branches": "BrokerBranch",
763
800
  "servers": "Server",
764
801
  "trading_platforms": "TradingPlatform",
802
+ "trading_nodes": "TradingNode",
765
803
  "counter_suppliers": "CounterSupplier",
766
804
  "server_rooms": "ServerRoom",
767
805
  "user_app": "UserApp",
@@ -897,6 +935,12 @@ export const AUTHORIZATION_TABLE_META = {
897
935
  "scope_mode": "global",
898
936
  "description": "授权后提供全部存活记录"
899
937
  },
938
+ "trading_nodes": {
939
+ "name": "交易节点表",
940
+ "category": "参考数据",
941
+ "scope_mode": "global",
942
+ "description": "授权后提供全部存活记录"
943
+ },
900
944
  "counter_suppliers": {
901
945
  "name": "柜台供应商表",
902
946
  "category": "参考数据",
@@ -3051,6 +3095,118 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3051
3095
  "blocked_reason": ""
3052
3096
  }
3053
3097
  ],
3098
+ "trading_nodes": [
3099
+ {
3100
+ "key": "_id",
3101
+ "title": "主键",
3102
+ "kind": "original",
3103
+ "type": "<class 'str'>",
3104
+ "sensitivity": "public",
3105
+ "selectable": true,
3106
+ "system_required": true,
3107
+ "blocked_reason": ""
3108
+ },
3109
+ {
3110
+ "key": "created_at",
3111
+ "title": "创建时间",
3112
+ "kind": "original",
3113
+ "type": "<class 'float'>",
3114
+ "sensitivity": "public",
3115
+ "selectable": true,
3116
+ "system_required": false,
3117
+ "blocked_reason": ""
3118
+ },
3119
+ {
3120
+ "key": "updated_at",
3121
+ "title": "更新时间",
3122
+ "kind": "original",
3123
+ "type": "<class 'float'>",
3124
+ "sensitivity": "public",
3125
+ "selectable": true,
3126
+ "system_required": false,
3127
+ "blocked_reason": ""
3128
+ },
3129
+ {
3130
+ "key": "deleted_at",
3131
+ "title": "软删除时间",
3132
+ "kind": "original",
3133
+ "type": "float | None",
3134
+ "sensitivity": "public",
3135
+ "selectable": false,
3136
+ "system_required": false,
3137
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3138
+ },
3139
+ {
3140
+ "key": "broker_id",
3141
+ "title": "开户公司ID",
3142
+ "kind": "original",
3143
+ "type": "<class 'str'>",
3144
+ "sensitivity": "public",
3145
+ "selectable": true,
3146
+ "system_required": false,
3147
+ "blocked_reason": ""
3148
+ },
3149
+ {
3150
+ "key": "counter_tier",
3151
+ "title": "柜台档位",
3152
+ "kind": "original",
3153
+ "type": "<enum 'CounterTier'>",
3154
+ "sensitivity": "public",
3155
+ "selectable": true,
3156
+ "system_required": false,
3157
+ "blocked_reason": ""
3158
+ },
3159
+ {
3160
+ "key": "branch_name",
3161
+ "title": "营业部名称",
3162
+ "kind": "original",
3163
+ "type": "<class 'str'>",
3164
+ "sensitivity": "public",
3165
+ "selectable": true,
3166
+ "system_required": false,
3167
+ "blocked_reason": ""
3168
+ },
3169
+ {
3170
+ "key": "exchange_id",
3171
+ "title": "交易市场",
3172
+ "kind": "original",
3173
+ "type": "<enum 'ExchangeType'>",
3174
+ "sensitivity": "public",
3175
+ "selectable": true,
3176
+ "system_required": false,
3177
+ "blocked_reason": ""
3178
+ },
3179
+ {
3180
+ "key": "node_name",
3181
+ "title": "节点名称",
3182
+ "kind": "original",
3183
+ "type": "<class 'str'>",
3184
+ "sensitivity": "public",
3185
+ "selectable": true,
3186
+ "system_required": false,
3187
+ "blocked_reason": ""
3188
+ },
3189
+ {
3190
+ "key": "server_room",
3191
+ "title": "所在机房",
3192
+ "kind": "original",
3193
+ "type": "<class 'str'>",
3194
+ "sensitivity": "public",
3195
+ "selectable": true,
3196
+ "system_required": false,
3197
+ "blocked_reason": ""
3198
+ },
3199
+ {
3200
+ "key": "memo",
3201
+ "title": "备注",
3202
+ "kind": "original",
3203
+ "type": "<class 'str'>",
3204
+ "sensitivity": "public",
3205
+ "selectable": true,
3206
+ "system_required": false,
3207
+ "blocked_reason": ""
3208
+ }
3209
+ ],
3054
3210
  "counter_suppliers": [
3055
3211
  {
3056
3212
  "key": "_id",
@@ -4304,6 +4460,64 @@ export const FIELD_SPECS = {
4304
4460
  "sensitivity": "public"
4305
4461
  }
4306
4462
  ],
4463
+ "trading_nodes": [
4464
+ {
4465
+ "key": "broker_id",
4466
+ "title": "开户公司ID",
4467
+ "widget": "text",
4468
+ "enum": null,
4469
+ "required": true,
4470
+ "sensitivity": "public"
4471
+ },
4472
+ {
4473
+ "key": "counter_tier",
4474
+ "title": "柜台档位",
4475
+ "widget": "enum",
4476
+ "enum": "CounterTier",
4477
+ "required": true,
4478
+ "sensitivity": "public"
4479
+ },
4480
+ {
4481
+ "key": "branch_name",
4482
+ "title": "营业部名称",
4483
+ "widget": "text",
4484
+ "enum": null,
4485
+ "required": true,
4486
+ "sensitivity": "public"
4487
+ },
4488
+ {
4489
+ "key": "exchange_id",
4490
+ "title": "交易市场",
4491
+ "widget": "enum",
4492
+ "enum": "ExchangeType",
4493
+ "required": true,
4494
+ "sensitivity": "public"
4495
+ },
4496
+ {
4497
+ "key": "node_name",
4498
+ "title": "节点名称",
4499
+ "widget": "text",
4500
+ "enum": null,
4501
+ "required": true,
4502
+ "sensitivity": "public"
4503
+ },
4504
+ {
4505
+ "key": "server_room",
4506
+ "title": "所在机房",
4507
+ "widget": "text",
4508
+ "enum": null,
4509
+ "required": true,
4510
+ "sensitivity": "public"
4511
+ },
4512
+ {
4513
+ "key": "memo",
4514
+ "title": "备注",
4515
+ "widget": "text",
4516
+ "enum": null,
4517
+ "required": false,
4518
+ "sensitivity": "public"
4519
+ }
4520
+ ],
4307
4521
  "counter_suppliers": [
4308
4522
  {
4309
4523
  "key": "type",