@fivenet-app/gen 2026.8.0 → 2026.10.2
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.
- package/LICENSE +201 -0
- package/clients.ts +12 -0
- package/codegen/perms/perms.ts +331 -2
- package/google/protobuf/any.ts +47 -103
- package/google/protobuf/descriptor.ts +28 -29
- package/google/protobuf/struct.ts +33 -22
- package/google/protobuf/timestamp.ts +3 -3
- package/package.json +2 -2
- package/perms.ts +58 -17
- package/resources/calendar/calendar.ts +11 -0
- package/resources/calendar/entries/entries.ts +23 -0
- package/resources/centrum/dispatches/dispatches.ts +214 -21
- package/resources/centrum/units/units.ts +212 -5
- package/resources/citizens/labels/access.ts +10 -6
- package/resources/cron/cron.ts +44 -3
- package/resources/dbsync/state.ts +192 -0
- package/resources/documents/stamps/access.ts +25 -0
- package/resources/documents/stamps/stamp.ts +0 -21
- package/resources/documents/templates/templates.ts +63 -61
- package/resources/documents/workflow/workflow.ts +61 -1
- package/resources/file/file.ts +3 -3
- package/resources/file/filestore.ts +26 -10
- package/resources/jobs/colleagues/activity/activity.ts +50 -8
- package/resources/jobs/colleagues/colleagues.ts +14 -1
- package/resources/jobs/groups/access/access.ts +29 -0
- package/resources/jobs/groups/activity.ts +332 -0
- package/resources/jobs/groups/group.ts +1666 -0
- package/resources/jobs/groups/short/group_member_short.ts +129 -0
- package/resources/jobs/job_asset.ts +116 -0
- package/resources/jobs/user_selector.ts +170 -0
- package/resources/notifications/clientview/clientview.ts +5 -1
- package/resources/notifications/events/events.ts +35 -1
- package/resources/notifications/notifications.ts +322 -2
- package/resources/permissions/attributes/attributes.ts +164 -2
- package/resources/permissions/authorization/authorization.ts +86 -0
- package/resources/permissions/permissions/permissions.ts +16 -1
- package/resources/properties/properties.ts +1648 -0
- package/resources/qualifications/activity/activity.ts +328 -0
- package/resources/qualifications/exam/exam.ts +108 -4
- package/resources/qualifications/qualifications.ts +36 -2
- package/resources/settings/config.ts +3 -3
- package/resources/settings/status.ts +197 -105
- package/resources/sync/activity/activity.ts +4 -4
- package/resources/sync/data/data.ts +16 -4
- package/resources/users/activity/activity.ts +220 -3
- package/resources/users/props/props.ts +13 -1
- package/resources/users/user.ts +13 -1
- package/resources/vehicles/activity/activity.ts +222 -3
- package/resources/vehicles/props/props.ts +13 -1
- package/resources/vehicles/vehicles.ts +13 -1
- package/services/auth/auth.ts +61 -67
- package/services/calendar/calendar.ts +1 -1
- package/services/calendar/entries.ts +3 -3
- package/services/centrum/centrum.ts +103 -1
- package/services/centrum/dispatches.ts +25 -1
- package/services/centrum/units.ts +28 -4
- package/services/citizens/citizens.client.ts +49 -0
- package/services/citizens/citizens.ts +384 -7
- package/services/completor/completor.ts +2 -2
- package/services/documents/approval.ts +2 -2
- package/services/documents/documents.ts +10 -9
- package/services/documents/templates.ts +24 -13
- package/services/jobs/colleagues.client.ts +34 -8
- package/services/jobs/colleagues.ts +289 -75
- package/services/jobs/conduct.ts +12 -19
- package/services/jobs/groups.client.ts +311 -0
- package/services/jobs/groups.ts +3654 -1
- package/services/jobs/timeclock.ts +30 -27
- package/services/notifications/notifications.client.ts +40 -1
- package/services/notifications/notifications.ts +483 -3
- package/services/qualifications/qualifications.client.ts +20 -7
- package/services/qualifications/qualifications.ts +291 -8
- package/services/settings/job_assets.client.ts +105 -0
- package/services/settings/job_assets.ts +373 -0
- package/services/settings/properties.client.ts +194 -0
- package/services/settings/properties.ts +1555 -0
- package/services/settings/settings.ts +1 -1
- package/services/settings/system.ts +29 -9
- package/services/sync/sync.client.ts +69 -33
- package/services/sync/sync.ts +557 -18
- package/services/vehicles/vehicles.client.ts +52 -0
- package/services/vehicles/vehicles.ts +386 -8
- package/svcs.ts +87 -1
|
@@ -13,7 +13,7 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
14
|
import { Colleague } from "../../jobs/colleagues/colleagues";
|
|
15
15
|
import { Unit } from "../units/units";
|
|
16
|
-
import {
|
|
16
|
+
import { UserShort } from "../../users/short/user";
|
|
17
17
|
import { JobList } from "../joblist";
|
|
18
18
|
import { Timestamp } from "../../timestamp/timestamp";
|
|
19
19
|
/**
|
|
@@ -32,11 +32,6 @@ export interface Dispatch {
|
|
|
32
32
|
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
33
33
|
*/
|
|
34
34
|
updatedAt?: Timestamp;
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated
|
|
37
|
-
* @generated from protobuf field: string job = 4 [deprecated = true]
|
|
38
|
-
*/
|
|
39
|
-
job: string;
|
|
40
35
|
/**
|
|
41
36
|
* @generated from protobuf field: resources.centrum.JobList jobs = 18
|
|
42
37
|
*/
|
|
@@ -78,9 +73,9 @@ export interface Dispatch {
|
|
|
78
73
|
*/
|
|
79
74
|
creatorId?: number;
|
|
80
75
|
/**
|
|
81
|
-
* @generated from protobuf field: optional resources.users.
|
|
76
|
+
* @generated from protobuf field: optional resources.users.short.UserShort creator = 15
|
|
82
77
|
*/
|
|
83
|
-
creator?:
|
|
78
|
+
creator?: UserShort;
|
|
84
79
|
/**
|
|
85
80
|
* @generated from protobuf field: repeated resources.centrum.dispatches.DispatchAssignment units = 16
|
|
86
81
|
*/
|
|
@@ -90,6 +85,70 @@ export interface Dispatch {
|
|
|
90
85
|
*/
|
|
91
86
|
references?: DispatchReferences;
|
|
92
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* DispatchSpec contains the independently reconciled, non-status portion of
|
|
90
|
+
* a dispatch projection.
|
|
91
|
+
*
|
|
92
|
+
* @generated from protobuf message resources.centrum.dispatches.DispatchSpec
|
|
93
|
+
*/
|
|
94
|
+
export interface DispatchSpec {
|
|
95
|
+
/**
|
|
96
|
+
* @generated from protobuf field: int64 id = 1
|
|
97
|
+
*/
|
|
98
|
+
id: number;
|
|
99
|
+
/**
|
|
100
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
101
|
+
*/
|
|
102
|
+
createdAt?: Timestamp;
|
|
103
|
+
/**
|
|
104
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
105
|
+
*/
|
|
106
|
+
updatedAt?: Timestamp;
|
|
107
|
+
/**
|
|
108
|
+
* @generated from protobuf field: resources.centrum.JobList jobs = 18
|
|
109
|
+
*/
|
|
110
|
+
jobs?: JobList;
|
|
111
|
+
/**
|
|
112
|
+
* @generated from protobuf field: string message = 7
|
|
113
|
+
*/
|
|
114
|
+
message: string;
|
|
115
|
+
/**
|
|
116
|
+
* @generated from protobuf field: optional string description = 8
|
|
117
|
+
*/
|
|
118
|
+
description?: string;
|
|
119
|
+
/**
|
|
120
|
+
* @generated from protobuf field: optional resources.centrum.dispatches.DispatchAttributes attributes = 9
|
|
121
|
+
*/
|
|
122
|
+
attributes?: DispatchAttributes;
|
|
123
|
+
/**
|
|
124
|
+
* @generated from protobuf field: double x = 10
|
|
125
|
+
*/
|
|
126
|
+
x: number;
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf field: double y = 11
|
|
129
|
+
*/
|
|
130
|
+
y: number;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: optional string postal = 12
|
|
133
|
+
*/
|
|
134
|
+
postal?: string;
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf field: bool anon = 13
|
|
137
|
+
*/
|
|
138
|
+
anon: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* @generated from protobuf field: optional int32 creator_id = 14
|
|
141
|
+
*/
|
|
142
|
+
creatorId?: number;
|
|
143
|
+
/**
|
|
144
|
+
* @generated from protobuf field: optional resources.users.short.UserShort creator = 15
|
|
145
|
+
*/
|
|
146
|
+
creator?: UserShort;
|
|
147
|
+
/**
|
|
148
|
+
* @generated from protobuf field: optional resources.centrum.dispatches.DispatchReferences references = 17
|
|
149
|
+
*/
|
|
150
|
+
references?: DispatchReferences;
|
|
151
|
+
}
|
|
93
152
|
/**
|
|
94
153
|
* @generated from protobuf message resources.centrum.dispatches.DispatchAssignments
|
|
95
154
|
*/
|
|
@@ -363,7 +422,6 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
363
422
|
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
364
423
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
365
424
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
366
|
-
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
367
425
|
{ no: 18, name: "jobs", kind: "message", T: () => JobList },
|
|
368
426
|
{ no: 5, name: "status", kind: "message", T: () => DispatchStatus },
|
|
369
427
|
{ no: 7, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
@@ -374,7 +432,7 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
374
432
|
{ no: 12, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
375
433
|
{ no: 13, name: "anon", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
376
434
|
{ no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
377
|
-
{ no: 15, name: "creator", kind: "message", T: () =>
|
|
435
|
+
{ no: 15, name: "creator", kind: "message", T: () => UserShort },
|
|
378
436
|
{ no: 16, name: "units", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DispatchAssignment },
|
|
379
437
|
{ no: 17, name: "references", kind: "message", T: () => DispatchReferences }
|
|
380
438
|
]);
|
|
@@ -382,7 +440,6 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
382
440
|
create(value?: PartialMessage<Dispatch>): Dispatch {
|
|
383
441
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
384
442
|
message.id = 0;
|
|
385
|
-
message.job = "";
|
|
386
443
|
message.message = "";
|
|
387
444
|
message.x = 0;
|
|
388
445
|
message.y = 0;
|
|
@@ -406,9 +463,6 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
406
463
|
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
407
464
|
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
408
465
|
break;
|
|
409
|
-
case /* string job = 4 [deprecated = true] */ 4:
|
|
410
|
-
message.job = reader.string();
|
|
411
|
-
break;
|
|
412
466
|
case /* resources.centrum.JobList jobs */ 18:
|
|
413
467
|
message.jobs = JobList.internalBinaryRead(reader, reader.uint32(), options, message.jobs);
|
|
414
468
|
break;
|
|
@@ -439,8 +493,8 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
439
493
|
case /* optional int32 creator_id */ 14:
|
|
440
494
|
message.creatorId = reader.int32();
|
|
441
495
|
break;
|
|
442
|
-
case /* optional resources.users.
|
|
443
|
-
message.creator =
|
|
496
|
+
case /* optional resources.users.short.UserShort creator */ 15:
|
|
497
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
444
498
|
break;
|
|
445
499
|
case /* repeated resources.centrum.dispatches.DispatchAssignment units */ 16:
|
|
446
500
|
message.units.push(DispatchAssignment.internalBinaryRead(reader, reader.uint32(), options));
|
|
@@ -469,9 +523,6 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
469
523
|
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
470
524
|
if (message.updatedAt)
|
|
471
525
|
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
472
|
-
/* string job = 4 [deprecated = true]; */
|
|
473
|
-
if (message.job !== "")
|
|
474
|
-
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
475
526
|
/* optional resources.centrum.dispatches.DispatchStatus status = 5; */
|
|
476
527
|
if (message.status)
|
|
477
528
|
DispatchStatus.internalBinaryWrite(message.status, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -499,9 +550,9 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
499
550
|
/* optional int32 creator_id = 14; */
|
|
500
551
|
if (message.creatorId !== undefined)
|
|
501
552
|
writer.tag(14, WireType.Varint).int32(message.creatorId);
|
|
502
|
-
/* optional resources.users.
|
|
553
|
+
/* optional resources.users.short.UserShort creator = 15; */
|
|
503
554
|
if (message.creator)
|
|
504
|
-
|
|
555
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
505
556
|
/* repeated resources.centrum.dispatches.DispatchAssignment units = 16; */
|
|
506
557
|
for (let i = 0; i < message.units.length; i++)
|
|
507
558
|
DispatchAssignment.internalBinaryWrite(message.units[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -522,6 +573,148 @@ class Dispatch$Type extends MessageType<Dispatch> {
|
|
|
522
573
|
*/
|
|
523
574
|
export const Dispatch = new Dispatch$Type();
|
|
524
575
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
576
|
+
class DispatchSpec$Type extends MessageType<DispatchSpec> {
|
|
577
|
+
constructor() {
|
|
578
|
+
super("resources.centrum.dispatches.DispatchSpec", [
|
|
579
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
580
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
581
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
582
|
+
{ no: 18, name: "jobs", kind: "message", T: () => JobList },
|
|
583
|
+
{ no: 7, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
584
|
+
{ no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
585
|
+
{ no: 9, name: "attributes", kind: "message", T: () => DispatchAttributes },
|
|
586
|
+
{ no: 10, name: "x", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
|
|
587
|
+
{ no: 11, name: "y", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
|
|
588
|
+
{ no: 12, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
589
|
+
{ no: 13, name: "anon", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
590
|
+
{ no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
591
|
+
{ no: 15, name: "creator", kind: "message", T: () => UserShort },
|
|
592
|
+
{ no: 17, name: "references", kind: "message", T: () => DispatchReferences }
|
|
593
|
+
]);
|
|
594
|
+
}
|
|
595
|
+
create(value?: PartialMessage<DispatchSpec>): DispatchSpec {
|
|
596
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
597
|
+
message.id = 0;
|
|
598
|
+
message.message = "";
|
|
599
|
+
message.x = 0;
|
|
600
|
+
message.y = 0;
|
|
601
|
+
message.anon = false;
|
|
602
|
+
if (value !== undefined)
|
|
603
|
+
reflectionMergePartial<DispatchSpec>(this, message, value);
|
|
604
|
+
return message;
|
|
605
|
+
}
|
|
606
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DispatchSpec): DispatchSpec {
|
|
607
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
608
|
+
while (reader.pos < end) {
|
|
609
|
+
let [fieldNo, wireType] = reader.tag();
|
|
610
|
+
switch (fieldNo) {
|
|
611
|
+
case /* int64 id */ 1:
|
|
612
|
+
message.id = reader.int64().toNumber();
|
|
613
|
+
break;
|
|
614
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
615
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
616
|
+
break;
|
|
617
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
618
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
619
|
+
break;
|
|
620
|
+
case /* resources.centrum.JobList jobs */ 18:
|
|
621
|
+
message.jobs = JobList.internalBinaryRead(reader, reader.uint32(), options, message.jobs);
|
|
622
|
+
break;
|
|
623
|
+
case /* string message */ 7:
|
|
624
|
+
message.message = reader.string();
|
|
625
|
+
break;
|
|
626
|
+
case /* optional string description */ 8:
|
|
627
|
+
message.description = reader.string();
|
|
628
|
+
break;
|
|
629
|
+
case /* optional resources.centrum.dispatches.DispatchAttributes attributes */ 9:
|
|
630
|
+
message.attributes = DispatchAttributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
|
|
631
|
+
break;
|
|
632
|
+
case /* double x */ 10:
|
|
633
|
+
message.x = reader.double();
|
|
634
|
+
break;
|
|
635
|
+
case /* double y */ 11:
|
|
636
|
+
message.y = reader.double();
|
|
637
|
+
break;
|
|
638
|
+
case /* optional string postal */ 12:
|
|
639
|
+
message.postal = reader.string();
|
|
640
|
+
break;
|
|
641
|
+
case /* bool anon */ 13:
|
|
642
|
+
message.anon = reader.bool();
|
|
643
|
+
break;
|
|
644
|
+
case /* optional int32 creator_id */ 14:
|
|
645
|
+
message.creatorId = reader.int32();
|
|
646
|
+
break;
|
|
647
|
+
case /* optional resources.users.short.UserShort creator */ 15:
|
|
648
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
649
|
+
break;
|
|
650
|
+
case /* optional resources.centrum.dispatches.DispatchReferences references */ 17:
|
|
651
|
+
message.references = DispatchReferences.internalBinaryRead(reader, reader.uint32(), options, message.references);
|
|
652
|
+
break;
|
|
653
|
+
default:
|
|
654
|
+
let u = options.readUnknownField;
|
|
655
|
+
if (u === "throw")
|
|
656
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
657
|
+
let d = reader.skip(wireType);
|
|
658
|
+
if (u !== false)
|
|
659
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return message;
|
|
663
|
+
}
|
|
664
|
+
internalBinaryWrite(message: DispatchSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
665
|
+
/* int64 id = 1; */
|
|
666
|
+
if (message.id !== 0)
|
|
667
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
668
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
669
|
+
if (message.createdAt)
|
|
670
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
671
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
672
|
+
if (message.updatedAt)
|
|
673
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
674
|
+
/* string message = 7; */
|
|
675
|
+
if (message.message !== "")
|
|
676
|
+
writer.tag(7, WireType.LengthDelimited).string(message.message);
|
|
677
|
+
/* optional string description = 8; */
|
|
678
|
+
if (message.description !== undefined)
|
|
679
|
+
writer.tag(8, WireType.LengthDelimited).string(message.description);
|
|
680
|
+
/* optional resources.centrum.dispatches.DispatchAttributes attributes = 9; */
|
|
681
|
+
if (message.attributes)
|
|
682
|
+
DispatchAttributes.internalBinaryWrite(message.attributes, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
683
|
+
/* double x = 10; */
|
|
684
|
+
if (message.x !== 0)
|
|
685
|
+
writer.tag(10, WireType.Bit64).double(message.x);
|
|
686
|
+
/* double y = 11; */
|
|
687
|
+
if (message.y !== 0)
|
|
688
|
+
writer.tag(11, WireType.Bit64).double(message.y);
|
|
689
|
+
/* optional string postal = 12; */
|
|
690
|
+
if (message.postal !== undefined)
|
|
691
|
+
writer.tag(12, WireType.LengthDelimited).string(message.postal);
|
|
692
|
+
/* bool anon = 13; */
|
|
693
|
+
if (message.anon !== false)
|
|
694
|
+
writer.tag(13, WireType.Varint).bool(message.anon);
|
|
695
|
+
/* optional int32 creator_id = 14; */
|
|
696
|
+
if (message.creatorId !== undefined)
|
|
697
|
+
writer.tag(14, WireType.Varint).int32(message.creatorId);
|
|
698
|
+
/* optional resources.users.short.UserShort creator = 15; */
|
|
699
|
+
if (message.creator)
|
|
700
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
701
|
+
/* optional resources.centrum.dispatches.DispatchReferences references = 17; */
|
|
702
|
+
if (message.references)
|
|
703
|
+
DispatchReferences.internalBinaryWrite(message.references, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
704
|
+
/* resources.centrum.JobList jobs = 18; */
|
|
705
|
+
if (message.jobs)
|
|
706
|
+
JobList.internalBinaryWrite(message.jobs, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
707
|
+
let u = options.writeUnknownFields;
|
|
708
|
+
if (u !== false)
|
|
709
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
710
|
+
return writer;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* @generated MessageType for protobuf message resources.centrum.dispatches.DispatchSpec
|
|
715
|
+
*/
|
|
716
|
+
export const DispatchSpec = new DispatchSpec$Type();
|
|
717
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
525
718
|
class DispatchAssignments$Type extends MessageType<DispatchAssignments> {
|
|
526
719
|
constructor() {
|
|
527
720
|
super("resources.centrum.dispatches.DispatchAssignments", [
|
|
@@ -83,6 +83,70 @@ export interface Unit {
|
|
|
83
83
|
*/
|
|
84
84
|
access?: Access;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* UnitSpec contains the configured, non-volatile portion of a unit
|
|
88
|
+
* projection. Runtime status and current membership are stored independently.
|
|
89
|
+
*
|
|
90
|
+
* @generated from protobuf message resources.centrum.units.UnitSpec
|
|
91
|
+
*/
|
|
92
|
+
export interface UnitSpec {
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: int64 id = 1
|
|
95
|
+
*/
|
|
96
|
+
id: number;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
99
|
+
*/
|
|
100
|
+
createdAt?: Timestamp;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
103
|
+
*/
|
|
104
|
+
updatedAt?: Timestamp;
|
|
105
|
+
/**
|
|
106
|
+
* @generated from protobuf field: string job = 4
|
|
107
|
+
*/
|
|
108
|
+
job: string;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf field: optional string job_label = 15
|
|
111
|
+
*/
|
|
112
|
+
jobLabel?: string;
|
|
113
|
+
/**
|
|
114
|
+
* @generated from protobuf field: int32 sort_order = 17
|
|
115
|
+
*/
|
|
116
|
+
sortOrder: number;
|
|
117
|
+
/**
|
|
118
|
+
* @generated from protobuf field: string name = 5
|
|
119
|
+
*/
|
|
120
|
+
name: string;
|
|
121
|
+
/**
|
|
122
|
+
* @generated from protobuf field: string initials = 6
|
|
123
|
+
*/
|
|
124
|
+
initials: string;
|
|
125
|
+
/**
|
|
126
|
+
* @generated from protobuf field: string color = 7
|
|
127
|
+
*/
|
|
128
|
+
color: string;
|
|
129
|
+
/**
|
|
130
|
+
* @generated from protobuf field: optional string icon = 16
|
|
131
|
+
*/
|
|
132
|
+
icon?: string;
|
|
133
|
+
/**
|
|
134
|
+
* @generated from protobuf field: optional string description = 8
|
|
135
|
+
*/
|
|
136
|
+
description?: string;
|
|
137
|
+
/**
|
|
138
|
+
* @generated from protobuf field: optional resources.centrum.units.UnitAttributes attributes = 12
|
|
139
|
+
*/
|
|
140
|
+
attributes?: UnitAttributes;
|
|
141
|
+
/**
|
|
142
|
+
* @generated from protobuf field: optional string home_postal = 13
|
|
143
|
+
*/
|
|
144
|
+
homePostal?: string;
|
|
145
|
+
/**
|
|
146
|
+
* @generated from protobuf field: resources.access.Access access = 14
|
|
147
|
+
*/
|
|
148
|
+
access?: Access;
|
|
149
|
+
}
|
|
86
150
|
/**
|
|
87
151
|
* @generated from protobuf message resources.centrum.units.UnitAssignments
|
|
88
152
|
*/
|
|
@@ -261,7 +325,7 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
261
325
|
{ no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
262
326
|
{ no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
263
327
|
{ no: 9, name: "status", kind: "message", T: () => UnitStatus },
|
|
264
|
-
{ no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
|
|
328
|
+
{ no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment, options: { "buf.validate.field": { repeated: { maxItems: "30" } } } },
|
|
265
329
|
{ no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
|
|
266
330
|
{ no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
|
|
267
331
|
{ no: 14, name: "access", kind: "message", T: () => Access }
|
|
@@ -404,12 +468,155 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
404
468
|
*/
|
|
405
469
|
export const Unit = new Unit$Type();
|
|
406
470
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
471
|
+
class UnitSpec$Type extends MessageType<UnitSpec> {
|
|
472
|
+
constructor() {
|
|
473
|
+
super("resources.centrum.units.UnitSpec", [
|
|
474
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
475
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
476
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
477
|
+
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
478
|
+
{ no: 15, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
479
|
+
{ no: 17, name: "sort_order", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
480
|
+
{ no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24" } } } },
|
|
481
|
+
{ no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "2", maxLen: "4" } } } },
|
|
482
|
+
{ no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } } } },
|
|
483
|
+
{ no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
|
|
484
|
+
{ no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
485
|
+
{ no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
|
|
486
|
+
{ no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
|
|
487
|
+
{ no: 14, name: "access", kind: "message", T: () => Access }
|
|
488
|
+
]);
|
|
489
|
+
}
|
|
490
|
+
create(value?: PartialMessage<UnitSpec>): UnitSpec {
|
|
491
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
492
|
+
message.id = 0;
|
|
493
|
+
message.job = "";
|
|
494
|
+
message.sortOrder = 0;
|
|
495
|
+
message.name = "";
|
|
496
|
+
message.initials = "";
|
|
497
|
+
message.color = "";
|
|
498
|
+
if (value !== undefined)
|
|
499
|
+
reflectionMergePartial<UnitSpec>(this, message, value);
|
|
500
|
+
return message;
|
|
501
|
+
}
|
|
502
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitSpec): UnitSpec {
|
|
503
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
504
|
+
while (reader.pos < end) {
|
|
505
|
+
let [fieldNo, wireType] = reader.tag();
|
|
506
|
+
switch (fieldNo) {
|
|
507
|
+
case /* int64 id */ 1:
|
|
508
|
+
message.id = reader.int64().toNumber();
|
|
509
|
+
break;
|
|
510
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
511
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
512
|
+
break;
|
|
513
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
514
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
515
|
+
break;
|
|
516
|
+
case /* string job */ 4:
|
|
517
|
+
message.job = reader.string();
|
|
518
|
+
break;
|
|
519
|
+
case /* optional string job_label */ 15:
|
|
520
|
+
message.jobLabel = reader.string();
|
|
521
|
+
break;
|
|
522
|
+
case /* int32 sort_order */ 17:
|
|
523
|
+
message.sortOrder = reader.int32();
|
|
524
|
+
break;
|
|
525
|
+
case /* string name */ 5:
|
|
526
|
+
message.name = reader.string();
|
|
527
|
+
break;
|
|
528
|
+
case /* string initials */ 6:
|
|
529
|
+
message.initials = reader.string();
|
|
530
|
+
break;
|
|
531
|
+
case /* string color */ 7:
|
|
532
|
+
message.color = reader.string();
|
|
533
|
+
break;
|
|
534
|
+
case /* optional string icon */ 16:
|
|
535
|
+
message.icon = reader.string();
|
|
536
|
+
break;
|
|
537
|
+
case /* optional string description */ 8:
|
|
538
|
+
message.description = reader.string();
|
|
539
|
+
break;
|
|
540
|
+
case /* optional resources.centrum.units.UnitAttributes attributes */ 12:
|
|
541
|
+
message.attributes = UnitAttributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
|
|
542
|
+
break;
|
|
543
|
+
case /* optional string home_postal */ 13:
|
|
544
|
+
message.homePostal = reader.string();
|
|
545
|
+
break;
|
|
546
|
+
case /* resources.access.Access access */ 14:
|
|
547
|
+
message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
|
|
548
|
+
break;
|
|
549
|
+
default:
|
|
550
|
+
let u = options.readUnknownField;
|
|
551
|
+
if (u === "throw")
|
|
552
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
553
|
+
let d = reader.skip(wireType);
|
|
554
|
+
if (u !== false)
|
|
555
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return message;
|
|
559
|
+
}
|
|
560
|
+
internalBinaryWrite(message: UnitSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
561
|
+
/* int64 id = 1; */
|
|
562
|
+
if (message.id !== 0)
|
|
563
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
564
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
565
|
+
if (message.createdAt)
|
|
566
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
567
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
568
|
+
if (message.updatedAt)
|
|
569
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
570
|
+
/* string job = 4; */
|
|
571
|
+
if (message.job !== "")
|
|
572
|
+
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
573
|
+
/* string name = 5; */
|
|
574
|
+
if (message.name !== "")
|
|
575
|
+
writer.tag(5, WireType.LengthDelimited).string(message.name);
|
|
576
|
+
/* string initials = 6; */
|
|
577
|
+
if (message.initials !== "")
|
|
578
|
+
writer.tag(6, WireType.LengthDelimited).string(message.initials);
|
|
579
|
+
/* string color = 7; */
|
|
580
|
+
if (message.color !== "")
|
|
581
|
+
writer.tag(7, WireType.LengthDelimited).string(message.color);
|
|
582
|
+
/* optional string description = 8; */
|
|
583
|
+
if (message.description !== undefined)
|
|
584
|
+
writer.tag(8, WireType.LengthDelimited).string(message.description);
|
|
585
|
+
/* optional resources.centrum.units.UnitAttributes attributes = 12; */
|
|
586
|
+
if (message.attributes)
|
|
587
|
+
UnitAttributes.internalBinaryWrite(message.attributes, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
588
|
+
/* optional string home_postal = 13; */
|
|
589
|
+
if (message.homePostal !== undefined)
|
|
590
|
+
writer.tag(13, WireType.LengthDelimited).string(message.homePostal);
|
|
591
|
+
/* resources.access.Access access = 14; */
|
|
592
|
+
if (message.access)
|
|
593
|
+
Access.internalBinaryWrite(message.access, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
594
|
+
/* optional string job_label = 15; */
|
|
595
|
+
if (message.jobLabel !== undefined)
|
|
596
|
+
writer.tag(15, WireType.LengthDelimited).string(message.jobLabel);
|
|
597
|
+
/* optional string icon = 16; */
|
|
598
|
+
if (message.icon !== undefined)
|
|
599
|
+
writer.tag(16, WireType.LengthDelimited).string(message.icon);
|
|
600
|
+
/* int32 sort_order = 17; */
|
|
601
|
+
if (message.sortOrder !== 0)
|
|
602
|
+
writer.tag(17, WireType.Varint).int32(message.sortOrder);
|
|
603
|
+
let u = options.writeUnknownFields;
|
|
604
|
+
if (u !== false)
|
|
605
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
606
|
+
return writer;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* @generated MessageType for protobuf message resources.centrum.units.UnitSpec
|
|
611
|
+
*/
|
|
612
|
+
export const UnitSpec = new UnitSpec$Type();
|
|
613
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
407
614
|
class UnitAssignments$Type extends MessageType<UnitAssignments> {
|
|
408
615
|
constructor() {
|
|
409
616
|
super("resources.centrum.units.UnitAssignments", [
|
|
410
|
-
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER
|
|
617
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
411
618
|
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
412
|
-
{ no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment }
|
|
619
|
+
{ no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment, options: { "buf.validate.field": { repeated: { maxItems: "30" } } } }
|
|
413
620
|
]);
|
|
414
621
|
}
|
|
415
622
|
create(value?: PartialMessage<UnitAssignments>): UnitAssignments {
|
|
@@ -470,7 +677,7 @@ export const UnitAssignments = new UnitAssignments$Type();
|
|
|
470
677
|
class UnitAssignment$Type extends MessageType<UnitAssignment> {
|
|
471
678
|
constructor() {
|
|
472
679
|
super("resources.centrum.units.UnitAssignment", [
|
|
473
|
-
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
|
|
680
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } }, "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
|
|
474
681
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\" alias:\"user_id\"" } },
|
|
475
682
|
{ no: 3, name: "user", kind: "message", T: () => Colleague }
|
|
476
683
|
]);
|
|
@@ -679,7 +886,7 @@ export const UnitStatus = new UnitStatus$Type();
|
|
|
679
886
|
class UnitAttributes$Type extends MessageType<UnitAttributes> {
|
|
680
887
|
constructor() {
|
|
681
888
|
super("resources.centrum.units.UnitAttributes", [
|
|
682
|
-
{ no: 1, name: "list", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.UnitAttribute", UnitAttribute, "UNIT_ATTRIBUTE_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } }
|
|
889
|
+
{ no: 1, name: "list", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.UnitAttribute", UnitAttribute, "UNIT_ATTRIBUTE_"], options: { "buf.validate.field": { repeated: { maxItems: "3", items: { enum: { definedOnly: true } } } } } }
|
|
683
890
|
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
684
891
|
}
|
|
685
892
|
create(value?: PartialMessage<UnitAttributes>): UnitAttributes {
|
|
@@ -11,15 +11,19 @@ export enum AccessLevel {
|
|
|
11
11
|
*/
|
|
12
12
|
UNSPECIFIED = 0,
|
|
13
13
|
/**
|
|
14
|
-
* @generated from protobuf enum value:
|
|
14
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
BLOCKED = 1,
|
|
17
17
|
/**
|
|
18
|
-
* @generated from protobuf enum value:
|
|
18
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 2;
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
VIEW = 2,
|
|
21
21
|
/**
|
|
22
|
-
* @generated from protobuf enum value:
|
|
22
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_GIVE = 3;
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
GIVE = 3,
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_REMOVE = 4;
|
|
27
|
+
*/
|
|
28
|
+
REMOVE = 4
|
|
25
29
|
}
|