@fivenet-app/gen 2026.5.1 → 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 (74) hide show
  1. package/clients.ts +6 -0
  2. package/codegen/perms/perms.ts +14 -2
  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 +343 -3
  8. package/resources/access/access.ts +481 -0
  9. package/resources/calendar/access/access.ts +0 -330
  10. package/resources/calendar/calendar.ts +307 -25
  11. package/resources/calendar/entries/entries.ts +204 -11
  12. package/resources/centrum/units/access/access.ts +0 -373
  13. package/resources/centrum/units/units.ts +20 -8
  14. package/resources/citizens/labels/access.ts +0 -191
  15. package/resources/citizens/labels/labels.ts +20 -8
  16. package/resources/common/content/diff_activity.ts +1 -1
  17. package/resources/cron/cron.ts +1 -1
  18. package/resources/documents/access/access.ts +0 -329
  19. package/resources/documents/activity/activity.ts +49 -45
  20. package/resources/documents/documents.ts +1 -1
  21. package/resources/documents/requests/requests.ts +1 -1
  22. package/resources/documents/stamps/stamp.ts +40 -210
  23. package/resources/documents/templates/templates.ts +158 -318
  24. package/resources/jobs/colleagues/activity/activity.ts +1 -1
  25. package/resources/jobs/conduct/conduct.ts +2 -2
  26. package/resources/jobs/jobs.ts +22 -0
  27. package/resources/jobs/labels/labels.ts +9 -9
  28. package/resources/laws/laws.ts +24 -0
  29. package/resources/livemap/markers/marker_marker.ts +311 -4
  30. package/resources/mailer/access/access.ts +0 -457
  31. package/resources/mailer/emails/email.ts +4 -4
  32. package/resources/notifications/events/events.ts +18 -1
  33. package/resources/qualifications/access/access.ts +0 -248
  34. package/resources/qualifications/qualifications.ts +9 -9
  35. package/resources/settings/config.ts +53 -5
  36. package/resources/settings/data.ts +1 -1
  37. package/resources/stats/stats.ts +32 -20
  38. package/resources/sync/data/data.ts +13 -1
  39. package/resources/userinfo/userinfo.ts +202 -51
  40. package/resources/users/activity/activity.ts +1 -1
  41. package/resources/wiki/access/access.ts +0 -330
  42. package/resources/wiki/activity/activity.ts +45 -45
  43. package/resources/wiki/page.ts +9 -9
  44. package/services/calendar/calendar.ts +1 -1
  45. package/services/calendar/entries.ts +12 -1
  46. package/services/centrum/dispatches.ts +27 -7
  47. package/services/centrum/units.client.ts +15 -2
  48. package/services/centrum/units.ts +231 -123
  49. package/services/citizens/citizens.ts +1 -1
  50. package/services/citizens/labels.client.ts +7 -20
  51. package/services/citizens/labels.ts +35 -183
  52. package/services/documents/approval.ts +15 -4
  53. package/services/documents/collab.ts +1 -1
  54. package/services/documents/documents.ts +38 -38
  55. package/services/documents/stats.ts +14 -2
  56. package/services/filestore/filestore.ts +4 -4
  57. package/services/jobs/colleagues.ts +3 -3
  58. package/services/jobs/conduct.ts +2 -2
  59. package/services/jobs/groups.client.ts +22 -0
  60. package/services/jobs/groups.ts +9 -0
  61. package/services/jobs/timeclock.ts +2 -2
  62. package/services/mailer/thread.ts +2 -2
  63. package/services/qualifications/qualifications.ts +52 -34
  64. package/services/settings/accounts.ts +5 -5
  65. package/services/settings/config.ts +2 -2
  66. package/services/settings/cron.ts +2 -2
  67. package/services/settings/laws.client.ts +28 -2
  68. package/services/settings/laws.ts +229 -1
  69. package/services/settings/system.ts +6 -6
  70. package/services/sync/sync.client.ts +42 -14
  71. package/services/sync/sync.ts +162 -13
  72. package/services/wiki/wiki.client.ts +15 -2
  73. package/services/wiki/wiki.ts +122 -0
  74. package/svcs.ts +18 -2
@@ -11,8 +11,8 @@ 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 { DocumentUserAccess } from "../access/access";
15
- import { DocumentJobAccess } from "../access/access";
14
+ import { UserAccess } from "../../access/access";
15
+ import { JobAccess } from "../../access/access";
16
16
  import { AccessLevel } from "../access/access";
17
17
  import { ContentDiff } from "../../common/content/diff_activity";
18
18
  import { UserShort } from "../../users/short/user";
@@ -189,34 +189,34 @@ export interface DocAccessUpdated {
189
189
  */
190
190
  export interface DocAccessJobsDiff {
191
191
  /**
192
- * @generated from protobuf field: repeated resources.documents.access.DocumentJobAccess to_create = 1
192
+ * @generated from protobuf field: repeated resources.access.JobAccess to_create = 1
193
193
  */
194
- toCreate: DocumentJobAccess[];
194
+ toCreate: JobAccess[];
195
195
  /**
196
- * @generated from protobuf field: repeated resources.documents.access.DocumentJobAccess to_update = 2
196
+ * @generated from protobuf field: repeated resources.access.JobAccess to_update = 2
197
197
  */
198
- toUpdate: DocumentJobAccess[];
198
+ toUpdate: JobAccess[];
199
199
  /**
200
- * @generated from protobuf field: repeated resources.documents.access.DocumentJobAccess to_delete = 3
200
+ * @generated from protobuf field: repeated resources.access.JobAccess to_delete = 3
201
201
  */
202
- toDelete: DocumentJobAccess[];
202
+ toDelete: JobAccess[];
203
203
  }
204
204
  /**
205
205
  * @generated from protobuf message resources.documents.activity.DocAccessUsersDiff
206
206
  */
207
207
  export interface DocAccessUsersDiff {
208
208
  /**
209
- * @generated from protobuf field: repeated resources.documents.access.DocumentUserAccess to_create = 1
209
+ * @generated from protobuf field: repeated resources.access.UserAccess to_create = 1
210
210
  */
211
- toCreate: DocumentUserAccess[];
211
+ toCreate: UserAccess[];
212
212
  /**
213
- * @generated from protobuf field: repeated resources.documents.access.DocumentUserAccess to_update = 2
213
+ * @generated from protobuf field: repeated resources.access.UserAccess to_update = 2
214
214
  */
215
- toUpdate: DocumentUserAccess[];
215
+ toUpdate: UserAccess[];
216
216
  /**
217
- * @generated from protobuf field: repeated resources.documents.access.DocumentUserAccess to_delete = 3
217
+ * @generated from protobuf field: repeated resources.access.UserAccess to_delete = 3
218
218
  */
219
- toDelete: DocumentUserAccess[];
219
+ toDelete: UserAccess[];
220
220
  }
221
221
  /**
222
222
  * @generated from protobuf message resources.documents.activity.DocSigningRequested
@@ -295,6 +295,10 @@ export enum DocActivityType {
295
295
  * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_COMMENT_DELETED = 12;
296
296
  */
297
297
  COMMENT_DELETED = 12,
298
+ /**
299
+ * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_COMMENT_RESTORED = 22;
300
+ */
301
+ COMMENT_RESTORED = 22,
298
302
  /**
299
303
  * Requests
300
304
  *
@@ -355,7 +359,7 @@ class DocActivity$Type extends MessageType<DocActivity> {
355
359
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
356
360
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
357
361
  { no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
358
- { no: 4, name: "activity_type", kind: "enum", T: () => ["resources.documents.activity.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"] },
362
+ { no: 4, name: "activity_type", kind: "enum", T: () => ["resources.documents.activity.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
359
363
  { no: 5, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
360
364
  { no: 6, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
361
365
  { no: 7, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
@@ -852,9 +856,9 @@ export const DocAccessUpdated = new DocAccessUpdated$Type();
852
856
  class DocAccessJobsDiff$Type extends MessageType<DocAccessJobsDiff> {
853
857
  constructor() {
854
858
  super("resources.documents.activity.DocAccessJobsDiff", [
855
- { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
856
- { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
857
- { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
859
+ { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
860
+ { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
861
+ { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
858
862
  ]);
859
863
  }
860
864
  create(value?: PartialMessage<DocAccessJobsDiff>): DocAccessJobsDiff {
@@ -871,14 +875,14 @@ class DocAccessJobsDiff$Type extends MessageType<DocAccessJobsDiff> {
871
875
  while (reader.pos < end) {
872
876
  let [fieldNo, wireType] = reader.tag();
873
877
  switch (fieldNo) {
874
- case /* repeated resources.documents.access.DocumentJobAccess to_create */ 1:
875
- message.toCreate.push(DocumentJobAccess.internalBinaryRead(reader, reader.uint32(), options));
878
+ case /* repeated resources.access.JobAccess to_create */ 1:
879
+ message.toCreate.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
876
880
  break;
877
- case /* repeated resources.documents.access.DocumentJobAccess to_update */ 2:
878
- message.toUpdate.push(DocumentJobAccess.internalBinaryRead(reader, reader.uint32(), options));
881
+ case /* repeated resources.access.JobAccess to_update */ 2:
882
+ message.toUpdate.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
879
883
  break;
880
- case /* repeated resources.documents.access.DocumentJobAccess to_delete */ 3:
881
- message.toDelete.push(DocumentJobAccess.internalBinaryRead(reader, reader.uint32(), options));
884
+ case /* repeated resources.access.JobAccess to_delete */ 3:
885
+ message.toDelete.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
882
886
  break;
883
887
  default:
884
888
  let u = options.readUnknownField;
@@ -892,15 +896,15 @@ class DocAccessJobsDiff$Type extends MessageType<DocAccessJobsDiff> {
892
896
  return message;
893
897
  }
894
898
  internalBinaryWrite(message: DocAccessJobsDiff, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
895
- /* repeated resources.documents.access.DocumentJobAccess to_create = 1; */
899
+ /* repeated resources.access.JobAccess to_create = 1; */
896
900
  for (let i = 0; i < message.toCreate.length; i++)
897
- DocumentJobAccess.internalBinaryWrite(message.toCreate[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
898
- /* repeated resources.documents.access.DocumentJobAccess to_update = 2; */
901
+ JobAccess.internalBinaryWrite(message.toCreate[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
902
+ /* repeated resources.access.JobAccess to_update = 2; */
899
903
  for (let i = 0; i < message.toUpdate.length; i++)
900
- DocumentJobAccess.internalBinaryWrite(message.toUpdate[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
901
- /* repeated resources.documents.access.DocumentJobAccess to_delete = 3; */
904
+ JobAccess.internalBinaryWrite(message.toUpdate[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
905
+ /* repeated resources.access.JobAccess to_delete = 3; */
902
906
  for (let i = 0; i < message.toDelete.length; i++)
903
- DocumentJobAccess.internalBinaryWrite(message.toDelete[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
907
+ JobAccess.internalBinaryWrite(message.toDelete[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
904
908
  let u = options.writeUnknownFields;
905
909
  if (u !== false)
906
910
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -915,9 +919,9 @@ export const DocAccessJobsDiff = new DocAccessJobsDiff$Type();
915
919
  class DocAccessUsersDiff$Type extends MessageType<DocAccessUsersDiff> {
916
920
  constructor() {
917
921
  super("resources.documents.activity.DocAccessUsersDiff", [
918
- { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
919
- { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
920
- { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
922
+ { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
923
+ { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
924
+ { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
921
925
  ]);
922
926
  }
923
927
  create(value?: PartialMessage<DocAccessUsersDiff>): DocAccessUsersDiff {
@@ -934,14 +938,14 @@ class DocAccessUsersDiff$Type extends MessageType<DocAccessUsersDiff> {
934
938
  while (reader.pos < end) {
935
939
  let [fieldNo, wireType] = reader.tag();
936
940
  switch (fieldNo) {
937
- case /* repeated resources.documents.access.DocumentUserAccess to_create */ 1:
938
- message.toCreate.push(DocumentUserAccess.internalBinaryRead(reader, reader.uint32(), options));
941
+ case /* repeated resources.access.UserAccess to_create */ 1:
942
+ message.toCreate.push(UserAccess.internalBinaryRead(reader, reader.uint32(), options));
939
943
  break;
940
- case /* repeated resources.documents.access.DocumentUserAccess to_update */ 2:
941
- message.toUpdate.push(DocumentUserAccess.internalBinaryRead(reader, reader.uint32(), options));
944
+ case /* repeated resources.access.UserAccess to_update */ 2:
945
+ message.toUpdate.push(UserAccess.internalBinaryRead(reader, reader.uint32(), options));
942
946
  break;
943
- case /* repeated resources.documents.access.DocumentUserAccess to_delete */ 3:
944
- message.toDelete.push(DocumentUserAccess.internalBinaryRead(reader, reader.uint32(), options));
947
+ case /* repeated resources.access.UserAccess to_delete */ 3:
948
+ message.toDelete.push(UserAccess.internalBinaryRead(reader, reader.uint32(), options));
945
949
  break;
946
950
  default:
947
951
  let u = options.readUnknownField;
@@ -955,15 +959,15 @@ class DocAccessUsersDiff$Type extends MessageType<DocAccessUsersDiff> {
955
959
  return message;
956
960
  }
957
961
  internalBinaryWrite(message: DocAccessUsersDiff, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
958
- /* repeated resources.documents.access.DocumentUserAccess to_create = 1; */
962
+ /* repeated resources.access.UserAccess to_create = 1; */
959
963
  for (let i = 0; i < message.toCreate.length; i++)
960
- DocumentUserAccess.internalBinaryWrite(message.toCreate[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
961
- /* repeated resources.documents.access.DocumentUserAccess to_update = 2; */
964
+ UserAccess.internalBinaryWrite(message.toCreate[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
965
+ /* repeated resources.access.UserAccess to_update = 2; */
962
966
  for (let i = 0; i < message.toUpdate.length; i++)
963
- DocumentUserAccess.internalBinaryWrite(message.toUpdate[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
964
- /* repeated resources.documents.access.DocumentUserAccess to_delete = 3; */
967
+ UserAccess.internalBinaryWrite(message.toUpdate[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
968
+ /* repeated resources.access.UserAccess to_delete = 3; */
965
969
  for (let i = 0; i < message.toDelete.length; i++)
966
- DocumentUserAccess.internalBinaryWrite(message.toDelete[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
970
+ UserAccess.internalBinaryWrite(message.toDelete[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
967
971
  let u = options.writeUnknownFields;
968
972
  if (u !== false)
969
973
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -312,7 +312,7 @@ class Document$Type extends MessageType<Document> {
312
312
  { no: 17, name: "pin", kind: "message", T: () => DocumentPin, options: { "tagger.tags": "alias:\"pin\"" } },
313
313
  { no: 18, name: "workflow_state", kind: "message", T: () => WorkflowState },
314
314
  { no: 19, name: "workflow_user", kind: "message", T: () => WorkflowUserState },
315
- { no: 20, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
315
+ { no: 20, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "buf.validate.field": { repeated: { maxItems: "5" } }, "tagger.tags": "alias:\"files\"" } }
316
316
  ]);
317
317
  }
318
318
  create(value?: PartialMessage<Document>): Document {
@@ -76,7 +76,7 @@ class DocRequest$Type extends MessageType<DocRequest> {
76
76
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
77
77
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
78
78
  { no: 4, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
79
- { no: 5, name: "request_type", kind: "enum", T: () => ["resources.documents.activity.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"], options: { "buf.validate.field": { enum: { in: [13, 14, 15, 16, 17, 18] } } } },
79
+ { no: 5, name: "request_type", kind: "enum", T: () => ["resources.documents.activity.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true, in: [13, 14, 15, 16, 17, 18] } } } },
80
80
  { no: 6, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
81
81
  { no: 7, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
82
82
  { no: 8, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
@@ -11,6 +11,7 @@ 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 { Access } from "../../access/access";
14
15
  import { Timestamp } from "../../timestamp/timestamp";
15
16
  /**
16
17
  * @generated from protobuf message resources.documents.stamps.Stamp
@@ -33,65 +34,27 @@ export interface Stamp {
33
34
  */
34
35
  createdAt?: Timestamp;
35
36
  /**
36
- * @generated from protobuf field: string name = 5
37
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 5
37
38
  */
38
- name: string;
39
- /**
40
- * Parameterized SVG with slots
41
- *
42
- * @generated from protobuf field: string svg_template = 6
43
- */
44
- svgTemplate: string;
45
- /**
46
- * @generated from protobuf field: resources.documents.stamps.StampAccess access = 7
47
- */
48
- access?: StampAccess;
49
- }
50
- /**
51
- * @generated from protobuf message resources.documents.stamps.StampAccess
52
- */
53
- export interface StampAccess {
54
- /**
55
- * @generated from protobuf field: repeated resources.documents.stamps.StampJobAccess jobs = 1
56
- */
57
- jobs: StampJobAccess[];
58
- }
59
- /**
60
- * @generated from protobuf message resources.documents.stamps.StampJobAccess
61
- */
62
- export interface StampJobAccess {
63
- /**
64
- * @generated from protobuf field: int64 id = 1
65
- */
66
- id: number;
67
- /**
68
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
69
- */
70
- createdAt?: Timestamp;
39
+ updatedAt?: Timestamp;
71
40
  /**
72
- * @generated from protobuf field: int64 target_id = 3
41
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 6
73
42
  */
74
- targetId: number;
43
+ deletedAt?: Timestamp;
75
44
  /**
76
- * @generated from protobuf field: string job = 4
45
+ * @generated from protobuf field: string name = 7
77
46
  */
78
- job: string;
79
- /**
80
- * @generated from protobuf field: optional string job_label = 5
81
- */
82
- jobLabel?: string;
83
- /**
84
- * @generated from protobuf field: int32 minimum_grade = 6
85
- */
86
- minimumGrade: number;
47
+ name: string;
87
48
  /**
88
- * @generated from protobuf field: optional string job_grade_label = 7
49
+ * Parameterized SVG with slots
50
+ *
51
+ * @generated from protobuf field: string svg_template = 8
89
52
  */
90
- jobGradeLabel?: string;
53
+ svgTemplate: string;
91
54
  /**
92
- * @generated from protobuf field: resources.documents.stamps.StampAccessLevel access = 8
55
+ * @generated from protobuf field: resources.access.Access access = 9
93
56
  */
94
- access: StampAccessLevel;
57
+ access?: Access;
95
58
  }
96
59
  /**
97
60
  * @generated from protobuf enum resources.documents.stamps.StampAccessLevel
@@ -122,9 +85,11 @@ class Stamp$Type extends MessageType<Stamp> {
122
85
  { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
123
86
  { no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
124
87
  { no: 4, name: "created_at", kind: "message", T: () => Timestamp },
125
- { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "120" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
126
- { no: 6, name: "svg_template", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "SanitizeSVG" } } },
127
- { no: 7, name: "access", kind: "message", T: () => StampAccess }
88
+ { no: 5, name: "updated_at", kind: "message", T: () => Timestamp },
89
+ { no: 6, name: "deleted_at", kind: "message", T: () => Timestamp },
90
+ { no: 7, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "120" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
91
+ { no: 8, name: "svg_template", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "SanitizeSVG" } } },
92
+ { no: 9, name: "access", kind: "message", T: () => Access }
128
93
  ]);
129
94
  }
130
95
  create(value?: PartialMessage<Stamp>): Stamp {
@@ -154,14 +119,20 @@ class Stamp$Type extends MessageType<Stamp> {
154
119
  case /* resources.timestamp.Timestamp created_at */ 4:
155
120
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
156
121
  break;
157
- case /* string name */ 5:
122
+ case /* optional resources.timestamp.Timestamp updated_at */ 5:
123
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
124
+ break;
125
+ case /* optional resources.timestamp.Timestamp deleted_at */ 6:
126
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
127
+ break;
128
+ case /* string name */ 7:
158
129
  message.name = reader.string();
159
130
  break;
160
- case /* string svg_template */ 6:
131
+ case /* string svg_template */ 8:
161
132
  message.svgTemplate = reader.string();
162
133
  break;
163
- case /* resources.documents.stamps.StampAccess access */ 7:
164
- message.access = StampAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
134
+ case /* resources.access.Access access */ 9:
135
+ message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
165
136
  break;
166
137
  default:
167
138
  let u = options.readUnknownField;
@@ -187,15 +158,21 @@ class Stamp$Type extends MessageType<Stamp> {
187
158
  /* resources.timestamp.Timestamp created_at = 4; */
188
159
  if (message.createdAt)
189
160
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
190
- /* string name = 5; */
161
+ /* optional resources.timestamp.Timestamp updated_at = 5; */
162
+ if (message.updatedAt)
163
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
164
+ /* optional resources.timestamp.Timestamp deleted_at = 6; */
165
+ if (message.deletedAt)
166
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
167
+ /* string name = 7; */
191
168
  if (message.name !== "")
192
- writer.tag(5, WireType.LengthDelimited).string(message.name);
193
- /* string svg_template = 6; */
169
+ writer.tag(7, WireType.LengthDelimited).string(message.name);
170
+ /* string svg_template = 8; */
194
171
  if (message.svgTemplate !== "")
195
- writer.tag(6, WireType.LengthDelimited).string(message.svgTemplate);
196
- /* resources.documents.stamps.StampAccess access = 7; */
172
+ writer.tag(8, WireType.LengthDelimited).string(message.svgTemplate);
173
+ /* resources.access.Access access = 9; */
197
174
  if (message.access)
198
- StampAccess.internalBinaryWrite(message.access, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
175
+ Access.internalBinaryWrite(message.access, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
199
176
  let u = options.writeUnknownFields;
200
177
  if (u !== false)
201
178
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -206,150 +183,3 @@ class Stamp$Type extends MessageType<Stamp> {
206
183
  * @generated MessageType for protobuf message resources.documents.stamps.Stamp
207
184
  */
208
185
  export const Stamp = new Stamp$Type();
209
- // @generated message type with reflection information, may provide speed optimized methods
210
- class StampAccess$Type extends MessageType<StampAccess> {
211
- constructor() {
212
- super("resources.documents.stamps.StampAccess", [
213
- { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => StampJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } }
214
- ]);
215
- }
216
- create(value?: PartialMessage<StampAccess>): StampAccess {
217
- const message = globalThis.Object.create((this.messagePrototype!));
218
- message.jobs = [];
219
- if (value !== undefined)
220
- reflectionMergePartial<StampAccess>(this, message, value);
221
- return message;
222
- }
223
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StampAccess): StampAccess {
224
- let message = target ?? this.create(), end = reader.pos + length;
225
- while (reader.pos < end) {
226
- let [fieldNo, wireType] = reader.tag();
227
- switch (fieldNo) {
228
- case /* repeated resources.documents.stamps.StampJobAccess jobs */ 1:
229
- message.jobs.push(StampJobAccess.internalBinaryRead(reader, reader.uint32(), options));
230
- break;
231
- default:
232
- let u = options.readUnknownField;
233
- if (u === "throw")
234
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
235
- let d = reader.skip(wireType);
236
- if (u !== false)
237
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
238
- }
239
- }
240
- return message;
241
- }
242
- internalBinaryWrite(message: StampAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
243
- /* repeated resources.documents.stamps.StampJobAccess jobs = 1; */
244
- for (let i = 0; i < message.jobs.length; i++)
245
- StampJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
246
- let u = options.writeUnknownFields;
247
- if (u !== false)
248
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
249
- return writer;
250
- }
251
- }
252
- /**
253
- * @generated MessageType for protobuf message resources.documents.stamps.StampAccess
254
- */
255
- export const StampAccess = new StampAccess$Type();
256
- // @generated message type with reflection information, may provide speed optimized methods
257
- class StampJobAccess$Type extends MessageType<StampJobAccess> {
258
- constructor() {
259
- super("resources.documents.stamps.StampJobAccess", [
260
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
261
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
262
- { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
263
- { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
264
- { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
265
- { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
266
- { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
267
- { no: 8, name: "access", kind: "enum", T: () => ["resources.documents.stamps.StampAccessLevel", StampAccessLevel, "STAMP_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
268
- ]);
269
- }
270
- create(value?: PartialMessage<StampJobAccess>): StampJobAccess {
271
- const message = globalThis.Object.create((this.messagePrototype!));
272
- message.id = 0;
273
- message.targetId = 0;
274
- message.job = "";
275
- message.minimumGrade = 0;
276
- message.access = 0;
277
- if (value !== undefined)
278
- reflectionMergePartial<StampJobAccess>(this, message, value);
279
- return message;
280
- }
281
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StampJobAccess): StampJobAccess {
282
- let message = target ?? this.create(), end = reader.pos + length;
283
- while (reader.pos < end) {
284
- let [fieldNo, wireType] = reader.tag();
285
- switch (fieldNo) {
286
- case /* int64 id */ 1:
287
- message.id = reader.int64().toNumber();
288
- break;
289
- case /* optional resources.timestamp.Timestamp created_at */ 2:
290
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
291
- break;
292
- case /* int64 target_id */ 3:
293
- message.targetId = reader.int64().toNumber();
294
- break;
295
- case /* string job */ 4:
296
- message.job = reader.string();
297
- break;
298
- case /* optional string job_label */ 5:
299
- message.jobLabel = reader.string();
300
- break;
301
- case /* int32 minimum_grade */ 6:
302
- message.minimumGrade = reader.int32();
303
- break;
304
- case /* optional string job_grade_label */ 7:
305
- message.jobGradeLabel = reader.string();
306
- break;
307
- case /* resources.documents.stamps.StampAccessLevel access */ 8:
308
- message.access = reader.int32();
309
- break;
310
- default:
311
- let u = options.readUnknownField;
312
- if (u === "throw")
313
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
314
- let d = reader.skip(wireType);
315
- if (u !== false)
316
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
317
- }
318
- }
319
- return message;
320
- }
321
- internalBinaryWrite(message: StampJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
322
- /* int64 id = 1; */
323
- if (message.id !== 0)
324
- writer.tag(1, WireType.Varint).int64(message.id);
325
- /* optional resources.timestamp.Timestamp created_at = 2; */
326
- if (message.createdAt)
327
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
328
- /* int64 target_id = 3; */
329
- if (message.targetId !== 0)
330
- writer.tag(3, WireType.Varint).int64(message.targetId);
331
- /* string job = 4; */
332
- if (message.job !== "")
333
- writer.tag(4, WireType.LengthDelimited).string(message.job);
334
- /* optional string job_label = 5; */
335
- if (message.jobLabel !== undefined)
336
- writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
337
- /* int32 minimum_grade = 6; */
338
- if (message.minimumGrade !== 0)
339
- writer.tag(6, WireType.Varint).int32(message.minimumGrade);
340
- /* optional string job_grade_label = 7; */
341
- if (message.jobGradeLabel !== undefined)
342
- writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
343
- /* resources.documents.stamps.StampAccessLevel access = 8; */
344
- if (message.access !== 0)
345
- writer.tag(8, WireType.Varint).int32(message.access);
346
- let u = options.writeUnknownFields;
347
- if (u !== false)
348
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
349
- return writer;
350
- }
351
- }
352
- /**
353
- * @generated MessageType for protobuf message resources.documents.stamps.StampJobAccess
354
- */
355
- export const StampJobAccess = new StampJobAccess$Type();