@fivenet-app/gen 2025.9.1 → 2026.4.0

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 (134) hide show
  1. package/README.md +1 -1
  2. package/clients.ts +36 -0
  3. package/codegen/perms/perms.ts +186 -15
  4. package/codegen/sanitizer/sanitizer.ts +34 -1
  5. package/package.json +2 -2
  6. package/perms.ts +140 -8
  7. package/resources/accounts/accounts.ts +98 -31
  8. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
  9. package/resources/audit/audit.ts +156 -38
  10. package/resources/calendar/{access.ts → access/access.ts} +30 -30
  11. package/resources/calendar/calendar.ts +17 -477
  12. package/resources/calendar/entries/entries.ts +474 -0
  13. package/resources/centrum/{access.ts → access/access.ts} +22 -22
  14. package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
  15. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
  16. package/resources/centrum/joblist.ts +136 -0
  17. package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
  18. package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
  19. package/resources/centrum/{units.ts → units/units.ts} +131 -51
  20. package/resources/citizens/labels/labels.ts +526 -0
  21. package/resources/{users → citizens/licenses}/licenses.ts +17 -17
  22. package/resources/clientconfig/clientconfig.ts +126 -258
  23. package/resources/collab/collab.ts +4 -16
  24. package/resources/common/content/content.ts +108 -85
  25. package/resources/common/content/diff_activity.ts +267 -0
  26. package/resources/common/i18n.ts +2 -2
  27. package/resources/{common/cron → cron}/cron.ts +43 -43
  28. package/resources/documents/{access.ts → access/access.ts} +29 -52
  29. package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
  30. package/resources/documents/approval/approval.ts +945 -0
  31. package/resources/documents/{category.ts → category/category.ts} +7 -7
  32. package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
  33. package/resources/documents/data/data.ts +303 -0
  34. package/resources/documents/documents.ts +282 -667
  35. package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
  36. package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
  37. package/resources/documents/references/references.ts +187 -0
  38. package/resources/documents/relations/relations.ts +184 -0
  39. package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
  40. package/resources/documents/stamps/stamp.ts +355 -0
  41. package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
  42. package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
  43. package/resources/file/filestore.ts +1 -1
  44. package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
  45. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
  46. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
  47. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
  48. package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
  49. package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
  50. package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
  51. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
  52. package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
  53. package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
  54. package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
  55. package/resources/mailer/{access.ts → access/access.ts} +67 -67
  56. package/resources/mailer/{email.ts → emails/email.ts} +19 -19
  57. package/resources/mailer/{events.ts → events/events.ts} +24 -24
  58. package/resources/mailer/{message.ts → messages/message.ts} +29 -29
  59. package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
  60. package/resources/mailer/{template.ts → templates/template.ts} +15 -15
  61. package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
  62. package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
  63. package/resources/notifications/{events.ts → events/events.ts} +20 -20
  64. package/resources/notifications/notifications.ts +4 -4
  65. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
  66. package/resources/permissions/{events.ts → events/events.ts} +7 -7
  67. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
  68. package/resources/qualifications/{access.ts → access/access.ts} +19 -19
  69. package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
  70. package/resources/qualifications/qualifications.ts +51 -179
  71. package/resources/settings/banner.ts +3 -3
  72. package/resources/settings/config.ts +527 -25
  73. package/resources/{documents/state.ts → settings/data.ts} +41 -20
  74. package/resources/settings/perms.ts +14 -14
  75. package/resources/stats/stats.ts +379 -0
  76. package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
  77. package/resources/sync/{data.ts → data/data.ts} +405 -59
  78. package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
  79. package/resources/users/{activity.ts → activity/activity.ts} +242 -101
  80. package/resources/users/{props.ts → props/props.ts} +91 -69
  81. package/resources/users/short/user.ts +184 -0
  82. package/resources/users/{users.ts → user.ts} +266 -195
  83. package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
  84. package/resources/vehicles/{props.ts → props/props.ts} +28 -6
  85. package/resources/vehicles/vehicles.ts +20 -8
  86. package/resources/wiki/{access.ts → access/access.ts} +30 -30
  87. package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
  88. package/resources/wiki/page.ts +39 -15
  89. package/services/auth/auth.client.ts +23 -10
  90. package/services/auth/auth.ts +445 -262
  91. package/services/calendar/calendar.ts +56 -34
  92. package/services/centrum/centrum.ts +127 -127
  93. package/services/citizens/citizens.client.ts +0 -13
  94. package/services/citizens/citizens.ts +44 -134
  95. package/services/citizens/labels.client.ts +77 -0
  96. package/services/citizens/labels.ts +455 -0
  97. package/services/completor/completor.ts +36 -16
  98. package/services/documents/approval.client.ts +188 -0
  99. package/services/documents/approval.ts +1776 -0
  100. package/services/documents/documents.ts +164 -186
  101. package/services/documents/forms.client.ts +51 -0
  102. package/services/documents/forms.ts +232 -0
  103. package/services/documents/stamps.client.ts +77 -0
  104. package/services/documents/stamps.ts +481 -0
  105. package/services/documents/stats.client.ts +38 -0
  106. package/services/documents/stats.ts +245 -0
  107. package/services/jobs/conduct.client.ts +30 -3
  108. package/services/jobs/conduct.ts +159 -33
  109. package/services/jobs/jobs.ts +43 -43
  110. package/services/jobs/stats.client.ts +38 -0
  111. package/services/jobs/stats.ts +207 -0
  112. package/services/jobs/timeclock.ts +39 -39
  113. package/services/livemap/livemap.ts +18 -18
  114. package/services/mailer/mailer.ts +78 -78
  115. package/services/notifications/notifications.ts +35 -35
  116. package/services/qualifications/qualifications.ts +81 -46
  117. package/services/settings/accounts.client.ts +23 -10
  118. package/services/settings/accounts.ts +191 -30
  119. package/services/settings/cron.client.ts +13 -0
  120. package/services/settings/cron.ts +118 -5
  121. package/services/settings/laws.ts +1 -1
  122. package/services/settings/settings.ts +73 -52
  123. package/services/settings/system.client.ts +13 -0
  124. package/services/settings/system.ts +115 -15
  125. package/services/stats/stats.client.ts +7 -7
  126. package/services/stats/stats.ts +24 -24
  127. package/services/sync/sync.client.ts +271 -37
  128. package/services/sync/sync.ts +1525 -421
  129. package/services/vehicles/vehicles.ts +8 -8
  130. package/services/wiki/wiki.ts +8 -8
  131. package/svcs.ts +100 -6
  132. package/resources/centrum/attributes.ts +0 -183
  133. package/resources/documents/signoff.ts +0 -55
  134. package/resources/users/labels.ts +0 -160
@@ -1,5 +1,5 @@
1
1
  // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
- // @generated from protobuf file "resources/users/users.proto" (package "resources.users", syntax proto3)
2
+ // @generated from protobuf file "resources/users/user.proto" (package "resources.users", syntax proto3)
3
3
  // tslint:disable
4
4
  // @ts-nocheck
5
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -11,20 +11,21 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
- import { License } from "./licenses";
15
- import { UserProps } from "./props";
14
+ import { Timestamp } from "../timestamp/timestamp";
15
+ import { License } from "../citizens/licenses/licenses";
16
+ import { UserProps } from "./props/props";
16
17
  /**
17
- * @generated from protobuf message resources.users.UserShort
18
+ * @generated from protobuf message resources.users.User
18
19
  */
19
- export interface UserShort {
20
+ export interface User {
20
21
  /**
21
22
  * @generated from protobuf field: int32 user_id = 1
22
23
  */
23
24
  userId: number;
24
25
  /**
25
- * @generated from protobuf field: optional string identifier = 2
26
+ * @generated from protobuf field: string identifier = 2
26
27
  */
27
- identifier?: string;
28
+ identifier: string;
28
29
  /**
29
30
  * @generated from protobuf field: string job = 3
30
31
  */
@@ -41,6 +42,10 @@ export interface UserShort {
41
42
  * @generated from protobuf field: optional string job_grade_label = 6
42
43
  */
43
44
  jobGradeLabel?: string;
45
+ /**
46
+ * @generated from protobuf field: repeated resources.users.UserJob jobs = 20
47
+ */
48
+ jobs: UserJob[];
44
49
  /**
45
50
  * @generated from protobuf field: string firstname = 7
46
51
  */
@@ -54,130 +59,151 @@ export interface UserShort {
54
59
  */
55
60
  dateofbirth: string;
56
61
  /**
57
- * @generated from protobuf field: optional string phone_number = 12
62
+ * @generated from protobuf field: optional string sex = 10
58
63
  */
59
- phoneNumber?: string;
64
+ sex?: string;
60
65
  /**
61
- * @generated from protobuf field: optional int64 profile_picture_file_id = 17
66
+ * @generated from protobuf field: optional float height = 11
62
67
  */
63
- profilePictureFileId?: number;
68
+ height?: number;
64
69
  /**
65
- * @generated from protobuf field: optional string profile_picture = 18
70
+ * @generated from protobuf field: optional string phone_number = 12
66
71
  */
67
- profilePicture?: string;
68
- }
69
- /**
70
- * @generated from protobuf message resources.users.User
71
- */
72
- export interface User {
72
+ phoneNumber?: string;
73
73
  /**
74
- * @generated from protobuf field: int32 user_id = 1
74
+ * @generated from protobuf field: repeated resources.users.PhoneNumber phone_numbers = 19
75
75
  */
76
- userId: number;
76
+ phoneNumbers: PhoneNumber[];
77
77
  /**
78
- * @generated from protobuf field: optional string identifier = 2
78
+ * @generated from protobuf field: optional int32 visum = 13
79
79
  */
80
- identifier?: string;
80
+ visum?: number;
81
81
  /**
82
- * @generated from protobuf field: string job = 3
82
+ * @generated from protobuf field: optional int32 playtime = 14
83
83
  */
84
- job: string;
84
+ playtime?: number;
85
85
  /**
86
- * @generated from protobuf field: optional string job_label = 4
86
+ * @generated from protobuf field: resources.users.props.UserProps props = 15
87
87
  */
88
- jobLabel?: string;
88
+ props?: UserProps;
89
89
  /**
90
- * @generated from protobuf field: int32 job_grade = 5
90
+ * @generated from protobuf field: repeated resources.citizens.licenses.License licenses = 16
91
91
  */
92
- jobGrade: number;
92
+ licenses: License[];
93
93
  /**
94
- * @generated from protobuf field: optional string job_grade_label = 6
94
+ * @generated from protobuf field: optional int64 profile_picture_file_id = 17
95
95
  */
96
- jobGradeLabel?: string;
96
+ profilePictureFileId?: number;
97
97
  /**
98
- * @generated from protobuf field: string firstname = 7
98
+ * @generated from protobuf field: optional string profile_picture = 18
99
99
  */
100
- firstname: string;
100
+ profilePicture?: string;
101
+ }
102
+ /**
103
+ * @generated from protobuf message resources.users.PhoneNumber
104
+ */
105
+ export interface PhoneNumber {
101
106
  /**
102
- * @generated from protobuf field: string lastname = 8
107
+ * @generated from protobuf field: int32 user_id = 1
103
108
  */
104
- lastname: string;
109
+ userId: number;
105
110
  /**
106
- * @generated from protobuf field: string dateofbirth = 9
111
+ * @generated from protobuf field: string number = 2
107
112
  */
108
- dateofbirth: string;
113
+ number: string;
109
114
  /**
110
- * @generated from protobuf field: optional string sex = 10
115
+ * @generated from protobuf field: bool is_primary = 3
111
116
  */
112
- sex?: string;
117
+ isPrimary: boolean;
113
118
  /**
114
- * @generated from protobuf field: optional string height = 11
119
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 4
115
120
  */
116
- height?: string;
121
+ createdAt?: Timestamp;
117
122
  /**
118
- * @generated from protobuf field: optional string phone_number = 12
123
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 5
119
124
  */
120
- phoneNumber?: string;
125
+ updatedAt?: Timestamp;
126
+ }
127
+ /**
128
+ * @generated from protobuf message resources.users.UserJob
129
+ */
130
+ export interface UserJob {
121
131
  /**
122
- * @generated from protobuf field: optional int32 visum = 13
132
+ * @generated from protobuf field: int32 user_id = 1
123
133
  */
124
- visum?: number;
134
+ userId: number;
125
135
  /**
126
- * @generated from protobuf field: optional int32 playtime = 14
136
+ * @generated from protobuf field: string job = 2
127
137
  */
128
- playtime?: number;
138
+ job: string;
129
139
  /**
130
- * @generated from protobuf field: resources.users.UserProps props = 15
140
+ * @generated from protobuf field: optional string job_label = 3
131
141
  */
132
- props?: UserProps;
142
+ jobLabel?: string;
133
143
  /**
134
- * @generated from protobuf field: repeated resources.users.License licenses = 16
144
+ * @generated from protobuf field: int32 grade = 4
135
145
  */
136
- licenses: License[];
146
+ grade: number;
137
147
  /**
138
- * @generated from protobuf field: optional int64 profile_picture_file_id = 17
148
+ * @generated from protobuf field: optional string grade_label = 5
139
149
  */
140
- profilePictureFileId?: number;
150
+ gradeLabel?: string;
141
151
  /**
142
- * @generated from protobuf field: optional string profile_picture = 18
152
+ * @generated from protobuf field: bool is_primary = 6
143
153
  */
144
- profilePicture?: string;
154
+ isPrimary: boolean;
145
155
  /**
146
- * @generated from protobuf field: optional string group = 20
156
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 7
147
157
  */
148
- group?: string;
158
+ createdAt?: Timestamp;
159
+ /**
160
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 8
161
+ */
162
+ updatedAt?: Timestamp;
149
163
  }
150
164
  // @generated message type with reflection information, may provide speed optimized methods
151
- class UserShort$Type extends MessageType<UserShort> {
165
+ class User$Type extends MessageType<User> {
152
166
  constructor() {
153
- super("resources.users.UserShort", [
167
+ super("resources.users.User", [
154
168
  { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
155
- { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
169
+ { no: 2, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
156
170
  { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
157
171
  { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
158
172
  { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
159
173
  { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
174
+ { no: 20, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserJob, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", repeated: { maxItems: "3" } } } },
160
175
  { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
161
176
  { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
162
177
  { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
178
+ { no: 10, name: "sex", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "2" } } } },
179
+ { no: 11, name: "height", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ },
163
180
  { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
181
+ { no: 19, name: "phone_numbers", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PhoneNumber, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", repeated: { maxItems: "5" } } } },
182
+ { no: 13, name: "visum", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
183
+ { no: 14, name: "playtime", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
184
+ { no: 15, name: "props", kind: "message", T: () => UserProps, options: { "tagger.tags": "alias:\"fivenet_user_props\"" } },
185
+ { no: 16, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "tagger.tags": "alias:\"user_licenses\"" } },
164
186
  { no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
165
187
  { no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
166
188
  ]);
167
189
  }
168
- create(value?: PartialMessage<UserShort>): UserShort {
190
+ create(value?: PartialMessage<User>): User {
169
191
  const message = globalThis.Object.create((this.messagePrototype!));
170
192
  message.userId = 0;
193
+ message.identifier = "";
171
194
  message.job = "";
172
195
  message.jobGrade = 0;
196
+ message.jobs = [];
173
197
  message.firstname = "";
174
198
  message.lastname = "";
175
199
  message.dateofbirth = "";
200
+ message.phoneNumbers = [];
201
+ message.licenses = [];
176
202
  if (value !== undefined)
177
- reflectionMergePartial<UserShort>(this, message, value);
203
+ reflectionMergePartial<User>(this, message, value);
178
204
  return message;
179
205
  }
180
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserShort): UserShort {
206
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
181
207
  let message = target ?? this.create(), end = reader.pos + length;
182
208
  while (reader.pos < end) {
183
209
  let [fieldNo, wireType] = reader.tag();
@@ -185,7 +211,7 @@ class UserShort$Type extends MessageType<UserShort> {
185
211
  case /* int32 user_id */ 1:
186
212
  message.userId = reader.int32();
187
213
  break;
188
- case /* optional string identifier */ 2:
214
+ case /* string identifier */ 2:
189
215
  message.identifier = reader.string();
190
216
  break;
191
217
  case /* string job */ 3:
@@ -200,6 +226,9 @@ class UserShort$Type extends MessageType<UserShort> {
200
226
  case /* optional string job_grade_label */ 6:
201
227
  message.jobGradeLabel = reader.string();
202
228
  break;
229
+ case /* repeated resources.users.UserJob jobs */ 20:
230
+ message.jobs.push(UserJob.internalBinaryRead(reader, reader.uint32(), options));
231
+ break;
203
232
  case /* string firstname */ 7:
204
233
  message.firstname = reader.string();
205
234
  break;
@@ -209,9 +238,30 @@ class UserShort$Type extends MessageType<UserShort> {
209
238
  case /* string dateofbirth */ 9:
210
239
  message.dateofbirth = reader.string();
211
240
  break;
241
+ case /* optional string sex */ 10:
242
+ message.sex = reader.string();
243
+ break;
244
+ case /* optional float height */ 11:
245
+ message.height = reader.float();
246
+ break;
212
247
  case /* optional string phone_number */ 12:
213
248
  message.phoneNumber = reader.string();
214
249
  break;
250
+ case /* repeated resources.users.PhoneNumber phone_numbers */ 19:
251
+ message.phoneNumbers.push(PhoneNumber.internalBinaryRead(reader, reader.uint32(), options));
252
+ break;
253
+ case /* optional int32 visum */ 13:
254
+ message.visum = reader.int32();
255
+ break;
256
+ case /* optional int32 playtime */ 14:
257
+ message.playtime = reader.int32();
258
+ break;
259
+ case /* resources.users.props.UserProps props */ 15:
260
+ message.props = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.props);
261
+ break;
262
+ case /* repeated resources.citizens.licenses.License licenses */ 16:
263
+ message.licenses.push(License.internalBinaryRead(reader, reader.uint32(), options));
264
+ break;
215
265
  case /* optional int64 profile_picture_file_id */ 17:
216
266
  message.profilePictureFileId = reader.int64().toNumber();
217
267
  break;
@@ -229,12 +279,12 @@ class UserShort$Type extends MessageType<UserShort> {
229
279
  }
230
280
  return message;
231
281
  }
232
- internalBinaryWrite(message: UserShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
282
+ internalBinaryWrite(message: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
233
283
  /* int32 user_id = 1; */
234
284
  if (message.userId !== 0)
235
285
  writer.tag(1, WireType.Varint).int32(message.userId);
236
- /* optional string identifier = 2; */
237
- if (message.identifier !== undefined)
286
+ /* string identifier = 2; */
287
+ if (message.identifier !== "")
238
288
  writer.tag(2, WireType.LengthDelimited).string(message.identifier);
239
289
  /* string job = 3; */
240
290
  if (message.job !== "")
@@ -257,15 +307,39 @@ class UserShort$Type extends MessageType<UserShort> {
257
307
  /* string dateofbirth = 9; */
258
308
  if (message.dateofbirth !== "")
259
309
  writer.tag(9, WireType.LengthDelimited).string(message.dateofbirth);
310
+ /* optional string sex = 10; */
311
+ if (message.sex !== undefined)
312
+ writer.tag(10, WireType.LengthDelimited).string(message.sex);
313
+ /* optional float height = 11; */
314
+ if (message.height !== undefined)
315
+ writer.tag(11, WireType.Bit32).float(message.height);
260
316
  /* optional string phone_number = 12; */
261
317
  if (message.phoneNumber !== undefined)
262
318
  writer.tag(12, WireType.LengthDelimited).string(message.phoneNumber);
319
+ /* optional int32 visum = 13; */
320
+ if (message.visum !== undefined)
321
+ writer.tag(13, WireType.Varint).int32(message.visum);
322
+ /* optional int32 playtime = 14; */
323
+ if (message.playtime !== undefined)
324
+ writer.tag(14, WireType.Varint).int32(message.playtime);
325
+ /* resources.users.props.UserProps props = 15; */
326
+ if (message.props)
327
+ UserProps.internalBinaryWrite(message.props, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
328
+ /* repeated resources.citizens.licenses.License licenses = 16; */
329
+ for (let i = 0; i < message.licenses.length; i++)
330
+ License.internalBinaryWrite(message.licenses[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
263
331
  /* optional int64 profile_picture_file_id = 17; */
264
332
  if (message.profilePictureFileId !== undefined)
265
333
  writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
266
334
  /* optional string profile_picture = 18; */
267
335
  if (message.profilePicture !== undefined)
268
336
  writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
337
+ /* repeated resources.users.PhoneNumber phone_numbers = 19; */
338
+ for (let i = 0; i < message.phoneNumbers.length; i++)
339
+ PhoneNumber.internalBinaryWrite(message.phoneNumbers[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join();
340
+ /* repeated resources.users.UserJob jobs = 20; */
341
+ for (let i = 0; i < message.jobs.length; i++)
342
+ UserJob.internalBinaryWrite(message.jobs[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join();
269
343
  let u = options.writeUnknownFields;
270
344
  if (u !== false)
271
345
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -273,48 +347,30 @@ class UserShort$Type extends MessageType<UserShort> {
273
347
  }
274
348
  }
275
349
  /**
276
- * @generated MessageType for protobuf message resources.users.UserShort
350
+ * @generated MessageType for protobuf message resources.users.User
277
351
  */
278
- export const UserShort = new UserShort$Type();
352
+ export const User = new User$Type();
279
353
  // @generated message type with reflection information, may provide speed optimized methods
280
- class User$Type extends MessageType<User> {
354
+ class PhoneNumber$Type extends MessageType<PhoneNumber> {
281
355
  constructor() {
282
- super("resources.users.User", [
283
- { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
284
- { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
285
- { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
286
- { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
287
- { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
288
- { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
289
- { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
290
- { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
291
- { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
292
- { no: 10, name: "sex", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "2" } } } },
293
- { no: 11, name: "height", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
294
- { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
295
- { no: 13, name: "visum", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
296
- { no: 14, name: "playtime", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
297
- { no: 15, name: "props", kind: "message", T: () => UserProps, options: { "tagger.tags": "alias:\"fivenet_user_props\"" } },
298
- { no: 16, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "tagger.tags": "alias:\"user_licenses\"" } },
299
- { no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
300
- { no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
301
- { no: 20, name: "group", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } }
356
+ super("resources.users.PhoneNumber", [
357
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
358
+ { no: 2, name: "number", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "tagger.tags": "alias:\"phone_number\"" } },
359
+ { no: 3, name: "is_primary", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
360
+ { no: 4, name: "created_at", kind: "message", T: () => Timestamp },
361
+ { no: 5, name: "updated_at", kind: "message", T: () => Timestamp }
302
362
  ]);
303
363
  }
304
- create(value?: PartialMessage<User>): User {
364
+ create(value?: PartialMessage<PhoneNumber>): PhoneNumber {
305
365
  const message = globalThis.Object.create((this.messagePrototype!));
306
366
  message.userId = 0;
307
- message.job = "";
308
- message.jobGrade = 0;
309
- message.firstname = "";
310
- message.lastname = "";
311
- message.dateofbirth = "";
312
- message.licenses = [];
367
+ message.number = "";
368
+ message.isPrimary = false;
313
369
  if (value !== undefined)
314
- reflectionMergePartial<User>(this, message, value);
370
+ reflectionMergePartial<PhoneNumber>(this, message, value);
315
371
  return message;
316
372
  }
317
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
373
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PhoneNumber): PhoneNumber {
318
374
  let message = target ?? this.create(), end = reader.pos + length;
319
375
  while (reader.pos < end) {
320
376
  let [fieldNo, wireType] = reader.tag();
@@ -322,59 +378,107 @@ class User$Type extends MessageType<User> {
322
378
  case /* int32 user_id */ 1:
323
379
  message.userId = reader.int32();
324
380
  break;
325
- case /* optional string identifier */ 2:
326
- message.identifier = reader.string();
327
- break;
328
- case /* string job */ 3:
329
- message.job = reader.string();
381
+ case /* string number */ 2:
382
+ message.number = reader.string();
330
383
  break;
331
- case /* optional string job_label */ 4:
332
- message.jobLabel = reader.string();
384
+ case /* bool is_primary */ 3:
385
+ message.isPrimary = reader.bool();
333
386
  break;
334
- case /* int32 job_grade */ 5:
335
- message.jobGrade = reader.int32();
336
- break;
337
- case /* optional string job_grade_label */ 6:
338
- message.jobGradeLabel = reader.string();
339
- break;
340
- case /* string firstname */ 7:
341
- message.firstname = reader.string();
342
- break;
343
- case /* string lastname */ 8:
344
- message.lastname = reader.string();
345
- break;
346
- case /* string dateofbirth */ 9:
347
- message.dateofbirth = reader.string();
348
- break;
349
- case /* optional string sex */ 10:
350
- message.sex = reader.string();
387
+ case /* resources.timestamp.Timestamp created_at */ 4:
388
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
351
389
  break;
352
- case /* optional string height */ 11:
353
- message.height = reader.string();
390
+ case /* optional resources.timestamp.Timestamp updated_at */ 5:
391
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
354
392
  break;
355
- case /* optional string phone_number */ 12:
356
- message.phoneNumber = reader.string();
393
+ default:
394
+ let u = options.readUnknownField;
395
+ if (u === "throw")
396
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
397
+ let d = reader.skip(wireType);
398
+ if (u !== false)
399
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
400
+ }
401
+ }
402
+ return message;
403
+ }
404
+ internalBinaryWrite(message: PhoneNumber, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
405
+ /* int32 user_id = 1; */
406
+ if (message.userId !== 0)
407
+ writer.tag(1, WireType.Varint).int32(message.userId);
408
+ /* string number = 2; */
409
+ if (message.number !== "")
410
+ writer.tag(2, WireType.LengthDelimited).string(message.number);
411
+ /* bool is_primary = 3; */
412
+ if (message.isPrimary !== false)
413
+ writer.tag(3, WireType.Varint).bool(message.isPrimary);
414
+ /* resources.timestamp.Timestamp created_at = 4; */
415
+ if (message.createdAt)
416
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
417
+ /* optional resources.timestamp.Timestamp updated_at = 5; */
418
+ if (message.updatedAt)
419
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
420
+ let u = options.writeUnknownFields;
421
+ if (u !== false)
422
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
423
+ return writer;
424
+ }
425
+ }
426
+ /**
427
+ * @generated MessageType for protobuf message resources.users.PhoneNumber
428
+ */
429
+ export const PhoneNumber = new PhoneNumber$Type();
430
+ // @generated message type with reflection information, may provide speed optimized methods
431
+ class UserJob$Type extends MessageType<UserJob> {
432
+ constructor() {
433
+ super("resources.users.UserJob", [
434
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
435
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
436
+ { no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
437
+ { no: 4, name: "grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
438
+ { no: 5, name: "grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
439
+ { no: 6, name: "is_primary", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
440
+ { no: 7, name: "created_at", kind: "message", T: () => Timestamp },
441
+ { no: 8, name: "updated_at", kind: "message", T: () => Timestamp }
442
+ ]);
443
+ }
444
+ create(value?: PartialMessage<UserJob>): UserJob {
445
+ const message = globalThis.Object.create((this.messagePrototype!));
446
+ message.userId = 0;
447
+ message.job = "";
448
+ message.grade = 0;
449
+ message.isPrimary = false;
450
+ if (value !== undefined)
451
+ reflectionMergePartial<UserJob>(this, message, value);
452
+ return message;
453
+ }
454
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserJob): UserJob {
455
+ let message = target ?? this.create(), end = reader.pos + length;
456
+ while (reader.pos < end) {
457
+ let [fieldNo, wireType] = reader.tag();
458
+ switch (fieldNo) {
459
+ case /* int32 user_id */ 1:
460
+ message.userId = reader.int32();
357
461
  break;
358
- case /* optional int32 visum */ 13:
359
- message.visum = reader.int32();
462
+ case /* string job */ 2:
463
+ message.job = reader.string();
360
464
  break;
361
- case /* optional int32 playtime */ 14:
362
- message.playtime = reader.int32();
465
+ case /* optional string job_label */ 3:
466
+ message.jobLabel = reader.string();
363
467
  break;
364
- case /* resources.users.UserProps props */ 15:
365
- message.props = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.props);
468
+ case /* int32 grade */ 4:
469
+ message.grade = reader.int32();
366
470
  break;
367
- case /* repeated resources.users.License licenses */ 16:
368
- message.licenses.push(License.internalBinaryRead(reader, reader.uint32(), options));
471
+ case /* optional string grade_label */ 5:
472
+ message.gradeLabel = reader.string();
369
473
  break;
370
- case /* optional int64 profile_picture_file_id */ 17:
371
- message.profilePictureFileId = reader.int64().toNumber();
474
+ case /* bool is_primary */ 6:
475
+ message.isPrimary = reader.bool();
372
476
  break;
373
- case /* optional string profile_picture */ 18:
374
- message.profilePicture = reader.string();
477
+ case /* resources.timestamp.Timestamp created_at */ 7:
478
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
375
479
  break;
376
- case /* optional string group */ 20:
377
- message.group = reader.string();
480
+ case /* optional resources.timestamp.Timestamp updated_at */ 8:
481
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
378
482
  break;
379
483
  default:
380
484
  let u = options.readUnknownField;
@@ -387,64 +491,31 @@ class User$Type extends MessageType<User> {
387
491
  }
388
492
  return message;
389
493
  }
390
- internalBinaryWrite(message: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
494
+ internalBinaryWrite(message: UserJob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
391
495
  /* int32 user_id = 1; */
392
496
  if (message.userId !== 0)
393
497
  writer.tag(1, WireType.Varint).int32(message.userId);
394
- /* optional string identifier = 2; */
395
- if (message.identifier !== undefined)
396
- writer.tag(2, WireType.LengthDelimited).string(message.identifier);
397
- /* string job = 3; */
498
+ /* string job = 2; */
398
499
  if (message.job !== "")
399
- writer.tag(3, WireType.LengthDelimited).string(message.job);
400
- /* optional string job_label = 4; */
500
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
501
+ /* optional string job_label = 3; */
401
502
  if (message.jobLabel !== undefined)
402
- writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
403
- /* int32 job_grade = 5; */
404
- if (message.jobGrade !== 0)
405
- writer.tag(5, WireType.Varint).int32(message.jobGrade);
406
- /* optional string job_grade_label = 6; */
407
- if (message.jobGradeLabel !== undefined)
408
- writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
409
- /* string firstname = 7; */
410
- if (message.firstname !== "")
411
- writer.tag(7, WireType.LengthDelimited).string(message.firstname);
412
- /* string lastname = 8; */
413
- if (message.lastname !== "")
414
- writer.tag(8, WireType.LengthDelimited).string(message.lastname);
415
- /* string dateofbirth = 9; */
416
- if (message.dateofbirth !== "")
417
- writer.tag(9, WireType.LengthDelimited).string(message.dateofbirth);
418
- /* optional string sex = 10; */
419
- if (message.sex !== undefined)
420
- writer.tag(10, WireType.LengthDelimited).string(message.sex);
421
- /* optional string height = 11; */
422
- if (message.height !== undefined)
423
- writer.tag(11, WireType.LengthDelimited).string(message.height);
424
- /* optional string phone_number = 12; */
425
- if (message.phoneNumber !== undefined)
426
- writer.tag(12, WireType.LengthDelimited).string(message.phoneNumber);
427
- /* optional int32 visum = 13; */
428
- if (message.visum !== undefined)
429
- writer.tag(13, WireType.Varint).int32(message.visum);
430
- /* optional int32 playtime = 14; */
431
- if (message.playtime !== undefined)
432
- writer.tag(14, WireType.Varint).int32(message.playtime);
433
- /* resources.users.UserProps props = 15; */
434
- if (message.props)
435
- UserProps.internalBinaryWrite(message.props, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
436
- /* repeated resources.users.License licenses = 16; */
437
- for (let i = 0; i < message.licenses.length; i++)
438
- License.internalBinaryWrite(message.licenses[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
439
- /* optional int64 profile_picture_file_id = 17; */
440
- if (message.profilePictureFileId !== undefined)
441
- writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
442
- /* optional string profile_picture = 18; */
443
- if (message.profilePicture !== undefined)
444
- writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
445
- /* optional string group = 20; */
446
- if (message.group !== undefined)
447
- writer.tag(20, WireType.LengthDelimited).string(message.group);
503
+ writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
504
+ /* int32 grade = 4; */
505
+ if (message.grade !== 0)
506
+ writer.tag(4, WireType.Varint).int32(message.grade);
507
+ /* optional string grade_label = 5; */
508
+ if (message.gradeLabel !== undefined)
509
+ writer.tag(5, WireType.LengthDelimited).string(message.gradeLabel);
510
+ /* bool is_primary = 6; */
511
+ if (message.isPrimary !== false)
512
+ writer.tag(6, WireType.Varint).bool(message.isPrimary);
513
+ /* resources.timestamp.Timestamp created_at = 7; */
514
+ if (message.createdAt)
515
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
516
+ /* optional resources.timestamp.Timestamp updated_at = 8; */
517
+ if (message.updatedAt)
518
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
448
519
  let u = options.writeUnknownFields;
449
520
  if (u !== false)
450
521
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -452,6 +523,6 @@ class User$Type extends MessageType<User> {
452
523
  }
453
524
  }
454
525
  /**
455
- * @generated MessageType for protobuf message resources.users.User
526
+ * @generated MessageType for protobuf message resources.users.UserJob
456
527
  */
457
- export const User = new User$Type();
528
+ export const UserJob = new UserJob$Type();