@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
@@ -13,6 +13,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
15
  import { Label } from "../../resources/citizens/labels/labels";
16
+ import { AccessLevel } from "../../resources/citizens/labels/access";
16
17
  /**
17
18
  * @generated from protobuf message services.citizens.ListLabelsRequest
18
19
  */
@@ -21,6 +22,14 @@ export interface ListLabelsRequest {
21
22
  * @generated from protobuf field: optional string search = 1
22
23
  */
23
24
  search?: string;
25
+ /**
26
+ * @generated from protobuf field: optional resources.citizens.labels.AccessLevel min_access = 2
27
+ */
28
+ minAccess?: AccessLevel;
29
+ /**
30
+ * @generated from protobuf field: optional bool own_job_only = 3
31
+ */
32
+ ownJobOnly?: boolean;
24
33
  }
25
34
  /**
26
35
  * @generated from protobuf message services.citizens.ListLabelsResponse
@@ -81,11 +90,27 @@ export interface DeleteLabelRequest {
81
90
  */
82
91
  export interface DeleteLabelResponse {
83
92
  }
93
+ /**
94
+ * @generated from protobuf message services.citizens.ReorderLabelsRequest
95
+ */
96
+ export interface ReorderLabelsRequest {
97
+ /**
98
+ * @generated from protobuf field: repeated int64 label_ids = 1
99
+ */
100
+ labelIds: number[];
101
+ }
102
+ /**
103
+ * @generated from protobuf message services.citizens.ReorderLabelsResponse
104
+ */
105
+ export interface ReorderLabelsResponse {
106
+ }
84
107
  // @generated message type with reflection information, may provide speed optimized methods
85
108
  class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
86
109
  constructor() {
87
110
  super("services.citizens.ListLabelsRequest", [
88
- { no: 1, name: "search", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
111
+ { no: 1, name: "search", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
112
+ { no: 2, name: "min_access", kind: "enum", opt: true, T: () => ["resources.citizens.labels.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
113
+ { no: 3, name: "own_job_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
89
114
  ]);
90
115
  }
91
116
  create(value?: PartialMessage<ListLabelsRequest>): ListLabelsRequest {
@@ -102,6 +127,12 @@ class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
102
127
  case /* optional string search */ 1:
103
128
  message.search = reader.string();
104
129
  break;
130
+ case /* optional resources.citizens.labels.AccessLevel min_access */ 2:
131
+ message.minAccess = reader.int32();
132
+ break;
133
+ case /* optional bool own_job_only */ 3:
134
+ message.ownJobOnly = reader.bool();
135
+ break;
105
136
  default:
106
137
  let u = options.readUnknownField;
107
138
  if (u === "throw")
@@ -117,6 +148,12 @@ class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
117
148
  /* optional string search = 1; */
118
149
  if (message.search !== undefined)
119
150
  writer.tag(1, WireType.LengthDelimited).string(message.search);
151
+ /* optional resources.citizens.labels.AccessLevel min_access = 2; */
152
+ if (message.minAccess !== undefined)
153
+ writer.tag(2, WireType.Varint).int32(message.minAccess);
154
+ /* optional bool own_job_only = 3; */
155
+ if (message.ownJobOnly !== undefined)
156
+ writer.tag(3, WireType.Varint).bool(message.ownJobOnly);
120
157
  let u = options.writeUnknownFields;
121
158
  if (u !== false)
122
159
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -444,12 +481,106 @@ class DeleteLabelResponse$Type extends MessageType<DeleteLabelResponse> {
444
481
  * @generated MessageType for protobuf message services.citizens.DeleteLabelResponse
445
482
  */
446
483
  export const DeleteLabelResponse = new DeleteLabelResponse$Type();
484
+ // @generated message type with reflection information, may provide speed optimized methods
485
+ class ReorderLabelsRequest$Type extends MessageType<ReorderLabelsRequest> {
486
+ constructor() {
487
+ super("services.citizens.ReorderLabelsRequest", [
488
+ { no: 1, name: "label_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { minItems: "1", maxItems: "50", items: { int64: { gt: "0" } } } } } }
489
+ ]);
490
+ }
491
+ create(value?: PartialMessage<ReorderLabelsRequest>): ReorderLabelsRequest {
492
+ const message = globalThis.Object.create((this.messagePrototype!));
493
+ message.labelIds = [];
494
+ if (value !== undefined)
495
+ reflectionMergePartial<ReorderLabelsRequest>(this, message, value);
496
+ return message;
497
+ }
498
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReorderLabelsRequest): ReorderLabelsRequest {
499
+ let message = target ?? this.create(), end = reader.pos + length;
500
+ while (reader.pos < end) {
501
+ let [fieldNo, wireType] = reader.tag();
502
+ switch (fieldNo) {
503
+ case /* repeated int64 label_ids */ 1:
504
+ if (wireType === WireType.LengthDelimited)
505
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
506
+ message.labelIds.push(reader.int64().toNumber());
507
+ else
508
+ message.labelIds.push(reader.int64().toNumber());
509
+ break;
510
+ default:
511
+ let u = options.readUnknownField;
512
+ if (u === "throw")
513
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
514
+ let d = reader.skip(wireType);
515
+ if (u !== false)
516
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
517
+ }
518
+ }
519
+ return message;
520
+ }
521
+ internalBinaryWrite(message: ReorderLabelsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
522
+ /* repeated int64 label_ids = 1; */
523
+ if (message.labelIds.length) {
524
+ writer.tag(1, WireType.LengthDelimited).fork();
525
+ for (let i = 0; i < message.labelIds.length; i++)
526
+ writer.int64(message.labelIds[i]);
527
+ writer.join();
528
+ }
529
+ let u = options.writeUnknownFields;
530
+ if (u !== false)
531
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
532
+ return writer;
533
+ }
534
+ }
535
+ /**
536
+ * @generated MessageType for protobuf message services.citizens.ReorderLabelsRequest
537
+ */
538
+ export const ReorderLabelsRequest = new ReorderLabelsRequest$Type();
539
+ // @generated message type with reflection information, may provide speed optimized methods
540
+ class ReorderLabelsResponse$Type extends MessageType<ReorderLabelsResponse> {
541
+ constructor() {
542
+ super("services.citizens.ReorderLabelsResponse", []);
543
+ }
544
+ create(value?: PartialMessage<ReorderLabelsResponse>): ReorderLabelsResponse {
545
+ const message = globalThis.Object.create((this.messagePrototype!));
546
+ if (value !== undefined)
547
+ reflectionMergePartial<ReorderLabelsResponse>(this, message, value);
548
+ return message;
549
+ }
550
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReorderLabelsResponse): ReorderLabelsResponse {
551
+ let message = target ?? this.create(), end = reader.pos + length;
552
+ while (reader.pos < end) {
553
+ let [fieldNo, wireType] = reader.tag();
554
+ switch (fieldNo) {
555
+ default:
556
+ let u = options.readUnknownField;
557
+ if (u === "throw")
558
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
559
+ let d = reader.skip(wireType);
560
+ if (u !== false)
561
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
562
+ }
563
+ }
564
+ return message;
565
+ }
566
+ internalBinaryWrite(message: ReorderLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
567
+ let u = options.writeUnknownFields;
568
+ if (u !== false)
569
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
570
+ return writer;
571
+ }
572
+ }
573
+ /**
574
+ * @generated MessageType for protobuf message services.citizens.ReorderLabelsResponse
575
+ */
576
+ export const ReorderLabelsResponse = new ReorderLabelsResponse$Type();
447
577
  /**
448
578
  * @generated ServiceType for protobuf service services.citizens.LabelsService
449
579
  */
450
580
  export const LabelsService = new ServiceType("services.citizens.LabelsService", [
451
- { name: "ListLabels", options: { "codegen.perms.perms": { enabled: true, service: "completor.CompletorService", name: "CompleteCitizenLabels" } }, I: ListLabelsRequest, O: ListLabelsResponse },
452
- { name: "GetLabel", options: { "codegen.perms.perms": { enabled: true, service: "completor.CompletorService", name: "CompleteCitizenLabels" } }, I: GetLabelRequest, O: GetLabelResponse },
581
+ { name: "ListLabels", options: { "codegen.perms.perms": { enabled: true, service: "CitizensService", name: "GetUser" } }, I: ListLabelsRequest, O: ListLabelsResponse },
582
+ { name: "GetLabel", options: { "codegen.perms.perms": { enabled: true, service: "CitizensService", name: "GetUser" } }, I: GetLabelRequest, O: GetLabelResponse },
453
583
  { name: "CreateOrUpdateLabel", options: { "codegen.perms.perms": { enabled: true } }, I: CreateOrUpdateLabelRequest, O: CreateOrUpdateLabelResponse },
454
- { name: "DeleteLabel", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteLabelRequest, O: DeleteLabelResponse }
584
+ { name: "DeleteLabel", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteLabelRequest, O: DeleteLabelResponse },
585
+ { name: "ReorderLabels", options: { "codegen.perms.perms": { enabled: true, name: "CreateOrUpdateLabel" } }, I: ReorderLabelsRequest, O: ReorderLabelsResponse }
455
586
  ], { "codegen.perms.perms_svc": { order: 32, icon: "i-mdi-label-multiple" } });
@@ -5,8 +5,6 @@
5
5
  import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
6
  import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
7
  import { CompletorService } from "./completor";
8
- import type { CompleteCitizenLabelsResponse } from "./completor";
9
- import type { CompleteCitizenLabelsRequest } from "./completor";
10
8
  import type { ListLawBooksResponse } from "./completor";
11
9
  import type { ListLawBooksRequest } from "./completor";
12
10
  import type { CompleteDocumentCategoriesResponse } from "./completor";
@@ -38,10 +36,6 @@ export interface ICompletorServiceClient {
38
36
  * @generated from protobuf rpc: ListLawBooks
39
37
  */
40
38
  listLawBooks(input: ListLawBooksRequest, options?: RpcOptions): UnaryCall<ListLawBooksRequest, ListLawBooksResponse>;
41
- /**
42
- * @generated from protobuf rpc: CompleteCitizenLabels
43
- */
44
- completeCitizenLabels(input: CompleteCitizenLabelsRequest, options?: RpcOptions): UnaryCall<CompleteCitizenLabelsRequest, CompleteCitizenLabelsResponse>;
45
39
  }
46
40
  /**
47
41
  * @generated from protobuf service services.completor.CompletorService
@@ -80,11 +74,4 @@ export class CompletorServiceClient implements ICompletorServiceClient, ServiceI
80
74
  const method = this.methods[3], opt = this._transport.mergeOptions(options);
81
75
  return stackIntercept<ListLawBooksRequest, ListLawBooksResponse>("unary", this._transport, method, opt, input);
82
76
  }
83
- /**
84
- * @generated from protobuf rpc: CompleteCitizenLabels
85
- */
86
- completeCitizenLabels(input: CompleteCitizenLabelsRequest, options?: RpcOptions): UnaryCall<CompleteCitizenLabelsRequest, CompleteCitizenLabelsResponse> {
87
- const method = this.methods[4], opt = this._transport.mergeOptions(options);
88
- return stackIntercept<CompleteCitizenLabelsRequest, CompleteCitizenLabelsResponse>("unary", this._transport, method, opt, input);
89
- }
90
77
  }
@@ -12,7 +12,6 @@ import { WireType } from "@protobuf-ts/runtime";
12
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
- import { Label } from "../../resources/citizens/labels/labels";
16
15
  import { LawBook } from "../../resources/laws/laws";
17
16
  import { Category } from "../../resources/documents/category/category";
18
17
  import { Job } from "../../resources/jobs/jobs";
@@ -113,24 +112,6 @@ export interface ListLawBooksResponse {
113
112
  */
114
113
  books: LawBook[];
115
114
  }
116
- /**
117
- * @generated from protobuf message services.completor.CompleteCitizenLabelsRequest
118
- */
119
- export interface CompleteCitizenLabelsRequest {
120
- /**
121
- * @generated from protobuf field: string search = 1
122
- */
123
- search: string;
124
- }
125
- /**
126
- * @generated from protobuf message services.completor.CompleteCitizenLabelsResponse
127
- */
128
- export interface CompleteCitizenLabelsResponse {
129
- /**
130
- * @generated from protobuf field: repeated resources.citizens.labels.Label labels = 1
131
- */
132
- labels: Label[];
133
- }
134
115
  // @generated message type with reflection information, may provide speed optimized methods
135
116
  class CompleteCitizensRequest$Type extends MessageType<CompleteCitizensRequest> {
136
117
  constructor() {
@@ -564,107 +545,12 @@ class ListLawBooksResponse$Type extends MessageType<ListLawBooksResponse> {
564
545
  * @generated MessageType for protobuf message services.completor.ListLawBooksResponse
565
546
  */
566
547
  export const ListLawBooksResponse = new ListLawBooksResponse$Type();
567
- // @generated message type with reflection information, may provide speed optimized methods
568
- class CompleteCitizenLabelsRequest$Type extends MessageType<CompleteCitizenLabelsRequest> {
569
- constructor() {
570
- super("services.completor.CompleteCitizenLabelsRequest", [
571
- { no: 1, name: "search", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } }
572
- ]);
573
- }
574
- create(value?: PartialMessage<CompleteCitizenLabelsRequest>): CompleteCitizenLabelsRequest {
575
- const message = globalThis.Object.create((this.messagePrototype!));
576
- message.search = "";
577
- if (value !== undefined)
578
- reflectionMergePartial<CompleteCitizenLabelsRequest>(this, message, value);
579
- return message;
580
- }
581
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CompleteCitizenLabelsRequest): CompleteCitizenLabelsRequest {
582
- let message = target ?? this.create(), end = reader.pos + length;
583
- while (reader.pos < end) {
584
- let [fieldNo, wireType] = reader.tag();
585
- switch (fieldNo) {
586
- case /* string search */ 1:
587
- message.search = reader.string();
588
- break;
589
- default:
590
- let u = options.readUnknownField;
591
- if (u === "throw")
592
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
593
- let d = reader.skip(wireType);
594
- if (u !== false)
595
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
596
- }
597
- }
598
- return message;
599
- }
600
- internalBinaryWrite(message: CompleteCitizenLabelsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
601
- /* string search = 1; */
602
- if (message.search !== "")
603
- writer.tag(1, WireType.LengthDelimited).string(message.search);
604
- let u = options.writeUnknownFields;
605
- if (u !== false)
606
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
607
- return writer;
608
- }
609
- }
610
- /**
611
- * @generated MessageType for protobuf message services.completor.CompleteCitizenLabelsRequest
612
- */
613
- export const CompleteCitizenLabelsRequest = new CompleteCitizenLabelsRequest$Type();
614
- // @generated message type with reflection information, may provide speed optimized methods
615
- class CompleteCitizenLabelsResponse$Type extends MessageType<CompleteCitizenLabelsResponse> {
616
- constructor() {
617
- super("services.completor.CompleteCitizenLabelsResponse", [
618
- { no: 1, name: "labels", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label }
619
- ]);
620
- }
621
- create(value?: PartialMessage<CompleteCitizenLabelsResponse>): CompleteCitizenLabelsResponse {
622
- const message = globalThis.Object.create((this.messagePrototype!));
623
- message.labels = [];
624
- if (value !== undefined)
625
- reflectionMergePartial<CompleteCitizenLabelsResponse>(this, message, value);
626
- return message;
627
- }
628
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CompleteCitizenLabelsResponse): CompleteCitizenLabelsResponse {
629
- let message = target ?? this.create(), end = reader.pos + length;
630
- while (reader.pos < end) {
631
- let [fieldNo, wireType] = reader.tag();
632
- switch (fieldNo) {
633
- case /* repeated resources.citizens.labels.Label labels */ 1:
634
- message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
635
- break;
636
- default:
637
- let u = options.readUnknownField;
638
- if (u === "throw")
639
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
640
- let d = reader.skip(wireType);
641
- if (u !== false)
642
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
643
- }
644
- }
645
- return message;
646
- }
647
- internalBinaryWrite(message: CompleteCitizenLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
648
- /* repeated resources.citizens.labels.Label labels = 1; */
649
- for (let i = 0; i < message.labels.length; i++)
650
- Label.internalBinaryWrite(message.labels[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
651
- let u = options.writeUnknownFields;
652
- if (u !== false)
653
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
654
- return writer;
655
- }
656
- }
657
- /**
658
- * @generated MessageType for protobuf message services.completor.CompleteCitizenLabelsResponse
659
- */
660
- export const CompleteCitizenLabelsResponse = new CompleteCitizenLabelsResponse$Type();
661
548
  /**
662
549
  * @generated ServiceType for protobuf service services.completor.CompletorService
663
550
  */
664
551
  export const CompletorService = new ServiceType("services.completor.CompletorService", [
665
552
  { name: "CompleteCitizens", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: CompleteCitizensRequest, O: CompleteCitizensResponse },
666
553
  { name: "CompleteJobs", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: CompleteJobsRequest, O: CompleteJobsResponse },
667
- { name: "CompleteDocumentCategories", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListCategories" } }, I: CompleteDocumentCategoriesRequest, O: CompleteDocumentCategoriesResponse },
668
- { name: "ListLawBooks", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: ListLawBooksRequest, O: ListLawBooksResponse },
669
- { name: "CompleteCitizenLabels", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Jobs", type: "ATTRIBUTE_TYPE_JOB_LIST" }] } }, I: CompleteCitizenLabelsRequest, O: CompleteCitizenLabelsResponse }
554
+ { name: "CompleteDocumentCategories", options: { "codegen.perms.perms": { enabled: true, namespace: "documents", service: "CategoriesService", name: "ListCategories" } }, I: CompleteDocumentCategoriesRequest, O: CompleteDocumentCategoriesResponse },
555
+ { name: "ListLawBooks", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: ListLawBooksRequest, O: ListLawBooksResponse }
670
556
  ], { "codegen.perms.perms_svc": { order: 10, icon: "i-mdi-keyboard-tab" } });
@@ -314,6 +314,10 @@ export interface RevokeApprovalResponse {
314
314
  * @generated from protobuf field: resources.documents.approval.Approval approval = 1
315
315
  */
316
316
  approval?: Approval;
317
+ /**
318
+ * @generated from protobuf field: resources.documents.DocumentMeta doc_meta = 2
319
+ */
320
+ docMeta?: DocumentMeta;
317
321
  }
318
322
  /**
319
323
  * @generated from protobuf message services.documents.DecideApprovalRequest
@@ -416,7 +420,7 @@ class ListApprovalTasksInboxRequest$Type extends MessageType<ListApprovalTasksIn
416
420
  constructor() {
417
421
  super("services.documents.ListApprovalTasksInboxRequest", [
418
422
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
419
- { no: 2, name: "statuses", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.approval.ApprovalTaskStatus", ApprovalTaskStatus, "APPROVAL_TASK_STATUS_"], options: { "buf.validate.field": { repeated: { maxItems: "4" } } } },
423
+ { no: 2, name: "statuses", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.approval.ApprovalTaskStatus", ApprovalTaskStatus, "APPROVAL_TASK_STATUS_"], options: { "buf.validate.field": { repeated: { maxItems: "4", items: { enum: { definedOnly: true } } } } } },
420
424
  { no: 3, name: "only_drafts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
421
425
  { no: 4, name: "not_already_acted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
422
426
  ]);
@@ -745,7 +749,7 @@ class ListApprovalTasksRequest$Type extends MessageType<ListApprovalTasksRequest
745
749
  constructor() {
746
750
  super("services.documents.ListApprovalTasksRequest", [
747
751
  { no: 1, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
748
- { no: 2, name: "statuses", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.approval.ApprovalTaskStatus", ApprovalTaskStatus, "APPROVAL_TASK_STATUS_"], options: { "buf.validate.field": { repeated: { maxItems: "4" } } } }
752
+ { no: 2, name: "statuses", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.approval.ApprovalTaskStatus", ApprovalTaskStatus, "APPROVAL_TASK_STATUS_"], options: { "buf.validate.field": { repeated: { maxItems: "4", items: { enum: { definedOnly: true } } } } } }
749
753
  ]);
750
754
  }
751
755
  create(value?: PartialMessage<ListApprovalTasksRequest>): ListApprovalTasksRequest {
@@ -1190,7 +1194,7 @@ class ListApprovalsRequest$Type extends MessageType<ListApprovalsRequest> {
1190
1194
  { no: 1, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
1191
1195
  { no: 2, name: "task_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
1192
1196
  { no: 3, name: "snapshot_date", kind: "message", T: () => Timestamp },
1193
- { no: 4, name: "status", kind: "enum", opt: true, T: () => ["resources.documents.approval.ApprovalStatus", ApprovalStatus, "APPROVAL_STATUS_"] },
1197
+ { no: 4, name: "status", kind: "enum", opt: true, T: () => ["resources.documents.approval.ApprovalStatus", ApprovalStatus, "APPROVAL_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1194
1198
  { no: 5, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
1195
1199
  ]);
1196
1200
  }
@@ -1364,7 +1368,8 @@ export const RevokeApprovalRequest = new RevokeApprovalRequest$Type();
1364
1368
  class RevokeApprovalResponse$Type extends MessageType<RevokeApprovalResponse> {
1365
1369
  constructor() {
1366
1370
  super("services.documents.RevokeApprovalResponse", [
1367
- { no: 1, name: "approval", kind: "message", T: () => Approval }
1371
+ { no: 1, name: "approval", kind: "message", T: () => Approval },
1372
+ { no: 2, name: "doc_meta", kind: "message", T: () => DocumentMeta }
1368
1373
  ]);
1369
1374
  }
1370
1375
  create(value?: PartialMessage<RevokeApprovalResponse>): RevokeApprovalResponse {
@@ -1381,6 +1386,9 @@ class RevokeApprovalResponse$Type extends MessageType<RevokeApprovalResponse> {
1381
1386
  case /* resources.documents.approval.Approval approval */ 1:
1382
1387
  message.approval = Approval.internalBinaryRead(reader, reader.uint32(), options, message.approval);
1383
1388
  break;
1389
+ case /* resources.documents.DocumentMeta doc_meta */ 2:
1390
+ message.docMeta = DocumentMeta.internalBinaryRead(reader, reader.uint32(), options, message.docMeta);
1391
+ break;
1384
1392
  default:
1385
1393
  let u = options.readUnknownField;
1386
1394
  if (u === "throw")
@@ -1396,6 +1404,9 @@ class RevokeApprovalResponse$Type extends MessageType<RevokeApprovalResponse> {
1396
1404
  /* resources.documents.approval.Approval approval = 1; */
1397
1405
  if (message.approval)
1398
1406
  Approval.internalBinaryWrite(message.approval, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1407
+ /* resources.documents.DocumentMeta doc_meta = 2; */
1408
+ if (message.docMeta)
1409
+ DocumentMeta.internalBinaryWrite(message.docMeta, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1399
1410
  let u = options.writeUnknownFields;
1400
1411
  if (u !== false)
1401
1412
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1762,15 +1773,15 @@ export const RecomputeApprovalPolicyCountersResponse = new RecomputeApprovalPoli
1762
1773
  * @generated ServiceType for protobuf service services.documents.ApprovalService
1763
1774
  */
1764
1775
  export const ApprovalService = new ServiceType("services.documents.ApprovalService", [
1765
- { name: "ListApprovalTasksInbox", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksInboxRequest, O: ListApprovalTasksInboxResponse },
1766
- { name: "ListApprovalPolicies", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListDocuments" } }, I: ListApprovalPoliciesRequest, O: ListApprovalPoliciesResponse },
1776
+ { name: "ListApprovalTasksInbox", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksInboxRequest, O: ListApprovalTasksInboxResponse },
1777
+ { name: "ListApprovalPolicies", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalPoliciesRequest, O: ListApprovalPoliciesResponse },
1767
1778
  { name: "UpsertApprovalPolicy", options: { "codegen.perms.perms": { enabled: true } }, I: UpsertApprovalPolicyRequest, O: UpsertApprovalPolicyResponse },
1768
- { name: "ListApprovalTasks", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksRequest, O: ListApprovalTasksResponse },
1779
+ { name: "ListApprovalTasks", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksRequest, O: ListApprovalTasksResponse },
1769
1780
  { name: "UpsertApprovalTasks", options: { "codegen.perms.perms": { enabled: true } }, I: UpsertApprovalTasksRequest, O: UpsertApprovalTasksResponse },
1770
1781
  { name: "DeleteApprovalTasks", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteApprovalTasksRequest, O: DeleteApprovalTasksResponse },
1771
- { name: "ListApprovals", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListDocuments" } }, I: ListApprovalsRequest, O: ListApprovalsResponse },
1782
+ { name: "ListApprovals", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalsRequest, O: ListApprovalsResponse },
1772
1783
  { name: "RevokeApproval", options: { "codegen.perms.perms": { enabled: true } }, I: RevokeApprovalRequest, O: RevokeApprovalResponse },
1773
- { name: "DecideApproval", options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "ListDocuments" } }, I: DecideApprovalRequest, O: DecideApprovalResponse },
1784
+ { name: "DecideApproval", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: DecideApprovalRequest, O: DecideApprovalResponse },
1774
1785
  { name: "ReopenApprovalTask", options: { "codegen.perms.perms": { enabled: true, name: "RevokeApproval" } }, I: ReopenApprovalTaskRequest, O: ReopenApprovalTaskResponse },
1775
1786
  { name: "RecomputeApprovalPolicyCounters", options: { "codegen.perms.perms": { enabled: true, name: "RevokeApproval" } }, I: RecomputeApprovalPolicyCountersRequest, O: RecomputeApprovalPolicyCountersResponse }
1776
1787
  ], { "codegen.perms.perms_svc": { order: 52, icon: "i-mdi-approval" } });
@@ -328,4 +328,4 @@ export const CategoriesService = new ServiceType("services.documents.CategoriesS
328
328
  { name: "ListCategories", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Jobs", type: "ATTRIBUTE_TYPE_JOB_LIST" }] } }, I: ListCategoriesRequest, O: ListCategoriesResponse },
329
329
  { name: "CreateOrUpdateCategory", options: { "codegen.perms.perms": { enabled: true } }, I: CreateOrUpdateCategoryRequest, O: CreateOrUpdateCategoryResponse },
330
330
  { name: "DeleteCategory", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteCategoryRequest, O: DeleteCategoryResponse }
331
- ], { "codegen.perms.perms_svc": { name: "documents.DocumentsService" } });
331
+ ], { "codegen.perms.perms_svc": { order: 51, icon: "i-mdi-shape" } });
@@ -9,5 +9,5 @@ import { ServiceType } from "@protobuf-ts/runtime-rpc";
9
9
  * @generated ServiceType for protobuf service services.documents.CollabService
10
10
  */
11
11
  export const CollabService = new ServiceType("services.documents.CollabService", [
12
- { name: "JoinRoom", serverStreaming: true, clientStreaming: true, options: { "codegen.perms.perms": { enabled: true, service: "documents.DocumentsService", name: "UpdateDocument" } }, I: ClientPacket, O: ServerPacket }
12
+ { name: "JoinRoom", serverStreaming: true, clientStreaming: true, options: { "codegen.perms.perms": { enabled: true, namespace: "documents", service: "DocumentsService", names: ["UpdateDocument", "ListDocuments"], internal: true } }, I: ClientPacket, O: ServerPacket }
13
13
  ]);
@@ -472,8 +472,8 @@ export const DeleteCommentResponse = new DeleteCommentResponse$Type();
472
472
  * @generated ServiceType for protobuf service services.documents.CommentsService
473
473
  */
474
474
  export const CommentsService = new ServiceType("services.documents.CommentsService", [
475
- { name: "GetComments", options: { "codegen.perms.perms": { enabled: true, name: "ListDocuments" } }, I: GetCommentsRequest, O: GetCommentsResponse },
476
- { name: "PostComment", options: { "codegen.perms.perms": { enabled: true, name: "ListDocuments" } }, I: PostCommentRequest, O: PostCommentResponse },
477
- { name: "EditComment", options: { "codegen.perms.perms": { enabled: true, name: "ListDocuments" } }, I: EditCommentRequest, O: EditCommentResponse },
475
+ { name: "GetComments", options: { "codegen.perms.perms": { enabled: true, namespace: "documents", service: "DocumentsService", name: "ListDocuments" } }, I: GetCommentsRequest, O: GetCommentsResponse },
476
+ { name: "PostComment", options: { "codegen.perms.perms": { enabled: true, namespace: "documents", service: "DocumentsService", name: "ListDocuments" } }, I: PostCommentRequest, O: PostCommentResponse },
477
+ { name: "EditComment", options: { "codegen.perms.perms": { enabled: true, namespace: "documents", service: "DocumentsService", name: "ListDocuments" } }, I: EditCommentRequest, O: EditCommentResponse },
478
478
  { name: "DeleteComment", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Access", type: "ATTRIBUTE_TYPE_STRING_LIST", validStringList: ["Own", "Lower_Rank", "Same_Rank", "Any"] }] } }, I: DeleteCommentRequest, O: DeleteCommentResponse }
479
- ], { "codegen.perms.perms_svc": { name: "documents.DocumentsService" } });
479
+ ], { "codegen.perms.perms_svc": { order: 51, icon: "i-mdi-comment-text-multiple" } });