@ysgroup/contracts 0.1.18 → 0.1.20

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 +181 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
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" | "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" | "counter_suppliers" | "server_rooms" | "file_metas" | "app_configs";
8
8
  export type ChangeOp = "upsert" | "delete";
9
9
  export type ExchangeType = "SH" | "SZ" | "SHFE" | "CFFEX" | "CZCE" | "DCE" | "GFEX" | "INE" | "SGE" | "UNKNOWN";
10
10
  export type FieldGroupStatus = "draft" | "published" | "archived";
@@ -270,6 +270,10 @@ export const ENUM_META = {
270
270
  "label": "开户公司表",
271
271
  "sort": 160
272
272
  },
273
+ "broker_branches": {
274
+ "label": "营业部表",
275
+ "sort": 165
276
+ },
273
277
  "servers": {
274
278
  "label": "服务器表",
275
279
  "sort": 170
@@ -443,6 +447,7 @@ export interface Account {
443
447
  "trade_servers"?: TradeServer[]; /** 交易网关;sensitivity=restricted(仅风险提示,不决定应用授权) */
444
448
  "trade_counter"?: string; /** 交易柜台;sensitivity=restricted(仅风险提示,不决定应用授权) */
445
449
  "bank_card_id"?: string; /** 银行卡ID;sensitivity=restricted(仅风险提示,不决定应用授权) */
450
+ "broker_branch_id"?: string; /** 营业部ID;sensitivity=restricted(仅风险提示,不决定应用授权) */
446
451
  "memo"?: string; /** 备注 */
447
452
  "primary_color"?: string; /** 主题色 */
448
453
  }
@@ -559,6 +564,18 @@ export interface Broker {
559
564
  "broker_ename"?: string; /** 公司英文名 */
560
565
  }
561
566
 
567
+ export interface BrokerBranch {
568
+ "_id"?: string; /** 主键 */
569
+ "created_at"?: number; /** 创建时间 */
570
+ "updated_at"?: number; /** 更新时间 */
571
+ "deleted_at"?: null | number; /** 软删除时间 */
572
+ "broker_id": string; /** 开户公司ID */
573
+ "code": string; /** 营业部代码 */
574
+ "name": string; /** 营业部名称 */
575
+ "contact_name"?: string; /** 联系人姓名 */
576
+ "contact_phone"?: string; /** 联系人电话 */
577
+ }
578
+
562
579
  export interface Server {
563
580
  "_id"?: string; /** 主键 */
564
581
  "created_at"?: number; /** 创建时间 */
@@ -662,7 +679,7 @@ export interface App {
662
679
  "title"?: string; /** 应用名称 */
663
680
  "kind"?: AppKind; /** 类型 */
664
681
  "status"?: AppStatus; /** 状态 */
665
- "logo_url"?: string; /** Logo链接 */
682
+ "has_logo"?: boolean; /** 应用Logo */
666
683
  "website_url"?: string; /** 访问链接 */
667
684
  "memo"?: string; /** 备注 */
668
685
  "weight"?: number; /** 门户排序权重 */
@@ -753,6 +770,7 @@ export const TABLES = {
753
770
  "strategies": "Strategy",
754
771
  "projects": "Project",
755
772
  "brokers": "Broker",
773
+ "broker_branches": "BrokerBranch",
756
774
  "servers": "Server",
757
775
  "trading_platforms": "TradingPlatform",
758
776
  "counter_suppliers": "CounterSupplier",
@@ -872,6 +890,12 @@ export const AUTHORIZATION_TABLE_META = {
872
890
  "scope_mode": "global",
873
891
  "description": "授权后提供全部存活记录"
874
892
  },
893
+ "broker_branches": {
894
+ "name": "营业部表",
895
+ "category": "参考数据",
896
+ "scope_mode": "global",
897
+ "description": "授权后提供全部存活记录"
898
+ },
875
899
  "servers": {
876
900
  "name": "服务器表",
877
901
  "category": "参考数据",
@@ -1686,6 +1710,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1686
1710
  "system_required": false,
1687
1711
  "blocked_reason": ""
1688
1712
  },
1713
+ {
1714
+ "key": "broker_branch_id",
1715
+ "title": "营业部ID",
1716
+ "kind": "original",
1717
+ "type": "<class 'str'>",
1718
+ "sensitivity": "restricted",
1719
+ "selectable": true,
1720
+ "system_required": false,
1721
+ "blocked_reason": ""
1722
+ },
1689
1723
  {
1690
1724
  "key": "memo",
1691
1725
  "title": "备注",
@@ -2702,6 +2736,98 @@ export const AUTHORIZATION_FIELD_CATALOG = {
2702
2736
  "blocked_reason": ""
2703
2737
  }
2704
2738
  ],
2739
+ "broker_branches": [
2740
+ {
2741
+ "key": "_id",
2742
+ "title": "主键",
2743
+ "kind": "original",
2744
+ "type": "<class 'str'>",
2745
+ "sensitivity": "public",
2746
+ "selectable": true,
2747
+ "system_required": true,
2748
+ "blocked_reason": ""
2749
+ },
2750
+ {
2751
+ "key": "created_at",
2752
+ "title": "创建时间",
2753
+ "kind": "original",
2754
+ "type": "<class 'float'>",
2755
+ "sensitivity": "public",
2756
+ "selectable": true,
2757
+ "system_required": false,
2758
+ "blocked_reason": ""
2759
+ },
2760
+ {
2761
+ "key": "updated_at",
2762
+ "title": "更新时间",
2763
+ "kind": "original",
2764
+ "type": "<class 'float'>",
2765
+ "sensitivity": "public",
2766
+ "selectable": true,
2767
+ "system_required": false,
2768
+ "blocked_reason": ""
2769
+ },
2770
+ {
2771
+ "key": "deleted_at",
2772
+ "title": "软删除时间",
2773
+ "kind": "original",
2774
+ "type": "float | None",
2775
+ "sensitivity": "public",
2776
+ "selectable": false,
2777
+ "system_required": false,
2778
+ "blocked_reason": "系统安全字段,禁止进入同步流"
2779
+ },
2780
+ {
2781
+ "key": "broker_id",
2782
+ "title": "开户公司ID",
2783
+ "kind": "original",
2784
+ "type": "<class 'str'>",
2785
+ "sensitivity": "public",
2786
+ "selectable": true,
2787
+ "system_required": false,
2788
+ "blocked_reason": ""
2789
+ },
2790
+ {
2791
+ "key": "code",
2792
+ "title": "营业部代码",
2793
+ "kind": "original",
2794
+ "type": "<class 'str'>",
2795
+ "sensitivity": "public",
2796
+ "selectable": true,
2797
+ "system_required": false,
2798
+ "blocked_reason": ""
2799
+ },
2800
+ {
2801
+ "key": "name",
2802
+ "title": "营业部名称",
2803
+ "kind": "original",
2804
+ "type": "<class 'str'>",
2805
+ "sensitivity": "public",
2806
+ "selectable": true,
2807
+ "system_required": false,
2808
+ "blocked_reason": ""
2809
+ },
2810
+ {
2811
+ "key": "contact_name",
2812
+ "title": "联系人姓名",
2813
+ "kind": "original",
2814
+ "type": "<class 'str'>",
2815
+ "sensitivity": "public",
2816
+ "selectable": true,
2817
+ "system_required": false,
2818
+ "blocked_reason": ""
2819
+ },
2820
+ {
2821
+ "key": "contact_phone",
2822
+ "title": "联系人电话",
2823
+ "kind": "original",
2824
+ "type": "<class 'str'>",
2825
+ "sensitivity": "public",
2826
+ "selectable": true,
2827
+ "system_required": false,
2828
+ "blocked_reason": ""
2829
+ }
2830
+ ],
2705
2831
  "servers": [
2706
2832
  {
2707
2833
  "key": "_id",
@@ -3628,6 +3754,14 @@ export const FIELD_SPECS = {
3628
3754
  "required": false,
3629
3755
  "sensitivity": "restricted"
3630
3756
  },
3757
+ {
3758
+ "key": "broker_branch_id",
3759
+ "title": "营业部ID",
3760
+ "widget": "text",
3761
+ "enum": null,
3762
+ "required": false,
3763
+ "sensitivity": "restricted"
3764
+ },
3631
3765
  {
3632
3766
  "key": "memo",
3633
3767
  "title": "备注",
@@ -4001,6 +4135,48 @@ export const FIELD_SPECS = {
4001
4135
  "sensitivity": "public"
4002
4136
  }
4003
4137
  ],
4138
+ "broker_branches": [
4139
+ {
4140
+ "key": "broker_id",
4141
+ "title": "开户公司ID",
4142
+ "widget": "text",
4143
+ "enum": null,
4144
+ "required": true,
4145
+ "sensitivity": "public"
4146
+ },
4147
+ {
4148
+ "key": "code",
4149
+ "title": "营业部代码",
4150
+ "widget": "text",
4151
+ "enum": null,
4152
+ "required": true,
4153
+ "sensitivity": "public"
4154
+ },
4155
+ {
4156
+ "key": "name",
4157
+ "title": "营业部名称",
4158
+ "widget": "text",
4159
+ "enum": null,
4160
+ "required": true,
4161
+ "sensitivity": "public"
4162
+ },
4163
+ {
4164
+ "key": "contact_name",
4165
+ "title": "联系人姓名",
4166
+ "widget": "text",
4167
+ "enum": null,
4168
+ "required": false,
4169
+ "sensitivity": "public"
4170
+ },
4171
+ {
4172
+ "key": "contact_phone",
4173
+ "title": "联系人电话",
4174
+ "widget": "text",
4175
+ "enum": null,
4176
+ "required": false,
4177
+ "sensitivity": "public"
4178
+ }
4179
+ ],
4004
4180
  "servers": [
4005
4181
  {
4006
4182
  "key": "broker_id",
@@ -4301,9 +4477,9 @@ export const FIELD_SPECS = {
4301
4477
  "sensitivity": "public"
4302
4478
  },
4303
4479
  {
4304
- "key": "logo_url",
4305
- "title": "Logo链接",
4306
- "widget": "text",
4480
+ "key": "has_logo",
4481
+ "title": "应用Logo",
4482
+ "widget": "switch",
4307
4483
  "enum": null,
4308
4484
  "required": false,
4309
4485
  "sensitivity": "public"