@fivenet-app/gen 2026.4.0 → 2026.5.1

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 (60) hide show
  1. package/clients.ts +60 -0
  2. package/codegen/perms/perms.ts +64 -31
  3. package/package.json +1 -1
  4. package/perms.ts +57 -41
  5. package/resources/accounts/accounts.ts +41 -30
  6. package/resources/audit/audit.ts +5 -1
  7. package/resources/citizens/labels/access.ts +216 -0
  8. package/resources/citizens/labels/labels.ts +8 -214
  9. package/resources/jobs/colleagues/activity/activity.ts +1 -1
  10. package/resources/laws/laws.ts +72 -50
  11. package/resources/permissions/attributes/attributes.ts +51 -39
  12. package/resources/permissions/permissions/permissions.ts +46 -34
  13. package/resources/sync/data/data.ts +9 -9
  14. package/resources/users/activity/activity.ts +69 -76
  15. package/services/auth/auth.ts +1 -1
  16. package/services/calendar/calendar.client.ts +2 -106
  17. package/services/calendar/calendar.ts +0 -1018
  18. package/services/calendar/entries.client.ts +129 -0
  19. package/services/calendar/entries.ts +1040 -0
  20. package/services/centrum/centrum.client.ts +23 -244
  21. package/services/centrum/centrum.ts +246 -2383
  22. package/services/centrum/dispatches.client.ts +155 -0
  23. package/services/centrum/dispatches.ts +1305 -0
  24. package/services/centrum/units.client.ts +116 -0
  25. package/services/centrum/units.ts +876 -0
  26. package/services/citizens/labels.client.ts +26 -0
  27. package/services/citizens/labels.ts +283 -4
  28. package/services/completor/completor.client.ts +0 -13
  29. package/services/completor/completor.ts +2 -116
  30. package/services/documents/approval.ts +5 -5
  31. package/services/documents/categories.client.ts +64 -0
  32. package/services/documents/categories.ts +331 -0
  33. package/services/documents/collab.ts +1 -1
  34. package/services/documents/comments.client.ts +77 -0
  35. package/services/documents/comments.ts +479 -0
  36. package/services/documents/documents.client.ts +26 -182
  37. package/services/documents/documents.ts +335 -1682
  38. package/services/documents/templates.client.ts +90 -0
  39. package/services/documents/templates.ts +591 -0
  40. package/services/jobs/colleagues.client.ts +129 -0
  41. package/services/jobs/colleagues.ts +1129 -0
  42. package/services/jobs/jobs.client.ts +3 -107
  43. package/services/jobs/jobs.ts +1 -1113
  44. package/services/mailer/mailer.client.ts +0 -208
  45. package/services/mailer/mailer.ts +1 -2010
  46. package/services/mailer/settings.client.ts +103 -0
  47. package/services/mailer/settings.ts +708 -0
  48. package/services/mailer/thread.client.ts +155 -0
  49. package/services/mailer/thread.ts +1343 -0
  50. package/services/qualifications/exam.client.ts +77 -0
  51. package/services/qualifications/exam.ts +609 -0
  52. package/services/qualifications/qualifications.client.ts +1 -53
  53. package/services/qualifications/qualifications.ts +0 -591
  54. package/services/settings/accounts.ts +14 -1
  55. package/services/settings/laws.client.ts +18 -5
  56. package/services/settings/laws.ts +128 -3
  57. package/services/sync/sync.client.ts +4 -4
  58. package/services/sync/sync.ts +23 -0
  59. package/services/wiki/collab.ts +1 -1
  60. package/svcs.ts +156 -68
@@ -5,6 +5,10 @@
5
5
  import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
6
  import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
7
  import { LabelsService } from "./labels";
8
+ import type { RemoveCitizenLabelsResponse } from "./labels";
9
+ import type { RemoveCitizenLabelsRequest } from "./labels";
10
+ import type { AddCitizenLabelsResponse } from "./labels";
11
+ import type { AddCitizenLabelsRequest } from "./labels";
8
12
  import type { DeleteLabelResponse } from "./labels";
9
13
  import type { DeleteLabelRequest } from "./labels";
10
14
  import type { CreateOrUpdateLabelResponse } from "./labels";
@@ -36,6 +40,14 @@ export interface ILabelsServiceClient {
36
40
  * @generated from protobuf rpc: DeleteLabel
37
41
  */
38
42
  deleteLabel(input: DeleteLabelRequest, options?: RpcOptions): UnaryCall<DeleteLabelRequest, DeleteLabelResponse>;
43
+ /**
44
+ * @generated from protobuf rpc: AddCitizenLabels
45
+ */
46
+ addCitizenLabels(input: AddCitizenLabelsRequest, options?: RpcOptions): UnaryCall<AddCitizenLabelsRequest, AddCitizenLabelsResponse>;
47
+ /**
48
+ * @generated from protobuf rpc: RemoveCitizenLabels
49
+ */
50
+ removeCitizenLabels(input: RemoveCitizenLabelsRequest, options?: RpcOptions): UnaryCall<RemoveCitizenLabelsRequest, RemoveCitizenLabelsResponse>;
39
51
  }
40
52
  /**
41
53
  * @generated from protobuf service services.citizens.LabelsService
@@ -74,4 +86,18 @@ export class LabelsServiceClient implements ILabelsServiceClient, ServiceInfo {
74
86
  const method = this.methods[3], opt = this._transport.mergeOptions(options);
75
87
  return stackIntercept<DeleteLabelRequest, DeleteLabelResponse>("unary", this._transport, method, opt, input);
76
88
  }
89
+ /**
90
+ * @generated from protobuf rpc: AddCitizenLabels
91
+ */
92
+ addCitizenLabels(input: AddCitizenLabelsRequest, options?: RpcOptions): UnaryCall<AddCitizenLabelsRequest, AddCitizenLabelsResponse> {
93
+ const method = this.methods[4], opt = this._transport.mergeOptions(options);
94
+ return stackIntercept<AddCitizenLabelsRequest, AddCitizenLabelsResponse>("unary", this._transport, method, opt, input);
95
+ }
96
+ /**
97
+ * @generated from protobuf rpc: RemoveCitizenLabels
98
+ */
99
+ removeCitizenLabels(input: RemoveCitizenLabelsRequest, options?: RpcOptions): UnaryCall<RemoveCitizenLabelsRequest, RemoveCitizenLabelsResponse> {
100
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
101
+ return stackIntercept<RemoveCitizenLabelsRequest, RemoveCitizenLabelsResponse>("unary", this._transport, method, opt, input);
102
+ }
77
103
  }
@@ -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,57 @@ export interface DeleteLabelRequest {
81
90
  */
82
91
  export interface DeleteLabelResponse {
83
92
  }
93
+ /**
94
+ * @generated from protobuf message services.citizens.AddCitizenLabelsRequest
95
+ */
96
+ export interface AddCitizenLabelsRequest {
97
+ /**
98
+ * @generated from protobuf field: int32 user_id = 1
99
+ */
100
+ userId: number;
101
+ /**
102
+ * @generated from protobuf field: repeated resources.citizens.labels.Label labels = 2
103
+ */
104
+ labels: Label[];
105
+ /**
106
+ * @generated from protobuf field: string reason = 3
107
+ */
108
+ reason: string;
109
+ }
110
+ /**
111
+ * @generated from protobuf message services.citizens.AddCitizenLabelsResponse
112
+ */
113
+ export interface AddCitizenLabelsResponse {
114
+ }
115
+ /**
116
+ * @generated from protobuf message services.citizens.RemoveCitizenLabelsRequest
117
+ */
118
+ export interface RemoveCitizenLabelsRequest {
119
+ /**
120
+ * @generated from protobuf field: int32 user_id = 1
121
+ */
122
+ userId: number;
123
+ /**
124
+ * @generated from protobuf field: repeated int64 ids = 2
125
+ */
126
+ ids: number[];
127
+ /**
128
+ * @generated from protobuf field: string reason = 3
129
+ */
130
+ reason: string;
131
+ }
132
+ /**
133
+ * @generated from protobuf message services.citizens.RemoveCitizenLabelsResponse
134
+ */
135
+ export interface RemoveCitizenLabelsResponse {
136
+ }
84
137
  // @generated message type with reflection information, may provide speed optimized methods
85
138
  class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
86
139
  constructor() {
87
140
  super("services.citizens.ListLabelsRequest", [
88
- { no: 1, name: "search", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
141
+ { no: 1, name: "search", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
142
+ { no: 2, name: "min_access", kind: "enum", opt: true, T: () => ["resources.citizens.labels.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
143
+ { no: 3, name: "own_job_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
89
144
  ]);
90
145
  }
91
146
  create(value?: PartialMessage<ListLabelsRequest>): ListLabelsRequest {
@@ -102,6 +157,12 @@ class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
102
157
  case /* optional string search */ 1:
103
158
  message.search = reader.string();
104
159
  break;
160
+ case /* optional resources.citizens.labels.AccessLevel min_access */ 2:
161
+ message.minAccess = reader.int32();
162
+ break;
163
+ case /* optional bool own_job_only */ 3:
164
+ message.ownJobOnly = reader.bool();
165
+ break;
105
166
  default:
106
167
  let u = options.readUnknownField;
107
168
  if (u === "throw")
@@ -117,6 +178,12 @@ class ListLabelsRequest$Type extends MessageType<ListLabelsRequest> {
117
178
  /* optional string search = 1; */
118
179
  if (message.search !== undefined)
119
180
  writer.tag(1, WireType.LengthDelimited).string(message.search);
181
+ /* optional resources.citizens.labels.AccessLevel min_access = 2; */
182
+ if (message.minAccess !== undefined)
183
+ writer.tag(2, WireType.Varint).int32(message.minAccess);
184
+ /* optional bool own_job_only = 3; */
185
+ if (message.ownJobOnly !== undefined)
186
+ writer.tag(3, WireType.Varint).bool(message.ownJobOnly);
120
187
  let u = options.writeUnknownFields;
121
188
  if (u !== false)
122
189
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -444,12 +511,224 @@ class DeleteLabelResponse$Type extends MessageType<DeleteLabelResponse> {
444
511
  * @generated MessageType for protobuf message services.citizens.DeleteLabelResponse
445
512
  */
446
513
  export const DeleteLabelResponse = new DeleteLabelResponse$Type();
514
+ // @generated message type with reflection information, may provide speed optimized methods
515
+ class AddCitizenLabelsRequest$Type extends MessageType<AddCitizenLabelsRequest> {
516
+ constructor() {
517
+ super("services.citizens.AddCitizenLabelsRequest", [
518
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
519
+ { no: 2, name: "labels", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label },
520
+ { no: 3, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } }
521
+ ]);
522
+ }
523
+ create(value?: PartialMessage<AddCitizenLabelsRequest>): AddCitizenLabelsRequest {
524
+ const message = globalThis.Object.create((this.messagePrototype!));
525
+ message.userId = 0;
526
+ message.labels = [];
527
+ message.reason = "";
528
+ if (value !== undefined)
529
+ reflectionMergePartial<AddCitizenLabelsRequest>(this, message, value);
530
+ return message;
531
+ }
532
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddCitizenLabelsRequest): AddCitizenLabelsRequest {
533
+ let message = target ?? this.create(), end = reader.pos + length;
534
+ while (reader.pos < end) {
535
+ let [fieldNo, wireType] = reader.tag();
536
+ switch (fieldNo) {
537
+ case /* int32 user_id */ 1:
538
+ message.userId = reader.int32();
539
+ break;
540
+ case /* repeated resources.citizens.labels.Label labels */ 2:
541
+ message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
542
+ break;
543
+ case /* string reason */ 3:
544
+ message.reason = reader.string();
545
+ break;
546
+ default:
547
+ let u = options.readUnknownField;
548
+ if (u === "throw")
549
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
550
+ let d = reader.skip(wireType);
551
+ if (u !== false)
552
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
553
+ }
554
+ }
555
+ return message;
556
+ }
557
+ internalBinaryWrite(message: AddCitizenLabelsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
558
+ /* int32 user_id = 1; */
559
+ if (message.userId !== 0)
560
+ writer.tag(1, WireType.Varint).int32(message.userId);
561
+ /* repeated resources.citizens.labels.Label labels = 2; */
562
+ for (let i = 0; i < message.labels.length; i++)
563
+ Label.internalBinaryWrite(message.labels[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
564
+ /* string reason = 3; */
565
+ if (message.reason !== "")
566
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
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.AddCitizenLabelsRequest
575
+ */
576
+ export const AddCitizenLabelsRequest = new AddCitizenLabelsRequest$Type();
577
+ // @generated message type with reflection information, may provide speed optimized methods
578
+ class AddCitizenLabelsResponse$Type extends MessageType<AddCitizenLabelsResponse> {
579
+ constructor() {
580
+ super("services.citizens.AddCitizenLabelsResponse", []);
581
+ }
582
+ create(value?: PartialMessage<AddCitizenLabelsResponse>): AddCitizenLabelsResponse {
583
+ const message = globalThis.Object.create((this.messagePrototype!));
584
+ if (value !== undefined)
585
+ reflectionMergePartial<AddCitizenLabelsResponse>(this, message, value);
586
+ return message;
587
+ }
588
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddCitizenLabelsResponse): AddCitizenLabelsResponse {
589
+ let message = target ?? this.create(), end = reader.pos + length;
590
+ while (reader.pos < end) {
591
+ let [fieldNo, wireType] = reader.tag();
592
+ switch (fieldNo) {
593
+ default:
594
+ let u = options.readUnknownField;
595
+ if (u === "throw")
596
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
597
+ let d = reader.skip(wireType);
598
+ if (u !== false)
599
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
600
+ }
601
+ }
602
+ return message;
603
+ }
604
+ internalBinaryWrite(message: AddCitizenLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
605
+ let u = options.writeUnknownFields;
606
+ if (u !== false)
607
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
608
+ return writer;
609
+ }
610
+ }
611
+ /**
612
+ * @generated MessageType for protobuf message services.citizens.AddCitizenLabelsResponse
613
+ */
614
+ export const AddCitizenLabelsResponse = new AddCitizenLabelsResponse$Type();
615
+ // @generated message type with reflection information, may provide speed optimized methods
616
+ class RemoveCitizenLabelsRequest$Type extends MessageType<RemoveCitizenLabelsRequest> {
617
+ constructor() {
618
+ super("services.citizens.RemoveCitizenLabelsRequest", [
619
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
620
+ { no: 2, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
621
+ { no: 3, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } }
622
+ ]);
623
+ }
624
+ create(value?: PartialMessage<RemoveCitizenLabelsRequest>): RemoveCitizenLabelsRequest {
625
+ const message = globalThis.Object.create((this.messagePrototype!));
626
+ message.userId = 0;
627
+ message.ids = [];
628
+ message.reason = "";
629
+ if (value !== undefined)
630
+ reflectionMergePartial<RemoveCitizenLabelsRequest>(this, message, value);
631
+ return message;
632
+ }
633
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveCitizenLabelsRequest): RemoveCitizenLabelsRequest {
634
+ let message = target ?? this.create(), end = reader.pos + length;
635
+ while (reader.pos < end) {
636
+ let [fieldNo, wireType] = reader.tag();
637
+ switch (fieldNo) {
638
+ case /* int32 user_id */ 1:
639
+ message.userId = reader.int32();
640
+ break;
641
+ case /* repeated int64 ids */ 2:
642
+ if (wireType === WireType.LengthDelimited)
643
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
644
+ message.ids.push(reader.int64().toNumber());
645
+ else
646
+ message.ids.push(reader.int64().toNumber());
647
+ break;
648
+ case /* string reason */ 3:
649
+ message.reason = reader.string();
650
+ break;
651
+ default:
652
+ let u = options.readUnknownField;
653
+ if (u === "throw")
654
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
655
+ let d = reader.skip(wireType);
656
+ if (u !== false)
657
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
658
+ }
659
+ }
660
+ return message;
661
+ }
662
+ internalBinaryWrite(message: RemoveCitizenLabelsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
663
+ /* int32 user_id = 1; */
664
+ if (message.userId !== 0)
665
+ writer.tag(1, WireType.Varint).int32(message.userId);
666
+ /* repeated int64 ids = 2; */
667
+ if (message.ids.length) {
668
+ writer.tag(2, WireType.LengthDelimited).fork();
669
+ for (let i = 0; i < message.ids.length; i++)
670
+ writer.int64(message.ids[i]);
671
+ writer.join();
672
+ }
673
+ /* string reason = 3; */
674
+ if (message.reason !== "")
675
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
676
+ let u = options.writeUnknownFields;
677
+ if (u !== false)
678
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
679
+ return writer;
680
+ }
681
+ }
682
+ /**
683
+ * @generated MessageType for protobuf message services.citizens.RemoveCitizenLabelsRequest
684
+ */
685
+ export const RemoveCitizenLabelsRequest = new RemoveCitizenLabelsRequest$Type();
686
+ // @generated message type with reflection information, may provide speed optimized methods
687
+ class RemoveCitizenLabelsResponse$Type extends MessageType<RemoveCitizenLabelsResponse> {
688
+ constructor() {
689
+ super("services.citizens.RemoveCitizenLabelsResponse", []);
690
+ }
691
+ create(value?: PartialMessage<RemoveCitizenLabelsResponse>): RemoveCitizenLabelsResponse {
692
+ const message = globalThis.Object.create((this.messagePrototype!));
693
+ if (value !== undefined)
694
+ reflectionMergePartial<RemoveCitizenLabelsResponse>(this, message, value);
695
+ return message;
696
+ }
697
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveCitizenLabelsResponse): RemoveCitizenLabelsResponse {
698
+ let message = target ?? this.create(), end = reader.pos + length;
699
+ while (reader.pos < end) {
700
+ let [fieldNo, wireType] = reader.tag();
701
+ switch (fieldNo) {
702
+ default:
703
+ let u = options.readUnknownField;
704
+ if (u === "throw")
705
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
706
+ let d = reader.skip(wireType);
707
+ if (u !== false)
708
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
709
+ }
710
+ }
711
+ return message;
712
+ }
713
+ internalBinaryWrite(message: RemoveCitizenLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
714
+ let u = options.writeUnknownFields;
715
+ if (u !== false)
716
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
717
+ return writer;
718
+ }
719
+ }
720
+ /**
721
+ * @generated MessageType for protobuf message services.citizens.RemoveCitizenLabelsResponse
722
+ */
723
+ export const RemoveCitizenLabelsResponse = new RemoveCitizenLabelsResponse$Type();
447
724
  /**
448
725
  * @generated ServiceType for protobuf service services.citizens.LabelsService
449
726
  */
450
727
  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 },
728
+ { name: "ListLabels", options: { "codegen.perms.perms": { enabled: true } }, I: ListLabelsRequest, O: ListLabelsResponse },
729
+ { name: "GetLabel", options: { "codegen.perms.perms": { enabled: true, name: "ListLabels" } }, I: GetLabelRequest, O: GetLabelResponse },
453
730
  { 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 }
731
+ { name: "DeleteLabel", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteLabelRequest, O: DeleteLabelResponse },
732
+ { name: "AddCitizenLabels", options: { "codegen.perms.perms": { enabled: true, name: "SetUserProps" } }, I: AddCitizenLabelsRequest, O: AddCitizenLabelsResponse },
733
+ { name: "RemoveCitizenLabels", options: { "codegen.perms.perms": { enabled: true, name: "SetUserProps" } }, I: RemoveCitizenLabelsRequest, O: RemoveCitizenLabelsResponse }
455
734
  ], { "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" } });
@@ -1762,15 +1762,15 @@ export const RecomputeApprovalPolicyCountersResponse = new RecomputeApprovalPoli
1762
1762
  * @generated ServiceType for protobuf service services.documents.ApprovalService
1763
1763
  */
1764
1764
  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 },
1765
+ { name: "ListApprovalTasksInbox", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksInboxRequest, O: ListApprovalTasksInboxResponse },
1766
+ { name: "ListApprovalPolicies", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalPoliciesRequest, O: ListApprovalPoliciesResponse },
1767
1767
  { 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 },
1768
+ { name: "ListApprovalTasks", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalTasksRequest, O: ListApprovalTasksResponse },
1769
1769
  { name: "UpsertApprovalTasks", options: { "codegen.perms.perms": { enabled: true } }, I: UpsertApprovalTasksRequest, O: UpsertApprovalTasksResponse },
1770
1770
  { 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 },
1771
+ { name: "ListApprovals", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: ListApprovalsRequest, O: ListApprovalsResponse },
1772
1772
  { 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 },
1773
+ { name: "DecideApproval", options: { "codegen.perms.perms": { enabled: true, service: "DocumentsService", name: "ListDocuments" } }, I: DecideApprovalRequest, O: DecideApprovalResponse },
1774
1774
  { name: "ReopenApprovalTask", options: { "codegen.perms.perms": { enabled: true, name: "RevokeApproval" } }, I: ReopenApprovalTaskRequest, O: ReopenApprovalTaskResponse },
1775
1775
  { name: "RecomputeApprovalPolicyCounters", options: { "codegen.perms.perms": { enabled: true, name: "RevokeApproval" } }, I: RecomputeApprovalPolicyCountersRequest, O: RecomputeApprovalPolicyCountersResponse }
1776
1776
  ], { "codegen.perms.perms_svc": { order: 52, icon: "i-mdi-approval" } });
@@ -0,0 +1,64 @@
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 "services/documents/categories.proto" (package "services.documents", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
+ import { CategoriesService } from "./categories";
8
+ import type { DeleteCategoryResponse } from "./categories";
9
+ import type { DeleteCategoryRequest } from "./categories";
10
+ import type { CreateOrUpdateCategoryResponse } from "./categories";
11
+ import type { CreateOrUpdateCategoryRequest } from "./categories";
12
+ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
13
+ import type { ListCategoriesResponse } from "./categories";
14
+ import type { ListCategoriesRequest } from "./categories";
15
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
16
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
17
+ /**
18
+ * @generated from protobuf service services.documents.CategoriesService
19
+ */
20
+ export interface ICategoriesServiceClient {
21
+ /**
22
+ * @generated from protobuf rpc: ListCategories
23
+ */
24
+ listCategories(input: ListCategoriesRequest, options?: RpcOptions): UnaryCall<ListCategoriesRequest, ListCategoriesResponse>;
25
+ /**
26
+ * @generated from protobuf rpc: CreateOrUpdateCategory
27
+ */
28
+ createOrUpdateCategory(input: CreateOrUpdateCategoryRequest, options?: RpcOptions): UnaryCall<CreateOrUpdateCategoryRequest, CreateOrUpdateCategoryResponse>;
29
+ /**
30
+ * @generated from protobuf rpc: DeleteCategory
31
+ */
32
+ deleteCategory(input: DeleteCategoryRequest, options?: RpcOptions): UnaryCall<DeleteCategoryRequest, DeleteCategoryResponse>;
33
+ }
34
+ /**
35
+ * @generated from protobuf service services.documents.CategoriesService
36
+ */
37
+ export class CategoriesServiceClient implements ICategoriesServiceClient, ServiceInfo {
38
+ typeName = CategoriesService.typeName;
39
+ methods = CategoriesService.methods;
40
+ options = CategoriesService.options;
41
+ constructor(private readonly _transport: RpcTransport) {
42
+ }
43
+ /**
44
+ * @generated from protobuf rpc: ListCategories
45
+ */
46
+ listCategories(input: ListCategoriesRequest, options?: RpcOptions): UnaryCall<ListCategoriesRequest, ListCategoriesResponse> {
47
+ const method = this.methods[0], opt = this._transport.mergeOptions(options);
48
+ return stackIntercept<ListCategoriesRequest, ListCategoriesResponse>("unary", this._transport, method, opt, input);
49
+ }
50
+ /**
51
+ * @generated from protobuf rpc: CreateOrUpdateCategory
52
+ */
53
+ createOrUpdateCategory(input: CreateOrUpdateCategoryRequest, options?: RpcOptions): UnaryCall<CreateOrUpdateCategoryRequest, CreateOrUpdateCategoryResponse> {
54
+ const method = this.methods[1], opt = this._transport.mergeOptions(options);
55
+ return stackIntercept<CreateOrUpdateCategoryRequest, CreateOrUpdateCategoryResponse>("unary", this._transport, method, opt, input);
56
+ }
57
+ /**
58
+ * @generated from protobuf rpc: DeleteCategory
59
+ */
60
+ deleteCategory(input: DeleteCategoryRequest, options?: RpcOptions): UnaryCall<DeleteCategoryRequest, DeleteCategoryResponse> {
61
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
62
+ return stackIntercept<DeleteCategoryRequest, DeleteCategoryResponse>("unary", this._transport, method, opt, input);
63
+ }
64
+ }