@fivenet-app/gen 2026.5.0 → 2026.7.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 (87) hide show
  1. package/clients.ts +6 -0
  2. package/codegen/perms/perms.ts +74 -40
  3. package/codegen/sanitizer/sanitizer.ts +6 -0
  4. package/google/protobuf/descriptor.ts +11 -3
  5. package/google/protobuf/timestamp.ts +7 -6
  6. package/package.json +1 -1
  7. package/perms.ts +387 -41
  8. package/resources/access/access.ts +481 -0
  9. package/resources/accounts/accounts.ts +41 -30
  10. package/resources/audit/audit.ts +5 -1
  11. package/resources/calendar/access/access.ts +0 -330
  12. package/resources/calendar/calendar.ts +307 -25
  13. package/resources/calendar/entries/entries.ts +204 -11
  14. package/resources/centrum/units/access/access.ts +0 -373
  15. package/resources/centrum/units/units.ts +20 -8
  16. package/resources/citizens/labels/access.ts +0 -191
  17. package/resources/citizens/labels/labels.ts +20 -8
  18. package/resources/common/content/diff_activity.ts +1 -1
  19. package/resources/cron/cron.ts +1 -1
  20. package/resources/documents/access/access.ts +0 -329
  21. package/resources/documents/activity/activity.ts +49 -45
  22. package/resources/documents/documents.ts +1 -1
  23. package/resources/documents/requests/requests.ts +1 -1
  24. package/resources/documents/stamps/stamp.ts +40 -210
  25. package/resources/documents/templates/templates.ts +158 -318
  26. package/resources/jobs/colleagues/activity/activity.ts +2 -2
  27. package/resources/jobs/conduct/conduct.ts +2 -2
  28. package/resources/jobs/jobs.ts +22 -0
  29. package/resources/jobs/labels/labels.ts +9 -9
  30. package/resources/laws/laws.ts +96 -50
  31. package/resources/livemap/markers/marker_marker.ts +311 -4
  32. package/resources/mailer/access/access.ts +0 -457
  33. package/resources/mailer/emails/email.ts +4 -4
  34. package/resources/notifications/events/events.ts +18 -1
  35. package/resources/permissions/attributes/attributes.ts +51 -39
  36. package/resources/permissions/permissions/permissions.ts +46 -34
  37. package/resources/qualifications/access/access.ts +0 -248
  38. package/resources/qualifications/qualifications.ts +9 -9
  39. package/resources/settings/config.ts +53 -5
  40. package/resources/settings/data.ts +1 -1
  41. package/resources/stats/stats.ts +32 -20
  42. package/resources/sync/data/data.ts +22 -10
  43. package/resources/userinfo/userinfo.ts +202 -51
  44. package/resources/users/activity/activity.ts +70 -77
  45. package/resources/wiki/access/access.ts +0 -330
  46. package/resources/wiki/activity/activity.ts +45 -45
  47. package/resources/wiki/page.ts +9 -9
  48. package/services/auth/auth.ts +1 -1
  49. package/services/calendar/calendar.ts +1 -1
  50. package/services/calendar/entries.ts +13 -2
  51. package/services/centrum/dispatches.ts +32 -12
  52. package/services/centrum/units.client.ts +15 -2
  53. package/services/centrum/units.ts +237 -129
  54. package/services/citizens/citizens.ts +1 -1
  55. package/services/citizens/labels.client.ts +13 -0
  56. package/services/citizens/labels.ts +135 -4
  57. package/services/completor/completor.client.ts +0 -13
  58. package/services/completor/completor.ts +2 -116
  59. package/services/documents/approval.ts +20 -9
  60. package/services/documents/categories.ts +1 -1
  61. package/services/documents/collab.ts +1 -1
  62. package/services/documents/comments.ts +4 -4
  63. package/services/documents/documents.ts +38 -38
  64. package/services/documents/stats.ts +14 -2
  65. package/services/documents/templates.ts +1 -1
  66. package/services/filestore/filestore.ts +4 -4
  67. package/services/jobs/colleagues.ts +4 -4
  68. package/services/jobs/conduct.ts +2 -2
  69. package/services/jobs/groups.client.ts +22 -0
  70. package/services/jobs/groups.ts +9 -0
  71. package/services/jobs/timeclock.ts +2 -2
  72. package/services/mailer/settings.ts +1 -1
  73. package/services/mailer/thread.ts +3 -3
  74. package/services/qualifications/exam.ts +5 -5
  75. package/services/qualifications/qualifications.ts +52 -34
  76. package/services/settings/accounts.ts +19 -6
  77. package/services/settings/config.ts +2 -2
  78. package/services/settings/cron.ts +2 -2
  79. package/services/settings/laws.client.ts +44 -5
  80. package/services/settings/laws.ts +357 -4
  81. package/services/settings/system.ts +6 -6
  82. package/services/sync/sync.client.ts +42 -14
  83. package/services/sync/sync.ts +162 -13
  84. package/services/wiki/collab.ts +1 -1
  85. package/services/wiki/wiki.client.ts +15 -2
  86. package/services/wiki/wiki.ts +122 -0
  87. package/svcs.ts +19 -1
@@ -2,101 +2,6 @@
2
2
  // @generated from protobuf file "resources/centrum/units/access/access.proto" (package "resources.centrum.units.access", syntax proto3)
3
3
  // tslint:disable
4
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
- import { QualificationShort } from "../../../qualifications/qualifications";
15
- import { Timestamp } from "../../../timestamp/timestamp";
16
- /**
17
- * @generated from protobuf message resources.centrum.units.access.UnitAccess
18
- */
19
- export interface UnitAccess {
20
- /**
21
- * @generated from protobuf field: repeated resources.centrum.units.access.UnitJobAccess jobs = 1
22
- */
23
- jobs: UnitJobAccess[];
24
- /**
25
- * @generated from protobuf field: repeated resources.centrum.units.access.UnitQualificationAccess qualifications = 3
26
- */
27
- qualifications: UnitQualificationAccess[];
28
- }
29
- /**
30
- * @generated from protobuf message resources.centrum.units.access.UnitJobAccess
31
- */
32
- export interface UnitJobAccess {
33
- /**
34
- * @generated from protobuf field: int64 id = 1
35
- */
36
- id: number;
37
- /**
38
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
39
- */
40
- createdAt?: Timestamp;
41
- /**
42
- * @generated from protobuf field: int64 target_id = 3
43
- */
44
- targetId: number;
45
- /**
46
- * @generated from protobuf field: string job = 4
47
- */
48
- job: string;
49
- /**
50
- * @generated from protobuf field: optional string job_label = 5
51
- */
52
- jobLabel?: string;
53
- /**
54
- * @generated from protobuf field: int32 minimum_grade = 6
55
- */
56
- minimumGrade: number;
57
- /**
58
- * @generated from protobuf field: optional string job_grade_label = 7
59
- */
60
- jobGradeLabel?: string;
61
- /**
62
- * @generated from protobuf field: resources.centrum.units.access.UnitAccessLevel access = 8
63
- */
64
- access: UnitAccessLevel;
65
- }
66
- /**
67
- * @generated from protobuf message resources.centrum.units.access.UnitUserAccess
68
- */
69
- export interface UnitUserAccess {
70
- }
71
- /**
72
- * @generated from protobuf message resources.centrum.units.access.UnitQualificationAccess
73
- */
74
- export interface UnitQualificationAccess {
75
- /**
76
- * @generated from protobuf field: int64 id = 1
77
- */
78
- id: number;
79
- /**
80
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
81
- */
82
- createdAt?: Timestamp;
83
- /**
84
- * @generated from protobuf field: int64 target_id = 3
85
- */
86
- targetId: number;
87
- /**
88
- * @generated from protobuf field: int64 qualification_id = 4
89
- */
90
- qualificationId: number;
91
- /**
92
- * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 5
93
- */
94
- qualification?: QualificationShort;
95
- /**
96
- * @generated from protobuf field: resources.centrum.units.access.UnitAccessLevel access = 6
97
- */
98
- access: UnitAccessLevel;
99
- }
100
5
  /**
101
6
  * @generated from protobuf enum resources.centrum.units.access.UnitAccessLevel
102
7
  */
@@ -114,281 +19,3 @@ export enum UnitAccessLevel {
114
19
  */
115
20
  JOIN = 2
116
21
  }
117
- // @generated message type with reflection information, may provide speed optimized methods
118
- class UnitAccess$Type extends MessageType<UnitAccess> {
119
- constructor() {
120
- super("resources.centrum.units.access.UnitAccess", [
121
- { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } },
122
- { no: 3, name: "qualifications", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitQualificationAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"qualification_access\"" } }
123
- ], { "codegen.dbscanner.dbscanner": { enabled: true } });
124
- }
125
- create(value?: PartialMessage<UnitAccess>): UnitAccess {
126
- const message = globalThis.Object.create((this.messagePrototype!));
127
- message.jobs = [];
128
- message.qualifications = [];
129
- if (value !== undefined)
130
- reflectionMergePartial<UnitAccess>(this, message, value);
131
- return message;
132
- }
133
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitAccess): UnitAccess {
134
- let message = target ?? this.create(), end = reader.pos + length;
135
- while (reader.pos < end) {
136
- let [fieldNo, wireType] = reader.tag();
137
- switch (fieldNo) {
138
- case /* repeated resources.centrum.units.access.UnitJobAccess jobs */ 1:
139
- message.jobs.push(UnitJobAccess.internalBinaryRead(reader, reader.uint32(), options));
140
- break;
141
- case /* repeated resources.centrum.units.access.UnitQualificationAccess qualifications */ 3:
142
- message.qualifications.push(UnitQualificationAccess.internalBinaryRead(reader, reader.uint32(), options));
143
- break;
144
- default:
145
- let u = options.readUnknownField;
146
- if (u === "throw")
147
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
148
- let d = reader.skip(wireType);
149
- if (u !== false)
150
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
151
- }
152
- }
153
- return message;
154
- }
155
- internalBinaryWrite(message: UnitAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
156
- /* repeated resources.centrum.units.access.UnitJobAccess jobs = 1; */
157
- for (let i = 0; i < message.jobs.length; i++)
158
- UnitJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
159
- /* repeated resources.centrum.units.access.UnitQualificationAccess qualifications = 3; */
160
- for (let i = 0; i < message.qualifications.length; i++)
161
- UnitQualificationAccess.internalBinaryWrite(message.qualifications[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
162
- let u = options.writeUnknownFields;
163
- if (u !== false)
164
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
165
- return writer;
166
- }
167
- }
168
- /**
169
- * @generated MessageType for protobuf message resources.centrum.units.access.UnitAccess
170
- */
171
- export const UnitAccess = new UnitAccess$Type();
172
- // @generated message type with reflection information, may provide speed optimized methods
173
- class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
174
- constructor() {
175
- super("resources.centrum.units.access.UnitJobAccess", [
176
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
177
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
178
- { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
179
- { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
180
- { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
181
- { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
182
- { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
183
- { no: 8, name: "access", kind: "enum", T: () => ["resources.centrum.units.access.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
184
- ]);
185
- }
186
- create(value?: PartialMessage<UnitJobAccess>): UnitJobAccess {
187
- const message = globalThis.Object.create((this.messagePrototype!));
188
- message.id = 0;
189
- message.targetId = 0;
190
- message.job = "";
191
- message.minimumGrade = 0;
192
- message.access = 0;
193
- if (value !== undefined)
194
- reflectionMergePartial<UnitJobAccess>(this, message, value);
195
- return message;
196
- }
197
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitJobAccess): UnitJobAccess {
198
- let message = target ?? this.create(), end = reader.pos + length;
199
- while (reader.pos < end) {
200
- let [fieldNo, wireType] = reader.tag();
201
- switch (fieldNo) {
202
- case /* int64 id */ 1:
203
- message.id = reader.int64().toNumber();
204
- break;
205
- case /* optional resources.timestamp.Timestamp created_at */ 2:
206
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
207
- break;
208
- case /* int64 target_id */ 3:
209
- message.targetId = reader.int64().toNumber();
210
- break;
211
- case /* string job */ 4:
212
- message.job = reader.string();
213
- break;
214
- case /* optional string job_label */ 5:
215
- message.jobLabel = reader.string();
216
- break;
217
- case /* int32 minimum_grade */ 6:
218
- message.minimumGrade = reader.int32();
219
- break;
220
- case /* optional string job_grade_label */ 7:
221
- message.jobGradeLabel = reader.string();
222
- break;
223
- case /* resources.centrum.units.access.UnitAccessLevel access */ 8:
224
- message.access = reader.int32();
225
- break;
226
- default:
227
- let u = options.readUnknownField;
228
- if (u === "throw")
229
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
230
- let d = reader.skip(wireType);
231
- if (u !== false)
232
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
233
- }
234
- }
235
- return message;
236
- }
237
- internalBinaryWrite(message: UnitJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
238
- /* int64 id = 1; */
239
- if (message.id !== 0)
240
- writer.tag(1, WireType.Varint).int64(message.id);
241
- /* optional resources.timestamp.Timestamp created_at = 2; */
242
- if (message.createdAt)
243
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
244
- /* int64 target_id = 3; */
245
- if (message.targetId !== 0)
246
- writer.tag(3, WireType.Varint).int64(message.targetId);
247
- /* string job = 4; */
248
- if (message.job !== "")
249
- writer.tag(4, WireType.LengthDelimited).string(message.job);
250
- /* optional string job_label = 5; */
251
- if (message.jobLabel !== undefined)
252
- writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
253
- /* int32 minimum_grade = 6; */
254
- if (message.minimumGrade !== 0)
255
- writer.tag(6, WireType.Varint).int32(message.minimumGrade);
256
- /* optional string job_grade_label = 7; */
257
- if (message.jobGradeLabel !== undefined)
258
- writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
259
- /* resources.centrum.units.access.UnitAccessLevel access = 8; */
260
- if (message.access !== 0)
261
- writer.tag(8, WireType.Varint).int32(message.access);
262
- let u = options.writeUnknownFields;
263
- if (u !== false)
264
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
265
- return writer;
266
- }
267
- }
268
- /**
269
- * @generated MessageType for protobuf message resources.centrum.units.access.UnitJobAccess
270
- */
271
- export const UnitJobAccess = new UnitJobAccess$Type();
272
- // @generated message type with reflection information, may provide speed optimized methods
273
- class UnitUserAccess$Type extends MessageType<UnitUserAccess> {
274
- constructor() {
275
- super("resources.centrum.units.access.UnitUserAccess", []);
276
- }
277
- create(value?: PartialMessage<UnitUserAccess>): UnitUserAccess {
278
- const message = globalThis.Object.create((this.messagePrototype!));
279
- if (value !== undefined)
280
- reflectionMergePartial<UnitUserAccess>(this, message, value);
281
- return message;
282
- }
283
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitUserAccess): UnitUserAccess {
284
- let message = target ?? this.create(), end = reader.pos + length;
285
- while (reader.pos < end) {
286
- let [fieldNo, wireType] = reader.tag();
287
- switch (fieldNo) {
288
- default:
289
- let u = options.readUnknownField;
290
- if (u === "throw")
291
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
292
- let d = reader.skip(wireType);
293
- if (u !== false)
294
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
295
- }
296
- }
297
- return message;
298
- }
299
- internalBinaryWrite(message: UnitUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
300
- let u = options.writeUnknownFields;
301
- if (u !== false)
302
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
303
- return writer;
304
- }
305
- }
306
- /**
307
- * @generated MessageType for protobuf message resources.centrum.units.access.UnitUserAccess
308
- */
309
- export const UnitUserAccess = new UnitUserAccess$Type();
310
- // @generated message type with reflection information, may provide speed optimized methods
311
- class UnitQualificationAccess$Type extends MessageType<UnitQualificationAccess> {
312
- constructor() {
313
- super("resources.centrum.units.access.UnitQualificationAccess", [
314
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
315
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
316
- { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
317
- { no: 4, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
318
- { no: 5, name: "qualification", kind: "message", T: () => QualificationShort },
319
- { no: 6, name: "access", kind: "enum", T: () => ["resources.centrum.units.access.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
320
- ]);
321
- }
322
- create(value?: PartialMessage<UnitQualificationAccess>): UnitQualificationAccess {
323
- const message = globalThis.Object.create((this.messagePrototype!));
324
- message.id = 0;
325
- message.targetId = 0;
326
- message.qualificationId = 0;
327
- message.access = 0;
328
- if (value !== undefined)
329
- reflectionMergePartial<UnitQualificationAccess>(this, message, value);
330
- return message;
331
- }
332
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitQualificationAccess): UnitQualificationAccess {
333
- let message = target ?? this.create(), end = reader.pos + length;
334
- while (reader.pos < end) {
335
- let [fieldNo, wireType] = reader.tag();
336
- switch (fieldNo) {
337
- case /* int64 id */ 1:
338
- message.id = reader.int64().toNumber();
339
- break;
340
- case /* optional resources.timestamp.Timestamp created_at */ 2:
341
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
342
- break;
343
- case /* int64 target_id */ 3:
344
- message.targetId = reader.int64().toNumber();
345
- break;
346
- case /* int64 qualification_id */ 4:
347
- message.qualificationId = reader.int64().toNumber();
348
- break;
349
- case /* optional resources.qualifications.QualificationShort qualification */ 5:
350
- message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
351
- break;
352
- case /* resources.centrum.units.access.UnitAccessLevel access */ 6:
353
- message.access = reader.int32();
354
- break;
355
- default:
356
- let u = options.readUnknownField;
357
- if (u === "throw")
358
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
359
- let d = reader.skip(wireType);
360
- if (u !== false)
361
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
362
- }
363
- }
364
- return message;
365
- }
366
- internalBinaryWrite(message: UnitQualificationAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
367
- /* int64 id = 1; */
368
- if (message.id !== 0)
369
- writer.tag(1, WireType.Varint).int64(message.id);
370
- /* optional resources.timestamp.Timestamp created_at = 2; */
371
- if (message.createdAt)
372
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
373
- /* int64 target_id = 3; */
374
- if (message.targetId !== 0)
375
- writer.tag(3, WireType.Varint).int64(message.targetId);
376
- /* int64 qualification_id = 4; */
377
- if (message.qualificationId !== 0)
378
- writer.tag(4, WireType.Varint).int64(message.qualificationId);
379
- /* optional resources.qualifications.QualificationShort qualification = 5; */
380
- if (message.qualification)
381
- QualificationShort.internalBinaryWrite(message.qualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
382
- /* resources.centrum.units.access.UnitAccessLevel access = 6; */
383
- if (message.access !== 0)
384
- writer.tag(6, WireType.Varint).int32(message.access);
385
- let u = options.writeUnknownFields;
386
- if (u !== false)
387
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
388
- return writer;
389
- }
390
- }
391
- /**
392
- * @generated MessageType for protobuf message resources.centrum.units.access.UnitQualificationAccess
393
- */
394
- export const UnitQualificationAccess = new UnitQualificationAccess$Type();
@@ -12,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
14
  import { Colleague } from "../../jobs/colleagues/colleagues";
15
- import { UnitAccess } from "./access/access";
15
+ import { Access } from "../../access/access";
16
16
  import { Timestamp } from "../../timestamp/timestamp";
17
17
  /**
18
18
  * @generated from protobuf message resources.centrum.units.Unit
@@ -38,6 +38,10 @@ export interface Unit {
38
38
  * @generated from protobuf field: optional string job_label = 15
39
39
  */
40
40
  jobLabel?: string;
41
+ /**
42
+ * @generated from protobuf field: int32 sort_order = 17
43
+ */
44
+ sortOrder: number;
41
45
  /**
42
46
  * @generated from protobuf field: string name = 5
43
47
  */
@@ -75,9 +79,9 @@ export interface Unit {
75
79
  */
76
80
  homePostal?: string;
77
81
  /**
78
- * @generated from protobuf field: resources.centrum.units.access.UnitAccess access = 14
82
+ * @generated from protobuf field: resources.access.Access access = 14
79
83
  */
80
- access?: UnitAccess;
84
+ access?: Access;
81
85
  }
82
86
  /**
83
87
  * @generated from protobuf message resources.centrum.units.UnitAssignments
@@ -250,6 +254,7 @@ class Unit$Type extends MessageType<Unit> {
250
254
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
251
255
  { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
252
256
  { no: 15, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
257
+ { no: 17, name: "sort_order", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
253
258
  { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
254
259
  { no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "2", maxLen: "4" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
255
260
  { no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
@@ -259,13 +264,14 @@ class Unit$Type extends MessageType<Unit> {
259
264
  { no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
260
265
  { no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
261
266
  { no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
262
- { no: 14, name: "access", kind: "message", T: () => UnitAccess }
267
+ { no: 14, name: "access", kind: "message", T: () => Access }
263
268
  ]);
264
269
  }
265
270
  create(value?: PartialMessage<Unit>): Unit {
266
271
  const message = globalThis.Object.create((this.messagePrototype!));
267
272
  message.id = 0;
268
273
  message.job = "";
274
+ message.sortOrder = 0;
269
275
  message.name = "";
270
276
  message.initials = "";
271
277
  message.color = "";
@@ -294,6 +300,9 @@ class Unit$Type extends MessageType<Unit> {
294
300
  case /* optional string job_label */ 15:
295
301
  message.jobLabel = reader.string();
296
302
  break;
303
+ case /* int32 sort_order */ 17:
304
+ message.sortOrder = reader.int32();
305
+ break;
297
306
  case /* string name */ 5:
298
307
  message.name = reader.string();
299
308
  break;
@@ -321,8 +330,8 @@ class Unit$Type extends MessageType<Unit> {
321
330
  case /* optional string home_postal */ 13:
322
331
  message.homePostal = reader.string();
323
332
  break;
324
- case /* resources.centrum.units.access.UnitAccess access */ 14:
325
- message.access = UnitAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
333
+ case /* resources.access.Access access */ 14:
334
+ message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
326
335
  break;
327
336
  default:
328
337
  let u = options.readUnknownField;
@@ -372,15 +381,18 @@ class Unit$Type extends MessageType<Unit> {
372
381
  /* optional string home_postal = 13; */
373
382
  if (message.homePostal !== undefined)
374
383
  writer.tag(13, WireType.LengthDelimited).string(message.homePostal);
375
- /* resources.centrum.units.access.UnitAccess access = 14; */
384
+ /* resources.access.Access access = 14; */
376
385
  if (message.access)
377
- UnitAccess.internalBinaryWrite(message.access, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
386
+ Access.internalBinaryWrite(message.access, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
378
387
  /* optional string job_label = 15; */
379
388
  if (message.jobLabel !== undefined)
380
389
  writer.tag(15, WireType.LengthDelimited).string(message.jobLabel);
381
390
  /* optional string icon = 16; */
382
391
  if (message.icon !== undefined)
383
392
  writer.tag(16, WireType.LengthDelimited).string(message.icon);
393
+ /* int32 sort_order = 17; */
394
+ if (message.sortOrder !== 0)
395
+ writer.tag(17, WireType.Varint).int32(message.sortOrder);
384
396
  let u = options.writeUnknownFields;
385
397
  if (u !== false)
386
398
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);