@fivenet-app/gen 2026.8.5 → 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 +39 -32
- package/google/protobuf/struct.ts +33 -22
- package/google/protobuf/timestamp.ts +9 -8
- package/package.json +2 -2
- package/perms.ts +41 -13
- package/resources/centrum/dispatches/dispatches.ts +206 -13
- package/resources/centrum/units/units.ts +207 -0
- package/resources/cron/cron.ts +44 -3
- package/resources/documents/templates/templates.ts +3 -3
- 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/short/group_member_short.ts +129 -0
- package/resources/jobs/job_asset.ts +116 -0
- package/resources/jobs/user_selector.ts +1 -15
- 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/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/centrum/centrum.ts +103 -1
- package/services/centrum/dispatches.ts +25 -1
- package/services/centrum/units.ts +25 -1
- package/services/citizens/citizens.client.ts +49 -0
- package/services/citizens/citizens.ts +384 -7
- package/services/documents/documents.ts +1 -0
- package/services/documents/templates.ts +12 -1
- package/services/jobs/colleagues.ts +26 -1
- package/services/jobs/conduct.ts +1 -0
- package/services/jobs/groups.ts +62 -4
- 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 +265 -4
- 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/system.ts +29 -9
- package/services/sync/sync.ts +115 -12
- package/services/vehicles/vehicles.client.ts +52 -0
- package/services/vehicles/vehicles.ts +385 -7
- package/svcs.ts +58 -0
package/perms.ts
CHANGED
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
// source: services/settings/accounts.proto
|
|
35
35
|
// source: services/settings/config.proto
|
|
36
36
|
// source: services/settings/cron.proto
|
|
37
|
+
// source: services/settings/job_assets.proto
|
|
37
38
|
// source: services/settings/laws.proto
|
|
39
|
+
// source: services/settings/properties.proto
|
|
38
40
|
// source: services/settings/settings.proto
|
|
39
41
|
// source: services/settings/system.proto
|
|
40
42
|
// source: services/stats/stats.proto
|
|
@@ -60,6 +62,7 @@ export type GRPCServicePerms =
|
|
|
60
62
|
| 'centrum.DispatchesService/UpdateDispatch'
|
|
61
63
|
| 'centrum.UnitsService/CreateOrUpdateUnit'
|
|
62
64
|
| 'centrum.UnitsService/DeleteUnit'
|
|
65
|
+
| 'citizens.CitizensService/DeleteCitizenFile'
|
|
63
66
|
| 'citizens.CitizensService/GetUser'
|
|
64
67
|
| 'citizens.CitizensService/ListCitizens'
|
|
65
68
|
| 'citizens.CitizensService/ListUserActivity'
|
|
@@ -122,8 +125,13 @@ export type GRPCServicePerms =
|
|
|
122
125
|
| 'qualifications.QualificationsService/DeleteQualification'
|
|
123
126
|
| 'qualifications.QualificationsService/ListQualifications'
|
|
124
127
|
| 'qualifications.QualificationsService/UpdateQualification'
|
|
128
|
+
| 'settings.JobsAssetsService/CreateJobAsset'
|
|
129
|
+
| 'settings.JobsAssetsService/DeleteJobAsset'
|
|
130
|
+
| 'settings.JobsAssetsService/ListJobAssets'
|
|
131
|
+
| 'settings.JobsAssetsService/UpdateJobAsset'
|
|
125
132
|
| 'settings.LawsService/CreateOrUpdateLawBook'
|
|
126
133
|
| 'settings.LawsService/DeleteLawBook'
|
|
134
|
+
| 'settings.PropertyService/UpdatePropertyDefinition'
|
|
127
135
|
| 'settings.SettingsService/CreateRole'
|
|
128
136
|
| 'settings.SettingsService/DeleteRole'
|
|
129
137
|
| 'settings.SettingsService/GetJobProps'
|
|
@@ -131,6 +139,7 @@ export type GRPCServicePerms =
|
|
|
131
139
|
| 'settings.SettingsService/SetJobProps'
|
|
132
140
|
| 'settings.SettingsService/UpdateRolePerms'
|
|
133
141
|
| 'settings.SettingsService/ViewAuditLog'
|
|
142
|
+
| 'vehicles.VehiclesService/DeleteVehicleFile'
|
|
134
143
|
| 'vehicles.VehiclesService/ListVehicleActivity'
|
|
135
144
|
| 'vehicles.VehiclesService/ListVehicles'
|
|
136
145
|
| 'vehicles.VehiclesService/SetVehicleProps'
|
|
@@ -165,7 +174,9 @@ export const GRPCServices = [
|
|
|
165
174
|
'livemap.LivemapService',
|
|
166
175
|
'mailer.MailerService',
|
|
167
176
|
'qualifications.QualificationsService',
|
|
177
|
+
'settings.JobsAssetsService',
|
|
168
178
|
'settings.LawsService',
|
|
179
|
+
'settings.PropertyService',
|
|
169
180
|
'settings.SettingsService',
|
|
170
181
|
'vehicles.VehiclesService',
|
|
171
182
|
'wiki.WikiService',
|
|
@@ -184,6 +195,7 @@ export const GRPCServiceMethods = [
|
|
|
184
195
|
'centrum.DispatchesService/UpdateDispatch',
|
|
185
196
|
'centrum.UnitsService/CreateOrUpdateUnit',
|
|
186
197
|
'centrum.UnitsService/DeleteUnit',
|
|
198
|
+
'citizens.CitizensService/DeleteCitizenFile',
|
|
187
199
|
'citizens.CitizensService/GetUser',
|
|
188
200
|
'citizens.CitizensService/ListCitizens',
|
|
189
201
|
'citizens.CitizensService/ListUserActivity',
|
|
@@ -246,8 +258,13 @@ export const GRPCServiceMethods = [
|
|
|
246
258
|
'qualifications.QualificationsService/DeleteQualification',
|
|
247
259
|
'qualifications.QualificationsService/ListQualifications',
|
|
248
260
|
'qualifications.QualificationsService/UpdateQualification',
|
|
261
|
+
'settings.JobsAssetsService/CreateJobAsset',
|
|
262
|
+
'settings.JobsAssetsService/DeleteJobAsset',
|
|
263
|
+
'settings.JobsAssetsService/ListJobAssets',
|
|
264
|
+
'settings.JobsAssetsService/UpdateJobAsset',
|
|
249
265
|
'settings.LawsService/CreateOrUpdateLawBook',
|
|
250
266
|
'settings.LawsService/DeleteLawBook',
|
|
267
|
+
'settings.PropertyService/UpdatePropertyDefinition',
|
|
251
268
|
'settings.SettingsService/CreateRole',
|
|
252
269
|
'settings.SettingsService/DeleteRole',
|
|
253
270
|
'settings.SettingsService/GetJobProps',
|
|
@@ -255,6 +272,7 @@ export const GRPCServiceMethods = [
|
|
|
255
272
|
'settings.SettingsService/SetJobProps',
|
|
256
273
|
'settings.SettingsService/UpdateRolePerms',
|
|
257
274
|
'settings.SettingsService/ViewAuditLog',
|
|
275
|
+
'vehicles.VehiclesService/DeleteVehicleFile',
|
|
258
276
|
'vehicles.VehiclesService/ListVehicleActivity',
|
|
259
277
|
'vehicles.VehiclesService/ListVehicles',
|
|
260
278
|
'vehicles.VehiclesService/SetVehicleProps',
|
|
@@ -299,15 +317,16 @@ export const PermAttributes = {
|
|
|
299
317
|
},
|
|
300
318
|
'centrum.UnitsService/DeleteUnit': {
|
|
301
319
|
},
|
|
320
|
+
'citizens.CitizensService/DeleteCitizenFile': {
|
|
321
|
+
},
|
|
302
322
|
'citizens.CitizensService/GetUser': {
|
|
303
323
|
'Jobs': {
|
|
304
324
|
type: 'jobGradeList',
|
|
305
325
|
},
|
|
306
326
|
},
|
|
307
327
|
'citizens.CitizensService/ListCitizens': {
|
|
308
|
-
'
|
|
309
|
-
type: '
|
|
310
|
-
values: ['PhoneNumber','Licenses','UserProps.Wanted','UserProps.Job','UserProps.TrafficInfractionPoints','UserProps.OpenFines','UserProps.BloodType','UserProps.Mugshot','UserProps.Labels','UserProps.Email',] as const,
|
|
328
|
+
'Properties': {
|
|
329
|
+
type: 'propertyList',
|
|
311
330
|
},
|
|
312
331
|
},
|
|
313
332
|
'citizens.CitizensService/ListUserActivity': {
|
|
@@ -317,9 +336,8 @@ export const PermAttributes = {
|
|
|
317
336
|
},
|
|
318
337
|
},
|
|
319
338
|
'citizens.CitizensService/SetUserProps': {
|
|
320
|
-
'
|
|
321
|
-
type: '
|
|
322
|
-
values: ['Wanted','Job','TrafficInfractionPoints','Mugshot','Labels',] as const,
|
|
339
|
+
'Properties': {
|
|
340
|
+
type: 'propertyList',
|
|
323
341
|
},
|
|
324
342
|
},
|
|
325
343
|
'citizens.LabelsService/CreateOrUpdateLabel': {
|
|
@@ -534,10 +552,20 @@ export const PermAttributes = {
|
|
|
534
552
|
values: ['Public',] as const,
|
|
535
553
|
},
|
|
536
554
|
},
|
|
555
|
+
'settings.JobsAssetsService/CreateJobAsset': {
|
|
556
|
+
},
|
|
557
|
+
'settings.JobsAssetsService/DeleteJobAsset': {
|
|
558
|
+
},
|
|
559
|
+
'settings.JobsAssetsService/ListJobAssets': {
|
|
560
|
+
},
|
|
561
|
+
'settings.JobsAssetsService/UpdateJobAsset': {
|
|
562
|
+
},
|
|
537
563
|
'settings.LawsService/CreateOrUpdateLawBook': {
|
|
538
564
|
},
|
|
539
565
|
'settings.LawsService/DeleteLawBook': {
|
|
540
566
|
},
|
|
567
|
+
'settings.PropertyService/UpdatePropertyDefinition': {
|
|
568
|
+
},
|
|
541
569
|
'settings.SettingsService/CreateRole': {
|
|
542
570
|
},
|
|
543
571
|
'settings.SettingsService/DeleteRole': {
|
|
@@ -552,6 +580,8 @@ export const PermAttributes = {
|
|
|
552
580
|
},
|
|
553
581
|
'settings.SettingsService/ViewAuditLog': {
|
|
554
582
|
},
|
|
583
|
+
'vehicles.VehiclesService/DeleteVehicleFile': {
|
|
584
|
+
},
|
|
555
585
|
'vehicles.VehiclesService/ListVehicleActivity': {
|
|
556
586
|
'Fields': {
|
|
557
587
|
type: 'stringList',
|
|
@@ -559,15 +589,13 @@ export const PermAttributes = {
|
|
|
559
589
|
},
|
|
560
590
|
},
|
|
561
591
|
'vehicles.VehiclesService/ListVehicles': {
|
|
562
|
-
'
|
|
563
|
-
type: '
|
|
564
|
-
values: ['Wanted',] as const,
|
|
592
|
+
'Properties': {
|
|
593
|
+
type: 'propertyList',
|
|
565
594
|
},
|
|
566
595
|
},
|
|
567
596
|
'vehicles.VehiclesService/SetVehicleProps': {
|
|
568
|
-
'
|
|
569
|
-
type: '
|
|
570
|
-
values: ['Wanted',] as const,
|
|
597
|
+
'Properties': {
|
|
598
|
+
type: 'propertyList',
|
|
571
599
|
},
|
|
572
600
|
},
|
|
573
601
|
'wiki.WikiService/CreatePage': {
|
|
@@ -589,7 +617,7 @@ export const PermAttributes = {
|
|
|
589
617
|
} as const;
|
|
590
618
|
|
|
591
619
|
export type PermAttributesMap = typeof PermAttributes;
|
|
592
|
-
export type PermAttrKind = 'stringList' | 'jobList' | 'jobGradeList';
|
|
620
|
+
export type PermAttrKind = 'stringList' | 'jobList' | 'jobGradeList' | 'propertyList';
|
|
593
621
|
|
|
594
622
|
export type PermAttrPerm = keyof PermAttributesMap;
|
|
595
623
|
|
|
@@ -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
|
*/
|
|
@@ -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 } } },
|
|
@@ -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;
|
|
@@ -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();
|
|
@@ -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
|
*/
|
|
@@ -404,6 +468,149 @@ 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", [
|