@ysgroup/contracts 0.1.36 → 0.1.37

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 +168 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/contracts",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
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
@@ -872,6 +884,18 @@ export interface OrgUnit {
872
884
  "memo"?: string; /** 备注 */
873
885
  }
874
886
 
887
+ export interface PositionTemplate {
888
+ "_id"?: string; /** 主键 */
889
+ "created_at"?: number; /** 创建时间 */
890
+ "updated_at"?: number; /** 更新时间 */
891
+ "deleted_at"?: null | number; /** 软删除时间 */
892
+ "parent_id"?: string; /** 上级标准岗位ID */
893
+ "kind": PositionTemplateKind; /** 层级 */
894
+ "name": string; /** 名称 */
895
+ "sort"?: number; /** 排序 */
896
+ "memo"?: string; /** 备注 */
897
+ }
898
+
875
899
  export interface App {
876
900
  "_id"?: string; /** 主键 */
877
901
  "created_at"?: number; /** 创建时间 */
@@ -985,6 +1009,7 @@ export const TABLES = {
985
1009
  "project_owner": "ProjectOwner",
986
1010
  "company_employees": "CompanyEmployee",
987
1011
  "org_units": "OrgUnit",
1012
+ "position_templates": "PositionTemplate",
988
1013
  "apps": "App",
989
1014
  "app_configs": "AppConfig",
990
1015
  "file_metas": "FileMeta",
@@ -1095,6 +1120,12 @@ export const AUTHORIZATION_TABLE_META = {
1095
1120
  "scope_mode": "global",
1096
1121
  "description": "授权后提供全部存活记录"
1097
1122
  },
1123
+ "position_templates": {
1124
+ "name": "标准岗位工位表",
1125
+ "category": "组织",
1126
+ "scope_mode": "global",
1127
+ "description": "授权后提供全部存活记录"
1128
+ },
1098
1129
  "brokers": {
1099
1130
  "name": "开户公司表",
1100
1131
  "category": "参考数据",
@@ -3029,6 +3060,98 @@ export const AUTHORIZATION_FIELD_CATALOG = {
3029
3060
  "blocked_reason": ""
3030
3061
  }
3031
3062
  ],
3063
+ "position_templates": [
3064
+ {
3065
+ "key": "_id",
3066
+ "title": "主键",
3067
+ "kind": "original",
3068
+ "type": "<class 'str'>",
3069
+ "sensitivity": "public",
3070
+ "selectable": true,
3071
+ "system_required": true,
3072
+ "blocked_reason": ""
3073
+ },
3074
+ {
3075
+ "key": "created_at",
3076
+ "title": "创建时间",
3077
+ "kind": "original",
3078
+ "type": "<class 'float'>",
3079
+ "sensitivity": "public",
3080
+ "selectable": true,
3081
+ "system_required": false,
3082
+ "blocked_reason": ""
3083
+ },
3084
+ {
3085
+ "key": "updated_at",
3086
+ "title": "更新时间",
3087
+ "kind": "original",
3088
+ "type": "<class 'float'>",
3089
+ "sensitivity": "public",
3090
+ "selectable": true,
3091
+ "system_required": false,
3092
+ "blocked_reason": ""
3093
+ },
3094
+ {
3095
+ "key": "deleted_at",
3096
+ "title": "软删除时间",
3097
+ "kind": "original",
3098
+ "type": "float | None",
3099
+ "sensitivity": "public",
3100
+ "selectable": false,
3101
+ "system_required": false,
3102
+ "blocked_reason": "系统安全字段,禁止进入同步流"
3103
+ },
3104
+ {
3105
+ "key": "parent_id",
3106
+ "title": "上级标准岗位ID",
3107
+ "kind": "original",
3108
+ "type": "<class 'str'>",
3109
+ "sensitivity": "public",
3110
+ "selectable": true,
3111
+ "system_required": false,
3112
+ "blocked_reason": ""
3113
+ },
3114
+ {
3115
+ "key": "kind",
3116
+ "title": "层级",
3117
+ "kind": "original",
3118
+ "type": "<enum 'PositionTemplateKind'>",
3119
+ "sensitivity": "public",
3120
+ "selectable": true,
3121
+ "system_required": false,
3122
+ "blocked_reason": ""
3123
+ },
3124
+ {
3125
+ "key": "name",
3126
+ "title": "名称",
3127
+ "kind": "original",
3128
+ "type": "<class 'str'>",
3129
+ "sensitivity": "public",
3130
+ "selectable": true,
3131
+ "system_required": false,
3132
+ "blocked_reason": ""
3133
+ },
3134
+ {
3135
+ "key": "sort",
3136
+ "title": "排序",
3137
+ "kind": "original",
3138
+ "type": "<class 'int'>",
3139
+ "sensitivity": "public",
3140
+ "selectable": true,
3141
+ "system_required": false,
3142
+ "blocked_reason": ""
3143
+ },
3144
+ {
3145
+ "key": "memo",
3146
+ "title": "备注",
3147
+ "kind": "original",
3148
+ "type": "<class 'str'>",
3149
+ "sensitivity": "public",
3150
+ "selectable": true,
3151
+ "system_required": false,
3152
+ "blocked_reason": ""
3153
+ }
3154
+ ],
3032
3155
  "brokers": [
3033
3156
  {
3034
3157
  "key": "_id",
@@ -5160,6 +5283,48 @@ export const FIELD_SPECS = {
5160
5283
  "sensitivity": "public"
5161
5284
  }
5162
5285
  ],
5286
+ "position_templates": [
5287
+ {
5288
+ "key": "parent_id",
5289
+ "title": "上级标准岗位ID",
5290
+ "widget": "text",
5291
+ "enum": null,
5292
+ "required": false,
5293
+ "sensitivity": "public"
5294
+ },
5295
+ {
5296
+ "key": "kind",
5297
+ "title": "层级",
5298
+ "widget": "enum",
5299
+ "enum": "PositionTemplateKind",
5300
+ "required": true,
5301
+ "sensitivity": "public"
5302
+ },
5303
+ {
5304
+ "key": "name",
5305
+ "title": "名称",
5306
+ "widget": "text",
5307
+ "enum": null,
5308
+ "required": true,
5309
+ "sensitivity": "public"
5310
+ },
5311
+ {
5312
+ "key": "sort",
5313
+ "title": "排序",
5314
+ "widget": "number",
5315
+ "enum": null,
5316
+ "required": false,
5317
+ "sensitivity": "public"
5318
+ },
5319
+ {
5320
+ "key": "memo",
5321
+ "title": "备注",
5322
+ "widget": "text",
5323
+ "enum": null,
5324
+ "required": false,
5325
+ "sensitivity": "public"
5326
+ }
5327
+ ],
5163
5328
  "apps": [
5164
5329
  {
5165
5330
  "key": "name",