@ysgroup/contracts 0.1.19 → 0.1.21
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 +196 -1
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" | "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,19 @@ 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
|
+
"short_name": string; /** 营业部简称 */
|
|
576
|
+
"contact_name"?: string; /** 联系人姓名 */
|
|
577
|
+
"contact_phone"?: string; /** 联系人电话 */
|
|
578
|
+
}
|
|
579
|
+
|
|
562
580
|
export interface Server {
|
|
563
581
|
"_id"?: string; /** 主键 */
|
|
564
582
|
"created_at"?: number; /** 创建时间 */
|
|
@@ -753,6 +771,7 @@ export const TABLES = {
|
|
|
753
771
|
"strategies": "Strategy",
|
|
754
772
|
"projects": "Project",
|
|
755
773
|
"brokers": "Broker",
|
|
774
|
+
"broker_branches": "BrokerBranch",
|
|
756
775
|
"servers": "Server",
|
|
757
776
|
"trading_platforms": "TradingPlatform",
|
|
758
777
|
"counter_suppliers": "CounterSupplier",
|
|
@@ -872,6 +891,12 @@ export const AUTHORIZATION_TABLE_META = {
|
|
|
872
891
|
"scope_mode": "global",
|
|
873
892
|
"description": "授权后提供全部存活记录"
|
|
874
893
|
},
|
|
894
|
+
"broker_branches": {
|
|
895
|
+
"name": "营业部表",
|
|
896
|
+
"category": "参考数据",
|
|
897
|
+
"scope_mode": "global",
|
|
898
|
+
"description": "授权后提供全部存活记录"
|
|
899
|
+
},
|
|
875
900
|
"servers": {
|
|
876
901
|
"name": "服务器表",
|
|
877
902
|
"category": "参考数据",
|
|
@@ -1686,6 +1711,16 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
1686
1711
|
"system_required": false,
|
|
1687
1712
|
"blocked_reason": ""
|
|
1688
1713
|
},
|
|
1714
|
+
{
|
|
1715
|
+
"key": "broker_branch_id",
|
|
1716
|
+
"title": "营业部ID",
|
|
1717
|
+
"kind": "original",
|
|
1718
|
+
"type": "<class 'str'>",
|
|
1719
|
+
"sensitivity": "restricted",
|
|
1720
|
+
"selectable": true,
|
|
1721
|
+
"system_required": false,
|
|
1722
|
+
"blocked_reason": ""
|
|
1723
|
+
},
|
|
1689
1724
|
{
|
|
1690
1725
|
"key": "memo",
|
|
1691
1726
|
"title": "备注",
|
|
@@ -2702,6 +2737,108 @@ export const AUTHORIZATION_FIELD_CATALOG = {
|
|
|
2702
2737
|
"blocked_reason": ""
|
|
2703
2738
|
}
|
|
2704
2739
|
],
|
|
2740
|
+
"broker_branches": [
|
|
2741
|
+
{
|
|
2742
|
+
"key": "_id",
|
|
2743
|
+
"title": "主键",
|
|
2744
|
+
"kind": "original",
|
|
2745
|
+
"type": "<class 'str'>",
|
|
2746
|
+
"sensitivity": "public",
|
|
2747
|
+
"selectable": true,
|
|
2748
|
+
"system_required": true,
|
|
2749
|
+
"blocked_reason": ""
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
"key": "created_at",
|
|
2753
|
+
"title": "创建时间",
|
|
2754
|
+
"kind": "original",
|
|
2755
|
+
"type": "<class 'float'>",
|
|
2756
|
+
"sensitivity": "public",
|
|
2757
|
+
"selectable": true,
|
|
2758
|
+
"system_required": false,
|
|
2759
|
+
"blocked_reason": ""
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"key": "updated_at",
|
|
2763
|
+
"title": "更新时间",
|
|
2764
|
+
"kind": "original",
|
|
2765
|
+
"type": "<class 'float'>",
|
|
2766
|
+
"sensitivity": "public",
|
|
2767
|
+
"selectable": true,
|
|
2768
|
+
"system_required": false,
|
|
2769
|
+
"blocked_reason": ""
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
"key": "deleted_at",
|
|
2773
|
+
"title": "软删除时间",
|
|
2774
|
+
"kind": "original",
|
|
2775
|
+
"type": "float | None",
|
|
2776
|
+
"sensitivity": "public",
|
|
2777
|
+
"selectable": false,
|
|
2778
|
+
"system_required": false,
|
|
2779
|
+
"blocked_reason": "系统安全字段,禁止进入同步流"
|
|
2780
|
+
},
|
|
2781
|
+
{
|
|
2782
|
+
"key": "broker_id",
|
|
2783
|
+
"title": "开户公司ID",
|
|
2784
|
+
"kind": "original",
|
|
2785
|
+
"type": "<class 'str'>",
|
|
2786
|
+
"sensitivity": "public",
|
|
2787
|
+
"selectable": true,
|
|
2788
|
+
"system_required": false,
|
|
2789
|
+
"blocked_reason": ""
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
"key": "code",
|
|
2793
|
+
"title": "营业部代码",
|
|
2794
|
+
"kind": "original",
|
|
2795
|
+
"type": "<class 'str'>",
|
|
2796
|
+
"sensitivity": "public",
|
|
2797
|
+
"selectable": true,
|
|
2798
|
+
"system_required": false,
|
|
2799
|
+
"blocked_reason": ""
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
"key": "name",
|
|
2803
|
+
"title": "营业部名称",
|
|
2804
|
+
"kind": "original",
|
|
2805
|
+
"type": "<class 'str'>",
|
|
2806
|
+
"sensitivity": "public",
|
|
2807
|
+
"selectable": true,
|
|
2808
|
+
"system_required": false,
|
|
2809
|
+
"blocked_reason": ""
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
"key": "short_name",
|
|
2813
|
+
"title": "营业部简称",
|
|
2814
|
+
"kind": "original",
|
|
2815
|
+
"type": "<class 'str'>",
|
|
2816
|
+
"sensitivity": "public",
|
|
2817
|
+
"selectable": true,
|
|
2818
|
+
"system_required": false,
|
|
2819
|
+
"blocked_reason": ""
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
"key": "contact_name",
|
|
2823
|
+
"title": "联系人姓名",
|
|
2824
|
+
"kind": "original",
|
|
2825
|
+
"type": "<class 'str'>",
|
|
2826
|
+
"sensitivity": "public",
|
|
2827
|
+
"selectable": true,
|
|
2828
|
+
"system_required": false,
|
|
2829
|
+
"blocked_reason": ""
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
"key": "contact_phone",
|
|
2833
|
+
"title": "联系人电话",
|
|
2834
|
+
"kind": "original",
|
|
2835
|
+
"type": "<class 'str'>",
|
|
2836
|
+
"sensitivity": "public",
|
|
2837
|
+
"selectable": true,
|
|
2838
|
+
"system_required": false,
|
|
2839
|
+
"blocked_reason": ""
|
|
2840
|
+
}
|
|
2841
|
+
],
|
|
2705
2842
|
"servers": [
|
|
2706
2843
|
{
|
|
2707
2844
|
"key": "_id",
|
|
@@ -3628,6 +3765,14 @@ export const FIELD_SPECS = {
|
|
|
3628
3765
|
"required": false,
|
|
3629
3766
|
"sensitivity": "restricted"
|
|
3630
3767
|
},
|
|
3768
|
+
{
|
|
3769
|
+
"key": "broker_branch_id",
|
|
3770
|
+
"title": "营业部ID",
|
|
3771
|
+
"widget": "text",
|
|
3772
|
+
"enum": null,
|
|
3773
|
+
"required": false,
|
|
3774
|
+
"sensitivity": "restricted"
|
|
3775
|
+
},
|
|
3631
3776
|
{
|
|
3632
3777
|
"key": "memo",
|
|
3633
3778
|
"title": "备注",
|
|
@@ -4001,6 +4146,56 @@ export const FIELD_SPECS = {
|
|
|
4001
4146
|
"sensitivity": "public"
|
|
4002
4147
|
}
|
|
4003
4148
|
],
|
|
4149
|
+
"broker_branches": [
|
|
4150
|
+
{
|
|
4151
|
+
"key": "broker_id",
|
|
4152
|
+
"title": "开户公司ID",
|
|
4153
|
+
"widget": "text",
|
|
4154
|
+
"enum": null,
|
|
4155
|
+
"required": true,
|
|
4156
|
+
"sensitivity": "public"
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
"key": "code",
|
|
4160
|
+
"title": "营业部代码",
|
|
4161
|
+
"widget": "text",
|
|
4162
|
+
"enum": null,
|
|
4163
|
+
"required": true,
|
|
4164
|
+
"sensitivity": "public"
|
|
4165
|
+
},
|
|
4166
|
+
{
|
|
4167
|
+
"key": "name",
|
|
4168
|
+
"title": "营业部名称",
|
|
4169
|
+
"widget": "text",
|
|
4170
|
+
"enum": null,
|
|
4171
|
+
"required": true,
|
|
4172
|
+
"sensitivity": "public"
|
|
4173
|
+
},
|
|
4174
|
+
{
|
|
4175
|
+
"key": "short_name",
|
|
4176
|
+
"title": "营业部简称",
|
|
4177
|
+
"widget": "text",
|
|
4178
|
+
"enum": null,
|
|
4179
|
+
"required": true,
|
|
4180
|
+
"sensitivity": "public"
|
|
4181
|
+
},
|
|
4182
|
+
{
|
|
4183
|
+
"key": "contact_name",
|
|
4184
|
+
"title": "联系人姓名",
|
|
4185
|
+
"widget": "text",
|
|
4186
|
+
"enum": null,
|
|
4187
|
+
"required": false,
|
|
4188
|
+
"sensitivity": "public"
|
|
4189
|
+
},
|
|
4190
|
+
{
|
|
4191
|
+
"key": "contact_phone",
|
|
4192
|
+
"title": "联系人电话",
|
|
4193
|
+
"widget": "text",
|
|
4194
|
+
"enum": null,
|
|
4195
|
+
"required": false,
|
|
4196
|
+
"sensitivity": "public"
|
|
4197
|
+
}
|
|
4198
|
+
],
|
|
4004
4199
|
"servers": [
|
|
4005
4200
|
{
|
|
4006
4201
|
"key": "broker_id",
|