@fivenet-app/gen 2026.3.0 → 2026.5.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 (68) hide show
  1. package/clients.ts +66 -6
  2. package/codegen/perms/perms.ts +104 -1
  3. package/package.json +1 -1
  4. package/perms.ts +16 -5
  5. package/resources/centrum/settings/settings.ts +1 -1
  6. package/resources/centrum/units/units.ts +1 -1
  7. package/resources/citizens/labels/access.ts +216 -0
  8. package/resources/citizens/labels/labels.ts +320 -0
  9. package/resources/{users → citizens}/licenses/licenses.ts +17 -17
  10. package/resources/clientconfig/clientconfig.ts +32 -289
  11. package/resources/cron/cron.ts +2 -2
  12. package/resources/documents/access/access.ts +0 -23
  13. package/resources/documents/category/category.ts +1 -1
  14. package/resources/documents/templates/templates.ts +2 -2
  15. package/resources/jobs/labels/labels.ts +16 -5
  16. package/resources/livemap/markers/marker_marker.ts +1 -1
  17. package/resources/settings/banner.ts +1 -1
  18. package/resources/settings/config.ts +16 -14
  19. package/resources/sync/data/data.ts +9 -9
  20. package/resources/users/activity/activity.ts +132 -12
  21. package/resources/users/props/props.ts +4 -4
  22. package/resources/users/user.ts +4 -4
  23. package/services/calendar/calendar.client.ts +2 -106
  24. package/services/calendar/calendar.ts +0 -1018
  25. package/services/calendar/entries.client.ts +129 -0
  26. package/services/calendar/entries.ts +1040 -0
  27. package/services/centrum/centrum.client.ts +23 -244
  28. package/services/centrum/centrum.ts +246 -2383
  29. package/services/centrum/dispatches.client.ts +155 -0
  30. package/services/centrum/dispatches.ts +1305 -0
  31. package/services/centrum/units.client.ts +116 -0
  32. package/services/centrum/units.ts +876 -0
  33. package/services/citizens/citizens.client.ts +0 -13
  34. package/services/citizens/citizens.ts +1 -115
  35. package/services/citizens/labels.client.ts +77 -0
  36. package/services/citizens/labels.ts +455 -0
  37. package/services/completor/completor.ts +5 -5
  38. package/services/documents/categories.client.ts +64 -0
  39. package/services/documents/categories.ts +331 -0
  40. package/services/documents/comments.client.ts +77 -0
  41. package/services/documents/comments.ts +479 -0
  42. package/services/documents/documents.client.ts +26 -182
  43. package/services/documents/documents.ts +335 -1682
  44. package/services/documents/templates.client.ts +90 -0
  45. package/services/documents/templates.ts +591 -0
  46. package/services/jobs/colleagues.client.ts +129 -0
  47. package/services/jobs/colleagues.ts +1129 -0
  48. package/services/jobs/jobs.client.ts +3 -107
  49. package/services/jobs/jobs.ts +1 -1113
  50. package/services/mailer/mailer.client.ts +0 -208
  51. package/services/mailer/mailer.ts +1 -2010
  52. package/services/mailer/settings.client.ts +103 -0
  53. package/services/mailer/settings.ts +708 -0
  54. package/services/mailer/thread.client.ts +155 -0
  55. package/services/mailer/thread.ts +1343 -0
  56. package/services/qualifications/exam.client.ts +77 -0
  57. package/services/qualifications/exam.ts +609 -0
  58. package/services/qualifications/qualifications.client.ts +1 -53
  59. package/services/qualifications/qualifications.ts +0 -591
  60. package/services/settings/cron.client.ts +13 -0
  61. package/services/settings/cron.ts +114 -1
  62. package/services/sync/sync.client.ts +271 -37
  63. package/services/sync/sync.ts +1463 -383
  64. package/svcs.ts +182 -94
  65. package/resources/sync/data/v2/data.ts +0 -220
  66. package/resources/users/labels/labels.ts +0 -160
  67. package/services/sync/v2/sync.client.ts +0 -331
  68. package/services/sync/v2/sync.ts +0 -1766
package/clients.ts CHANGED
@@ -14,18 +14,42 @@ export async function getCalendarCalendarClient() {
14
14
  return new CalendarServiceClient(useGRPCTransport());
15
15
  }
16
16
 
17
+ // Factory for calendar.entries client.
18
+ export async function getCalendarEntriesClient() {
19
+ const { EntriesServiceClient } = await import('~~/gen/ts/services/calendar/entries.client');
20
+ return new EntriesServiceClient(useGRPCTransport());
21
+ }
22
+
17
23
  // Factory for centrum.centrum client.
18
24
  export async function getCentrumCentrumClient() {
19
25
  const { CentrumServiceClient } = await import('~~/gen/ts/services/centrum/centrum.client');
20
26
  return new CentrumServiceClient(useGRPCTransport());
21
27
  }
22
28
 
29
+ // Factory for centrum.dispatches client.
30
+ export async function getCentrumDispatchesClient() {
31
+ const { DispatchesServiceClient } = await import('~~/gen/ts/services/centrum/dispatches.client');
32
+ return new DispatchesServiceClient(useGRPCTransport());
33
+ }
34
+
35
+ // Factory for centrum.units client.
36
+ export async function getCentrumUnitsClient() {
37
+ const { UnitsServiceClient } = await import('~~/gen/ts/services/centrum/units.client');
38
+ return new UnitsServiceClient(useGRPCTransport());
39
+ }
40
+
23
41
  // Factory for citizens.citizens client.
24
42
  export async function getCitizensCitizensClient() {
25
43
  const { CitizensServiceClient } = await import('~~/gen/ts/services/citizens/citizens.client');
26
44
  return new CitizensServiceClient(useGRPCTransport());
27
45
  }
28
46
 
47
+ // Factory for citizens.labels client.
48
+ export async function getCitizensLabelsClient() {
49
+ const { LabelsServiceClient } = await import('~~/gen/ts/services/citizens/labels.client');
50
+ return new LabelsServiceClient(useGRPCTransport());
51
+ }
52
+
29
53
  // Factory for completor.completor client.
30
54
  export async function getCompletorCompletorClient() {
31
55
  const { CompletorServiceClient } = await import('~~/gen/ts/services/completor/completor.client');
@@ -38,12 +62,24 @@ export async function getDocumentsApprovalClient() {
38
62
  return new ApprovalServiceClient(useGRPCTransport());
39
63
  }
40
64
 
65
+ // Factory for documents.categories client.
66
+ export async function getDocumentsCategoriesClient() {
67
+ const { CategoriesServiceClient } = await import('~~/gen/ts/services/documents/categories.client');
68
+ return new CategoriesServiceClient(useGRPCTransport());
69
+ }
70
+
41
71
  // Factory for documents.collab client.
42
72
  export async function getDocumentsCollabClient() {
43
73
  const { CollabServiceClient } = await import('~~/gen/ts/services/documents/collab.client');
44
74
  return new CollabServiceClient(useGRPCTransport());
45
75
  }
46
76
 
77
+ // Factory for documents.comments client.
78
+ export async function getDocumentsCommentsClient() {
79
+ const { CommentsServiceClient } = await import('~~/gen/ts/services/documents/comments.client');
80
+ return new CommentsServiceClient(useGRPCTransport());
81
+ }
82
+
47
83
  // Factory for documents.documents client.
48
84
  export async function getDocumentsDocumentsClient() {
49
85
  const { DocumentsServiceClient } = await import('~~/gen/ts/services/documents/documents.client');
@@ -68,12 +104,24 @@ export async function getDocumentsStatsClient() {
68
104
  return new StatsServiceClient(useGRPCTransport());
69
105
  }
70
106
 
107
+ // Factory for documents.templates client.
108
+ export async function getDocumentsTemplatesClient() {
109
+ const { TemplatesServiceClient } = await import('~~/gen/ts/services/documents/templates.client');
110
+ return new TemplatesServiceClient(useGRPCTransport());
111
+ }
112
+
71
113
  // Factory for filestore.filestore client.
72
114
  export async function getFilestoreFilestoreClient() {
73
115
  const { FilestoreServiceClient } = await import('~~/gen/ts/services/filestore/filestore.client');
74
116
  return new FilestoreServiceClient(useGRPCTransport());
75
117
  }
76
118
 
119
+ // Factory for jobs.colleagues client.
120
+ export async function getJobsColleaguesClient() {
121
+ const { ColleaguesServiceClient } = await import('~~/gen/ts/services/jobs/colleagues.client');
122
+ return new ColleaguesServiceClient(useGRPCTransport());
123
+ }
124
+
77
125
  // Factory for jobs.conduct client.
78
126
  export async function getJobsConductClient() {
79
127
  const { ConductServiceClient } = await import('~~/gen/ts/services/jobs/conduct.client');
@@ -110,12 +158,30 @@ export async function getMailerMailerClient() {
110
158
  return new MailerServiceClient(useGRPCTransport());
111
159
  }
112
160
 
161
+ // Factory for mailer.settings client.
162
+ export async function getMailerSettingsClient() {
163
+ const { SettingsServiceClient } = await import('~~/gen/ts/services/mailer/settings.client');
164
+ return new SettingsServiceClient(useGRPCTransport());
165
+ }
166
+
167
+ // Factory for mailer.thread client.
168
+ export async function getMailerThreadClient() {
169
+ const { ThreadServiceClient } = await import('~~/gen/ts/services/mailer/thread.client');
170
+ return new ThreadServiceClient(useGRPCTransport());
171
+ }
172
+
113
173
  // Factory for notifications.notifications client.
114
174
  export async function getNotificationsNotificationsClient() {
115
175
  const { NotificationsServiceClient } = await import('~~/gen/ts/services/notifications/notifications.client');
116
176
  return new NotificationsServiceClient(useGRPCTransport());
117
177
  }
118
178
 
179
+ // Factory for qualifications.exam client.
180
+ export async function getQualificationsExamClient() {
181
+ const { ExamServiceClient } = await import('~~/gen/ts/services/qualifications/exam.client');
182
+ return new ExamServiceClient(useGRPCTransport());
183
+ }
184
+
119
185
  // Factory for qualifications.qualifications client.
120
186
  export async function getQualificationsQualificationsClient() {
121
187
  const { QualificationsServiceClient } = await import('~~/gen/ts/services/qualifications/qualifications.client');
@@ -170,12 +236,6 @@ export async function getSyncSyncClient() {
170
236
  return new SyncServiceClient(useGRPCTransport());
171
237
  }
172
238
 
173
- // Factory for sync.v2.sync client.
174
- export async function getSyncV2SyncClient() {
175
- const { SyncServiceClient } = await import('~~/gen/ts/services/sync/v2/sync.client');
176
- return new SyncServiceClient(useGRPCTransport());
177
- }
178
-
179
239
  // Factory for vehicles.vehicles client.
180
240
  export async function getVehiclesVehiclesClient() {
181
241
  const { VehiclesServiceClient } = await import('~~/gen/ts/services/vehicles/vehicles.client');
@@ -74,6 +74,31 @@ export interface ServiceOptions {
74
74
  * @generated from protobuf field: optional string icon = 2
75
75
  */
76
76
  icon?: string;
77
+ /**
78
+ * @generated from protobuf field: optional string name = 4
79
+ */
80
+ name?: string;
81
+ /**
82
+ * @generated from protobuf field: repeated codegen.perms.AdditionalServicePerm additional_perms = 3
83
+ */
84
+ additionalPerms: AdditionalServicePerm[];
85
+ }
86
+ /**
87
+ * @generated from protobuf message codegen.perms.AdditionalServicePerm
88
+ */
89
+ export interface AdditionalServicePerm {
90
+ /**
91
+ * @generated from protobuf field: string name = 3
92
+ */
93
+ name: string;
94
+ /**
95
+ * @generated from protobuf field: int32 order = 4
96
+ */
97
+ order: number;
98
+ /**
99
+ * @generated from protobuf field: repeated codegen.perms.Attr attrs = 5
100
+ */
101
+ attrs: Attr[];
77
102
  }
78
103
  // @generated message type with reflection information, may provide speed optimized methods
79
104
  class PermsOptions$Type extends MessageType<PermsOptions> {
@@ -236,12 +261,15 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
236
261
  constructor() {
237
262
  super("codegen.perms.ServiceOptions", [
238
263
  { no: 1, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
239
- { no: 2, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
264
+ { no: 2, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
265
+ { no: 4, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
266
+ { no: 3, name: "additional_perms", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AdditionalServicePerm }
240
267
  ]);
241
268
  }
242
269
  create(value?: PartialMessage<ServiceOptions>): ServiceOptions {
243
270
  const message = globalThis.Object.create((this.messagePrototype!));
244
271
  message.order = 0;
272
+ message.additionalPerms = [];
245
273
  if (value !== undefined)
246
274
  reflectionMergePartial<ServiceOptions>(this, message, value);
247
275
  return message;
@@ -257,6 +285,12 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
257
285
  case /* optional string icon */ 2:
258
286
  message.icon = reader.string();
259
287
  break;
288
+ case /* optional string name */ 4:
289
+ message.name = reader.string();
290
+ break;
291
+ case /* repeated codegen.perms.AdditionalServicePerm additional_perms */ 3:
292
+ message.additionalPerms.push(AdditionalServicePerm.internalBinaryRead(reader, reader.uint32(), options));
293
+ break;
260
294
  default:
261
295
  let u = options.readUnknownField;
262
296
  if (u === "throw")
@@ -275,6 +309,12 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
275
309
  /* optional string icon = 2; */
276
310
  if (message.icon !== undefined)
277
311
  writer.tag(2, WireType.LengthDelimited).string(message.icon);
312
+ /* repeated codegen.perms.AdditionalServicePerm additional_perms = 3; */
313
+ for (let i = 0; i < message.additionalPerms.length; i++)
314
+ AdditionalServicePerm.internalBinaryWrite(message.additionalPerms[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
315
+ /* optional string name = 4; */
316
+ if (message.name !== undefined)
317
+ writer.tag(4, WireType.LengthDelimited).string(message.name);
278
318
  let u = options.writeUnknownFields;
279
319
  if (u !== false)
280
320
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -285,3 +325,66 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
285
325
  * @generated MessageType for protobuf message codegen.perms.ServiceOptions
286
326
  */
287
327
  export const ServiceOptions = new ServiceOptions$Type();
328
+ // @generated message type with reflection information, may provide speed optimized methods
329
+ class AdditionalServicePerm$Type extends MessageType<AdditionalServicePerm> {
330
+ constructor() {
331
+ super("codegen.perms.AdditionalServicePerm", [
332
+ { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
333
+ { no: 4, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
334
+ { no: 5, name: "attrs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attr }
335
+ ]);
336
+ }
337
+ create(value?: PartialMessage<AdditionalServicePerm>): AdditionalServicePerm {
338
+ const message = globalThis.Object.create((this.messagePrototype!));
339
+ message.name = "";
340
+ message.order = 0;
341
+ message.attrs = [];
342
+ if (value !== undefined)
343
+ reflectionMergePartial<AdditionalServicePerm>(this, message, value);
344
+ return message;
345
+ }
346
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdditionalServicePerm): AdditionalServicePerm {
347
+ let message = target ?? this.create(), end = reader.pos + length;
348
+ while (reader.pos < end) {
349
+ let [fieldNo, wireType] = reader.tag();
350
+ switch (fieldNo) {
351
+ case /* string name */ 3:
352
+ message.name = reader.string();
353
+ break;
354
+ case /* int32 order */ 4:
355
+ message.order = reader.int32();
356
+ break;
357
+ case /* repeated codegen.perms.Attr attrs */ 5:
358
+ message.attrs.push(Attr.internalBinaryRead(reader, reader.uint32(), options));
359
+ break;
360
+ default:
361
+ let u = options.readUnknownField;
362
+ if (u === "throw")
363
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
364
+ let d = reader.skip(wireType);
365
+ if (u !== false)
366
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
367
+ }
368
+ }
369
+ return message;
370
+ }
371
+ internalBinaryWrite(message: AdditionalServicePerm, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
372
+ /* string name = 3; */
373
+ if (message.name !== "")
374
+ writer.tag(3, WireType.LengthDelimited).string(message.name);
375
+ /* int32 order = 4; */
376
+ if (message.order !== 0)
377
+ writer.tag(4, WireType.Varint).int32(message.order);
378
+ /* repeated codegen.perms.Attr attrs = 5; */
379
+ for (let i = 0; i < message.attrs.length; i++)
380
+ Attr.internalBinaryWrite(message.attrs[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
381
+ let u = options.writeUnknownFields;
382
+ if (u !== false)
383
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
384
+ return writer;
385
+ }
386
+ }
387
+ /**
388
+ * @generated MessageType for protobuf message codegen.perms.AdditionalServicePerm
389
+ */
390
+ export const AdditionalServicePerm = new AdditionalServicePerm$Type();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fivenet-app/gen",
3
3
  "private": false,
4
- "version": "2026.3.0",
4
+ "version": "2026.5.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "homepage": "https://fivenet.app",
package/perms.ts CHANGED
@@ -1,23 +1,34 @@
1
1
  // Code generated by protoc-gen-fronthelper. DO NOT EDIT.
2
2
  // source: services/auth/auth.proto
3
3
  // source: services/calendar/calendar.proto
4
+ // source: services/calendar/entries.proto
4
5
  // source: services/centrum/centrum.proto
6
+ // source: services/centrum/dispatches.proto
7
+ // source: services/centrum/units.proto
5
8
  // source: services/citizens/citizens.proto
9
+ // source: services/citizens/labels.proto
6
10
  // source: services/completor/completor.proto
7
11
  // source: services/documents/approval.proto
12
+ // source: services/documents/categories.proto
8
13
  // source: services/documents/collab.proto
14
+ // source: services/documents/comments.proto
9
15
  // source: services/documents/documents.proto
10
16
  // source: services/documents/forms.proto
11
17
  // source: services/documents/stamps.proto
12
18
  // source: services/documents/stats.proto
19
+ // source: services/documents/templates.proto
13
20
  // source: services/filestore/filestore.proto
21
+ // source: services/jobs/colleagues.proto
14
22
  // source: services/jobs/conduct.proto
15
23
  // source: services/jobs/jobs.proto
16
24
  // source: services/jobs/stats.proto
17
25
  // source: services/jobs/timeclock.proto
18
26
  // source: services/livemap/livemap.proto
19
27
  // source: services/mailer/mailer.proto
28
+ // source: services/mailer/settings.proto
29
+ // source: services/mailer/thread.proto
20
30
  // source: services/notifications/notifications.proto
31
+ // source: services/qualifications/exam.proto
21
32
  // source: services/qualifications/qualifications.proto
22
33
  // source: services/settings/accounts.proto
23
34
  // source: services/settings/config.proto
@@ -27,7 +38,6 @@
27
38
  // source: services/settings/system.proto
28
39
  // source: services/stats/stats.proto
29
40
  // source: services/sync/sync.proto
30
- // source: services/sync/v2/sync.proto
31
41
  // source: services/vehicles/vehicles.proto
32
42
  // source: services/wiki/collab.proto
33
43
  // source: services/wiki/wiki.proto
@@ -52,10 +62,10 @@ export type GRPCServicePerms =
52
62
  | 'citizens.CitizensService/GetUser'
53
63
  | 'citizens.CitizensService/ListCitizens'
54
64
  | 'citizens.CitizensService/ListUserActivity'
55
- | 'citizens.CitizensService/ManageLabels'
56
65
  | 'citizens.CitizensService/SetUserProps'
66
+ | 'citizens.LabelsService/CreateOrUpdateLabel'
67
+ | 'citizens.LabelsService/DeleteLabel'
57
68
  | 'completor.CompletorService/CompleteCitizenLabels'
58
- | 'completor.CompletorService/CompleteDocumentCategories'
59
69
  | 'documents.ApprovalService/DeleteApprovalTasks'
60
70
  | 'documents.ApprovalService/RevokeApproval'
61
71
  | 'documents.ApprovalService/UpsertApprovalPolicy'
@@ -131,6 +141,7 @@ export const GRPCServices = [
131
141
  'calendar.CalendarService',
132
142
  'centrum.CentrumService',
133
143
  'citizens.CitizensService',
144
+ 'citizens.LabelsService',
134
145
  'completor.CompletorService',
135
146
  'documents.ApprovalService',
136
147
  'documents.DocumentsService',
@@ -165,10 +176,10 @@ export const GRPCServiceMethods = [
165
176
  'citizens.CitizensService/GetUser',
166
177
  'citizens.CitizensService/ListCitizens',
167
178
  'citizens.CitizensService/ListUserActivity',
168
- 'citizens.CitizensService/ManageLabels',
169
179
  'citizens.CitizensService/SetUserProps',
180
+ 'citizens.LabelsService/CreateOrUpdateLabel',
181
+ 'citizens.LabelsService/DeleteLabel',
170
182
  'completor.CompletorService/CompleteCitizenLabels',
171
- 'completor.CompletorService/CompleteDocumentCategories',
172
183
  'documents.ApprovalService/DeleteApprovalTasks',
173
184
  'documents.ApprovalService/RevokeApproval',
174
185
  'documents.ApprovalService/UpsertApprovalPolicy',
@@ -444,7 +444,7 @@ class Configuration$Type extends MessageType<Configuration> {
444
444
  super("resources.centrum.settings.Configuration", [
445
445
  { no: 1, name: "deduplication_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
446
446
  { no: 2, name: "deduplication_radius", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { lt: "1000000", gt: "5" } } } },
447
- { no: 3, name: "deduplication_duration", kind: "message", T: () => Duration }
447
+ { no: 3, name: "deduplication_duration", kind: "message", T: () => Duration, options: { "buf.validate.field": { duration: { lte: { seconds: "3600" }, gt: {} } } } }
448
448
  ], { "codegen.dbscanner.dbscanner": { enabled: true } });
449
449
  }
450
450
  create(value?: PartialMessage<Configuration>): Configuration {
@@ -253,7 +253,7 @@ class Unit$Type extends MessageType<Unit> {
253
253
  { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
254
254
  { no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "2", maxLen: "4" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
255
255
  { no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
256
- { no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128", suffix: "Icon" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
256
+ { 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 } } },
257
257
  { no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
258
258
  { no: 9, name: "status", kind: "message", T: () => UnitStatus },
259
259
  { no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
@@ -0,0 +1,216 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
+ // @generated from protobuf file "resources/citizens/labels/access.proto" (package "resources.citizens.labels", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MessageType } from "@protobuf-ts/runtime";
14
+ /**
15
+ * @generated from protobuf message resources.citizens.labels.LabelAccess
16
+ */
17
+ export interface LabelAccess {
18
+ /**
19
+ * @generated from protobuf field: repeated resources.citizens.labels.JobAccess jobs = 1
20
+ */
21
+ jobs: JobAccess[];
22
+ }
23
+ /**
24
+ * @generated from protobuf message resources.citizens.labels.JobAccess
25
+ */
26
+ export interface JobAccess {
27
+ /**
28
+ * @generated from protobuf field: int64 id = 1
29
+ */
30
+ id: number;
31
+ /**
32
+ * @generated from protobuf field: int64 target_id = 2
33
+ */
34
+ targetId: number;
35
+ /**
36
+ * @generated from protobuf field: string job = 3
37
+ */
38
+ job: string;
39
+ /**
40
+ * @generated from protobuf field: optional string job_label = 4
41
+ */
42
+ jobLabel?: string;
43
+ /**
44
+ * @generated from protobuf field: int32 minimum_grade = 5
45
+ */
46
+ minimumGrade: number;
47
+ /**
48
+ * @generated from protobuf field: optional string job_grade_label = 6
49
+ */
50
+ jobGradeLabel?: string;
51
+ /**
52
+ * @generated from protobuf field: resources.citizens.labels.AccessLevel access = 7
53
+ */
54
+ access: AccessLevel;
55
+ }
56
+ /**
57
+ * @generated from protobuf enum resources.citizens.labels.AccessLevel
58
+ */
59
+ export enum AccessLevel {
60
+ /**
61
+ * @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
62
+ */
63
+ UNSPECIFIED = 0,
64
+ /**
65
+ * @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 1;
66
+ */
67
+ VIEW = 1,
68
+ /**
69
+ * @generated from protobuf enum value: ACCESS_LEVEL_GIVE = 2;
70
+ */
71
+ GIVE = 2,
72
+ /**
73
+ * @generated from protobuf enum value: ACCESS_LEVEL_REMOVE = 3;
74
+ */
75
+ REMOVE = 3
76
+ }
77
+ // @generated message type with reflection information, may provide speed optimized methods
78
+ class LabelAccess$Type extends MessageType<LabelAccess> {
79
+ constructor() {
80
+ super("resources.citizens.labels.LabelAccess", [
81
+ { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } }
82
+ ]);
83
+ }
84
+ create(value?: PartialMessage<LabelAccess>): LabelAccess {
85
+ const message = globalThis.Object.create((this.messagePrototype!));
86
+ message.jobs = [];
87
+ if (value !== undefined)
88
+ reflectionMergePartial<LabelAccess>(this, message, value);
89
+ return message;
90
+ }
91
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LabelAccess): LabelAccess {
92
+ let message = target ?? this.create(), end = reader.pos + length;
93
+ while (reader.pos < end) {
94
+ let [fieldNo, wireType] = reader.tag();
95
+ switch (fieldNo) {
96
+ case /* repeated resources.citizens.labels.JobAccess jobs */ 1:
97
+ message.jobs.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
98
+ break;
99
+ default:
100
+ let u = options.readUnknownField;
101
+ if (u === "throw")
102
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
103
+ let d = reader.skip(wireType);
104
+ if (u !== false)
105
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
106
+ }
107
+ }
108
+ return message;
109
+ }
110
+ internalBinaryWrite(message: LabelAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
111
+ /* repeated resources.citizens.labels.JobAccess jobs = 1; */
112
+ for (let i = 0; i < message.jobs.length; i++)
113
+ JobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
114
+ let u = options.writeUnknownFields;
115
+ if (u !== false)
116
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
117
+ return writer;
118
+ }
119
+ }
120
+ /**
121
+ * @generated MessageType for protobuf message resources.citizens.labels.LabelAccess
122
+ */
123
+ export const LabelAccess = new LabelAccess$Type();
124
+ // @generated message type with reflection information, may provide speed optimized methods
125
+ class JobAccess$Type extends MessageType<JobAccess> {
126
+ constructor() {
127
+ super("resources.citizens.labels.JobAccess", [
128
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\"" } },
129
+ { no: 2, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
130
+ { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
131
+ { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
132
+ { no: 5, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
133
+ { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
134
+ { no: 7, name: "access", kind: "enum", T: () => ["resources.citizens.labels.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
135
+ ]);
136
+ }
137
+ create(value?: PartialMessage<JobAccess>): JobAccess {
138
+ const message = globalThis.Object.create((this.messagePrototype!));
139
+ message.id = 0;
140
+ message.targetId = 0;
141
+ message.job = "";
142
+ message.minimumGrade = 0;
143
+ message.access = 0;
144
+ if (value !== undefined)
145
+ reflectionMergePartial<JobAccess>(this, message, value);
146
+ return message;
147
+ }
148
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobAccess): JobAccess {
149
+ let message = target ?? this.create(), end = reader.pos + length;
150
+ while (reader.pos < end) {
151
+ let [fieldNo, wireType] = reader.tag();
152
+ switch (fieldNo) {
153
+ case /* int64 id */ 1:
154
+ message.id = reader.int64().toNumber();
155
+ break;
156
+ case /* int64 target_id */ 2:
157
+ message.targetId = reader.int64().toNumber();
158
+ break;
159
+ case /* string job */ 3:
160
+ message.job = reader.string();
161
+ break;
162
+ case /* optional string job_label */ 4:
163
+ message.jobLabel = reader.string();
164
+ break;
165
+ case /* int32 minimum_grade */ 5:
166
+ message.minimumGrade = reader.int32();
167
+ break;
168
+ case /* optional string job_grade_label */ 6:
169
+ message.jobGradeLabel = reader.string();
170
+ break;
171
+ case /* resources.citizens.labels.AccessLevel access */ 7:
172
+ message.access = reader.int32();
173
+ break;
174
+ default:
175
+ let u = options.readUnknownField;
176
+ if (u === "throw")
177
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
178
+ let d = reader.skip(wireType);
179
+ if (u !== false)
180
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
181
+ }
182
+ }
183
+ return message;
184
+ }
185
+ internalBinaryWrite(message: JobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
186
+ /* int64 id = 1; */
187
+ if (message.id !== 0)
188
+ writer.tag(1, WireType.Varint).int64(message.id);
189
+ /* int64 target_id = 2; */
190
+ if (message.targetId !== 0)
191
+ writer.tag(2, WireType.Varint).int64(message.targetId);
192
+ /* string job = 3; */
193
+ if (message.job !== "")
194
+ writer.tag(3, WireType.LengthDelimited).string(message.job);
195
+ /* optional string job_label = 4; */
196
+ if (message.jobLabel !== undefined)
197
+ writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
198
+ /* int32 minimum_grade = 5; */
199
+ if (message.minimumGrade !== 0)
200
+ writer.tag(5, WireType.Varint).int32(message.minimumGrade);
201
+ /* optional string job_grade_label = 6; */
202
+ if (message.jobGradeLabel !== undefined)
203
+ writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
204
+ /* resources.citizens.labels.AccessLevel access = 7; */
205
+ if (message.access !== 0)
206
+ writer.tag(7, WireType.Varint).int32(message.access);
207
+ let u = options.writeUnknownFields;
208
+ if (u !== false)
209
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
210
+ return writer;
211
+ }
212
+ }
213
+ /**
214
+ * @generated MessageType for protobuf message resources.citizens.labels.JobAccess
215
+ */
216
+ export const JobAccess = new JobAccess$Type();