@ysgroup/contracts 0.1.38 → 0.1.40

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 +109 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
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" | "org_units" | "position_templates" | "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" | "org_units" | "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";
@@ -13,7 +13,6 @@ export type FieldGroupStatus = "draft" | "published" | "archived";
13
13
  export type GatewayMode = "db" | "flow";
14
14
  export type OrgUnitKind = "Department" | "Position";
15
15
  export type OwnerType = "Product" | "LegalPerson" | "NaturalPerson";
16
- export type PositionTemplateKind = "Position" | "Workstation";
17
16
  export type RecordScopeMode = "user_app" | "global" | "explicit" | "derived" | "app_owned";
18
17
  export type Sensitivity = "public" | "restricted" | "credential";
19
18
  export type ServerType = "td" | "md";
@@ -88,18 +87,6 @@ export const ENUM_META = {
88
87
  "sort": 1
89
88
  }
90
89
  },
91
- "PositionTemplateKind": {
92
- "Position": {
93
- "name": "标准岗位",
94
- "parent_kind": "",
95
- "sort": 0
96
- },
97
- "Workstation": {
98
- "name": "工位",
99
- "parent_kind": "Position",
100
- "sort": 1
101
- }
102
- },
103
90
  "ExchangeType": {
104
91
  "SH": {
105
92
  "name": "上交所",
@@ -425,10 +412,14 @@ export const ENUM_META = {
425
412
  "label": "组织单元表",
426
413
  "sort": 155
427
414
  },
428
- "position_templates": {
429
- "label": "标准岗位工位表",
415
+ "workstations": {
416
+ "label": "工位表",
430
417
  "sort": 156
431
418
  },
419
+ "owner_workstations": {
420
+ "label": "主体工位关系表",
421
+ "sort": 157
422
+ },
432
423
  "brokers": {
433
424
  "label": "开户公司表",
434
425
  "sort": 160
@@ -883,17 +874,25 @@ export interface OrgUnit {
883
874
  "memo"?: string; /** 备注 */
884
875
  }
885
876
 
886
- export interface PositionTemplate {
877
+ export interface Workstation {
887
878
  "_id"?: string; /** 主键 */
888
879
  "created_at"?: number; /** 创建时间 */
889
880
  "updated_at"?: number; /** 更新时间 */
890
881
  "deleted_at"?: null | number; /** 软删除时间 */
891
- "parent_id"?: string; /** 上级标准岗位ID */
892
- "kind": PositionTemplateKind; /** 层级 */
882
+ "parent_id"?: string; /** 岗位ID */
893
883
  "name": string; /** 名称 */
894
884
  "memo"?: string; /** 备注 */
895
885
  }
896
886
 
887
+ export interface OwnerWorkstation {
888
+ "_id"?: string; /** 主键 */
889
+ "created_at"?: number; /** 创建时间 */
890
+ "updated_at"?: number; /** 更新时间 */
891
+ "deleted_at"?: null | number; /** 软删除时间 */
892
+ "owner_id": string; /** 自然人主体ID */
893
+ "workstation_id": string; /** 工位ID */
894
+ }
895
+
897
896
  export interface App {
898
897
  "_id"?: string; /** 主键 */
899
898
  "created_at"?: number; /** 创建时间 */
@@ -1007,7 +1006,8 @@ export const TABLES = {
1007
1006
  "project_owner": "ProjectOwner",
1008
1007
  "company_employees": "CompanyEmployee",
1009
1008
  "org_units": "OrgUnit",
1010
- "position_templates": "PositionTemplate",
1009
+ "workstations": "Workstation",
1010
+ "owner_workstations": "OwnerWorkstation",
1011
1011
  "apps": "App",
1012
1012
  "app_configs": "AppConfig",
1013
1013
  "file_metas": "FileMeta",
@@ -1118,12 +1118,18 @@ export const AUTHORIZATION_TABLE_META = {
1118
1118
  "scope_mode": "global",
1119
1119
  "description": "授权后提供全部存活记录"
1120
1120
  },
1121
- "position_templates": {
1122
- "name": "标准岗位工位表",
1121
+ "workstations": {
1122
+ "name": "工位表",
1123
1123
  "category": "组织",
1124
1124
  "scope_mode": "global",
1125
1125
  "description": "授权后提供全部存活记录"
1126
1126
  },
1127
+ "owner_workstations": {
1128
+ "name": "主体工位关系表",
1129
+ "category": "组织",
1130
+ "scope_mode": "derived",
1131
+ "description": "自然人主体获授权且工位表已授权后下发"
1132
+ },
1127
1133
  "brokers": {
1128
1134
  "name": "开户公司表",
1129
1135
  "category": "参考数据",
@@ -3048,7 +3054,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3048
3054
  "blocked_reason": ""
3049
3055
  }
3050
3056
  ],
3051
- "position_templates": [
3057
+ "workstations": [
3052
3058
  {
3053
3059
  "key": "_id",
3054
3060
  "title": "主键",
@@ -3091,7 +3097,7 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3091
3097
  },
3092
3098
  {
3093
3099
  "key": "parent_id",
3094
- "title": "上级标准岗位ID",
3100
+ "title": "岗位ID",
3095
3101
  "kind": "original",
3096
3102
  "type": "<class 'str'>",
3097
3103
  "sensitivity": "public",
@@ -3100,28 +3106,80 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3100
3106
  "blocked_reason": ""
3101
3107
  },
3102
3108
  {
3103
- "key": "kind",
3104
- "title": "层级",
3109
+ "key": "name",
3110
+ "title": "名称",
3105
3111
  "kind": "original",
3106
- "type": "<enum 'PositionTemplateKind'>",
3112
+ "type": "<class 'str'>",
3107
3113
  "sensitivity": "public",
3108
3114
  "selectable": true,
3109
3115
  "system_required": false,
3110
3116
  "blocked_reason": ""
3111
3117
  },
3112
3118
  {
3113
- "key": "name",
3114
- "title": "名称",
3119
+ "key": "memo",
3120
+ "title": "备注",
3115
3121
  "kind": "original",
3116
3122
  "type": "<class 'str'>",
3117
3123
  "sensitivity": "public",
3118
3124
  "selectable": true,
3119
3125
  "system_required": false,
3120
3126
  "blocked_reason": ""
3127
+ }
3128
+ ],
3129
+ "owner_workstations": [
3130
+ {
3131
+ "key": "_id",
3132
+ "title": "主键",
3133
+ "kind": "original",
3134
+ "type": "<class 'str'>",
3135
+ "sensitivity": "public",
3136
+ "selectable": true,
3137
+ "system_required": true,
3138
+ "blocked_reason": ""
3121
3139
  },
3122
3140
  {
3123
- "key": "memo",
3124
- "title": "备注",
3141
+ "key": "created_at",
3142
+ "title": "创建时间",
3143
+ "kind": "original",
3144
+ "type": "<class 'float'>",
3145
+ "sensitivity": "public",
3146
+ "selectable": true,
3147
+ "system_required": false,
3148
+ "blocked_reason": ""
3149
+ },
3150
+ {
3151
+ "key": "updated_at",
3152
+ "title": "更新时间",
3153
+ "kind": "original",
3154
+ "type": "<class 'float'>",
3155
+ "sensitivity": "public",
3156
+ "selectable": true,
3157
+ "system_required": false,
3158
+ "blocked_reason": ""
3159
+ },
3160
+ {
3161
+ "key": "deleted_at",
3162
+ "title": "软删除时间",
3163
+ "kind": "original",
3164
+ "type": "float | None",
3165
+ "sensitivity": "public",
3166
+ "selectable": false,
3167
+ "system_required": false,
3168
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3169
+ },
3170
+ {
3171
+ "key": "owner_id",
3172
+ "title": "自然人主体ID",
3173
+ "kind": "original",
3174
+ "type": "<class 'str'>",
3175
+ "sensitivity": "public",
3176
+ "selectable": true,
3177
+ "system_required": false,
3178
+ "blocked_reason": ""
3179
+ },
3180
+ {
3181
+ "key": "workstation_id",
3182
+ "title": "工位ID",
3125
3183
  "kind": "original",
3126
3184
  "type": "<class 'str'>",
3127
3185
  "sensitivity": "public",
@@ -5253,23 +5311,15 @@ export const FIELD_SPECS = {
5253
5311
  "sensitivity": "public"
5254
5312
  }
5255
5313
  ],
5256
- "position_templates": [
5314
+ "workstations": [
5257
5315
  {
5258
5316
  "key": "parent_id",
5259
- "title": "上级标准岗位ID",
5317
+ "title": "岗位ID",
5260
5318
  "widget": "text",
5261
5319
  "enum": null,
5262
5320
  "required": false,
5263
5321
  "sensitivity": "public"
5264
5322
  },
5265
- {
5266
- "key": "kind",
5267
- "title": "层级",
5268
- "widget": "enum",
5269
- "enum": "PositionTemplateKind",
5270
- "required": true,
5271
- "sensitivity": "public"
5272
- },
5273
5323
  {
5274
5324
  "key": "name",
5275
5325
  "title": "名称",
@@ -5287,6 +5337,24 @@ export const FIELD_SPECS = {
5287
5337
  "sensitivity": "public"
5288
5338
  }
5289
5339
  ],
5340
+ "owner_workstations": [
5341
+ {
5342
+ "key": "owner_id",
5343
+ "title": "自然人主体ID",
5344
+ "widget": "text",
5345
+ "enum": null,
5346
+ "required": true,
5347
+ "sensitivity": "public"
5348
+ },
5349
+ {
5350
+ "key": "workstation_id",
5351
+ "title": "工位ID",
5352
+ "widget": "text",
5353
+ "enum": null,
5354
+ "required": true,
5355
+ "sensitivity": "public"
5356
+ }
5357
+ ],
5290
5358
  "apps": [
5291
5359
  {
5292
5360
  "key": "name",