@ysgroup/contracts 0.1.33 → 0.1.35

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 +66 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ export type AuthorizationTable = "users" | "teams" | "owners" | "accounts" | "ex
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 ExchangeBusinessPlatform = "1" | "2" | "3" | "4" | "5" | "6" | "MTP" | "ATP" | "DTP" | "XBTP" | "ITP" | "FISP" | "IITP";
11
- export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE" | "UNKNOWN";
11
+ export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE";
12
12
  export type FieldGroupStatus = "draft" | "published" | "archived";
13
13
  export type GatewayMode = "db" | "flow";
14
14
  export type OwnerType = "Product" | "LegalPerson" | "NaturalPerson";
@@ -128,12 +128,6 @@ export const ENUM_META = {
128
128
  "full_name": "上海黄金交易所",
129
129
  "english_name": "Shanghai Gold Exchange",
130
130
  "market": "FUTURES"
131
- },
132
- "UNKNOWN": {
133
- "name": "其他",
134
- "full_name": "",
135
- "english_name": "",
136
- "market": "UNKNOWN"
137
131
  }
138
132
  },
139
133
  "ExchangeBusinessPlatform": {
@@ -526,6 +520,11 @@ export interface TradingNodeAddress {
526
520
  "port"?: number; /** Port */
527
521
  }
528
522
 
523
+ export interface TradingSeatGateway {
524
+ "platform": ExchangeBusinessPlatform; /** 业务平台 */
525
+ "count": number; /** 网关数量 */
526
+ }
527
+
529
528
  export interface Team {
530
529
  "_id"?: string; /** 主键 */
531
530
  "created_at"?: number; /** 创建时间 */
@@ -684,6 +683,7 @@ export interface Strategy {
684
683
  "deleted_at"?: null | number; /** 软删除时间 */
685
684
  "name": string; /** 名称 */
686
685
  "memo"?: string; /** 备注 */
686
+ "project_id"?: string; /** 所属项目 */
687
687
  }
688
688
 
689
689
  export interface Project {
@@ -693,6 +693,7 @@ export interface Project {
693
693
  "deleted_at"?: null | number; /** 软删除时间 */
694
694
  "name": string; /** 名称 */
695
695
  "memo"?: string; /** 备注 */
696
+ "parent_id"?: string; /** 父项目 */
696
697
  }
697
698
 
698
699
  export interface Broker {
@@ -763,7 +764,8 @@ export interface TradingSeat {
763
764
  "deleted_at"?: null | number; /** 软删除时间 */
764
765
  "trading_node_id": string; /** 交易节点ID */
765
766
  "seat_no": string; /** 席位号 */
766
- "exchange_id": ExchangeType; /** 交易市场 */
767
+ "exchange_id": ExchangeType; /** 交易所 */
768
+ "gateways"?: TradingSeatGateway[]; /** 网关配置 */
767
769
  "memo"?: string; /** 备注 */
768
770
  }
769
771
 
@@ -2551,6 +2553,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
2551
2553
  "selectable": true,
2552
2554
  "system_required": false,
2553
2555
  "blocked_reason": ""
2556
+ },
2557
+ {
2558
+ "key": "project_id",
2559
+ "title": "所属项目",
2560
+ "kind": "original",
2561
+ "type": "<class 'str'>",
2562
+ "sensitivity": "public",
2563
+ "selectable": true,
2564
+ "system_required": false,
2565
+ "blocked_reason": ""
2554
2566
  }
2555
2567
  ],
2556
2568
  "projects": [
@@ -2613,6 +2625,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
2613
2625
  "selectable": true,
2614
2626
  "system_required": false,
2615
2627
  "blocked_reason": ""
2628
+ },
2629
+ {
2630
+ "key": "parent_id",
2631
+ "title": "父项目",
2632
+ "kind": "original",
2633
+ "type": "<class 'str'>",
2634
+ "sensitivity": "public",
2635
+ "selectable": true,
2636
+ "system_required": false,
2637
+ "blocked_reason": ""
2616
2638
  }
2617
2639
  ],
2618
2640
  "project_owner": [
@@ -3396,7 +3418,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3396
3418
  },
3397
3419
  {
3398
3420
  "key": "exchange_id",
3399
- "title": "交易市场",
3421
+ "title": "交易所",
3400
3422
  "kind": "original",
3401
3423
  "type": "<enum 'ExchangeType'>",
3402
3424
  "sensitivity": "public",
@@ -3404,6 +3426,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3404
3426
  "system_required": false,
3405
3427
  "blocked_reason": ""
3406
3428
  },
3429
+ {
3430
+ "key": "gateways",
3431
+ "title": "网关配置",
3432
+ "kind": "original",
3433
+ "type": "list[ys_base.contracts.master.TradingSeatGateway]",
3434
+ "sensitivity": "public",
3435
+ "selectable": true,
3436
+ "system_required": false,
3437
+ "blocked_reason": ""
3438
+ },
3407
3439
  {
3408
3440
  "key": "memo",
3409
3441
  "title": "备注",
@@ -4472,6 +4504,14 @@ export const FIELD_SPECS = {
4472
4504
  "enum": null,
4473
4505
  "required": false,
4474
4506
  "sensitivity": "public"
4507
+ },
4508
+ {
4509
+ "key": "project_id",
4510
+ "title": "所属项目",
4511
+ "widget": "text",
4512
+ "enum": null,
4513
+ "required": false,
4514
+ "sensitivity": "public"
4475
4515
  }
4476
4516
  ],
4477
4517
  "projects": [
@@ -4490,6 +4530,14 @@ export const FIELD_SPECS = {
4490
4530
  "enum": null,
4491
4531
  "required": false,
4492
4532
  "sensitivity": "public"
4533
+ },
4534
+ {
4535
+ "key": "parent_id",
4536
+ "title": "父项目",
4537
+ "widget": "text",
4538
+ "enum": null,
4539
+ "required": false,
4540
+ "sensitivity": "public"
4493
4541
  }
4494
4542
  ],
4495
4543
  "brokers": [
@@ -4729,12 +4777,20 @@ export const FIELD_SPECS = {
4729
4777
  },
4730
4778
  {
4731
4779
  "key": "exchange_id",
4732
- "title": "交易市场",
4780
+ "title": "交易所",
4733
4781
  "widget": "enum",
4734
4782
  "enum": "ExchangeType",
4735
4783
  "required": true,
4736
4784
  "sensitivity": "public"
4737
4785
  },
4786
+ {
4787
+ "key": "gateways",
4788
+ "title": "网关配置",
4789
+ "widget": "tags",
4790
+ "enum": null,
4791
+ "required": false,
4792
+ "sensitivity": "public"
4793
+ },
4738
4794
  {
4739
4795
  "key": "memo",
4740
4796
  "title": "备注",