@fivenet-app/gen 2026.5.1 → 2026.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/clients.ts +6 -0
  2. package/codegen/perms/perms.ts +14 -2
  3. package/codegen/sanitizer/sanitizer.ts +6 -0
  4. package/google/protobuf/descriptor.ts +11 -3
  5. package/google/protobuf/timestamp.ts +7 -6
  6. package/package.json +1 -1
  7. package/perms.ts +343 -3
  8. package/resources/access/access.ts +481 -0
  9. package/resources/calendar/access/access.ts +0 -330
  10. package/resources/calendar/calendar.ts +307 -25
  11. package/resources/calendar/entries/entries.ts +204 -11
  12. package/resources/centrum/units/access/access.ts +0 -373
  13. package/resources/centrum/units/units.ts +20 -8
  14. package/resources/citizens/labels/access.ts +0 -191
  15. package/resources/citizens/labels/labels.ts +20 -8
  16. package/resources/common/content/diff_activity.ts +1 -1
  17. package/resources/cron/cron.ts +1 -1
  18. package/resources/documents/access/access.ts +0 -329
  19. package/resources/documents/activity/activity.ts +49 -45
  20. package/resources/documents/documents.ts +1 -1
  21. package/resources/documents/requests/requests.ts +1 -1
  22. package/resources/documents/stamps/stamp.ts +40 -210
  23. package/resources/documents/templates/templates.ts +158 -318
  24. package/resources/jobs/colleagues/activity/activity.ts +1 -1
  25. package/resources/jobs/conduct/conduct.ts +2 -2
  26. package/resources/jobs/jobs.ts +22 -0
  27. package/resources/jobs/labels/labels.ts +9 -9
  28. package/resources/laws/laws.ts +24 -0
  29. package/resources/livemap/markers/marker_marker.ts +311 -4
  30. package/resources/mailer/access/access.ts +0 -457
  31. package/resources/mailer/emails/email.ts +4 -4
  32. package/resources/notifications/events/events.ts +18 -1
  33. package/resources/qualifications/access/access.ts +0 -248
  34. package/resources/qualifications/qualifications.ts +9 -9
  35. package/resources/settings/config.ts +53 -5
  36. package/resources/settings/data.ts +1 -1
  37. package/resources/stats/stats.ts +32 -20
  38. package/resources/sync/data/data.ts +13 -1
  39. package/resources/userinfo/userinfo.ts +202 -51
  40. package/resources/users/activity/activity.ts +1 -1
  41. package/resources/wiki/access/access.ts +0 -330
  42. package/resources/wiki/activity/activity.ts +45 -45
  43. package/resources/wiki/page.ts +9 -9
  44. package/services/calendar/calendar.ts +1 -1
  45. package/services/calendar/entries.ts +12 -1
  46. package/services/centrum/dispatches.ts +27 -7
  47. package/services/centrum/units.client.ts +15 -2
  48. package/services/centrum/units.ts +231 -123
  49. package/services/citizens/citizens.ts +1 -1
  50. package/services/citizens/labels.client.ts +7 -20
  51. package/services/citizens/labels.ts +35 -183
  52. package/services/documents/approval.ts +15 -4
  53. package/services/documents/collab.ts +1 -1
  54. package/services/documents/documents.ts +38 -38
  55. package/services/documents/stats.ts +14 -2
  56. package/services/filestore/filestore.ts +4 -4
  57. package/services/jobs/colleagues.ts +3 -3
  58. package/services/jobs/conduct.ts +2 -2
  59. package/services/jobs/groups.client.ts +22 -0
  60. package/services/jobs/groups.ts +9 -0
  61. package/services/jobs/timeclock.ts +2 -2
  62. package/services/mailer/thread.ts +2 -2
  63. package/services/qualifications/qualifications.ts +52 -34
  64. package/services/settings/accounts.ts +5 -5
  65. package/services/settings/config.ts +2 -2
  66. package/services/settings/cron.ts +2 -2
  67. package/services/settings/laws.client.ts +28 -2
  68. package/services/settings/laws.ts +229 -1
  69. package/services/settings/system.ts +6 -6
  70. package/services/sync/sync.client.ts +42 -14
  71. package/services/sync/sync.ts +162 -13
  72. package/services/wiki/wiki.client.ts +15 -2
  73. package/services/wiki/wiki.ts +122 -0
  74. package/svcs.ts +18 -2
@@ -53,6 +53,32 @@ export interface ListUnitsResponse {
53
53
  */
54
54
  units: Unit[];
55
55
  }
56
+ /**
57
+ * @generated from protobuf message services.centrum.ListUnitActivityRequest
58
+ */
59
+ export interface ListUnitActivityRequest {
60
+ /**
61
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
62
+ */
63
+ pagination?: PaginationRequest;
64
+ /**
65
+ * @generated from protobuf field: int64 id = 2
66
+ */
67
+ id: number;
68
+ }
69
+ /**
70
+ * @generated from protobuf message services.centrum.ListUnitActivityResponse
71
+ */
72
+ export interface ListUnitActivityResponse {
73
+ /**
74
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
75
+ */
76
+ pagination?: PaginationResponse;
77
+ /**
78
+ * @generated from protobuf field: repeated resources.centrum.units.UnitStatus activity = 2
79
+ */
80
+ activity: UnitStatus[];
81
+ }
56
82
  /**
57
83
  * @generated from protobuf message services.centrum.CreateOrUpdateUnitRequest
58
84
  */
@@ -86,30 +112,18 @@ export interface DeleteUnitRequest {
86
112
  export interface DeleteUnitResponse {
87
113
  }
88
114
  /**
89
- * @generated from protobuf message services.centrum.UpdateUnitStatusRequest
115
+ * @generated from protobuf message services.centrum.ReorderUnitsRequest
90
116
  */
91
- export interface UpdateUnitStatusRequest {
92
- /**
93
- * @generated from protobuf field: int64 unit_id = 1
94
- */
95
- unitId: number;
96
- /**
97
- * @generated from protobuf field: resources.centrum.units.StatusUnit status = 2
98
- */
99
- status: StatusUnit;
117
+ export interface ReorderUnitsRequest {
100
118
  /**
101
- * @generated from protobuf field: optional string reason = 3
102
- */
103
- reason?: string;
104
- /**
105
- * @generated from protobuf field: optional string code = 4
119
+ * @generated from protobuf field: repeated int64 unit_ids = 1
106
120
  */
107
- code?: string;
121
+ unitIds: number[];
108
122
  }
109
123
  /**
110
- * @generated from protobuf message services.centrum.UpdateUnitStatusResponse
124
+ * @generated from protobuf message services.centrum.ReorderUnitsResponse
111
125
  */
112
- export interface UpdateUnitStatusResponse {
126
+ export interface ReorderUnitsResponse {
113
127
  }
114
128
  /**
115
129
  * @generated from protobuf message services.centrum.AssignUnitRequest
@@ -134,30 +148,30 @@ export interface AssignUnitRequest {
134
148
  export interface AssignUnitResponse {
135
149
  }
136
150
  /**
137
- * @generated from protobuf message services.centrum.ListUnitActivityRequest
151
+ * @generated from protobuf message services.centrum.UpdateUnitStatusRequest
138
152
  */
139
- export interface ListUnitActivityRequest {
153
+ export interface UpdateUnitStatusRequest {
140
154
  /**
141
- * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
155
+ * @generated from protobuf field: int64 unit_id = 1
142
156
  */
143
- pagination?: PaginationRequest;
157
+ unitId: number;
144
158
  /**
145
- * @generated from protobuf field: int64 id = 2
159
+ * @generated from protobuf field: resources.centrum.units.StatusUnit status = 2
146
160
  */
147
- id: number;
148
- }
149
- /**
150
- * @generated from protobuf message services.centrum.ListUnitActivityResponse
151
- */
152
- export interface ListUnitActivityResponse {
161
+ status: StatusUnit;
153
162
  /**
154
- * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
163
+ * @generated from protobuf field: optional string reason = 3
155
164
  */
156
- pagination?: PaginationResponse;
165
+ reason?: string;
157
166
  /**
158
- * @generated from protobuf field: repeated resources.centrum.units.UnitStatus activity = 2
167
+ * @generated from protobuf field: optional string code = 4
159
168
  */
160
- activity: UnitStatus[];
169
+ code?: string;
170
+ }
171
+ /**
172
+ * @generated from protobuf message services.centrum.UpdateUnitStatusResponse
173
+ */
174
+ export interface UpdateUnitStatusResponse {
161
175
  }
162
176
  // @generated message type with reflection information, may provide speed optimized methods
163
177
  class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
@@ -354,6 +368,114 @@ class ListUnitsResponse$Type extends MessageType<ListUnitsResponse> {
354
368
  */
355
369
  export const ListUnitsResponse = new ListUnitsResponse$Type();
356
370
  // @generated message type with reflection information, may provide speed optimized methods
371
+ class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest> {
372
+ constructor() {
373
+ super("services.centrum.ListUnitActivityRequest", [
374
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
375
+ { no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
376
+ ]);
377
+ }
378
+ create(value?: PartialMessage<ListUnitActivityRequest>): ListUnitActivityRequest {
379
+ const message = globalThis.Object.create((this.messagePrototype!));
380
+ message.id = 0;
381
+ if (value !== undefined)
382
+ reflectionMergePartial<ListUnitActivityRequest>(this, message, value);
383
+ return message;
384
+ }
385
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityRequest): ListUnitActivityRequest {
386
+ let message = target ?? this.create(), end = reader.pos + length;
387
+ while (reader.pos < end) {
388
+ let [fieldNo, wireType] = reader.tag();
389
+ switch (fieldNo) {
390
+ case /* resources.common.database.PaginationRequest pagination */ 1:
391
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
392
+ break;
393
+ case /* int64 id */ 2:
394
+ message.id = reader.int64().toNumber();
395
+ break;
396
+ default:
397
+ let u = options.readUnknownField;
398
+ if (u === "throw")
399
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
400
+ let d = reader.skip(wireType);
401
+ if (u !== false)
402
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
403
+ }
404
+ }
405
+ return message;
406
+ }
407
+ internalBinaryWrite(message: ListUnitActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
408
+ /* resources.common.database.PaginationRequest pagination = 1; */
409
+ if (message.pagination)
410
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
411
+ /* int64 id = 2; */
412
+ if (message.id !== 0)
413
+ writer.tag(2, WireType.Varint).int64(message.id);
414
+ let u = options.writeUnknownFields;
415
+ if (u !== false)
416
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
417
+ return writer;
418
+ }
419
+ }
420
+ /**
421
+ * @generated MessageType for protobuf message services.centrum.ListUnitActivityRequest
422
+ */
423
+ export const ListUnitActivityRequest = new ListUnitActivityRequest$Type();
424
+ // @generated message type with reflection information, may provide speed optimized methods
425
+ class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse> {
426
+ constructor() {
427
+ super("services.centrum.ListUnitActivityResponse", [
428
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
429
+ { no: 2, name: "activity", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitStatus, options: { "codegen.itemslen.enabled": true } }
430
+ ]);
431
+ }
432
+ create(value?: PartialMessage<ListUnitActivityResponse>): ListUnitActivityResponse {
433
+ const message = globalThis.Object.create((this.messagePrototype!));
434
+ message.activity = [];
435
+ if (value !== undefined)
436
+ reflectionMergePartial<ListUnitActivityResponse>(this, message, value);
437
+ return message;
438
+ }
439
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityResponse): ListUnitActivityResponse {
440
+ let message = target ?? this.create(), end = reader.pos + length;
441
+ while (reader.pos < end) {
442
+ let [fieldNo, wireType] = reader.tag();
443
+ switch (fieldNo) {
444
+ case /* resources.common.database.PaginationResponse pagination */ 1:
445
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
446
+ break;
447
+ case /* repeated resources.centrum.units.UnitStatus activity */ 2:
448
+ message.activity.push(UnitStatus.internalBinaryRead(reader, reader.uint32(), options));
449
+ break;
450
+ default:
451
+ let u = options.readUnknownField;
452
+ if (u === "throw")
453
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
454
+ let d = reader.skip(wireType);
455
+ if (u !== false)
456
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
457
+ }
458
+ }
459
+ return message;
460
+ }
461
+ internalBinaryWrite(message: ListUnitActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
462
+ /* resources.common.database.PaginationResponse pagination = 1; */
463
+ if (message.pagination)
464
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
465
+ /* repeated resources.centrum.units.UnitStatus activity = 2; */
466
+ for (let i = 0; i < message.activity.length; i++)
467
+ UnitStatus.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
468
+ let u = options.writeUnknownFields;
469
+ if (u !== false)
470
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
471
+ return writer;
472
+ }
473
+ }
474
+ /**
475
+ * @generated MessageType for protobuf message services.centrum.ListUnitActivityResponse
476
+ */
477
+ export const ListUnitActivityResponse = new ListUnitActivityResponse$Type();
478
+ // @generated message type with reflection information, may provide speed optimized methods
357
479
  class CreateOrUpdateUnitRequest$Type extends MessageType<CreateOrUpdateUnitRequest> {
358
480
  constructor() {
359
481
  super("services.centrum.CreateOrUpdateUnitRequest", [
@@ -531,39 +653,30 @@ class DeleteUnitResponse$Type extends MessageType<DeleteUnitResponse> {
531
653
  */
532
654
  export const DeleteUnitResponse = new DeleteUnitResponse$Type();
533
655
  // @generated message type with reflection information, may provide speed optimized methods
534
- class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest> {
656
+ class ReorderUnitsRequest$Type extends MessageType<ReorderUnitsRequest> {
535
657
  constructor() {
536
- super("services.centrum.UpdateUnitStatusRequest", [
537
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
538
- { no: 2, name: "status", kind: "enum", T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
539
- { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
540
- { no: 4, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
658
+ super("services.centrum.ReorderUnitsRequest", [
659
+ { no: 1, name: "unit_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { minItems: "1", maxItems: "250", items: { int64: { gt: "0" } } } } } }
541
660
  ]);
542
661
  }
543
- create(value?: PartialMessage<UpdateUnitStatusRequest>): UpdateUnitStatusRequest {
662
+ create(value?: PartialMessage<ReorderUnitsRequest>): ReorderUnitsRequest {
544
663
  const message = globalThis.Object.create((this.messagePrototype!));
545
- message.unitId = 0;
546
- message.status = 0;
664
+ message.unitIds = [];
547
665
  if (value !== undefined)
548
- reflectionMergePartial<UpdateUnitStatusRequest>(this, message, value);
666
+ reflectionMergePartial<ReorderUnitsRequest>(this, message, value);
549
667
  return message;
550
668
  }
551
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusRequest): UpdateUnitStatusRequest {
669
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReorderUnitsRequest): ReorderUnitsRequest {
552
670
  let message = target ?? this.create(), end = reader.pos + length;
553
671
  while (reader.pos < end) {
554
672
  let [fieldNo, wireType] = reader.tag();
555
673
  switch (fieldNo) {
556
- case /* int64 unit_id */ 1:
557
- message.unitId = reader.int64().toNumber();
558
- break;
559
- case /* resources.centrum.units.StatusUnit status */ 2:
560
- message.status = reader.int32();
561
- break;
562
- case /* optional string reason */ 3:
563
- message.reason = reader.string();
564
- break;
565
- case /* optional string code */ 4:
566
- message.code = reader.string();
674
+ case /* repeated int64 unit_ids */ 1:
675
+ if (wireType === WireType.LengthDelimited)
676
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
677
+ message.unitIds.push(reader.int64().toNumber());
678
+ else
679
+ message.unitIds.push(reader.int64().toNumber());
567
680
  break;
568
681
  default:
569
682
  let u = options.readUnknownField;
@@ -576,19 +689,14 @@ class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest>
576
689
  }
577
690
  return message;
578
691
  }
579
- internalBinaryWrite(message: UpdateUnitStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
580
- /* int64 unit_id = 1; */
581
- if (message.unitId !== 0)
582
- writer.tag(1, WireType.Varint).int64(message.unitId);
583
- /* resources.centrum.units.StatusUnit status = 2; */
584
- if (message.status !== 0)
585
- writer.tag(2, WireType.Varint).int32(message.status);
586
- /* optional string reason = 3; */
587
- if (message.reason !== undefined)
588
- writer.tag(3, WireType.LengthDelimited).string(message.reason);
589
- /* optional string code = 4; */
590
- if (message.code !== undefined)
591
- writer.tag(4, WireType.LengthDelimited).string(message.code);
692
+ internalBinaryWrite(message: ReorderUnitsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
693
+ /* repeated int64 unit_ids = 1; */
694
+ if (message.unitIds.length) {
695
+ writer.tag(1, WireType.LengthDelimited).fork();
696
+ for (let i = 0; i < message.unitIds.length; i++)
697
+ writer.int64(message.unitIds[i]);
698
+ writer.join();
699
+ }
592
700
  let u = options.writeUnknownFields;
593
701
  if (u !== false)
594
702
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -596,21 +704,21 @@ class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest>
596
704
  }
597
705
  }
598
706
  /**
599
- * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusRequest
707
+ * @generated MessageType for protobuf message services.centrum.ReorderUnitsRequest
600
708
  */
601
- export const UpdateUnitStatusRequest = new UpdateUnitStatusRequest$Type();
709
+ export const ReorderUnitsRequest = new ReorderUnitsRequest$Type();
602
710
  // @generated message type with reflection information, may provide speed optimized methods
603
- class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse> {
711
+ class ReorderUnitsResponse$Type extends MessageType<ReorderUnitsResponse> {
604
712
  constructor() {
605
- super("services.centrum.UpdateUnitStatusResponse", []);
713
+ super("services.centrum.ReorderUnitsResponse", []);
606
714
  }
607
- create(value?: PartialMessage<UpdateUnitStatusResponse>): UpdateUnitStatusResponse {
715
+ create(value?: PartialMessage<ReorderUnitsResponse>): ReorderUnitsResponse {
608
716
  const message = globalThis.Object.create((this.messagePrototype!));
609
717
  if (value !== undefined)
610
- reflectionMergePartial<UpdateUnitStatusResponse>(this, message, value);
718
+ reflectionMergePartial<ReorderUnitsResponse>(this, message, value);
611
719
  return message;
612
720
  }
613
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusResponse): UpdateUnitStatusResponse {
721
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReorderUnitsResponse): ReorderUnitsResponse {
614
722
  let message = target ?? this.create(), end = reader.pos + length;
615
723
  while (reader.pos < end) {
616
724
  let [fieldNo, wireType] = reader.tag();
@@ -626,7 +734,7 @@ class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse
626
734
  }
627
735
  return message;
628
736
  }
629
- internalBinaryWrite(message: UpdateUnitStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
737
+ internalBinaryWrite(message: ReorderUnitsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
630
738
  let u = options.writeUnknownFields;
631
739
  if (u !== false)
632
740
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -634,9 +742,9 @@ class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse
634
742
  }
635
743
  }
636
744
  /**
637
- * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusResponse
745
+ * @generated MessageType for protobuf message services.centrum.ReorderUnitsResponse
638
746
  */
639
- export const UpdateUnitStatusResponse = new UpdateUnitStatusResponse$Type();
747
+ export const ReorderUnitsResponse = new ReorderUnitsResponse$Type();
640
748
  // @generated message type with reflection information, may provide speed optimized methods
641
749
  class AssignUnitRequest$Type extends MessageType<AssignUnitRequest> {
642
750
  constructor() {
@@ -755,30 +863,39 @@ class AssignUnitResponse$Type extends MessageType<AssignUnitResponse> {
755
863
  */
756
864
  export const AssignUnitResponse = new AssignUnitResponse$Type();
757
865
  // @generated message type with reflection information, may provide speed optimized methods
758
- class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest> {
866
+ class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest> {
759
867
  constructor() {
760
- super("services.centrum.ListUnitActivityRequest", [
761
- { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
762
- { no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
868
+ super("services.centrum.UpdateUnitStatusRequest", [
869
+ { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
870
+ { no: 2, name: "status", kind: "enum", T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
871
+ { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
872
+ { no: 4, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
763
873
  ]);
764
874
  }
765
- create(value?: PartialMessage<ListUnitActivityRequest>): ListUnitActivityRequest {
875
+ create(value?: PartialMessage<UpdateUnitStatusRequest>): UpdateUnitStatusRequest {
766
876
  const message = globalThis.Object.create((this.messagePrototype!));
767
- message.id = 0;
877
+ message.unitId = 0;
878
+ message.status = 0;
768
879
  if (value !== undefined)
769
- reflectionMergePartial<ListUnitActivityRequest>(this, message, value);
880
+ reflectionMergePartial<UpdateUnitStatusRequest>(this, message, value);
770
881
  return message;
771
882
  }
772
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityRequest): ListUnitActivityRequest {
883
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusRequest): UpdateUnitStatusRequest {
773
884
  let message = target ?? this.create(), end = reader.pos + length;
774
885
  while (reader.pos < end) {
775
886
  let [fieldNo, wireType] = reader.tag();
776
887
  switch (fieldNo) {
777
- case /* resources.common.database.PaginationRequest pagination */ 1:
778
- message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
888
+ case /* int64 unit_id */ 1:
889
+ message.unitId = reader.int64().toNumber();
779
890
  break;
780
- case /* int64 id */ 2:
781
- message.id = reader.int64().toNumber();
891
+ case /* resources.centrum.units.StatusUnit status */ 2:
892
+ message.status = reader.int32();
893
+ break;
894
+ case /* optional string reason */ 3:
895
+ message.reason = reader.string();
896
+ break;
897
+ case /* optional string code */ 4:
898
+ message.code = reader.string();
782
899
  break;
783
900
  default:
784
901
  let u = options.readUnknownField;
@@ -791,13 +908,19 @@ class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest>
791
908
  }
792
909
  return message;
793
910
  }
794
- internalBinaryWrite(message: ListUnitActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
795
- /* resources.common.database.PaginationRequest pagination = 1; */
796
- if (message.pagination)
797
- PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
798
- /* int64 id = 2; */
799
- if (message.id !== 0)
800
- writer.tag(2, WireType.Varint).int64(message.id);
911
+ internalBinaryWrite(message: UpdateUnitStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
912
+ /* int64 unit_id = 1; */
913
+ if (message.unitId !== 0)
914
+ writer.tag(1, WireType.Varint).int64(message.unitId);
915
+ /* resources.centrum.units.StatusUnit status = 2; */
916
+ if (message.status !== 0)
917
+ writer.tag(2, WireType.Varint).int32(message.status);
918
+ /* optional string reason = 3; */
919
+ if (message.reason !== undefined)
920
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
921
+ /* optional string code = 4; */
922
+ if (message.code !== undefined)
923
+ writer.tag(4, WireType.LengthDelimited).string(message.code);
801
924
  let u = options.writeUnknownFields;
802
925
  if (u !== false)
803
926
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -805,35 +928,25 @@ class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest>
805
928
  }
806
929
  }
807
930
  /**
808
- * @generated MessageType for protobuf message services.centrum.ListUnitActivityRequest
931
+ * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusRequest
809
932
  */
810
- export const ListUnitActivityRequest = new ListUnitActivityRequest$Type();
933
+ export const UpdateUnitStatusRequest = new UpdateUnitStatusRequest$Type();
811
934
  // @generated message type with reflection information, may provide speed optimized methods
812
- class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse> {
935
+ class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse> {
813
936
  constructor() {
814
- super("services.centrum.ListUnitActivityResponse", [
815
- { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
816
- { no: 2, name: "activity", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitStatus, options: { "codegen.itemslen.enabled": true } }
817
- ]);
937
+ super("services.centrum.UpdateUnitStatusResponse", []);
818
938
  }
819
- create(value?: PartialMessage<ListUnitActivityResponse>): ListUnitActivityResponse {
939
+ create(value?: PartialMessage<UpdateUnitStatusResponse>): UpdateUnitStatusResponse {
820
940
  const message = globalThis.Object.create((this.messagePrototype!));
821
- message.activity = [];
822
941
  if (value !== undefined)
823
- reflectionMergePartial<ListUnitActivityResponse>(this, message, value);
942
+ reflectionMergePartial<UpdateUnitStatusResponse>(this, message, value);
824
943
  return message;
825
944
  }
826
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityResponse): ListUnitActivityResponse {
945
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusResponse): UpdateUnitStatusResponse {
827
946
  let message = target ?? this.create(), end = reader.pos + length;
828
947
  while (reader.pos < end) {
829
948
  let [fieldNo, wireType] = reader.tag();
830
949
  switch (fieldNo) {
831
- case /* resources.common.database.PaginationResponse pagination */ 1:
832
- message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
833
- break;
834
- case /* repeated resources.centrum.units.UnitStatus activity */ 2:
835
- message.activity.push(UnitStatus.internalBinaryRead(reader, reader.uint32(), options));
836
- break;
837
950
  default:
838
951
  let u = options.readUnknownField;
839
952
  if (u === "throw")
@@ -845,13 +958,7 @@ class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse
845
958
  }
846
959
  return message;
847
960
  }
848
- internalBinaryWrite(message: ListUnitActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
849
- /* resources.common.database.PaginationResponse pagination = 1; */
850
- if (message.pagination)
851
- PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
852
- /* repeated resources.centrum.units.UnitStatus activity = 2; */
853
- for (let i = 0; i < message.activity.length; i++)
854
- UnitStatus.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
961
+ internalBinaryWrite(message: UpdateUnitStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
855
962
  let u = options.writeUnknownFields;
856
963
  if (u !== false)
857
964
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -859,9 +966,9 @@ class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse
859
966
  }
860
967
  }
861
968
  /**
862
- * @generated MessageType for protobuf message services.centrum.ListUnitActivityResponse
969
+ * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusResponse
863
970
  */
864
- export const ListUnitActivityResponse = new ListUnitActivityResponse$Type();
971
+ export const UpdateUnitStatusResponse = new UpdateUnitStatusResponse$Type();
865
972
  /**
866
973
  * @generated ServiceType for protobuf service services.centrum.UnitsService
867
974
  */
@@ -871,6 +978,7 @@ export const UnitsService = new ServiceType("services.centrum.UnitsService", [
871
978
  { name: "ListUnitActivity", options: { "codegen.perms.perms": { enabled: true, namespace: "centrum", service: "CentrumService", name: "Stream" } }, I: ListUnitActivityRequest, O: ListUnitActivityResponse },
872
979
  { name: "CreateOrUpdateUnit", options: { "codegen.perms.perms": { enabled: true } }, I: CreateOrUpdateUnitRequest, O: CreateOrUpdateUnitResponse },
873
980
  { name: "DeleteUnit", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteUnitRequest, O: DeleteUnitResponse },
981
+ { name: "ReorderUnits", options: { "codegen.perms.perms": { enabled: true, name: "CreateOrUpdateUnit" } }, I: ReorderUnitsRequest, O: ReorderUnitsResponse },
874
982
  { name: "AssignUnit", options: { "codegen.perms.perms": { enabled: true, namespace: "centrum", service: "CentrumService", name: "TakeControl" } }, I: AssignUnitRequest, O: AssignUnitResponse },
875
983
  { name: "UpdateUnitStatus", options: { "codegen.perms.perms": { enabled: true, namespace: "centrum", service: "DispatchesService", name: "TakeDispatch" } }, I: UpdateUnitStatusRequest, O: UpdateUnitStatusResponse }
876
984
  ], { "codegen.perms.perms_svc": { order: 110, icon: "i-mdi-account-group" } });
@@ -462,7 +462,7 @@ class ListUserActivityRequest$Type extends MessageType<ListUserActivityRequest>
462
462
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
463
463
  { no: 2, name: "sort", kind: "message", T: () => Sort },
464
464
  { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
465
- { 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" } } } }
465
+ { 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", items: { enum: { definedOnly: true } } } } } }
466
466
  ]);
467
467
  }
468
468
  create(value?: PartialMessage<ListUserActivityRequest>): ListUserActivityRequest {
@@ -5,10 +5,8 @@
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
+ import type { ReorderLabelsResponse } from "./labels";
9
+ import type { ReorderLabelsRequest } from "./labels";
12
10
  import type { DeleteLabelResponse } from "./labels";
13
11
  import type { DeleteLabelRequest } from "./labels";
14
12
  import type { CreateOrUpdateLabelResponse } from "./labels";
@@ -41,13 +39,9 @@ export interface ILabelsServiceClient {
41
39
  */
42
40
  deleteLabel(input: DeleteLabelRequest, options?: RpcOptions): UnaryCall<DeleteLabelRequest, DeleteLabelResponse>;
43
41
  /**
44
- * @generated from protobuf rpc: AddCitizenLabels
42
+ * @generated from protobuf rpc: ReorderLabels
45
43
  */
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>;
44
+ reorderLabels(input: ReorderLabelsRequest, options?: RpcOptions): UnaryCall<ReorderLabelsRequest, ReorderLabelsResponse>;
51
45
  }
52
46
  /**
53
47
  * @generated from protobuf service services.citizens.LabelsService
@@ -87,17 +81,10 @@ export class LabelsServiceClient implements ILabelsServiceClient, ServiceInfo {
87
81
  return stackIntercept<DeleteLabelRequest, DeleteLabelResponse>("unary", this._transport, method, opt, input);
88
82
  }
89
83
  /**
90
- * @generated from protobuf rpc: AddCitizenLabels
84
+ * @generated from protobuf rpc: ReorderLabels
91
85
  */
92
- addCitizenLabels(input: AddCitizenLabelsRequest, options?: RpcOptions): UnaryCall<AddCitizenLabelsRequest, AddCitizenLabelsResponse> {
86
+ reorderLabels(input: ReorderLabelsRequest, options?: RpcOptions): UnaryCall<ReorderLabelsRequest, ReorderLabelsResponse> {
93
87
  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);
88
+ return stackIntercept<ReorderLabelsRequest, ReorderLabelsResponse>("unary", this._transport, method, opt, input);
102
89
  }
103
90
  }