@ysgroup/contracts 0.1.36 → 0.1.38

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 +137 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -4,15 +4,16 @@
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" | "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" | "position_templates" | "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" | "Workstation";
14
+ export type OrgUnitKind = "Department" | "Position";
15
15
  export type OwnerType = "Product" | "LegalPerson" | "NaturalPerson";
16
+ export type PositionTemplateKind = "Position" | "Workstation";
16
17
  export type RecordScopeMode = "user_app" | "global" | "explicit" | "derived" | "app_owned";
17
18
  export type Sensitivity = "public" | "restricted" | "credential";
18
19
  export type ServerType = "td" | "md";
@@ -85,11 +86,18 @@ export const ENUM_META = {
85
86
  "name": "岗位",
86
87
  "parent_kind": "Department",
87
88
  "sort": 1
89
+ }
90
+ },
91
+ "PositionTemplateKind": {
92
+ "Position": {
93
+ "name": "标准岗位",
94
+ "parent_kind": "",
95
+ "sort": 0
88
96
  },
89
97
  "Workstation": {
90
98
  "name": "工位",
91
99
  "parent_kind": "Position",
92
- "sort": 2
100
+ "sort": 1
93
101
  }
94
102
  },
95
103
  "ExchangeType": {
@@ -417,6 +425,10 @@ export const ENUM_META = {
417
425
  "label": "组织单元表",
418
426
  "sort": 155
419
427
  },
428
+ "position_templates": {
429
+ "label": "标准岗位工位表",
430
+ "sort": 156
431
+ },
420
432
  "brokers": {
421
433
  "label": "开户公司表",
422
434
  "sort": 160
@@ -868,7 +880,17 @@ export interface OrgUnit {
868
880
  "parent_id"?: string; /** 上级单元ID */
869
881
  "kind": OrgUnitKind; /** 层级 */
870
882
  "name": string; /** 名称 */
871
- "sort"?: number; /** 排序 */
883
+ "memo"?: string; /** 备注 */
884
+ }
885
+
886
+ export interface PositionTemplate {
887
+ "_id"?: string; /** 主键 */
888
+ "created_at"?: number; /** 创建时间 */
889
+ "updated_at"?: number; /** 更新时间 */
890
+ "deleted_at"?: null | number; /** 软删除时间 */
891
+ "parent_id"?: string; /** 上级标准岗位ID */
892
+ "kind": PositionTemplateKind; /** 层级 */
893
+ "name": string; /** 名称 */
872
894
  "memo"?: string; /** 备注 */
873
895
  }
874
896
 
@@ -985,6 +1007,7 @@ export const TABLES = {
985
1007
  "project_owner": "ProjectOwner",
986
1008
  "company_employees": "CompanyEmployee",
987
1009
  "org_units": "OrgUnit",
1010
+ "position_templates": "PositionTemplate",
988
1011
  "apps": "App",
989
1012
  "app_configs": "AppConfig",
990
1013
  "file_metas": "FileMeta",
@@ -1095,6 +1118,12 @@ export const AUTHORIZATION_TABLE_META = {
1095
1118
  "scope_mode": "global",
1096
1119
  "description": "授权后提供全部存活记录"
1097
1120
  },
1121
+ "position_templates": {
1122
+ "name": "标准岗位工位表",
1123
+ "category": "组织",
1124
+ "scope_mode": "global",
1125
+ "description": "授权后提供全部存活记录"
1126
+ },
1098
1127
  "brokers": {
1099
1128
  "name": "开户公司表",
1100
1129
  "category": "参考数据",
@@ -3009,10 +3038,82 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3009
3038
  "blocked_reason": ""
3010
3039
  },
3011
3040
  {
3012
- "key": "sort",
3013
- "title": "排序",
3041
+ "key": "memo",
3042
+ "title": "备注",
3014
3043
  "kind": "original",
3015
- "type": "<class 'int'>",
3044
+ "type": "<class 'str'>",
3045
+ "sensitivity": "public",
3046
+ "selectable": true,
3047
+ "system_required": false,
3048
+ "blocked_reason": ""
3049
+ }
3050
+ ],
3051
+ "position_templates": [
3052
+ {
3053
+ "key": "_id",
3054
+ "title": "主键",
3055
+ "kind": "original",
3056
+ "type": "<class 'str'>",
3057
+ "sensitivity": "public",
3058
+ "selectable": true,
3059
+ "system_required": true,
3060
+ "blocked_reason": ""
3061
+ },
3062
+ {
3063
+ "key": "created_at",
3064
+ "title": "创建时间",
3065
+ "kind": "original",
3066
+ "type": "<class 'float'>",
3067
+ "sensitivity": "public",
3068
+ "selectable": true,
3069
+ "system_required": false,
3070
+ "blocked_reason": ""
3071
+ },
3072
+ {
3073
+ "key": "updated_at",
3074
+ "title": "更新时间",
3075
+ "kind": "original",
3076
+ "type": "<class 'float'>",
3077
+ "sensitivity": "public",
3078
+ "selectable": true,
3079
+ "system_required": false,
3080
+ "blocked_reason": ""
3081
+ },
3082
+ {
3083
+ "key": "deleted_at",
3084
+ "title": "软删除时间",
3085
+ "kind": "original",
3086
+ "type": "float | None",
3087
+ "sensitivity": "public",
3088
+ "selectable": false,
3089
+ "system_required": false,
3090
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3091
+ },
3092
+ {
3093
+ "key": "parent_id",
3094
+ "title": "上级标准岗位ID",
3095
+ "kind": "original",
3096
+ "type": "<class 'str'>",
3097
+ "sensitivity": "public",
3098
+ "selectable": true,
3099
+ "system_required": false,
3100
+ "blocked_reason": ""
3101
+ },
3102
+ {
3103
+ "key": "kind",
3104
+ "title": "层级",
3105
+ "kind": "original",
3106
+ "type": "<enum 'PositionTemplateKind'>",
3107
+ "sensitivity": "public",
3108
+ "selectable": true,
3109
+ "system_required": false,
3110
+ "blocked_reason": ""
3111
+ },
3112
+ {
3113
+ "key": "name",
3114
+ "title": "名称",
3115
+ "kind": "original",
3116
+ "type": "<class 'str'>",
3016
3117
  "sensitivity": "public",
3017
3118
  "selectable": true,
3018
3119
  "system_required": false,
@@ -5144,13 +5245,39 @@ export const FIELD_SPECS = {
5144
5245
  "sensitivity": "public"
5145
5246
  },
5146
5247
  {
5147
- "key": "sort",
5148
- "title": "排序",
5149
- "widget": "number",
5248
+ "key": "memo",
5249
+ "title": "备注",
5250
+ "widget": "text",
5251
+ "enum": null,
5252
+ "required": false,
5253
+ "sensitivity": "public"
5254
+ }
5255
+ ],
5256
+ "position_templates": [
5257
+ {
5258
+ "key": "parent_id",
5259
+ "title": "上级标准岗位ID",
5260
+ "widget": "text",
5150
5261
  "enum": null,
5151
5262
  "required": false,
5152
5263
  "sensitivity": "public"
5153
5264
  },
5265
+ {
5266
+ "key": "kind",
5267
+ "title": "层级",
5268
+ "widget": "enum",
5269
+ "enum": "PositionTemplateKind",
5270
+ "required": true,
5271
+ "sensitivity": "public"
5272
+ },
5273
+ {
5274
+ "key": "name",
5275
+ "title": "名称",
5276
+ "widget": "text",
5277
+ "enum": null,
5278
+ "required": true,
5279
+ "sensitivity": "public"
5280
+ },
5154
5281
  {
5155
5282
  "key": "memo",
5156
5283
  "title": "备注",