@ysgroup/contracts 0.1.39 → 0.1.41

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 -102
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -4,14 +4,13 @@
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" | "org_units" | "workstations" | "brokers" | "broker_branches" | "servers" | "trading_counters" | "trading_nodes" | "trading_seats" | "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" | "workstations" | "owner_workstations" | "brokers" | "broker_branches" | "servers" | "trading_counters" | "trading_nodes" | "trading_seats" | "counter_suppliers" | "server_rooms" | "file_metas" | "app_configs";
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
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
- export type OrgUnitKind = "Department" | "Position";
15
14
  export type OwnerType = "Product" | "LegalPerson" | "NaturalPerson";
16
15
  export type RecordScopeMode = "user_app" | "global" | "explicit" | "derived" | "app_owned";
17
16
  export type Sensitivity = "public" | "restricted" | "credential";
@@ -75,18 +74,6 @@ export const ENUM_META = {
75
74
  "sort": 2
76
75
  }
77
76
  },
78
- "OrgUnitKind": {
79
- "Department": {
80
- "name": "部门",
81
- "parent_kind": "",
82
- "sort": 0
83
- },
84
- "Position": {
85
- "name": "岗位",
86
- "parent_kind": "Department",
87
- "sort": 1
88
- }
89
- },
90
77
  "ExchangeType": {
91
78
  "SH": {
92
79
  "name": "上交所",
@@ -408,14 +395,14 @@ export const ENUM_META = {
408
395
  "label": "任职关系表",
409
396
  "sort": 150
410
397
  },
411
- "org_units": {
412
- "label": "组织单元表",
413
- "sort": 155
414
- },
415
398
  "workstations": {
416
399
  "label": "工位表",
417
400
  "sort": 156
418
401
  },
402
+ "owner_workstations": {
403
+ "label": "主体工位关系表",
404
+ "sort": 157
405
+ },
419
406
  "brokers": {
420
407
  "label": "开户公司表",
421
408
  "sort": 160
@@ -858,26 +845,23 @@ export interface CompanyEmployee {
858
845
  "employee_id": string; /** 自然人ID(owners) */
859
846
  }
860
847
 
861
- export interface OrgUnit {
848
+ export interface Workstation {
862
849
  "_id"?: string; /** 主键 */
863
850
  "created_at"?: number; /** 创建时间 */
864
851
  "updated_at"?: number; /** 更新时间 */
865
852
  "deleted_at"?: null | number; /** 软删除时间 */
866
- "company_id": string; /** 所属公司ID */
867
- "parent_id"?: string; /** 上级单元ID */
868
- "kind": OrgUnitKind; /** 层级 */
853
+ "parent_id"?: string; /** 上级ID */
869
854
  "name": string; /** 名称 */
870
855
  "memo"?: string; /** 备注 */
871
856
  }
872
857
 
873
- export interface Workstation {
858
+ export interface OwnerWorkstation {
874
859
  "_id"?: string; /** 主键 */
875
860
  "created_at"?: number; /** 创建时间 */
876
861
  "updated_at"?: number; /** 更新时间 */
877
862
  "deleted_at"?: null | number; /** 软删除时间 */
878
- "parent_id"?: string; /** 岗位ID */
879
- "name": string; /** 名称 */
880
- "memo"?: string; /** 备注 */
863
+ "owner_id": string; /** 自然人主体ID */
864
+ "workstation_id": string; /** 工位ID */
881
865
  }
882
866
 
883
867
  export interface App {
@@ -992,8 +976,8 @@ export const TABLES = {
992
976
  "owner_strategy": "OwnerStrategy",
993
977
  "project_owner": "ProjectOwner",
994
978
  "company_employees": "CompanyEmployee",
995
- "org_units": "OrgUnit",
996
979
  "workstations": "Workstation",
980
+ "owner_workstations": "OwnerWorkstation",
997
981
  "apps": "App",
998
982
  "app_configs": "AppConfig",
999
983
  "file_metas": "FileMeta",
@@ -1098,18 +1082,18 @@ export const AUTHORIZATION_TABLE_META = {
1098
1082
  "scope_mode": "derived",
1099
1083
  "description": "法人和员工主体均获授权后下发"
1100
1084
  },
1101
- "org_units": {
1102
- "name": "组织单元表",
1103
- "category": "组织",
1104
- "scope_mode": "global",
1105
- "description": "授权后提供全部存活记录"
1106
- },
1107
1085
  "workstations": {
1108
1086
  "name": "工位表",
1109
1087
  "category": "组织",
1110
1088
  "scope_mode": "global",
1111
1089
  "description": "授权后提供全部存活记录"
1112
1090
  },
1091
+ "owner_workstations": {
1092
+ "name": "主体工位关系表",
1093
+ "category": "组织",
1094
+ "scope_mode": "derived",
1095
+ "description": "自然人主体获授权且工位表已授权后下发"
1096
+ },
1113
1097
  "brokers": {
1114
1098
  "name": "开户公司表",
1115
1099
  "category": "参考数据",
@@ -2942,7 +2926,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
2942
2926
  "blocked_reason": ""
2943
2927
  }
2944
2928
  ],
2945
- "org_units": [
2929
+ "workstations": [
2946
2930
  {
2947
2931
  "key": "_id",
2948
2932
  "title": "主键",
@@ -2983,19 +2967,9 @@ export const AUTHORIZATION_FIELD_CATALOG = {
2983
2967
  "system_required": false,
2984
2968
  "blocked_reason": "系统安全字段,禁止进入同步流"
2985
2969
  },
2986
- {
2987
- "key": "company_id",
2988
- "title": "所属公司ID",
2989
- "kind": "original",
2990
- "type": "<class 'str'>",
2991
- "sensitivity": "public",
2992
- "selectable": true,
2993
- "system_required": false,
2994
- "blocked_reason": ""
2995
- },
2996
2970
  {
2997
2971
  "key": "parent_id",
2998
- "title": "上级单元ID",
2972
+ "title": "上级ID",
2999
2973
  "kind": "original",
3000
2974
  "type": "<class 'str'>",
3001
2975
  "sensitivity": "public",
@@ -3003,16 +2977,6 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3003
2977
  "system_required": false,
3004
2978
  "blocked_reason": ""
3005
2979
  },
3006
- {
3007
- "key": "kind",
3008
- "title": "层级",
3009
- "kind": "original",
3010
- "type": "<enum 'OrgUnitKind'>",
3011
- "sensitivity": "public",
3012
- "selectable": true,
3013
- "system_required": false,
3014
- "blocked_reason": ""
3015
- },
3016
2980
  {
3017
2981
  "key": "name",
3018
2982
  "title": "名称",
@@ -3034,7 +2998,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3034
2998
  "blocked_reason": ""
3035
2999
  }
3036
3000
  ],
3037
- "workstations": [
3001
+ "owner_workstations": [
3038
3002
  {
3039
3003
  "key": "_id",
3040
3004
  "title": "主键",
@@ -3076,18 +3040,8 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3076
3040
  "blocked_reason": "系统安全字段,禁止进入同步流"
3077
3041
  },
3078
3042
  {
3079
- "key": "parent_id",
3080
- "title": "岗位ID",
3081
- "kind": "original",
3082
- "type": "<class 'str'>",
3083
- "sensitivity": "public",
3084
- "selectable": true,
3085
- "system_required": false,
3086
- "blocked_reason": ""
3087
- },
3088
- {
3089
- "key": "name",
3090
- "title": "名称",
3043
+ "key": "owner_id",
3044
+ "title": "自然人主体ID",
3091
3045
  "kind": "original",
3092
3046
  "type": "<class 'str'>",
3093
3047
  "sensitivity": "public",
@@ -3096,8 +3050,8 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3096
3050
  "blocked_reason": ""
3097
3051
  },
3098
3052
  {
3099
- "key": "memo",
3100
- "title": "备注",
3053
+ "key": "workstation_id",
3054
+ "title": "工位ID",
3101
3055
  "kind": "original",
3102
3056
  "type": "<class 'str'>",
3103
3057
  "sensitivity": "public",
@@ -5187,31 +5141,15 @@ export const FIELD_SPECS = {
5187
5141
  "sensitivity": "public"
5188
5142
  }
5189
5143
  ],
5190
- "org_units": [
5191
- {
5192
- "key": "company_id",
5193
- "title": "所属公司ID",
5194
- "widget": "text",
5195
- "enum": null,
5196
- "required": true,
5197
- "sensitivity": "public"
5198
- },
5144
+ "workstations": [
5199
5145
  {
5200
5146
  "key": "parent_id",
5201
- "title": "上级单元ID",
5147
+ "title": "上级ID",
5202
5148
  "widget": "text",
5203
5149
  "enum": null,
5204
5150
  "required": false,
5205
5151
  "sensitivity": "public"
5206
5152
  },
5207
- {
5208
- "key": "kind",
5209
- "title": "层级",
5210
- "widget": "enum",
5211
- "enum": "OrgUnitKind",
5212
- "required": true,
5213
- "sensitivity": "public"
5214
- },
5215
5153
  {
5216
5154
  "key": "name",
5217
5155
  "title": "名称",
@@ -5229,29 +5167,21 @@ export const FIELD_SPECS = {
5229
5167
  "sensitivity": "public"
5230
5168
  }
5231
5169
  ],
5232
- "workstations": [
5233
- {
5234
- "key": "parent_id",
5235
- "title": "岗位ID",
5236
- "widget": "text",
5237
- "enum": null,
5238
- "required": false,
5239
- "sensitivity": "public"
5240
- },
5170
+ "owner_workstations": [
5241
5171
  {
5242
- "key": "name",
5243
- "title": "名称",
5172
+ "key": "owner_id",
5173
+ "title": "自然人主体ID",
5244
5174
  "widget": "text",
5245
5175
  "enum": null,
5246
5176
  "required": true,
5247
5177
  "sensitivity": "public"
5248
5178
  },
5249
5179
  {
5250
- "key": "memo",
5251
- "title": "备注",
5180
+ "key": "workstation_id",
5181
+ "title": "工位ID",
5252
5182
  "widget": "text",
5253
5183
  "enum": null,
5254
- "required": false,
5184
+ "required": true,
5255
5185
  "sensitivity": "public"
5256
5186
  }
5257
5187
  ],