@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/props.proto" (package "resources.users", syntax proto3)
2
+ // @generated from protobuf file "resources/users/props/props.proto" (package "resources.users.props", syntax proto3)
3
3
  // tslint:disable
4
4
  // @ts-nocheck
5
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -11,13 +11,13 @@ 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 { Labels } from "./labels";
15
- import { File } from "../file/file";
16
- import { JobGrade } from "../jobs/jobs";
17
- import { Job } from "../jobs/jobs";
18
- import { Timestamp } from "../timestamp/timestamp";
14
+ import { Labels } from "../../citizens/labels/labels";
15
+ import { File } from "../../file/file";
16
+ import { JobGrade } from "../../jobs/jobs";
17
+ import { Job } from "../../jobs/jobs";
18
+ import { Timestamp } from "../../timestamp/timestamp";
19
19
  /**
20
- * @generated from protobuf message resources.users.UserProps
20
+ * @generated from protobuf message resources.users.props.UserProps
21
21
  */
22
22
  export interface UserProps {
23
23
  /**
@@ -33,73 +33,83 @@ export interface UserProps {
33
33
  */
34
34
  wanted?: boolean;
35
35
  /**
36
- * @generated from protobuf field: optional string job_name = 4
36
+ * @generated from protobuf field: optional resources.timestamp.Timestamp wanted_at = 4
37
+ */
38
+ wantedAt?: Timestamp;
39
+ /**
40
+ * @generated from protobuf field: optional resources.timestamp.Timestamp wanted_till = 5
41
+ */
42
+ wantedTill?: Timestamp;
43
+ /**
44
+ * @generated from protobuf field: optional string job_name = 6
37
45
  */
38
46
  jobName?: string;
39
47
  /**
40
- * @generated from protobuf field: optional resources.jobs.Job job = 5
48
+ * @generated from protobuf field: optional resources.jobs.Job job = 7
41
49
  */
42
50
  job?: Job;
43
51
  /**
44
- * @generated from protobuf field: optional int32 job_grade_number = 6
52
+ * @generated from protobuf field: optional int32 job_grade_number = 8
45
53
  */
46
54
  jobGradeNumber?: number;
47
55
  /**
48
- * @generated from protobuf field: optional resources.jobs.JobGrade job_grade = 7
56
+ * @generated from protobuf field: optional resources.jobs.JobGrade job_grade = 9
49
57
  */
50
58
  jobGrade?: JobGrade;
51
59
  /**
52
- * @generated from protobuf field: optional uint32 traffic_infraction_points = 8
60
+ * @generated from protobuf field: optional uint32 traffic_infraction_points = 10
53
61
  */
54
62
  trafficInfractionPoints?: number;
55
63
  /**
56
- * @generated from protobuf field: optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 9
64
+ * @generated from protobuf field: optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 11
57
65
  */
58
66
  trafficInfractionPointsUpdatedAt?: Timestamp;
59
67
  /**
60
- * @generated from protobuf field: optional int64 open_fines = 10
68
+ * @generated from protobuf field: optional int64 open_fines = 12
61
69
  */
62
70
  openFines?: number;
63
71
  /**
64
- * @generated from protobuf field: optional string blood_type = 11
72
+ * @generated from protobuf field: optional string blood_type = 13
65
73
  */
66
74
  bloodType?: string;
67
75
  /**
68
- * @generated from protobuf field: optional int64 mugshot_file_id = 12
76
+ * @generated from protobuf field: optional int64 mugshot_file_id = 14
69
77
  */
70
78
  mugshotFileId?: number;
71
79
  /**
72
- * @generated from protobuf field: optional resources.file.File mugshot = 13
80
+ * @generated from protobuf field: optional resources.file.File mugshot = 15
73
81
  */
74
82
  mugshot?: File;
75
83
  /**
76
- * @generated from protobuf field: optional resources.users.Labels labels = 14
84
+ * @generated from protobuf field: optional resources.citizens.labels.Labels labels = 16
77
85
  */
78
86
  labels?: Labels;
79
87
  /**
80
- * @generated from protobuf field: optional string email = 15
88
+ * @generated from protobuf field: optional string email = 17
81
89
  */
82
90
  email?: string;
83
91
  }
84
92
  // @generated message type with reflection information, may provide speed optimized methods
85
93
  class UserProps$Type extends MessageType<UserProps> {
86
94
  constructor() {
87
- super("resources.users.UserProps", [
95
+ super("resources.users.props.UserProps", [
88
96
  { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
89
97
  { no: 2, name: "updated_at", kind: "message", T: () => Timestamp },
90
98
  { no: 3, name: "wanted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
91
- { no: 4, name: "job_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "tagger.tags": "alias:\"job\"" } },
92
- { no: 5, name: "job", kind: "message", T: () => Job },
93
- { no: 6, name: "job_grade_number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "tagger.tags": "alias:\"job_grade\"" } },
94
- { no: 7, name: "job_grade", kind: "message", T: () => JobGrade },
95
- { no: 8, name: "traffic_infraction_points", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
96
- { no: 9, name: "traffic_infraction_points_updated_at", kind: "message", T: () => Timestamp },
97
- { no: 10, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
98
- { no: 11, name: "blood_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
99
- { no: 12, name: "mugshot_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
100
- { no: 13, name: "mugshot", kind: "message", T: () => File, options: { "tagger.tags": "alias:\"mugshot\"" } },
101
- { no: 14, name: "labels", kind: "message", T: () => Labels },
102
- { no: 15, name: "email", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxLen: "80" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
99
+ { no: 4, name: "wanted_at", kind: "message", T: () => Timestamp },
100
+ { no: 5, name: "wanted_till", kind: "message", T: () => Timestamp },
101
+ { no: 6, name: "job_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "tagger.tags": "alias:\"job\"" } },
102
+ { no: 7, name: "job", kind: "message", T: () => Job },
103
+ { no: 8, name: "job_grade_number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "tagger.tags": "alias:\"job_grade\"" } },
104
+ { no: 9, name: "job_grade", kind: "message", T: () => JobGrade },
105
+ { no: 10, name: "traffic_infraction_points", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
106
+ { no: 11, name: "traffic_infraction_points_updated_at", kind: "message", T: () => Timestamp },
107
+ { no: 12, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
108
+ { no: 13, name: "blood_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
109
+ { no: 14, name: "mugshot_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
110
+ { no: 15, name: "mugshot", kind: "message", T: () => File, options: { "tagger.tags": "alias:\"mugshot\"" } },
111
+ { no: 16, name: "labels", kind: "message", T: () => Labels },
112
+ { no: 17, name: "email", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxLen: "80" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } }
103
113
  ]);
104
114
  }
105
115
  create(value?: PartialMessage<UserProps>): UserProps {
@@ -123,40 +133,46 @@ class UserProps$Type extends MessageType<UserProps> {
123
133
  case /* optional bool wanted */ 3:
124
134
  message.wanted = reader.bool();
125
135
  break;
126
- case /* optional string job_name */ 4:
136
+ case /* optional resources.timestamp.Timestamp wanted_at */ 4:
137
+ message.wantedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.wantedAt);
138
+ break;
139
+ case /* optional resources.timestamp.Timestamp wanted_till */ 5:
140
+ message.wantedTill = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.wantedTill);
141
+ break;
142
+ case /* optional string job_name */ 6:
127
143
  message.jobName = reader.string();
128
144
  break;
129
- case /* optional resources.jobs.Job job */ 5:
145
+ case /* optional resources.jobs.Job job */ 7:
130
146
  message.job = Job.internalBinaryRead(reader, reader.uint32(), options, message.job);
131
147
  break;
132
- case /* optional int32 job_grade_number */ 6:
148
+ case /* optional int32 job_grade_number */ 8:
133
149
  message.jobGradeNumber = reader.int32();
134
150
  break;
135
- case /* optional resources.jobs.JobGrade job_grade */ 7:
151
+ case /* optional resources.jobs.JobGrade job_grade */ 9:
136
152
  message.jobGrade = JobGrade.internalBinaryRead(reader, reader.uint32(), options, message.jobGrade);
137
153
  break;
138
- case /* optional uint32 traffic_infraction_points */ 8:
154
+ case /* optional uint32 traffic_infraction_points */ 10:
139
155
  message.trafficInfractionPoints = reader.uint32();
140
156
  break;
141
- case /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at */ 9:
157
+ case /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at */ 11:
142
158
  message.trafficInfractionPointsUpdatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.trafficInfractionPointsUpdatedAt);
143
159
  break;
144
- case /* optional int64 open_fines */ 10:
160
+ case /* optional int64 open_fines */ 12:
145
161
  message.openFines = reader.int64().toNumber();
146
162
  break;
147
- case /* optional string blood_type */ 11:
163
+ case /* optional string blood_type */ 13:
148
164
  message.bloodType = reader.string();
149
165
  break;
150
- case /* optional int64 mugshot_file_id */ 12:
166
+ case /* optional int64 mugshot_file_id */ 14:
151
167
  message.mugshotFileId = reader.int64().toNumber();
152
168
  break;
153
- case /* optional resources.file.File mugshot */ 13:
169
+ case /* optional resources.file.File mugshot */ 15:
154
170
  message.mugshot = File.internalBinaryRead(reader, reader.uint32(), options, message.mugshot);
155
171
  break;
156
- case /* optional resources.users.Labels labels */ 14:
172
+ case /* optional resources.citizens.labels.Labels labels */ 16:
157
173
  message.labels = Labels.internalBinaryRead(reader, reader.uint32(), options, message.labels);
158
174
  break;
159
- case /* optional string email */ 15:
175
+ case /* optional string email */ 17:
160
176
  message.email = reader.string();
161
177
  break;
162
178
  default:
@@ -180,42 +196,48 @@ class UserProps$Type extends MessageType<UserProps> {
180
196
  /* optional bool wanted = 3; */
181
197
  if (message.wanted !== undefined)
182
198
  writer.tag(3, WireType.Varint).bool(message.wanted);
183
- /* optional string job_name = 4; */
199
+ /* optional resources.timestamp.Timestamp wanted_at = 4; */
200
+ if (message.wantedAt)
201
+ Timestamp.internalBinaryWrite(message.wantedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
202
+ /* optional resources.timestamp.Timestamp wanted_till = 5; */
203
+ if (message.wantedTill)
204
+ Timestamp.internalBinaryWrite(message.wantedTill, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
205
+ /* optional string job_name = 6; */
184
206
  if (message.jobName !== undefined)
185
- writer.tag(4, WireType.LengthDelimited).string(message.jobName);
186
- /* optional resources.jobs.Job job = 5; */
207
+ writer.tag(6, WireType.LengthDelimited).string(message.jobName);
208
+ /* optional resources.jobs.Job job = 7; */
187
209
  if (message.job)
188
- Job.internalBinaryWrite(message.job, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
189
- /* optional int32 job_grade_number = 6; */
210
+ Job.internalBinaryWrite(message.job, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
211
+ /* optional int32 job_grade_number = 8; */
190
212
  if (message.jobGradeNumber !== undefined)
191
- writer.tag(6, WireType.Varint).int32(message.jobGradeNumber);
192
- /* optional resources.jobs.JobGrade job_grade = 7; */
213
+ writer.tag(8, WireType.Varint).int32(message.jobGradeNumber);
214
+ /* optional resources.jobs.JobGrade job_grade = 9; */
193
215
  if (message.jobGrade)
194
- JobGrade.internalBinaryWrite(message.jobGrade, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
195
- /* optional uint32 traffic_infraction_points = 8; */
216
+ JobGrade.internalBinaryWrite(message.jobGrade, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
217
+ /* optional uint32 traffic_infraction_points = 10; */
196
218
  if (message.trafficInfractionPoints !== undefined)
197
- writer.tag(8, WireType.Varint).uint32(message.trafficInfractionPoints);
198
- /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 9; */
219
+ writer.tag(10, WireType.Varint).uint32(message.trafficInfractionPoints);
220
+ /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 11; */
199
221
  if (message.trafficInfractionPointsUpdatedAt)
200
- Timestamp.internalBinaryWrite(message.trafficInfractionPointsUpdatedAt, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
201
- /* optional int64 open_fines = 10; */
222
+ Timestamp.internalBinaryWrite(message.trafficInfractionPointsUpdatedAt, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
223
+ /* optional int64 open_fines = 12; */
202
224
  if (message.openFines !== undefined)
203
- writer.tag(10, WireType.Varint).int64(message.openFines);
204
- /* optional string blood_type = 11; */
225
+ writer.tag(12, WireType.Varint).int64(message.openFines);
226
+ /* optional string blood_type = 13; */
205
227
  if (message.bloodType !== undefined)
206
- writer.tag(11, WireType.LengthDelimited).string(message.bloodType);
207
- /* optional int64 mugshot_file_id = 12; */
228
+ writer.tag(13, WireType.LengthDelimited).string(message.bloodType);
229
+ /* optional int64 mugshot_file_id = 14; */
208
230
  if (message.mugshotFileId !== undefined)
209
- writer.tag(12, WireType.Varint).int64(message.mugshotFileId);
210
- /* optional resources.file.File mugshot = 13; */
231
+ writer.tag(14, WireType.Varint).int64(message.mugshotFileId);
232
+ /* optional resources.file.File mugshot = 15; */
211
233
  if (message.mugshot)
212
- File.internalBinaryWrite(message.mugshot, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
213
- /* optional resources.users.Labels labels = 14; */
234
+ File.internalBinaryWrite(message.mugshot, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
235
+ /* optional resources.citizens.labels.Labels labels = 16; */
214
236
  if (message.labels)
215
- Labels.internalBinaryWrite(message.labels, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
216
- /* optional string email = 15; */
237
+ Labels.internalBinaryWrite(message.labels, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
238
+ /* optional string email = 17; */
217
239
  if (message.email !== undefined)
218
- writer.tag(15, WireType.LengthDelimited).string(message.email);
240
+ writer.tag(17, WireType.LengthDelimited).string(message.email);
219
241
  let u = options.writeUnknownFields;
220
242
  if (u !== false)
221
243
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -223,6 +245,6 @@ class UserProps$Type extends MessageType<UserProps> {
223
245
  }
224
246
  }
225
247
  /**
226
- * @generated MessageType for protobuf message resources.users.UserProps
248
+ * @generated MessageType for protobuf message resources.users.props.UserProps
227
249
  */
228
250
  export const UserProps = new UserProps$Type();
@@ -0,0 +1,184 @@
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/short/user.proto" (package "resources.users.short", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MessageType } from "@protobuf-ts/runtime";
14
+ /**
15
+ * @generated from protobuf message resources.users.short.UserShort
16
+ */
17
+ export interface UserShort {
18
+ /**
19
+ * @generated from protobuf field: int32 user_id = 1
20
+ */
21
+ userId: number;
22
+ /**
23
+ * @generated from protobuf field: string job = 3
24
+ */
25
+ job: string;
26
+ /**
27
+ * @generated from protobuf field: optional string job_label = 4
28
+ */
29
+ jobLabel?: string;
30
+ /**
31
+ * @generated from protobuf field: int32 job_grade = 5
32
+ */
33
+ jobGrade: number;
34
+ /**
35
+ * @generated from protobuf field: optional string job_grade_label = 6
36
+ */
37
+ jobGradeLabel?: string;
38
+ /**
39
+ * @generated from protobuf field: string firstname = 7
40
+ */
41
+ firstname: string;
42
+ /**
43
+ * @generated from protobuf field: string lastname = 8
44
+ */
45
+ lastname: string;
46
+ /**
47
+ * @generated from protobuf field: string dateofbirth = 9
48
+ */
49
+ dateofbirth: string;
50
+ /**
51
+ * @generated from protobuf field: optional string phone_number = 12
52
+ */
53
+ phoneNumber?: string;
54
+ /**
55
+ * @generated from protobuf field: optional int64 profile_picture_file_id = 17
56
+ */
57
+ profilePictureFileId?: number;
58
+ /**
59
+ * @generated from protobuf field: optional string profile_picture = 18
60
+ */
61
+ profilePicture?: string;
62
+ }
63
+ // @generated message type with reflection information, may provide speed optimized methods
64
+ class UserShort$Type extends MessageType<UserShort> {
65
+ constructor() {
66
+ super("resources.users.short.UserShort", [
67
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
68
+ { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
69
+ { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
70
+ { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
71
+ { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
72
+ { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
73
+ { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
74
+ { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
75
+ { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
76
+ { no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
77
+ { no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
78
+ ]);
79
+ }
80
+ create(value?: PartialMessage<UserShort>): UserShort {
81
+ const message = globalThis.Object.create((this.messagePrototype!));
82
+ message.userId = 0;
83
+ message.job = "";
84
+ message.jobGrade = 0;
85
+ message.firstname = "";
86
+ message.lastname = "";
87
+ message.dateofbirth = "";
88
+ if (value !== undefined)
89
+ reflectionMergePartial<UserShort>(this, message, value);
90
+ return message;
91
+ }
92
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserShort): UserShort {
93
+ let message = target ?? this.create(), end = reader.pos + length;
94
+ while (reader.pos < end) {
95
+ let [fieldNo, wireType] = reader.tag();
96
+ switch (fieldNo) {
97
+ case /* int32 user_id */ 1:
98
+ message.userId = reader.int32();
99
+ break;
100
+ case /* string job */ 3:
101
+ message.job = reader.string();
102
+ break;
103
+ case /* optional string job_label */ 4:
104
+ message.jobLabel = reader.string();
105
+ break;
106
+ case /* int32 job_grade */ 5:
107
+ message.jobGrade = reader.int32();
108
+ break;
109
+ case /* optional string job_grade_label */ 6:
110
+ message.jobGradeLabel = reader.string();
111
+ break;
112
+ case /* string firstname */ 7:
113
+ message.firstname = reader.string();
114
+ break;
115
+ case /* string lastname */ 8:
116
+ message.lastname = reader.string();
117
+ break;
118
+ case /* string dateofbirth */ 9:
119
+ message.dateofbirth = reader.string();
120
+ break;
121
+ case /* optional string phone_number */ 12:
122
+ message.phoneNumber = reader.string();
123
+ break;
124
+ case /* optional int64 profile_picture_file_id */ 17:
125
+ message.profilePictureFileId = reader.int64().toNumber();
126
+ break;
127
+ case /* optional string profile_picture */ 18:
128
+ message.profilePicture = reader.string();
129
+ break;
130
+ default:
131
+ let u = options.readUnknownField;
132
+ if (u === "throw")
133
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
134
+ let d = reader.skip(wireType);
135
+ if (u !== false)
136
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
137
+ }
138
+ }
139
+ return message;
140
+ }
141
+ internalBinaryWrite(message: UserShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
142
+ /* int32 user_id = 1; */
143
+ if (message.userId !== 0)
144
+ writer.tag(1, WireType.Varint).int32(message.userId);
145
+ /* string job = 3; */
146
+ if (message.job !== "")
147
+ writer.tag(3, WireType.LengthDelimited).string(message.job);
148
+ /* optional string job_label = 4; */
149
+ if (message.jobLabel !== undefined)
150
+ writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
151
+ /* int32 job_grade = 5; */
152
+ if (message.jobGrade !== 0)
153
+ writer.tag(5, WireType.Varint).int32(message.jobGrade);
154
+ /* optional string job_grade_label = 6; */
155
+ if (message.jobGradeLabel !== undefined)
156
+ writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
157
+ /* string firstname = 7; */
158
+ if (message.firstname !== "")
159
+ writer.tag(7, WireType.LengthDelimited).string(message.firstname);
160
+ /* string lastname = 8; */
161
+ if (message.lastname !== "")
162
+ writer.tag(8, WireType.LengthDelimited).string(message.lastname);
163
+ /* string dateofbirth = 9; */
164
+ if (message.dateofbirth !== "")
165
+ writer.tag(9, WireType.LengthDelimited).string(message.dateofbirth);
166
+ /* optional string phone_number = 12; */
167
+ if (message.phoneNumber !== undefined)
168
+ writer.tag(12, WireType.LengthDelimited).string(message.phoneNumber);
169
+ /* optional int64 profile_picture_file_id = 17; */
170
+ if (message.profilePictureFileId !== undefined)
171
+ writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
172
+ /* optional string profile_picture = 18; */
173
+ if (message.profilePicture !== undefined)
174
+ writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
175
+ let u = options.writeUnknownFields;
176
+ if (u !== false)
177
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
178
+ return writer;
179
+ }
180
+ }
181
+ /**
182
+ * @generated MessageType for protobuf message resources.users.short.UserShort
183
+ */
184
+ export const UserShort = new UserShort$Type();