@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
@@ -13,10 +13,6 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
14
  import { OnEditBehavior } from "../approval/approval";
15
15
  import { ApprovalRuleKind } from "../approval/approval";
16
- import { Vehicle } from "../../vehicles/vehicles";
17
- import { UserShort } from "../../users/short/user";
18
- import { DocumentShort } from "../documents";
19
- import { User } from "../../users/user";
20
16
  import { Workflow } from "../workflow/workflow";
21
17
  import { Access } from "../../access/access";
22
18
  import { JobAccess } from "../../access/access";
@@ -191,9 +187,9 @@ export interface TemplateRequirements {
191
187
  */
192
188
  export interface ObjectSpecs {
193
189
  /**
194
- * @generated from protobuf field: optional bool required = 1
190
+ * @generated from protobuf field: bool required = 1
195
191
  */
196
- required?: boolean;
192
+ required: boolean;
197
193
  /**
198
194
  * @generated from protobuf field: optional int32 min = 2
199
195
  */
@@ -204,25 +200,21 @@ export interface ObjectSpecs {
204
200
  max?: number;
205
201
  }
206
202
  /**
207
- * @generated from protobuf message resources.documents.templates.TemplateData
203
+ * @generated from protobuf message resources.documents.templates.TemplateSelection
208
204
  */
209
- export interface TemplateData {
205
+ export interface TemplateSelection {
210
206
  /**
211
- * @generated from protobuf field: resources.users.User active_char = 1
207
+ * @generated from protobuf field: repeated int32 user_ids = 1
212
208
  */
213
- activeChar?: User;
209
+ userIds: number[];
214
210
  /**
215
- * @generated from protobuf field: repeated resources.documents.DocumentShort documents = 2
211
+ * @generated from protobuf field: repeated int64 document_ids = 2
216
212
  */
217
- documents: DocumentShort[];
213
+ documentIds: number[];
218
214
  /**
219
- * @generated from protobuf field: repeated resources.users.short.UserShort users = 3
215
+ * @generated from protobuf field: repeated string plates = 3
220
216
  */
221
- users: UserShort[];
222
- /**
223
- * @generated from protobuf field: repeated resources.vehicles.Vehicle vehicles = 4
224
- */
225
- vehicles: Vehicle[];
217
+ plates: string[];
226
218
  }
227
219
  /**
228
220
  * @generated from protobuf message resources.documents.templates.TemplateApproval
@@ -326,7 +318,7 @@ class Template$Type extends MessageType<Template> {
326
318
  { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
327
319
  { no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
328
320
  { no: 10, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
329
- { no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content_title\"" } },
321
+ { no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content_title\"" } },
330
322
  { no: 12, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "0", maxBytes: "2000000" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content\"" } },
331
323
  { no: 13, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "tagger.tags": "alias:\"state\"" } },
332
324
  { no: 14, name: "schema", kind: "message", T: () => TemplateSchema, options: { "tagger.tags": "alias:\"schema\"" } },
@@ -737,13 +729,14 @@ export const TemplateRequirements = new TemplateRequirements$Type();
737
729
  class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
738
730
  constructor() {
739
731
  super("resources.documents.templates.ObjectSpecs", [
740
- { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
732
+ { no: 1, name: "required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
741
733
  { no: 2, name: "min", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
742
734
  { no: 3, name: "max", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
743
735
  ]);
744
736
  }
745
737
  create(value?: PartialMessage<ObjectSpecs>): ObjectSpecs {
746
738
  const message = globalThis.Object.create((this.messagePrototype!));
739
+ message.required = false;
747
740
  if (value !== undefined)
748
741
  reflectionMergePartial<ObjectSpecs>(this, message, value);
749
742
  return message;
@@ -753,7 +746,7 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
753
746
  while (reader.pos < end) {
754
747
  let [fieldNo, wireType] = reader.tag();
755
748
  switch (fieldNo) {
756
- case /* optional bool required */ 1:
749
+ case /* bool required */ 1:
757
750
  message.required = reader.bool();
758
751
  break;
759
752
  case /* optional int32 min */ 2:
@@ -774,8 +767,8 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
774
767
  return message;
775
768
  }
776
769
  internalBinaryWrite(message: ObjectSpecs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
777
- /* optional bool required = 1; */
778
- if (message.required !== undefined)
770
+ /* bool required = 1; */
771
+ if (message.required !== false)
779
772
  writer.tag(1, WireType.Varint).bool(message.required);
780
773
  /* optional int32 min = 2; */
781
774
  if (message.min !== undefined)
@@ -794,40 +787,44 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
794
787
  */
795
788
  export const ObjectSpecs = new ObjectSpecs$Type();
796
789
  // @generated message type with reflection information, may provide speed optimized methods
797
- class TemplateData$Type extends MessageType<TemplateData> {
790
+ class TemplateSelection$Type extends MessageType<TemplateSelection> {
798
791
  constructor() {
799
- super("resources.documents.templates.TemplateData", [
800
- { no: 1, name: "active_char", kind: "message", T: () => User, options: { "buf.validate.field": { required: true } } },
801
- { no: 2, name: "documents", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentShort, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } },
802
- { no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserShort, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } },
803
- { no: 4, name: "vehicles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Vehicle, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } }
792
+ super("resources.documents.templates.TemplateSelection", [
793
+ { no: 1, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { int32: { gt: 0 } } } } } },
794
+ { no: 2, name: "document_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { int64: { gt: "0" } } } } } },
795
+ { no: 3, name: "plates", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { string: { minLen: "1", maxLen: "32" } } } } } }
804
796
  ]);
805
797
  }
806
- create(value?: PartialMessage<TemplateData>): TemplateData {
798
+ create(value?: PartialMessage<TemplateSelection>): TemplateSelection {
807
799
  const message = globalThis.Object.create((this.messagePrototype!));
808
- message.documents = [];
809
- message.users = [];
810
- message.vehicles = [];
800
+ message.userIds = [];
801
+ message.documentIds = [];
802
+ message.plates = [];
811
803
  if (value !== undefined)
812
- reflectionMergePartial<TemplateData>(this, message, value);
804
+ reflectionMergePartial<TemplateSelection>(this, message, value);
813
805
  return message;
814
806
  }
815
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateData): TemplateData {
807
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateSelection): TemplateSelection {
816
808
  let message = target ?? this.create(), end = reader.pos + length;
817
809
  while (reader.pos < end) {
818
810
  let [fieldNo, wireType] = reader.tag();
819
811
  switch (fieldNo) {
820
- case /* resources.users.User active_char */ 1:
821
- message.activeChar = User.internalBinaryRead(reader, reader.uint32(), options, message.activeChar);
822
- break;
823
- case /* repeated resources.documents.DocumentShort documents */ 2:
824
- message.documents.push(DocumentShort.internalBinaryRead(reader, reader.uint32(), options));
812
+ case /* repeated int32 user_ids */ 1:
813
+ if (wireType === WireType.LengthDelimited)
814
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
815
+ message.userIds.push(reader.int32());
816
+ else
817
+ message.userIds.push(reader.int32());
825
818
  break;
826
- case /* repeated resources.users.short.UserShort users */ 3:
827
- message.users.push(UserShort.internalBinaryRead(reader, reader.uint32(), options));
819
+ case /* repeated int64 document_ids */ 2:
820
+ if (wireType === WireType.LengthDelimited)
821
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
822
+ message.documentIds.push(reader.int64().toNumber());
823
+ else
824
+ message.documentIds.push(reader.int64().toNumber());
828
825
  break;
829
- case /* repeated resources.vehicles.Vehicle vehicles */ 4:
830
- message.vehicles.push(Vehicle.internalBinaryRead(reader, reader.uint32(), options));
826
+ case /* repeated string plates */ 3:
827
+ message.plates.push(reader.string());
831
828
  break;
832
829
  default:
833
830
  let u = options.readUnknownField;
@@ -840,19 +837,24 @@ class TemplateData$Type extends MessageType<TemplateData> {
840
837
  }
841
838
  return message;
842
839
  }
843
- internalBinaryWrite(message: TemplateData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
844
- /* resources.users.User active_char = 1; */
845
- if (message.activeChar)
846
- User.internalBinaryWrite(message.activeChar, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
847
- /* repeated resources.documents.DocumentShort documents = 2; */
848
- for (let i = 0; i < message.documents.length; i++)
849
- DocumentShort.internalBinaryWrite(message.documents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
850
- /* repeated resources.users.short.UserShort users = 3; */
851
- for (let i = 0; i < message.users.length; i++)
852
- UserShort.internalBinaryWrite(message.users[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
853
- /* repeated resources.vehicles.Vehicle vehicles = 4; */
854
- for (let i = 0; i < message.vehicles.length; i++)
855
- Vehicle.internalBinaryWrite(message.vehicles[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
840
+ internalBinaryWrite(message: TemplateSelection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
841
+ /* repeated int32 user_ids = 1; */
842
+ if (message.userIds.length) {
843
+ writer.tag(1, WireType.LengthDelimited).fork();
844
+ for (let i = 0; i < message.userIds.length; i++)
845
+ writer.int32(message.userIds[i]);
846
+ writer.join();
847
+ }
848
+ /* repeated int64 document_ids = 2; */
849
+ if (message.documentIds.length) {
850
+ writer.tag(2, WireType.LengthDelimited).fork();
851
+ for (let i = 0; i < message.documentIds.length; i++)
852
+ writer.int64(message.documentIds[i]);
853
+ writer.join();
854
+ }
855
+ /* repeated string plates = 3; */
856
+ for (let i = 0; i < message.plates.length; i++)
857
+ writer.tag(3, WireType.LengthDelimited).string(message.plates[i]);
856
858
  let u = options.writeUnknownFields;
857
859
  if (u !== false)
858
860
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -860,9 +862,9 @@ class TemplateData$Type extends MessageType<TemplateData> {
860
862
  }
861
863
  }
862
864
  /**
863
- * @generated MessageType for protobuf message resources.documents.templates.TemplateData
865
+ * @generated MessageType for protobuf message resources.documents.templates.TemplateSelection
864
866
  */
865
- export const TemplateData = new TemplateData$Type();
867
+ export const TemplateSelection = new TemplateSelection$Type();
866
868
  // @generated message type with reflection information, may provide speed optimized methods
867
869
  class TemplateApproval$Type extends MessageType<TemplateApproval> {
868
870
  constructor() {
@@ -81,6 +81,26 @@ export interface WorkflowCronData {
81
81
  * @generated from protobuf field: int64 last_doc_id = 1
82
82
  */
83
83
  lastDocId: number;
84
+ /**
85
+ * @generated from protobuf field: int64 processed_rows = 2
86
+ */
87
+ processedRows: number;
88
+ /**
89
+ * @generated from protobuf field: int64 reminders_sent = 3
90
+ */
91
+ remindersSent: number;
92
+ /**
93
+ * @generated from protobuf field: int64 auto_closed_rows = 4
94
+ */
95
+ autoClosedRows: number;
96
+ /**
97
+ * @generated from protobuf field: int64 deleted_rows = 5
98
+ */
99
+ deletedRows: number;
100
+ /**
101
+ * @generated from protobuf field: int64 updated_rows = 6
102
+ */
103
+ updatedRows: number;
84
104
  }
85
105
  /**
86
106
  * @generated from protobuf message resources.documents.workflow.WorkflowState
@@ -380,12 +400,22 @@ export const AutoCloseSettings = new AutoCloseSettings$Type();
380
400
  class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
381
401
  constructor() {
382
402
  super("resources.documents.workflow.WorkflowCronData", [
383
- { no: 1, name: "last_doc_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
403
+ { no: 1, name: "last_doc_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
404
+ { no: 2, name: "processed_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
405
+ { no: 3, name: "reminders_sent", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
406
+ { no: 4, name: "auto_closed_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
407
+ { no: 5, name: "deleted_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
408
+ { no: 6, name: "updated_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
384
409
  ]);
385
410
  }
386
411
  create(value?: PartialMessage<WorkflowCronData>): WorkflowCronData {
387
412
  const message = globalThis.Object.create((this.messagePrototype!));
388
413
  message.lastDocId = 0;
414
+ message.processedRows = 0;
415
+ message.remindersSent = 0;
416
+ message.autoClosedRows = 0;
417
+ message.deletedRows = 0;
418
+ message.updatedRows = 0;
389
419
  if (value !== undefined)
390
420
  reflectionMergePartial<WorkflowCronData>(this, message, value);
391
421
  return message;
@@ -398,6 +428,21 @@ class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
398
428
  case /* int64 last_doc_id */ 1:
399
429
  message.lastDocId = reader.int64().toNumber();
400
430
  break;
431
+ case /* int64 processed_rows */ 2:
432
+ message.processedRows = reader.int64().toNumber();
433
+ break;
434
+ case /* int64 reminders_sent */ 3:
435
+ message.remindersSent = reader.int64().toNumber();
436
+ break;
437
+ case /* int64 auto_closed_rows */ 4:
438
+ message.autoClosedRows = reader.int64().toNumber();
439
+ break;
440
+ case /* int64 deleted_rows */ 5:
441
+ message.deletedRows = reader.int64().toNumber();
442
+ break;
443
+ case /* int64 updated_rows */ 6:
444
+ message.updatedRows = reader.int64().toNumber();
445
+ break;
401
446
  default:
402
447
  let u = options.readUnknownField;
403
448
  if (u === "throw")
@@ -413,6 +458,21 @@ class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
413
458
  /* int64 last_doc_id = 1; */
414
459
  if (message.lastDocId !== 0)
415
460
  writer.tag(1, WireType.Varint).int64(message.lastDocId);
461
+ /* int64 processed_rows = 2; */
462
+ if (message.processedRows !== 0)
463
+ writer.tag(2, WireType.Varint).int64(message.processedRows);
464
+ /* int64 reminders_sent = 3; */
465
+ if (message.remindersSent !== 0)
466
+ writer.tag(3, WireType.Varint).int64(message.remindersSent);
467
+ /* int64 auto_closed_rows = 4; */
468
+ if (message.autoClosedRows !== 0)
469
+ writer.tag(4, WireType.Varint).int64(message.autoClosedRows);
470
+ /* int64 deleted_rows = 5; */
471
+ if (message.deletedRows !== 0)
472
+ writer.tag(5, WireType.Varint).int64(message.deletedRows);
473
+ /* int64 updated_rows = 6; */
474
+ if (message.updatedRows !== 0)
475
+ writer.tag(6, WireType.Varint).int64(message.updatedRows);
416
476
  let u = options.writeUnknownFields;
417
477
  if (u !== false)
418
478
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -0,0 +1,29 @@
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/jobs/groups/access/access.proto" (package "resources.jobs.groups.access", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ /**
6
+ * @generated from protobuf enum resources.jobs.groups.access.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_VIEW = 2;
19
+ */
20
+ VIEW = 2,
21
+ /**
22
+ * @generated from protobuf enum value: ACCESS_LEVEL_EDIT = 4;
23
+ */
24
+ EDIT = 4,
25
+ /**
26
+ * @generated from protobuf enum value: ACCESS_LEVEL_MANAGE = 5;
27
+ */
28
+ MANAGE = 5
29
+ }