@fivenet-app/gen 2025.9.1 → 2026.3.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 (131) hide show
  1. package/README.md +1 -1
  2. package/clients.ts +36 -0
  3. package/codegen/perms/perms.ts +94 -15
  4. package/codegen/sanitizer/sanitizer.ts +34 -1
  5. package/package.json +2 -2
  6. package/perms.ts +137 -6
  7. package/resources/accounts/accounts.ts +98 -31
  8. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
  9. package/resources/audit/audit.ts +156 -38
  10. package/resources/calendar/{access.ts → access/access.ts} +30 -30
  11. package/resources/calendar/calendar.ts +17 -477
  12. package/resources/calendar/entries/entries.ts +474 -0
  13. package/resources/centrum/{access.ts → access/access.ts} +22 -22
  14. package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
  15. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
  16. package/resources/centrum/joblist.ts +136 -0
  17. package/resources/centrum/{settings.ts → settings/settings.ts} +69 -69
  18. package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
  19. package/resources/centrum/{units.ts → units/units.ts} +131 -51
  20. package/resources/clientconfig/clientconfig.ts +159 -34
  21. package/resources/collab/collab.ts +4 -16
  22. package/resources/common/content/content.ts +108 -85
  23. package/resources/common/content/diff_activity.ts +267 -0
  24. package/resources/common/i18n.ts +2 -2
  25. package/resources/{common/cron → cron}/cron.ts +41 -41
  26. package/resources/documents/{access.ts → access/access.ts} +30 -30
  27. package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
  28. package/resources/documents/approval/approval.ts +945 -0
  29. package/resources/documents/{category.ts → category/category.ts} +7 -7
  30. package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
  31. package/resources/documents/data/data.ts +303 -0
  32. package/resources/documents/documents.ts +282 -667
  33. package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
  34. package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
  35. package/resources/documents/references/references.ts +187 -0
  36. package/resources/documents/relations/relations.ts +184 -0
  37. package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
  38. package/resources/documents/stamps/stamp.ts +355 -0
  39. package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
  40. package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
  41. package/resources/file/filestore.ts +1 -1
  42. package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
  43. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
  44. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
  45. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
  46. package/resources/jobs/{labels.ts → labels/labels.ts} +18 -18
  47. package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
  48. package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
  49. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
  50. package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
  51. package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
  52. package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
  53. package/resources/mailer/{access.ts → access/access.ts} +67 -67
  54. package/resources/mailer/{email.ts → emails/email.ts} +19 -19
  55. package/resources/mailer/{events.ts → events/events.ts} +24 -24
  56. package/resources/mailer/{message.ts → messages/message.ts} +29 -29
  57. package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
  58. package/resources/mailer/{template.ts → templates/template.ts} +15 -15
  59. package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
  60. package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
  61. package/resources/notifications/{events.ts → events/events.ts} +20 -20
  62. package/resources/notifications/notifications.ts +4 -4
  63. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
  64. package/resources/permissions/{events.ts → events/events.ts} +7 -7
  65. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
  66. package/resources/qualifications/{access.ts → access/access.ts} +19 -19
  67. package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
  68. package/resources/qualifications/qualifications.ts +51 -179
  69. package/resources/settings/banner.ts +3 -3
  70. package/resources/settings/config.ts +514 -14
  71. package/resources/{documents/state.ts → settings/data.ts} +41 -20
  72. package/resources/settings/perms.ts +14 -14
  73. package/resources/stats/stats.ts +379 -0
  74. package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
  75. package/resources/sync/{data.ts → data/data.ts} +404 -58
  76. package/resources/sync/data/v2/data.ts +220 -0
  77. package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
  78. package/resources/users/{activity.ts → activity/activity.ts} +121 -100
  79. package/resources/users/{labels.ts → labels/labels.ts} +12 -12
  80. package/resources/users/{licenses.ts → licenses/licenses.ts} +10 -10
  81. package/resources/users/{props.ts → props/props.ts} +91 -69
  82. package/resources/users/short/user.ts +184 -0
  83. package/resources/users/{users.ts → user.ts} +266 -195
  84. package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
  85. package/resources/vehicles/{props.ts → props/props.ts} +28 -6
  86. package/resources/vehicles/vehicles.ts +20 -8
  87. package/resources/wiki/{access.ts → access/access.ts} +30 -30
  88. package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
  89. package/resources/wiki/page.ts +39 -15
  90. package/services/auth/auth.client.ts +23 -10
  91. package/services/auth/auth.ts +445 -262
  92. package/services/calendar/calendar.ts +56 -34
  93. package/services/centrum/centrum.ts +127 -127
  94. package/services/citizens/citizens.ts +51 -27
  95. package/services/completor/completor.ts +35 -15
  96. package/services/documents/approval.client.ts +188 -0
  97. package/services/documents/approval.ts +1776 -0
  98. package/services/documents/documents.ts +163 -185
  99. package/services/documents/forms.client.ts +51 -0
  100. package/services/documents/forms.ts +232 -0
  101. package/services/documents/stamps.client.ts +77 -0
  102. package/services/documents/stamps.ts +481 -0
  103. package/services/documents/stats.client.ts +38 -0
  104. package/services/documents/stats.ts +245 -0
  105. package/services/jobs/conduct.client.ts +30 -3
  106. package/services/jobs/conduct.ts +159 -33
  107. package/services/jobs/jobs.ts +43 -43
  108. package/services/jobs/stats.client.ts +38 -0
  109. package/services/jobs/stats.ts +207 -0
  110. package/services/jobs/timeclock.ts +39 -39
  111. package/services/livemap/livemap.ts +18 -18
  112. package/services/mailer/mailer.ts +78 -78
  113. package/services/notifications/notifications.ts +35 -35
  114. package/services/qualifications/qualifications.ts +80 -45
  115. package/services/settings/accounts.client.ts +23 -10
  116. package/services/settings/accounts.ts +191 -30
  117. package/services/settings/cron.ts +4 -4
  118. package/services/settings/laws.ts +1 -1
  119. package/services/settings/settings.ts +73 -52
  120. package/services/settings/system.client.ts +13 -0
  121. package/services/settings/system.ts +115 -15
  122. package/services/stats/stats.client.ts +7 -7
  123. package/services/stats/stats.ts +24 -24
  124. package/services/sync/sync.ts +124 -77
  125. package/services/sync/v2/sync.client.ts +331 -0
  126. package/services/sync/v2/sync.ts +1766 -0
  127. package/services/vehicles/vehicles.ts +8 -8
  128. package/services/wiki/wiki.ts +8 -8
  129. package/svcs.ts +95 -3
  130. package/resources/centrum/attributes.ts +0 -183
  131. package/resources/documents/signoff.ts +0 -55
@@ -14,11 +14,11 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
14
14
  import type { PartialMessage } from "@protobuf-ts/runtime";
15
15
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
16
16
  import { MessageType } from "@protobuf-ts/runtime";
17
- import { Label } from "../../resources/users/labels";
18
- import { UserProps } from "../../resources/users/props";
19
- import { UserActivity } from "../../resources/users/activity";
20
- import { UserActivityType } from "../../resources/users/activity";
21
- import { User } from "../../resources/users/users";
17
+ import { Label } from "../../resources/users/labels/labels";
18
+ import { UserProps } from "../../resources/users/props/props";
19
+ import { UserActivity } from "../../resources/users/activity/activity";
20
+ import { UserActivityType } from "../../resources/users/activity/activity";
21
+ import { User } from "../../resources/users/user";
22
22
  import { PaginationResponse } from "../../resources/common/database/database";
23
23
  import { Sort } from "../../resources/common/database/database";
24
24
  import { PaginationRequest } from "../../resources/common/database/database";
@@ -60,6 +60,16 @@ export interface ListCitizensRequest {
60
60
  * @generated from protobuf field: optional int64 open_fines = 8
61
61
  */
62
62
  openFines?: number;
63
+ /**
64
+ * Height range search (in cm)
65
+ *
66
+ * @generated from protobuf field: optional float min_height = 9
67
+ */
68
+ minHeight?: number;
69
+ /**
70
+ * @generated from protobuf field: optional float max_height = 10
71
+ */
72
+ maxHeight?: number;
63
73
  }
64
74
  /**
65
75
  * @generated from protobuf message services.citizens.ListCitizensResponse
@@ -115,7 +125,7 @@ export interface ListUserActivityRequest {
115
125
  */
116
126
  userId: number;
117
127
  /**
118
- * @generated from protobuf field: repeated resources.users.UserActivityType types = 4
128
+ * @generated from protobuf field: repeated resources.users.activity.UserActivityType types = 4
119
129
  */
120
130
  types: UserActivityType[];
121
131
  }
@@ -128,7 +138,7 @@ export interface ListUserActivityResponse {
128
138
  */
129
139
  pagination?: PaginationResponse;
130
140
  /**
131
- * @generated from protobuf field: repeated resources.users.UserActivity activity = 2
141
+ * @generated from protobuf field: repeated resources.users.activity.UserActivity activity = 2
132
142
  */
133
143
  activity: UserActivity[];
134
144
  }
@@ -137,7 +147,7 @@ export interface ListUserActivityResponse {
137
147
  */
138
148
  export interface SetUserPropsRequest {
139
149
  /**
140
- * @generated from protobuf field: resources.users.UserProps props = 1
150
+ * @generated from protobuf field: resources.users.props.UserProps props = 1
141
151
  */
142
152
  props?: UserProps;
143
153
  /**
@@ -150,7 +160,7 @@ export interface SetUserPropsRequest {
150
160
  */
151
161
  export interface SetUserPropsResponse {
152
162
  /**
153
- * @generated from protobuf field: resources.users.UserProps props = 1
163
+ * @generated from protobuf field: resources.users.props.UserProps props = 1
154
164
  */
155
165
  props?: UserProps;
156
166
  }
@@ -187,7 +197,7 @@ export interface DeleteMugshotResponse {
187
197
  */
188
198
  export interface ManageLabelsRequest {
189
199
  /**
190
- * @generated from protobuf field: repeated resources.users.Label labels = 1
200
+ * @generated from protobuf field: repeated resources.users.labels.Label labels = 1
191
201
  */
192
202
  labels: Label[];
193
203
  }
@@ -196,7 +206,7 @@ export interface ManageLabelsRequest {
196
206
  */
197
207
  export interface ManageLabelsResponse {
198
208
  /**
199
- * @generated from protobuf field: repeated resources.users.Label labels = 1
209
+ * @generated from protobuf field: repeated resources.users.labels.Label labels = 1
200
210
  */
201
211
  labels: Label[];
202
212
  }
@@ -211,7 +221,9 @@ class ListCitizensRequest$Type extends MessageType<ListCitizensRequest> {
211
221
  { no: 5, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
212
222
  { no: 6, name: "traffic_infraction_points", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
213
223
  { no: 7, name: "dateofbirth", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "10" } } } },
214
- { no: 8, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
224
+ { no: 8, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
225
+ { no: 9, name: "min_height", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ },
226
+ { no: 10, name: "max_height", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }
215
227
  ]);
216
228
  }
217
229
  create(value?: PartialMessage<ListCitizensRequest>): ListCitizensRequest {
@@ -250,6 +262,12 @@ class ListCitizensRequest$Type extends MessageType<ListCitizensRequest> {
250
262
  case /* optional int64 open_fines */ 8:
251
263
  message.openFines = reader.int64().toNumber();
252
264
  break;
265
+ case /* optional float min_height */ 9:
266
+ message.minHeight = reader.float();
267
+ break;
268
+ case /* optional float max_height */ 10:
269
+ message.maxHeight = reader.float();
270
+ break;
253
271
  default:
254
272
  let u = options.readUnknownField;
255
273
  if (u === "throw")
@@ -286,6 +304,12 @@ class ListCitizensRequest$Type extends MessageType<ListCitizensRequest> {
286
304
  /* optional int64 open_fines = 8; */
287
305
  if (message.openFines !== undefined)
288
306
  writer.tag(8, WireType.Varint).int64(message.openFines);
307
+ /* optional float min_height = 9; */
308
+ if (message.minHeight !== undefined)
309
+ writer.tag(9, WireType.Bit32).float(message.minHeight);
310
+ /* optional float max_height = 10; */
311
+ if (message.maxHeight !== undefined)
312
+ writer.tag(10, WireType.Bit32).float(message.maxHeight);
289
313
  let u = options.writeUnknownFields;
290
314
  if (u !== false)
291
315
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -457,7 +481,7 @@ class ListUserActivityRequest$Type extends MessageType<ListUserActivityRequest>
457
481
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
458
482
  { no: 2, name: "sort", kind: "message", T: () => Sort },
459
483
  { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
460
- { no: 4, name: "types", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.users.UserActivityType", UserActivityType, "USER_ACTIVITY_TYPE_"], options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
484
+ { no: 4, name: "types", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.users.activity.UserActivityType", UserActivityType, "USER_ACTIVITY_TYPE_"], options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
461
485
  ]);
462
486
  }
463
487
  create(value?: PartialMessage<ListUserActivityRequest>): ListUserActivityRequest {
@@ -482,7 +506,7 @@ class ListUserActivityRequest$Type extends MessageType<ListUserActivityRequest>
482
506
  case /* int32 user_id */ 3:
483
507
  message.userId = reader.int32();
484
508
  break;
485
- case /* repeated resources.users.UserActivityType types */ 4:
509
+ case /* repeated resources.users.activity.UserActivityType types */ 4:
486
510
  if (wireType === WireType.LengthDelimited)
487
511
  for (let e = reader.int32() + reader.pos; reader.pos < e;)
488
512
  message.types.push(reader.int32());
@@ -510,7 +534,7 @@ class ListUserActivityRequest$Type extends MessageType<ListUserActivityRequest>
510
534
  /* int32 user_id = 3; */
511
535
  if (message.userId !== 0)
512
536
  writer.tag(3, WireType.Varint).int32(message.userId);
513
- /* repeated resources.users.UserActivityType types = 4; */
537
+ /* repeated resources.users.activity.UserActivityType types = 4; */
514
538
  if (message.types.length) {
515
539
  writer.tag(4, WireType.LengthDelimited).fork();
516
540
  for (let i = 0; i < message.types.length; i++)
@@ -550,7 +574,7 @@ class ListUserActivityResponse$Type extends MessageType<ListUserActivityResponse
550
574
  case /* resources.common.database.PaginationResponse pagination */ 1:
551
575
  message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
552
576
  break;
553
- case /* repeated resources.users.UserActivity activity */ 2:
577
+ case /* repeated resources.users.activity.UserActivity activity */ 2:
554
578
  message.activity.push(UserActivity.internalBinaryRead(reader, reader.uint32(), options));
555
579
  break;
556
580
  default:
@@ -568,7 +592,7 @@ class ListUserActivityResponse$Type extends MessageType<ListUserActivityResponse
568
592
  /* resources.common.database.PaginationResponse pagination = 1; */
569
593
  if (message.pagination)
570
594
  PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
571
- /* repeated resources.users.UserActivity activity = 2; */
595
+ /* repeated resources.users.activity.UserActivity activity = 2; */
572
596
  for (let i = 0; i < message.activity.length; i++)
573
597
  UserActivity.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
574
598
  let u = options.writeUnknownFields;
@@ -601,7 +625,7 @@ class SetUserPropsRequest$Type extends MessageType<SetUserPropsRequest> {
601
625
  while (reader.pos < end) {
602
626
  let [fieldNo, wireType] = reader.tag();
603
627
  switch (fieldNo) {
604
- case /* resources.users.UserProps props */ 1:
628
+ case /* resources.users.props.UserProps props */ 1:
605
629
  message.props = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.props);
606
630
  break;
607
631
  case /* string reason */ 2:
@@ -619,7 +643,7 @@ class SetUserPropsRequest$Type extends MessageType<SetUserPropsRequest> {
619
643
  return message;
620
644
  }
621
645
  internalBinaryWrite(message: SetUserPropsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
622
- /* resources.users.UserProps props = 1; */
646
+ /* resources.users.props.UserProps props = 1; */
623
647
  if (message.props)
624
648
  UserProps.internalBinaryWrite(message.props, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
625
649
  /* string reason = 2; */
@@ -653,7 +677,7 @@ class SetUserPropsResponse$Type extends MessageType<SetUserPropsResponse> {
653
677
  while (reader.pos < end) {
654
678
  let [fieldNo, wireType] = reader.tag();
655
679
  switch (fieldNo) {
656
- case /* resources.users.UserProps props */ 1:
680
+ case /* resources.users.props.UserProps props */ 1:
657
681
  message.props = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.props);
658
682
  break;
659
683
  default:
@@ -668,7 +692,7 @@ class SetUserPropsResponse$Type extends MessageType<SetUserPropsResponse> {
668
692
  return message;
669
693
  }
670
694
  internalBinaryWrite(message: SetUserPropsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
671
- /* resources.users.UserProps props = 1; */
695
+ /* resources.users.props.UserProps props = 1; */
672
696
  if (message.props)
673
697
  UserProps.internalBinaryWrite(message.props, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
674
698
  let u = options.writeUnknownFields;
@@ -854,7 +878,7 @@ export const DeleteMugshotResponse = new DeleteMugshotResponse$Type();
854
878
  class ManageLabelsRequest$Type extends MessageType<ManageLabelsRequest> {
855
879
  constructor() {
856
880
  super("services.citizens.ManageLabelsRequest", [
857
- { no: 1, name: "labels", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label }
881
+ { no: 1, name: "labels", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label, options: { "buf.validate.field": { repeated: { maxItems: "50" } } } }
858
882
  ]);
859
883
  }
860
884
  create(value?: PartialMessage<ManageLabelsRequest>): ManageLabelsRequest {
@@ -869,7 +893,7 @@ class ManageLabelsRequest$Type extends MessageType<ManageLabelsRequest> {
869
893
  while (reader.pos < end) {
870
894
  let [fieldNo, wireType] = reader.tag();
871
895
  switch (fieldNo) {
872
- case /* repeated resources.users.Label labels */ 1:
896
+ case /* repeated resources.users.labels.Label labels */ 1:
873
897
  message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
874
898
  break;
875
899
  default:
@@ -884,7 +908,7 @@ class ManageLabelsRequest$Type extends MessageType<ManageLabelsRequest> {
884
908
  return message;
885
909
  }
886
910
  internalBinaryWrite(message: ManageLabelsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
887
- /* repeated resources.users.Label labels = 1; */
911
+ /* repeated resources.users.labels.Label labels = 1; */
888
912
  for (let i = 0; i < message.labels.length; i++)
889
913
  Label.internalBinaryWrite(message.labels[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
890
914
  let u = options.writeUnknownFields;
@@ -916,7 +940,7 @@ class ManageLabelsResponse$Type extends MessageType<ManageLabelsResponse> {
916
940
  while (reader.pos < end) {
917
941
  let [fieldNo, wireType] = reader.tag();
918
942
  switch (fieldNo) {
919
- case /* repeated resources.users.Label labels */ 1:
943
+ case /* repeated resources.users.labels.Label labels */ 1:
920
944
  message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
921
945
  break;
922
946
  default:
@@ -931,7 +955,7 @@ class ManageLabelsResponse$Type extends MessageType<ManageLabelsResponse> {
931
955
  return message;
932
956
  }
933
957
  internalBinaryWrite(message: ManageLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
934
- /* repeated resources.users.Label labels = 1; */
958
+ /* repeated resources.users.labels.Label labels = 1; */
935
959
  for (let i = 0; i < message.labels.length; i++)
936
960
  Label.internalBinaryWrite(message.labels[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
937
961
  let u = options.writeUnknownFields;
@@ -957,4 +981,4 @@ export const CitizensService = new ServiceType("services.citizens.CitizensServic
957
981
  { name: "UploadMugshot", clientStreaming: true, options: { "codegen.perms.perms": { enabled: true, name: "SetUserProps" } }, I: UploadFileRequest, O: UploadFileResponse },
958
982
  { name: "DeleteMugshot", options: { "codegen.perms.perms": { enabled: true, name: "SetUserProps" } }, I: DeleteMugshotRequest, O: DeleteMugshotResponse },
959
983
  { name: "ManageLabels", options: { "codegen.perms.perms": { enabled: true } }, I: ManageLabelsRequest, O: ManageLabelsResponse }
960
- ]);
984
+ ], { "codegen.perms.perms_svc": { order: 30, icon: "i-mdi-account-multiple-outline" } });
@@ -12,11 +12,11 @@ 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/users/labels";
15
+ import { Label } from "../../resources/users/labels/labels";
16
16
  import { LawBook } from "../../resources/laws/laws";
17
- import { Category } from "../../resources/documents/category";
17
+ import { Category } from "../../resources/documents/category/category";
18
18
  import { Job } from "../../resources/jobs/jobs";
19
- import { UserShort } from "../../resources/users/users";
19
+ import { UserShort } from "../../resources/users/short/user";
20
20
  /**
21
21
  * @generated from protobuf message services.completor.CompleteCitizensRequest
22
22
  */
@@ -47,7 +47,7 @@ export interface CompleteCitizensRequest {
47
47
  */
48
48
  export interface CompleteCitizensResponse {
49
49
  /**
50
- * @generated from protobuf field: repeated resources.users.UserShort users = 1
50
+ * @generated from protobuf field: repeated resources.users.short.UserShort users = 1
51
51
  */
52
52
  users: UserShort[];
53
53
  }
@@ -85,13 +85,17 @@ export interface CompleteDocumentCategoriesRequest {
85
85
  * @generated from protobuf field: string search = 1
86
86
  */
87
87
  search: string;
88
+ /**
89
+ * @generated from protobuf field: repeated int64 category_ids = 2
90
+ */
91
+ categoryIds: number[];
88
92
  }
89
93
  /**
90
94
  * @generated from protobuf message services.completor.CompleteDocumentCategoriesResponse
91
95
  */
92
96
  export interface CompleteDocumentCategoriesResponse {
93
97
  /**
94
- * @generated from protobuf field: repeated resources.documents.Category categories = 1
98
+ * @generated from protobuf field: repeated resources.documents.category.Category categories = 1
95
99
  */
96
100
  categories: Category[];
97
101
  }
@@ -123,7 +127,7 @@ export interface CompleteCitizenLabelsRequest {
123
127
  */
124
128
  export interface CompleteCitizenLabelsResponse {
125
129
  /**
126
- * @generated from protobuf field: repeated resources.users.Label labels = 1
130
+ * @generated from protobuf field: repeated resources.users.labels.Label labels = 1
127
131
  */
128
132
  labels: Label[];
129
133
  }
@@ -230,7 +234,7 @@ class CompleteCitizensResponse$Type extends MessageType<CompleteCitizensResponse
230
234
  while (reader.pos < end) {
231
235
  let [fieldNo, wireType] = reader.tag();
232
236
  switch (fieldNo) {
233
- case /* repeated resources.users.UserShort users */ 1:
237
+ case /* repeated resources.users.short.UserShort users */ 1:
234
238
  message.users.push(UserShort.internalBinaryRead(reader, reader.uint32(), options));
235
239
  break;
236
240
  default:
@@ -245,7 +249,7 @@ class CompleteCitizensResponse$Type extends MessageType<CompleteCitizensResponse
245
249
  return message;
246
250
  }
247
251
  internalBinaryWrite(message: CompleteCitizensResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
248
- /* repeated resources.users.UserShort users = 1; */
252
+ /* repeated resources.users.short.UserShort users = 1; */
249
253
  for (let i = 0; i < message.users.length; i++)
250
254
  UserShort.internalBinaryWrite(message.users[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
251
255
  let u = options.writeUnknownFields;
@@ -369,12 +373,14 @@ export const CompleteJobsResponse = new CompleteJobsResponse$Type();
369
373
  class CompleteDocumentCategoriesRequest$Type extends MessageType<CompleteDocumentCategoriesRequest> {
370
374
  constructor() {
371
375
  super("services.completor.CompleteDocumentCategoriesRequest", [
372
- { no: 1, name: "search", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } }
376
+ { no: 1, name: "search", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
377
+ { no: 2, name: "category_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { items: { int64: { gt: "0" } } } } } }
373
378
  ]);
374
379
  }
375
380
  create(value?: PartialMessage<CompleteDocumentCategoriesRequest>): CompleteDocumentCategoriesRequest {
376
381
  const message = globalThis.Object.create((this.messagePrototype!));
377
382
  message.search = "";
383
+ message.categoryIds = [];
378
384
  if (value !== undefined)
379
385
  reflectionMergePartial<CompleteDocumentCategoriesRequest>(this, message, value);
380
386
  return message;
@@ -387,6 +393,13 @@ class CompleteDocumentCategoriesRequest$Type extends MessageType<CompleteDocumen
387
393
  case /* string search */ 1:
388
394
  message.search = reader.string();
389
395
  break;
396
+ case /* repeated int64 category_ids */ 2:
397
+ if (wireType === WireType.LengthDelimited)
398
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
399
+ message.categoryIds.push(reader.int64().toNumber());
400
+ else
401
+ message.categoryIds.push(reader.int64().toNumber());
402
+ break;
390
403
  default:
391
404
  let u = options.readUnknownField;
392
405
  if (u === "throw")
@@ -402,6 +415,13 @@ class CompleteDocumentCategoriesRequest$Type extends MessageType<CompleteDocumen
402
415
  /* string search = 1; */
403
416
  if (message.search !== "")
404
417
  writer.tag(1, WireType.LengthDelimited).string(message.search);
418
+ /* repeated int64 category_ids = 2; */
419
+ if (message.categoryIds.length) {
420
+ writer.tag(2, WireType.LengthDelimited).fork();
421
+ for (let i = 0; i < message.categoryIds.length; i++)
422
+ writer.int64(message.categoryIds[i]);
423
+ writer.join();
424
+ }
405
425
  let u = options.writeUnknownFields;
406
426
  if (u !== false)
407
427
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -431,7 +451,7 @@ class CompleteDocumentCategoriesResponse$Type extends MessageType<CompleteDocume
431
451
  while (reader.pos < end) {
432
452
  let [fieldNo, wireType] = reader.tag();
433
453
  switch (fieldNo) {
434
- case /* repeated resources.documents.Category categories */ 1:
454
+ case /* repeated resources.documents.category.Category categories */ 1:
435
455
  message.categories.push(Category.internalBinaryRead(reader, reader.uint32(), options));
436
456
  break;
437
457
  default:
@@ -446,7 +466,7 @@ class CompleteDocumentCategoriesResponse$Type extends MessageType<CompleteDocume
446
466
  return message;
447
467
  }
448
468
  internalBinaryWrite(message: CompleteDocumentCategoriesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
449
- /* repeated resources.documents.Category categories = 1; */
469
+ /* repeated resources.documents.category.Category categories = 1; */
450
470
  for (let i = 0; i < message.categories.length; i++)
451
471
  Category.internalBinaryWrite(message.categories[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
452
472
  let u = options.writeUnknownFields;
@@ -610,7 +630,7 @@ class CompleteCitizenLabelsResponse$Type extends MessageType<CompleteCitizenLabe
610
630
  while (reader.pos < end) {
611
631
  let [fieldNo, wireType] = reader.tag();
612
632
  switch (fieldNo) {
613
- case /* repeated resources.users.Label labels */ 1:
633
+ case /* repeated resources.users.labels.Label labels */ 1:
614
634
  message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options));
615
635
  break;
616
636
  default:
@@ -625,7 +645,7 @@ class CompleteCitizenLabelsResponse$Type extends MessageType<CompleteCitizenLabe
625
645
  return message;
626
646
  }
627
647
  internalBinaryWrite(message: CompleteCitizenLabelsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
628
- /* repeated resources.users.Label labels = 1; */
648
+ /* repeated resources.users.labels.Label labels = 1; */
629
649
  for (let i = 0; i < message.labels.length; i++)
630
650
  Label.internalBinaryWrite(message.labels[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
631
651
  let u = options.writeUnknownFields;
@@ -642,9 +662,9 @@ export const CompleteCitizenLabelsResponse = new CompleteCitizenLabelsResponse$T
642
662
  * @generated ServiceType for protobuf service services.completor.CompletorService
643
663
  */
644
664
  export const CompletorService = new ServiceType("services.completor.CompletorService", [
645
- { name: "CompleteCitizens", options: { "codegen.perms.perms": { enabled: true } }, I: CompleteCitizensRequest, O: CompleteCitizensResponse },
665
+ { name: "CompleteCitizens", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: CompleteCitizensRequest, O: CompleteCitizensResponse },
646
666
  { name: "CompleteJobs", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: CompleteJobsRequest, O: CompleteJobsResponse },
647
667
  { name: "CompleteDocumentCategories", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Jobs", type: "ATTRIBUTE_TYPE_JOB_LIST" }] } }, I: CompleteDocumentCategoriesRequest, O: CompleteDocumentCategoriesResponse },
648
668
  { name: "ListLawBooks", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: ListLawBooksRequest, O: ListLawBooksResponse },
649
669
  { name: "CompleteCitizenLabels", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Jobs", type: "ATTRIBUTE_TYPE_JOB_LIST" }] } }, I: CompleteCitizenLabelsRequest, O: CompleteCitizenLabelsResponse }
650
- ]);
670
+ ], { "codegen.perms.perms_svc": { order: 10, icon: "i-mdi-keyboard-tab" } });
@@ -0,0 +1,188 @@
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/approval.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 { ApprovalService } from "./approval";
8
+ import type { RecomputeApprovalPolicyCountersResponse } from "./approval";
9
+ import type { RecomputeApprovalPolicyCountersRequest } from "./approval";
10
+ import type { ReopenApprovalTaskResponse } from "./approval";
11
+ import type { ReopenApprovalTaskRequest } from "./approval";
12
+ import type { DecideApprovalResponse } from "./approval";
13
+ import type { DecideApprovalRequest } from "./approval";
14
+ import type { RevokeApprovalResponse } from "./approval";
15
+ import type { RevokeApprovalRequest } from "./approval";
16
+ import type { ListApprovalsResponse } from "./approval";
17
+ import type { ListApprovalsRequest } from "./approval";
18
+ import type { DeleteApprovalTasksResponse } from "./approval";
19
+ import type { DeleteApprovalTasksRequest } from "./approval";
20
+ import type { UpsertApprovalTasksResponse } from "./approval";
21
+ import type { UpsertApprovalTasksRequest } from "./approval";
22
+ import type { ListApprovalTasksResponse } from "./approval";
23
+ import type { ListApprovalTasksRequest } from "./approval";
24
+ import type { UpsertApprovalPolicyResponse } from "./approval";
25
+ import type { UpsertApprovalPolicyRequest } from "./approval";
26
+ import type { ListApprovalPoliciesResponse } from "./approval";
27
+ import type { ListApprovalPoliciesRequest } from "./approval";
28
+ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
29
+ import type { ListApprovalTasksInboxResponse } from "./approval";
30
+ import type { ListApprovalTasksInboxRequest } from "./approval";
31
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
32
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
33
+ /**
34
+ * @generated from protobuf service services.documents.ApprovalService
35
+ */
36
+ export interface IApprovalServiceClient {
37
+ /**
38
+ * Inbox (for tasks assigned to user)
39
+ *
40
+ * @generated from protobuf rpc: ListApprovalTasksInbox
41
+ */
42
+ listApprovalTasksInbox(input: ListApprovalTasksInboxRequest, options?: RpcOptions): UnaryCall<ListApprovalTasksInboxRequest, ListApprovalTasksInboxResponse>;
43
+ /**
44
+ * Policies
45
+ *
46
+ * @generated from protobuf rpc: ListApprovalPolicies
47
+ */
48
+ listApprovalPolicies(input: ListApprovalPoliciesRequest, options?: RpcOptions): UnaryCall<ListApprovalPoliciesRequest, ListApprovalPoliciesResponse>;
49
+ /**
50
+ * @generated from protobuf rpc: UpsertApprovalPolicy
51
+ */
52
+ upsertApprovalPolicy(input: UpsertApprovalPolicyRequest, options?: RpcOptions): UnaryCall<UpsertApprovalPolicyRequest, UpsertApprovalPolicyResponse>;
53
+ /**
54
+ * Tasks
55
+ *
56
+ * @generated from protobuf rpc: ListApprovalTasks
57
+ */
58
+ listApprovalTasks(input: ListApprovalTasksRequest, options?: RpcOptions): UnaryCall<ListApprovalTasksRequest, ListApprovalTasksResponse>;
59
+ /**
60
+ * @generated from protobuf rpc: UpsertApprovalTasks
61
+ */
62
+ upsertApprovalTasks(input: UpsertApprovalTasksRequest, options?: RpcOptions): UnaryCall<UpsertApprovalTasksRequest, UpsertApprovalTasksResponse>;
63
+ /**
64
+ * @generated from protobuf rpc: DeleteApprovalTasks
65
+ */
66
+ deleteApprovalTasks(input: DeleteApprovalTasksRequest, options?: RpcOptions): UnaryCall<DeleteApprovalTasksRequest, DeleteApprovalTasksResponse>;
67
+ /**
68
+ * Approval
69
+ *
70
+ * @generated from protobuf rpc: ListApprovals
71
+ */
72
+ listApprovals(input: ListApprovalsRequest, options?: RpcOptions): UnaryCall<ListApprovalsRequest, ListApprovalsResponse>;
73
+ /**
74
+ * @generated from protobuf rpc: RevokeApproval
75
+ */
76
+ revokeApproval(input: RevokeApprovalRequest, options?: RpcOptions): UnaryCall<RevokeApprovalRequest, RevokeApprovalResponse>;
77
+ /**
78
+ * @generated from protobuf rpc: DecideApproval
79
+ */
80
+ decideApproval(input: DecideApprovalRequest, options?: RpcOptions): UnaryCall<DecideApprovalRequest, DecideApprovalResponse>;
81
+ /**
82
+ * @generated from protobuf rpc: ReopenApprovalTask
83
+ */
84
+ reopenApprovalTask(input: ReopenApprovalTaskRequest, options?: RpcOptions): UnaryCall<ReopenApprovalTaskRequest, ReopenApprovalTaskResponse>;
85
+ /**
86
+ * Helpers
87
+ *
88
+ * @generated from protobuf rpc: RecomputeApprovalPolicyCounters
89
+ */
90
+ recomputeApprovalPolicyCounters(input: RecomputeApprovalPolicyCountersRequest, options?: RpcOptions): UnaryCall<RecomputeApprovalPolicyCountersRequest, RecomputeApprovalPolicyCountersResponse>;
91
+ }
92
+ /**
93
+ * @generated from protobuf service services.documents.ApprovalService
94
+ */
95
+ export class ApprovalServiceClient implements IApprovalServiceClient, ServiceInfo {
96
+ typeName = ApprovalService.typeName;
97
+ methods = ApprovalService.methods;
98
+ options = ApprovalService.options;
99
+ constructor(private readonly _transport: RpcTransport) {
100
+ }
101
+ /**
102
+ * Inbox (for tasks assigned to user)
103
+ *
104
+ * @generated from protobuf rpc: ListApprovalTasksInbox
105
+ */
106
+ listApprovalTasksInbox(input: ListApprovalTasksInboxRequest, options?: RpcOptions): UnaryCall<ListApprovalTasksInboxRequest, ListApprovalTasksInboxResponse> {
107
+ const method = this.methods[0], opt = this._transport.mergeOptions(options);
108
+ return stackIntercept<ListApprovalTasksInboxRequest, ListApprovalTasksInboxResponse>("unary", this._transport, method, opt, input);
109
+ }
110
+ /**
111
+ * Policies
112
+ *
113
+ * @generated from protobuf rpc: ListApprovalPolicies
114
+ */
115
+ listApprovalPolicies(input: ListApprovalPoliciesRequest, options?: RpcOptions): UnaryCall<ListApprovalPoliciesRequest, ListApprovalPoliciesResponse> {
116
+ const method = this.methods[1], opt = this._transport.mergeOptions(options);
117
+ return stackIntercept<ListApprovalPoliciesRequest, ListApprovalPoliciesResponse>("unary", this._transport, method, opt, input);
118
+ }
119
+ /**
120
+ * @generated from protobuf rpc: UpsertApprovalPolicy
121
+ */
122
+ upsertApprovalPolicy(input: UpsertApprovalPolicyRequest, options?: RpcOptions): UnaryCall<UpsertApprovalPolicyRequest, UpsertApprovalPolicyResponse> {
123
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
124
+ return stackIntercept<UpsertApprovalPolicyRequest, UpsertApprovalPolicyResponse>("unary", this._transport, method, opt, input);
125
+ }
126
+ /**
127
+ * Tasks
128
+ *
129
+ * @generated from protobuf rpc: ListApprovalTasks
130
+ */
131
+ listApprovalTasks(input: ListApprovalTasksRequest, options?: RpcOptions): UnaryCall<ListApprovalTasksRequest, ListApprovalTasksResponse> {
132
+ const method = this.methods[3], opt = this._transport.mergeOptions(options);
133
+ return stackIntercept<ListApprovalTasksRequest, ListApprovalTasksResponse>("unary", this._transport, method, opt, input);
134
+ }
135
+ /**
136
+ * @generated from protobuf rpc: UpsertApprovalTasks
137
+ */
138
+ upsertApprovalTasks(input: UpsertApprovalTasksRequest, options?: RpcOptions): UnaryCall<UpsertApprovalTasksRequest, UpsertApprovalTasksResponse> {
139
+ const method = this.methods[4], opt = this._transport.mergeOptions(options);
140
+ return stackIntercept<UpsertApprovalTasksRequest, UpsertApprovalTasksResponse>("unary", this._transport, method, opt, input);
141
+ }
142
+ /**
143
+ * @generated from protobuf rpc: DeleteApprovalTasks
144
+ */
145
+ deleteApprovalTasks(input: DeleteApprovalTasksRequest, options?: RpcOptions): UnaryCall<DeleteApprovalTasksRequest, DeleteApprovalTasksResponse> {
146
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
147
+ return stackIntercept<DeleteApprovalTasksRequest, DeleteApprovalTasksResponse>("unary", this._transport, method, opt, input);
148
+ }
149
+ /**
150
+ * Approval
151
+ *
152
+ * @generated from protobuf rpc: ListApprovals
153
+ */
154
+ listApprovals(input: ListApprovalsRequest, options?: RpcOptions): UnaryCall<ListApprovalsRequest, ListApprovalsResponse> {
155
+ const method = this.methods[6], opt = this._transport.mergeOptions(options);
156
+ return stackIntercept<ListApprovalsRequest, ListApprovalsResponse>("unary", this._transport, method, opt, input);
157
+ }
158
+ /**
159
+ * @generated from protobuf rpc: RevokeApproval
160
+ */
161
+ revokeApproval(input: RevokeApprovalRequest, options?: RpcOptions): UnaryCall<RevokeApprovalRequest, RevokeApprovalResponse> {
162
+ const method = this.methods[7], opt = this._transport.mergeOptions(options);
163
+ return stackIntercept<RevokeApprovalRequest, RevokeApprovalResponse>("unary", this._transport, method, opt, input);
164
+ }
165
+ /**
166
+ * @generated from protobuf rpc: DecideApproval
167
+ */
168
+ decideApproval(input: DecideApprovalRequest, options?: RpcOptions): UnaryCall<DecideApprovalRequest, DecideApprovalResponse> {
169
+ const method = this.methods[8], opt = this._transport.mergeOptions(options);
170
+ return stackIntercept<DecideApprovalRequest, DecideApprovalResponse>("unary", this._transport, method, opt, input);
171
+ }
172
+ /**
173
+ * @generated from protobuf rpc: ReopenApprovalTask
174
+ */
175
+ reopenApprovalTask(input: ReopenApprovalTaskRequest, options?: RpcOptions): UnaryCall<ReopenApprovalTaskRequest, ReopenApprovalTaskResponse> {
176
+ const method = this.methods[9], opt = this._transport.mergeOptions(options);
177
+ return stackIntercept<ReopenApprovalTaskRequest, ReopenApprovalTaskResponse>("unary", this._transport, method, opt, input);
178
+ }
179
+ /**
180
+ * Helpers
181
+ *
182
+ * @generated from protobuf rpc: RecomputeApprovalPolicyCounters
183
+ */
184
+ recomputeApprovalPolicyCounters(input: RecomputeApprovalPolicyCountersRequest, options?: RpcOptions): UnaryCall<RecomputeApprovalPolicyCountersRequest, RecomputeApprovalPolicyCountersResponse> {
185
+ const method = this.methods[10], opt = this._transport.mergeOptions(options);
186
+ return stackIntercept<RecomputeApprovalPolicyCountersRequest, RecomputeApprovalPolicyCountersResponse>("unary", this._transport, method, opt, input);
187
+ }
188
+ }