@fivenet-app/gen 2026.8.0 → 2026.8.5

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 (38) hide show
  1. package/google/protobuf/descriptor.ts +3 -11
  2. package/google/protobuf/timestamp.ts +6 -7
  3. package/package.json +1 -1
  4. package/perms.ts +17 -4
  5. package/resources/calendar/calendar.ts +11 -0
  6. package/resources/calendar/entries/entries.ts +23 -0
  7. package/resources/centrum/dispatches/dispatches.ts +8 -8
  8. package/resources/centrum/units/units.ts +5 -5
  9. package/resources/citizens/labels/access.ts +10 -6
  10. package/resources/dbsync/state.ts +192 -0
  11. package/resources/documents/stamps/access.ts +25 -0
  12. package/resources/documents/stamps/stamp.ts +0 -21
  13. package/resources/documents/templates/templates.ts +61 -59
  14. package/resources/documents/workflow/workflow.ts +61 -1
  15. package/resources/jobs/groups/access/access.ts +29 -0
  16. package/resources/jobs/groups/activity.ts +332 -0
  17. package/resources/jobs/groups/group.ts +1666 -0
  18. package/resources/jobs/user_selector.ts +184 -0
  19. package/resources/settings/status.ts +197 -105
  20. package/services/calendar/calendar.ts +1 -1
  21. package/services/calendar/entries.ts +3 -3
  22. package/services/centrum/units.ts +3 -3
  23. package/services/completor/completor.ts +2 -2
  24. package/services/documents/approval.ts +2 -2
  25. package/services/documents/documents.ts +9 -9
  26. package/services/documents/templates.ts +13 -13
  27. package/services/jobs/colleagues.client.ts +34 -8
  28. package/services/jobs/colleagues.ts +263 -74
  29. package/services/jobs/conduct.ts +11 -19
  30. package/services/jobs/groups.client.ts +311 -0
  31. package/services/jobs/groups.ts +3596 -1
  32. package/services/jobs/timeclock.ts +30 -27
  33. package/services/qualifications/qualifications.ts +26 -4
  34. package/services/settings/settings.ts +1 -1
  35. package/services/sync/sync.client.ts +69 -33
  36. package/services/sync/sync.ts +442 -6
  37. package/services/vehicles/vehicles.ts +2 -2
  38. package/svcs.ts +29 -1
@@ -1150,11 +1150,9 @@ export interface FieldOptions {
1150
1150
  */
1151
1151
  deprecated?: boolean;
1152
1152
  /**
1153
- * DEPRECATED. DO NOT USE!
1154
1153
  * For Google-internal migration only. Do not use.
1155
1154
  *
1156
- * @deprecated
1157
- * @generated from protobuf field: optional bool weak = 10 [default = false, deprecated = true]
1155
+ * @generated from protobuf field: optional bool weak = 10 [default = false]
1158
1156
  */
1159
1157
  weak?: boolean;
1160
1158
  /**
@@ -2182,12 +2180,6 @@ export enum Edition {
2182
2180
  * @generated from protobuf enum value: EDITION_2024 = 1001;
2183
2181
  */
2184
2182
  EDITION_2024 = 1001,
2185
- /**
2186
- * A placeholder edition for developing and testing unscheduled features.
2187
- *
2188
- * @generated from protobuf enum value: EDITION_UNSTABLE = 9999;
2189
- */
2190
- EDITION_UNSTABLE = 9999,
2191
2183
  /**
2192
2184
  * Placeholder editions for testing feature resolution. These should not be
2193
2185
  * used or relied on outside of tests.
@@ -3659,7 +3651,7 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
3659
3651
  case /* optional bool deprecated = 3 [default = false] */ 3:
3660
3652
  message.deprecated = reader.bool();
3661
3653
  break;
3662
- case /* optional bool weak = 10 [default = false, deprecated = true] */ 10:
3654
+ case /* optional bool weak = 10 [default = false] */ 10:
3663
3655
  message.weak = reader.bool();
3664
3656
  break;
3665
3657
  case /* optional bool debug_redact = 16 [default = false] */ 16:
@@ -3714,7 +3706,7 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
3714
3706
  /* optional google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; */
3715
3707
  if (message.jstype !== undefined)
3716
3708
  writer.tag(6, WireType.Varint).int32(message.jstype);
3717
- /* optional bool weak = 10 [default = false, deprecated = true]; */
3709
+ /* optional bool weak = 10 [default = false]; */
3718
3710
  if (message.weak !== undefined)
3719
3711
  writer.tag(10, WireType.Varint).bool(message.weak);
3720
3712
  /* optional bool unverified_lazy = 15 [default = false]; */
@@ -143,18 +143,17 @@ import { MessageType } from "@protobuf-ts/runtime";
143
143
  */
144
144
  export interface Timestamp {
145
145
  /**
146
- * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
147
- * be between -315576000000 and 315576000000 inclusive (which corresponds to
148
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
146
+ * Represents seconds of UTC time since Unix epoch
147
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
148
+ * 9999-12-31T23:59:59Z inclusive.
149
149
  *
150
150
  * @generated from protobuf field: int64 seconds = 1
151
151
  */
152
152
  seconds: number;
153
153
  /**
154
- * Non-negative fractions of a second at nanosecond resolution. This field is
155
- * the nanosecond portion of the duration, not an alternative to seconds.
156
- * Negative second values with fractions must still have non-negative nanos
157
- * values that count forward in time. Must be between 0 and 999,999,999
154
+ * Non-negative fractions of a second at nanosecond resolution. Negative
155
+ * second values with fractions must still have non-negative nanos values
156
+ * that count forward in time. Must be from 0 to 999,999,999
158
157
  * inclusive.
159
158
  *
160
159
  * @generated from protobuf field: int32 nanos = 2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fivenet-app/gen",
3
3
  "private": false,
4
- "version": "2026.8.0",
4
+ "version": "2026.8.5",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "homepage": "https://fivenet.app",
package/perms.ts CHANGED
@@ -96,16 +96,19 @@ export type GRPCServicePerms =
96
96
  | 'documents.TemplatesService/DeleteTemplate'
97
97
  | 'documents.TemplatesService/ListTemplates'
98
98
  | 'documents.TemplatesService/MoveTemplate'
99
+ | 'jobs.ColleaguesService/CreateOrUpdateLabel'
99
100
  | 'jobs.ColleaguesService/GetColleague'
100
101
  | 'jobs.ColleaguesService/ListColleagueActivity'
101
102
  | 'jobs.ColleaguesService/ListColleagues'
102
- | 'jobs.ColleaguesService/ManageLabels'
103
103
  | 'jobs.ColleaguesService/SetColleagueProps'
104
104
  | 'jobs.ConductService/CreateConductEntry'
105
105
  | 'jobs.ConductService/DeleteConductEntry'
106
106
  | 'jobs.ConductService/ListConductEntries'
107
107
  | 'jobs.ConductService/RestoreConductEntry'
108
108
  | 'jobs.ConductService/UpdateConductEntry'
109
+ | 'jobs.GroupsService/ArchiveGroup'
110
+ | 'jobs.GroupsService/CreateGroup'
111
+ | 'jobs.GroupsService/ListGroups'
109
112
  | 'jobs.JobsService/SetMOTD'
110
113
  | 'jobs.StatsService/GetStats'
111
114
  | 'jobs.TimeclockService/ListInactiveEmployees'
@@ -155,6 +158,7 @@ export const GRPCServices = [
155
158
  'documents.TemplatesService',
156
159
  'jobs.ColleaguesService',
157
160
  'jobs.ConductService',
161
+ 'jobs.GroupsService',
158
162
  'jobs.JobsService',
159
163
  'jobs.StatsService',
160
164
  'jobs.TimeclockService',
@@ -216,16 +220,19 @@ export const GRPCServiceMethods = [
216
220
  'documents.TemplatesService/DeleteTemplate',
217
221
  'documents.TemplatesService/ListTemplates',
218
222
  'documents.TemplatesService/MoveTemplate',
223
+ 'jobs.ColleaguesService/CreateOrUpdateLabel',
219
224
  'jobs.ColleaguesService/GetColleague',
220
225
  'jobs.ColleaguesService/ListColleagueActivity',
221
226
  'jobs.ColleaguesService/ListColleagues',
222
- 'jobs.ColleaguesService/ManageLabels',
223
227
  'jobs.ColleaguesService/SetColleagueProps',
224
228
  'jobs.ConductService/CreateConductEntry',
225
229
  'jobs.ConductService/DeleteConductEntry',
226
230
  'jobs.ConductService/ListConductEntries',
227
231
  'jobs.ConductService/RestoreConductEntry',
228
232
  'jobs.ConductService/UpdateConductEntry',
233
+ 'jobs.GroupsService/ArchiveGroup',
234
+ 'jobs.GroupsService/CreateGroup',
235
+ 'jobs.GroupsService/ListGroups',
229
236
  'jobs.JobsService/SetMOTD',
230
237
  'jobs.StatsService/GetStats',
231
238
  'jobs.TimeclockService/ListInactiveEmployees',
@@ -417,6 +424,8 @@ export const PermAttributes = {
417
424
  },
418
425
  'documents.TemplatesService/MoveTemplate': {
419
426
  },
427
+ 'jobs.ColleaguesService/CreateOrUpdateLabel': {
428
+ },
420
429
  'jobs.ColleaguesService/GetColleague': {
421
430
  'Access': {
422
431
  type: 'stringList',
@@ -435,8 +444,6 @@ export const PermAttributes = {
435
444
  },
436
445
  'jobs.ColleaguesService/ListColleagues': {
437
446
  },
438
- 'jobs.ColleaguesService/ManageLabels': {
439
- },
440
447
  'jobs.ColleaguesService/SetColleagueProps': {
441
448
  'Access': {
442
449
  type: 'stringList',
@@ -461,6 +468,12 @@ export const PermAttributes = {
461
468
  },
462
469
  'jobs.ConductService/UpdateConductEntry': {
463
470
  },
471
+ 'jobs.GroupsService/ArchiveGroup': {
472
+ },
473
+ 'jobs.GroupsService/CreateGroup': {
474
+ },
475
+ 'jobs.GroupsService/ListGroups': {
476
+ },
464
477
  'jobs.JobsService/SetMOTD': {
465
478
  },
466
479
  'jobs.StatsService/GetStats': {
@@ -63,6 +63,10 @@ export interface Calendar {
63
63
  * @generated from protobuf field: string color = 10
64
64
  */
65
65
  color: string;
66
+ /**
67
+ * @generated from protobuf field: optional string icon = 18
68
+ */
69
+ icon?: string;
66
70
  /**
67
71
  * @generated from protobuf field: optional int32 creator_id = 11
68
72
  */
@@ -241,6 +245,7 @@ class Calendar$Type extends MessageType<Calendar> {
241
245
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
242
246
  { no: 9, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
243
247
  { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
248
+ { no: 18, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
244
249
  { no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
245
250
  { no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
246
251
  { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
@@ -299,6 +304,9 @@ class Calendar$Type extends MessageType<Calendar> {
299
304
  case /* string color */ 10:
300
305
  message.color = reader.string();
301
306
  break;
307
+ case /* optional string icon */ 18:
308
+ message.icon = reader.string();
309
+ break;
302
310
  case /* optional int32 creator_id */ 11:
303
311
  message.creatorId = reader.int32();
304
312
  break;
@@ -380,6 +388,9 @@ class Calendar$Type extends MessageType<Calendar> {
380
388
  /* optional resources.calendar.CalendarDiscordSettings discord_settings = 17; */
381
389
  if (message.discordSettings)
382
390
  CalendarDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
391
+ /* optional string icon = 18; */
392
+ if (message.icon !== undefined)
393
+ writer.tag(18, WireType.LengthDelimited).string(message.icon);
383
394
  let u = options.writeUnknownFields;
384
395
  if (u !== false)
385
396
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -80,6 +80,10 @@ export interface CalendarEntry {
80
80
  * @generated from protobuf field: optional resources.timestamp.Timestamp end_time = 9
81
81
  */
82
82
  endTime?: Timestamp;
83
+ /**
84
+ * @generated from protobuf field: bool all_day = 22
85
+ */
86
+ allDay: boolean;
83
87
  /**
84
88
  * @generated from protobuf field: string title = 10
85
89
  */
@@ -96,6 +100,10 @@ export interface CalendarEntry {
96
100
  * @generated from protobuf field: optional bool rsvp_open = 13
97
101
  */
98
102
  rsvpOpen?: boolean;
103
+ /**
104
+ * @generated from protobuf field: optional string icon = 23
105
+ */
106
+ icon?: string;
99
107
  /**
100
108
  * @generated from protobuf field: optional int32 creator_id = 14
101
109
  */
@@ -340,10 +348,12 @@ class CalendarEntry$Type extends MessageType<CalendarEntry> {
340
348
  { no: 7, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
341
349
  { no: 8, name: "start_time", kind: "message", T: () => Timestamp },
342
350
  { no: 9, name: "end_time", kind: "message", T: () => Timestamp },
351
+ { no: 22, name: "all_day", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
343
352
  { no: 10, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
344
353
  { no: 11, name: "content", kind: "message", T: () => Content },
345
354
  { no: 12, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
346
355
  { no: 13, name: "rsvp_open", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
356
+ { no: 23, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
347
357
  { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
348
358
  { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
349
359
  { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
@@ -358,6 +368,7 @@ class CalendarEntry$Type extends MessageType<CalendarEntry> {
358
368
  const message = globalThis.Object.create((this.messagePrototype!));
359
369
  message.id = 0;
360
370
  message.calendarId = 0;
371
+ message.allDay = false;
361
372
  message.title = "";
362
373
  message.closed = false;
363
374
  message.creatorJob = "";
@@ -398,6 +409,9 @@ class CalendarEntry$Type extends MessageType<CalendarEntry> {
398
409
  case /* optional resources.timestamp.Timestamp end_time */ 9:
399
410
  message.endTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endTime);
400
411
  break;
412
+ case /* bool all_day */ 22:
413
+ message.allDay = reader.bool();
414
+ break;
401
415
  case /* string title */ 10:
402
416
  message.title = reader.string();
403
417
  break;
@@ -410,6 +424,9 @@ class CalendarEntry$Type extends MessageType<CalendarEntry> {
410
424
  case /* optional bool rsvp_open */ 13:
411
425
  message.rsvpOpen = reader.bool();
412
426
  break;
427
+ case /* optional string icon */ 23:
428
+ message.icon = reader.string();
429
+ break;
413
430
  case /* optional int32 creator_id */ 14:
414
431
  message.creatorId = reader.int32();
415
432
  break;
@@ -509,6 +526,12 @@ class CalendarEntry$Type extends MessageType<CalendarEntry> {
509
526
  /* int32 recurrence_version = 21; */
510
527
  if (message.recurrenceVersion !== 0)
511
528
  writer.tag(21, WireType.Varint).int32(message.recurrenceVersion);
529
+ /* bool all_day = 22; */
530
+ if (message.allDay !== false)
531
+ writer.tag(22, WireType.Varint).bool(message.allDay);
532
+ /* optional string icon = 23; */
533
+ if (message.icon !== undefined)
534
+ writer.tag(23, WireType.LengthDelimited).string(message.icon);
512
535
  let u = options.writeUnknownFields;
513
536
  if (u !== false)
514
537
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -13,7 +13,7 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
14
  import { Colleague } from "../../jobs/colleagues/colleagues";
15
15
  import { Unit } from "../units/units";
16
- import { User } from "../../users/user";
16
+ import { UserShort } from "../../users/short/user";
17
17
  import { JobList } from "../joblist";
18
18
  import { Timestamp } from "../../timestamp/timestamp";
19
19
  /**
@@ -78,9 +78,9 @@ export interface Dispatch {
78
78
  */
79
79
  creatorId?: number;
80
80
  /**
81
- * @generated from protobuf field: optional resources.users.User creator = 15
81
+ * @generated from protobuf field: optional resources.users.short.UserShort creator = 15
82
82
  */
83
- creator?: User;
83
+ creator?: UserShort;
84
84
  /**
85
85
  * @generated from protobuf field: repeated resources.centrum.dispatches.DispatchAssignment units = 16
86
86
  */
@@ -374,7 +374,7 @@ class Dispatch$Type extends MessageType<Dispatch> {
374
374
  { no: 12, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
375
375
  { no: 13, name: "anon", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
376
376
  { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
377
- { no: 15, name: "creator", kind: "message", T: () => User },
377
+ { no: 15, name: "creator", kind: "message", T: () => UserShort },
378
378
  { no: 16, name: "units", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DispatchAssignment },
379
379
  { no: 17, name: "references", kind: "message", T: () => DispatchReferences }
380
380
  ]);
@@ -439,8 +439,8 @@ class Dispatch$Type extends MessageType<Dispatch> {
439
439
  case /* optional int32 creator_id */ 14:
440
440
  message.creatorId = reader.int32();
441
441
  break;
442
- case /* optional resources.users.User creator */ 15:
443
- message.creator = User.internalBinaryRead(reader, reader.uint32(), options, message.creator);
442
+ case /* optional resources.users.short.UserShort creator */ 15:
443
+ message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
444
444
  break;
445
445
  case /* repeated resources.centrum.dispatches.DispatchAssignment units */ 16:
446
446
  message.units.push(DispatchAssignment.internalBinaryRead(reader, reader.uint32(), options));
@@ -499,9 +499,9 @@ class Dispatch$Type extends MessageType<Dispatch> {
499
499
  /* optional int32 creator_id = 14; */
500
500
  if (message.creatorId !== undefined)
501
501
  writer.tag(14, WireType.Varint).int32(message.creatorId);
502
- /* optional resources.users.User creator = 15; */
502
+ /* optional resources.users.short.UserShort creator = 15; */
503
503
  if (message.creator)
504
- User.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
504
+ UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
505
505
  /* repeated resources.centrum.dispatches.DispatchAssignment units = 16; */
506
506
  for (let i = 0; i < message.units.length; i++)
507
507
  DispatchAssignment.internalBinaryWrite(message.units[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
@@ -261,7 +261,7 @@ class Unit$Type extends MessageType<Unit> {
261
261
  { no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
262
262
  { no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
263
263
  { no: 9, name: "status", kind: "message", T: () => UnitStatus },
264
- { no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
264
+ { no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment, options: { "buf.validate.field": { repeated: { maxItems: "30" } } } },
265
265
  { no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
266
266
  { no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
267
267
  { no: 14, name: "access", kind: "message", T: () => Access }
@@ -407,9 +407,9 @@ export const Unit = new Unit$Type();
407
407
  class UnitAssignments$Type extends MessageType<UnitAssignments> {
408
408
  constructor() {
409
409
  super("resources.centrum.units.UnitAssignments", [
410
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
410
+ { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
411
411
  { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
412
- { no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment }
412
+ { no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment, options: { "buf.validate.field": { repeated: { maxItems: "30" } } } }
413
413
  ]);
414
414
  }
415
415
  create(value?: PartialMessage<UnitAssignments>): UnitAssignments {
@@ -470,7 +470,7 @@ export const UnitAssignments = new UnitAssignments$Type();
470
470
  class UnitAssignment$Type extends MessageType<UnitAssignment> {
471
471
  constructor() {
472
472
  super("resources.centrum.units.UnitAssignment", [
473
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
473
+ { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } }, "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
474
474
  { no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\" alias:\"user_id\"" } },
475
475
  { no: 3, name: "user", kind: "message", T: () => Colleague }
476
476
  ]);
@@ -679,7 +679,7 @@ export const UnitStatus = new UnitStatus$Type();
679
679
  class UnitAttributes$Type extends MessageType<UnitAttributes> {
680
680
  constructor() {
681
681
  super("resources.centrum.units.UnitAttributes", [
682
- { no: 1, name: "list", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.UnitAttribute", UnitAttribute, "UNIT_ATTRIBUTE_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } }
682
+ { no: 1, name: "list", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.UnitAttribute", UnitAttribute, "UNIT_ATTRIBUTE_"], options: { "buf.validate.field": { repeated: { maxItems: "3", items: { enum: { definedOnly: true } } } } } }
683
683
  ], { "codegen.dbscanner.dbscanner": { enabled: true } });
684
684
  }
685
685
  create(value?: PartialMessage<UnitAttributes>): UnitAttributes {
@@ -11,15 +11,19 @@ export enum AccessLevel {
11
11
  */
12
12
  UNSPECIFIED = 0,
13
13
  /**
14
- * @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 1;
14
+ * @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
15
15
  */
16
- VIEW = 1,
16
+ BLOCKED = 1,
17
17
  /**
18
- * @generated from protobuf enum value: ACCESS_LEVEL_GIVE = 2;
18
+ * @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 2;
19
19
  */
20
- GIVE = 2,
20
+ VIEW = 2,
21
21
  /**
22
- * @generated from protobuf enum value: ACCESS_LEVEL_REMOVE = 3;
22
+ * @generated from protobuf enum value: ACCESS_LEVEL_GIVE = 3;
23
23
  */
24
- REMOVE = 3
24
+ GIVE = 3,
25
+ /**
26
+ * @generated from protobuf enum value: ACCESS_LEVEL_REMOVE = 4;
27
+ */
28
+ REMOVE = 4
25
29
  }
@@ -0,0 +1,192 @@
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/dbsync/state.proto" (package "resources.dbsync", 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
+ import { Timestamp } from "../timestamp/timestamp";
15
+ /**
16
+ * @generated from protobuf message resources.dbsync.DBSyncCheckpoint
17
+ */
18
+ export interface DBSyncCheckpoint {
19
+ /**
20
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_check = 1
21
+ */
22
+ lastCheck?: Timestamp;
23
+ /**
24
+ * @generated from protobuf field: optional string last_id = 2
25
+ */
26
+ lastId?: string;
27
+ }
28
+ /**
29
+ * @generated from protobuf message resources.dbsync.DBSyncTableSyncState
30
+ */
31
+ export interface DBSyncTableSyncState {
32
+ /**
33
+ * @generated from protobuf field: string table = 1
34
+ */
35
+ table: string;
36
+ /**
37
+ * @generated from protobuf field: optional resources.dbsync.DBSyncCheckpoint checkpoint = 2
38
+ */
39
+ checkpoint?: DBSyncCheckpoint;
40
+ /**
41
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_synced_at = 3
42
+ */
43
+ lastSyncedAt?: Timestamp;
44
+ /**
45
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_attempt_at = 4
46
+ */
47
+ lastAttemptAt?: Timestamp;
48
+ /**
49
+ * @generated from protobuf field: optional string last_error = 5
50
+ */
51
+ lastError?: string;
52
+ /**
53
+ * @generated from protobuf field: bool enabled = 6
54
+ */
55
+ enabled: boolean;
56
+ }
57
+ // @generated message type with reflection information, may provide speed optimized methods
58
+ class DBSyncCheckpoint$Type extends MessageType<DBSyncCheckpoint> {
59
+ constructor() {
60
+ super("resources.dbsync.DBSyncCheckpoint", [
61
+ { no: 1, name: "last_check", kind: "message", T: () => Timestamp },
62
+ { no: 2, name: "last_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
63
+ ]);
64
+ }
65
+ create(value?: PartialMessage<DBSyncCheckpoint>): DBSyncCheckpoint {
66
+ const message = globalThis.Object.create((this.messagePrototype!));
67
+ if (value !== undefined)
68
+ reflectionMergePartial<DBSyncCheckpoint>(this, message, value);
69
+ return message;
70
+ }
71
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DBSyncCheckpoint): DBSyncCheckpoint {
72
+ let message = target ?? this.create(), end = reader.pos + length;
73
+ while (reader.pos < end) {
74
+ let [fieldNo, wireType] = reader.tag();
75
+ switch (fieldNo) {
76
+ case /* optional resources.timestamp.Timestamp last_check */ 1:
77
+ message.lastCheck = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastCheck);
78
+ break;
79
+ case /* optional string last_id */ 2:
80
+ message.lastId = reader.string();
81
+ break;
82
+ default:
83
+ let u = options.readUnknownField;
84
+ if (u === "throw")
85
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
86
+ let d = reader.skip(wireType);
87
+ if (u !== false)
88
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
89
+ }
90
+ }
91
+ return message;
92
+ }
93
+ internalBinaryWrite(message: DBSyncCheckpoint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
94
+ /* optional resources.timestamp.Timestamp last_check = 1; */
95
+ if (message.lastCheck)
96
+ Timestamp.internalBinaryWrite(message.lastCheck, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
97
+ /* optional string last_id = 2; */
98
+ if (message.lastId !== undefined)
99
+ writer.tag(2, WireType.LengthDelimited).string(message.lastId);
100
+ let u = options.writeUnknownFields;
101
+ if (u !== false)
102
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
103
+ return writer;
104
+ }
105
+ }
106
+ /**
107
+ * @generated MessageType for protobuf message resources.dbsync.DBSyncCheckpoint
108
+ */
109
+ export const DBSyncCheckpoint = new DBSyncCheckpoint$Type();
110
+ // @generated message type with reflection information, may provide speed optimized methods
111
+ class DBSyncTableSyncState$Type extends MessageType<DBSyncTableSyncState> {
112
+ constructor() {
113
+ super("resources.dbsync.DBSyncTableSyncState", [
114
+ { no: 1, name: "table", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
115
+ { no: 2, name: "checkpoint", kind: "message", T: () => DBSyncCheckpoint },
116
+ { no: 3, name: "last_synced_at", kind: "message", T: () => Timestamp },
117
+ { no: 4, name: "last_attempt_at", kind: "message", T: () => Timestamp },
118
+ { no: 5, name: "last_error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "256" } } } },
119
+ { no: 6, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
120
+ ]);
121
+ }
122
+ create(value?: PartialMessage<DBSyncTableSyncState>): DBSyncTableSyncState {
123
+ const message = globalThis.Object.create((this.messagePrototype!));
124
+ message.table = "";
125
+ message.enabled = false;
126
+ if (value !== undefined)
127
+ reflectionMergePartial<DBSyncTableSyncState>(this, message, value);
128
+ return message;
129
+ }
130
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DBSyncTableSyncState): DBSyncTableSyncState {
131
+ let message = target ?? this.create(), end = reader.pos + length;
132
+ while (reader.pos < end) {
133
+ let [fieldNo, wireType] = reader.tag();
134
+ switch (fieldNo) {
135
+ case /* string table */ 1:
136
+ message.table = reader.string();
137
+ break;
138
+ case /* optional resources.dbsync.DBSyncCheckpoint checkpoint */ 2:
139
+ message.checkpoint = DBSyncCheckpoint.internalBinaryRead(reader, reader.uint32(), options, message.checkpoint);
140
+ break;
141
+ case /* optional resources.timestamp.Timestamp last_synced_at */ 3:
142
+ message.lastSyncedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastSyncedAt);
143
+ break;
144
+ case /* optional resources.timestamp.Timestamp last_attempt_at */ 4:
145
+ message.lastAttemptAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAttemptAt);
146
+ break;
147
+ case /* optional string last_error */ 5:
148
+ message.lastError = reader.string();
149
+ break;
150
+ case /* bool enabled */ 6:
151
+ message.enabled = reader.bool();
152
+ break;
153
+ default:
154
+ let u = options.readUnknownField;
155
+ if (u === "throw")
156
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
157
+ let d = reader.skip(wireType);
158
+ if (u !== false)
159
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
160
+ }
161
+ }
162
+ return message;
163
+ }
164
+ internalBinaryWrite(message: DBSyncTableSyncState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
165
+ /* string table = 1; */
166
+ if (message.table !== "")
167
+ writer.tag(1, WireType.LengthDelimited).string(message.table);
168
+ /* optional resources.dbsync.DBSyncCheckpoint checkpoint = 2; */
169
+ if (message.checkpoint)
170
+ DBSyncCheckpoint.internalBinaryWrite(message.checkpoint, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
171
+ /* optional resources.timestamp.Timestamp last_synced_at = 3; */
172
+ if (message.lastSyncedAt)
173
+ Timestamp.internalBinaryWrite(message.lastSyncedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
174
+ /* optional resources.timestamp.Timestamp last_attempt_at = 4; */
175
+ if (message.lastAttemptAt)
176
+ Timestamp.internalBinaryWrite(message.lastAttemptAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
177
+ /* optional string last_error = 5; */
178
+ if (message.lastError !== undefined)
179
+ writer.tag(5, WireType.LengthDelimited).string(message.lastError);
180
+ /* bool enabled = 6; */
181
+ if (message.enabled !== false)
182
+ writer.tag(6, WireType.Varint).bool(message.enabled);
183
+ let u = options.writeUnknownFields;
184
+ if (u !== false)
185
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
186
+ return writer;
187
+ }
188
+ }
189
+ /**
190
+ * @generated MessageType for protobuf message resources.dbsync.DBSyncTableSyncState
191
+ */
192
+ export const DBSyncTableSyncState = new DBSyncTableSyncState$Type();
@@ -0,0 +1,25 @@
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/documents/stamps/access.proto" (package "resources.documents.stamps", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ /**
6
+ * @generated from protobuf enum resources.documents.stamps.AccessLevel
7
+ */
8
+ export enum AccessLevel {
9
+ /**
10
+ * @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
11
+ */
12
+ UNSPECIFIED = 0,
13
+ /**
14
+ * @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
15
+ */
16
+ BLOCKED = 1,
17
+ /**
18
+ * @generated from protobuf enum value: ACCESS_LEVEL_USE = 2;
19
+ */
20
+ USE = 2,
21
+ /**
22
+ * @generated from protobuf enum value: ACCESS_LEVEL_MANAGE = 3;
23
+ */
24
+ MANAGE = 3
25
+ }
@@ -56,27 +56,6 @@ export interface Stamp {
56
56
  */
57
57
  access?: Access;
58
58
  }
59
- /**
60
- * @generated from protobuf enum resources.documents.stamps.StampAccessLevel
61
- */
62
- export enum StampAccessLevel {
63
- /**
64
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_UNSPECIFIED = 0;
65
- */
66
- UNSPECIFIED = 0,
67
- /**
68
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_BLOCKED = 1;
69
- */
70
- BLOCKED = 1,
71
- /**
72
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_USE = 2;
73
- */
74
- USE = 2,
75
- /**
76
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_MANAGE = 3;
77
- */
78
- MANAGE = 3
79
- }
80
59
  // @generated message type with reflection information, may provide speed optimized methods
81
60
  class Stamp$Type extends MessageType<Stamp> {
82
61
  constructor() {