@ysgroup/contracts 0.1.8 → 0.1.10

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 +32 -31
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -425,7 +425,6 @@ export interface Account {
425
425
  "team_id": string; /** 团队ID */
426
426
  "owner_id": string; /** 主体ID */
427
427
  "enabled"?: boolean; /** 启用 */
428
- "auto_trade"?: boolean; /** 自动化交易 */
429
428
  "account": string; /** 资金账号 */
430
429
  "cname": string; /** 账户别名 */
431
430
  "type": AccountType; /** 账户类型 */
@@ -447,7 +446,7 @@ export interface Account {
447
446
  "login_password_hint"?: string; /** 登录密码提示 */
448
447
  "fund_password_hint"?: string; /** 资金密码提示 */
449
448
  "cfmmc_password_hint"?: string; /** CFMMC密码提示 */
450
- "config"?: Record<string, unknown>; /** 配置信息 */
449
+ "profit_enabled"?: boolean; /** 计算盈亏 */
451
450
  "commission_refund"?: number; /** 手续费返还 */
452
451
  "positions_refund"?: number; /** 持仓返还 */
453
452
  "interest"?: number; /** 利息 */
@@ -947,7 +946,7 @@ export const DERIVED_FIELD_SPECS = {
947
946
  "dependency_policy": "same_record"
948
947
  },
949
948
  {
950
- "key": "admin",
949
+ "key": "is_admin",
951
950
  "title": "应用管理员",
952
951
  "source_table": "user_app",
953
952
  "source_field": "admin",
@@ -961,6 +960,13 @@ export const DERIVED_FIELD_SPECS = {
961
960
  "source_table": "owners",
962
961
  "source_field": "name",
963
962
  "dependency_policy": "same_record"
963
+ },
964
+ {
965
+ "key": "broker_name",
966
+ "title": "开户公司名称",
967
+ "source_table": "brokers",
968
+ "source_field": "broker_name",
969
+ "dependency_policy": "same_record"
964
970
  }
965
971
  ]
966
972
  } as const;
@@ -1012,9 +1018,9 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1012
1018
  "kind": "original",
1013
1019
  "type": "<class 'bool'>",
1014
1020
  "sensitivity": "public",
1015
- "selectable": true,
1016
- "system_required": true,
1017
- "blocked_reason": ""
1021
+ "selectable": false,
1022
+ "system_required": false,
1023
+ "blocked_reason": "系统安全字段,禁止进入同步流"
1018
1024
  },
1019
1025
  {
1020
1026
  "key": "username",
@@ -1110,7 +1116,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1110
1116
  "blocked_reason": ""
1111
1117
  },
1112
1118
  {
1113
- "key": "admin",
1119
+ "key": "is_admin",
1114
1120
  "title": "应用管理员",
1115
1121
  "source_table": "user_app",
1116
1122
  "source_field": "admin",
@@ -1508,16 +1514,6 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1508
1514
  "system_required": false,
1509
1515
  "blocked_reason": ""
1510
1516
  },
1511
- {
1512
- "key": "auto_trade",
1513
- "title": "自动化交易",
1514
- "kind": "original",
1515
- "type": "<class 'bool'>",
1516
- "sensitivity": "public",
1517
- "selectable": true,
1518
- "system_required": false,
1519
- "blocked_reason": ""
1520
- },
1521
1517
  {
1522
1518
  "key": "account",
1523
1519
  "title": "资金账号",
@@ -1729,10 +1725,10 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1729
1725
  "blocked_reason": ""
1730
1726
  },
1731
1727
  {
1732
- "key": "config",
1733
- "title": "配置信息",
1728
+ "key": "profit_enabled",
1729
+ "title": "计算盈亏",
1734
1730
  "kind": "original",
1735
- "type": "<class 'dict'>",
1731
+ "type": "<class 'bool'>",
1736
1732
  "sensitivity": "public",
1737
1733
  "selectable": true,
1738
1734
  "system_required": false,
@@ -1800,6 +1796,19 @@ export const AUTHORIZATION_FIELD_CATALOG = {
1800
1796
  "selectable": true,
1801
1797
  "system_required": false,
1802
1798
  "blocked_reason": ""
1799
+ },
1800
+ {
1801
+ "key": "broker_name",
1802
+ "title": "开户公司名称",
1803
+ "source_table": "brokers",
1804
+ "source_field": "broker_name",
1805
+ "dependency_policy": "same_record",
1806
+ "kind": "derived",
1807
+ "type": "derived",
1808
+ "sensitivity": "public",
1809
+ "selectable": true,
1810
+ "system_required": false,
1811
+ "blocked_reason": ""
1803
1812
  }
1804
1813
  ],
1805
1814
  "exchange_accounts": [
@@ -3548,14 +3557,6 @@ export const FIELD_SPECS = {
3548
3557
  "required": false,
3549
3558
  "sensitivity": "public"
3550
3559
  },
3551
- {
3552
- "key": "auto_trade",
3553
- "title": "自动化交易",
3554
- "widget": "switch",
3555
- "enum": null,
3556
- "required": false,
3557
- "sensitivity": "public"
3558
- },
3559
3560
  {
3560
3561
  "key": "account",
3561
3562
  "title": "资金账号",
@@ -3725,9 +3726,9 @@ export const FIELD_SPECS = {
3725
3726
  "sensitivity": "public"
3726
3727
  },
3727
3728
  {
3728
- "key": "config",
3729
- "title": "配置信息",
3730
- "widget": "json",
3729
+ "key": "profit_enabled",
3730
+ "title": "计算盈亏",
3731
+ "widget": "switch",
3731
3732
  "enum": null,
3732
3733
  "required": false,
3733
3734
  "sensitivity": "public"