@fivenet-app/gen 2026.4.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 (41) hide show
  1. package/clients.ts +60 -0
  2. package/codegen/perms/perms.ts +11 -0
  3. package/package.json +1 -1
  4. package/perms.ts +10 -0
  5. package/resources/citizens/labels/access.ts +216 -0
  6. package/resources/citizens/labels/labels.ts +8 -214
  7. package/services/calendar/calendar.client.ts +2 -106
  8. package/services/calendar/calendar.ts +0 -1018
  9. package/services/calendar/entries.client.ts +129 -0
  10. package/services/calendar/entries.ts +1040 -0
  11. package/services/centrum/centrum.client.ts +23 -244
  12. package/services/centrum/centrum.ts +246 -2383
  13. package/services/centrum/dispatches.client.ts +155 -0
  14. package/services/centrum/dispatches.ts +1305 -0
  15. package/services/centrum/units.client.ts +116 -0
  16. package/services/centrum/units.ts +876 -0
  17. package/services/documents/categories.client.ts +64 -0
  18. package/services/documents/categories.ts +331 -0
  19. package/services/documents/comments.client.ts +77 -0
  20. package/services/documents/comments.ts +479 -0
  21. package/services/documents/documents.client.ts +26 -182
  22. package/services/documents/documents.ts +335 -1682
  23. package/services/documents/templates.client.ts +90 -0
  24. package/services/documents/templates.ts +591 -0
  25. package/services/jobs/colleagues.client.ts +129 -0
  26. package/services/jobs/colleagues.ts +1129 -0
  27. package/services/jobs/jobs.client.ts +3 -107
  28. package/services/jobs/jobs.ts +1 -1113
  29. package/services/mailer/mailer.client.ts +0 -208
  30. package/services/mailer/mailer.ts +1 -2010
  31. package/services/mailer/settings.client.ts +103 -0
  32. package/services/mailer/settings.ts +708 -0
  33. package/services/mailer/thread.client.ts +155 -0
  34. package/services/mailer/thread.ts +1343 -0
  35. package/services/qualifications/exam.client.ts +77 -0
  36. package/services/qualifications/exam.ts +609 -0
  37. package/services/qualifications/qualifications.client.ts +1 -53
  38. package/services/qualifications/qualifications.ts +0 -591
  39. package/services/sync/sync.client.ts +4 -4
  40. package/services/sync/sync.ts +23 -0
  41. package/svcs.ts +153 -67
package/clients.ts CHANGED
@@ -14,12 +14,30 @@ 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');
@@ -44,12 +62,24 @@ export async function getDocumentsApprovalClient() {
44
62
  return new ApprovalServiceClient(useGRPCTransport());
45
63
  }
46
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
+
47
71
  // Factory for documents.collab client.
48
72
  export async function getDocumentsCollabClient() {
49
73
  const { CollabServiceClient } = await import('~~/gen/ts/services/documents/collab.client');
50
74
  return new CollabServiceClient(useGRPCTransport());
51
75
  }
52
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
+
53
83
  // Factory for documents.documents client.
54
84
  export async function getDocumentsDocumentsClient() {
55
85
  const { DocumentsServiceClient } = await import('~~/gen/ts/services/documents/documents.client');
@@ -74,12 +104,24 @@ export async function getDocumentsStatsClient() {
74
104
  return new StatsServiceClient(useGRPCTransport());
75
105
  }
76
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
+
77
113
  // Factory for filestore.filestore client.
78
114
  export async function getFilestoreFilestoreClient() {
79
115
  const { FilestoreServiceClient } = await import('~~/gen/ts/services/filestore/filestore.client');
80
116
  return new FilestoreServiceClient(useGRPCTransport());
81
117
  }
82
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
+
83
125
  // Factory for jobs.conduct client.
84
126
  export async function getJobsConductClient() {
85
127
  const { ConductServiceClient } = await import('~~/gen/ts/services/jobs/conduct.client');
@@ -116,12 +158,30 @@ export async function getMailerMailerClient() {
116
158
  return new MailerServiceClient(useGRPCTransport());
117
159
  }
118
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
+
119
173
  // Factory for notifications.notifications client.
120
174
  export async function getNotificationsNotificationsClient() {
121
175
  const { NotificationsServiceClient } = await import('~~/gen/ts/services/notifications/notifications.client');
122
176
  return new NotificationsServiceClient(useGRPCTransport());
123
177
  }
124
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
+
125
185
  // Factory for qualifications.qualifications client.
126
186
  export async function getQualificationsQualificationsClient() {
127
187
  const { QualificationsServiceClient } = await import('~~/gen/ts/services/qualifications/qualifications.client');
@@ -74,6 +74,10 @@ 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;
77
81
  /**
78
82
  * @generated from protobuf field: repeated codegen.perms.AdditionalServicePerm additional_perms = 3
79
83
  */
@@ -258,6 +262,7 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
258
262
  super("codegen.perms.ServiceOptions", [
259
263
  { no: 1, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
260
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*/ },
261
266
  { no: 3, name: "additional_perms", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AdditionalServicePerm }
262
267
  ]);
263
268
  }
@@ -280,6 +285,9 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
280
285
  case /* optional string icon */ 2:
281
286
  message.icon = reader.string();
282
287
  break;
288
+ case /* optional string name */ 4:
289
+ message.name = reader.string();
290
+ break;
283
291
  case /* repeated codegen.perms.AdditionalServicePerm additional_perms */ 3:
284
292
  message.additionalPerms.push(AdditionalServicePerm.internalBinaryRead(reader, reader.uint32(), options));
285
293
  break;
@@ -304,6 +312,9 @@ class ServiceOptions$Type extends MessageType<ServiceOptions> {
304
312
  /* repeated codegen.perms.AdditionalServicePerm additional_perms = 3; */
305
313
  for (let i = 0; i < message.additionalPerms.length; i++)
306
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);
307
318
  let u = options.writeUnknownFields;
308
319
  if (u !== false)
309
320
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fivenet-app/gen",
3
3
  "private": false,
4
- "version": "2026.4.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,24 +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
6
9
  // source: services/citizens/labels.proto
7
10
  // source: services/completor/completor.proto
8
11
  // source: services/documents/approval.proto
12
+ // source: services/documents/categories.proto
9
13
  // source: services/documents/collab.proto
14
+ // source: services/documents/comments.proto
10
15
  // source: services/documents/documents.proto
11
16
  // source: services/documents/forms.proto
12
17
  // source: services/documents/stamps.proto
13
18
  // source: services/documents/stats.proto
19
+ // source: services/documents/templates.proto
14
20
  // source: services/filestore/filestore.proto
21
+ // source: services/jobs/colleagues.proto
15
22
  // source: services/jobs/conduct.proto
16
23
  // source: services/jobs/jobs.proto
17
24
  // source: services/jobs/stats.proto
18
25
  // source: services/jobs/timeclock.proto
19
26
  // source: services/livemap/livemap.proto
20
27
  // source: services/mailer/mailer.proto
28
+ // source: services/mailer/settings.proto
29
+ // source: services/mailer/thread.proto
21
30
  // source: services/notifications/notifications.proto
31
+ // source: services/qualifications/exam.proto
22
32
  // source: services/qualifications/qualifications.proto
23
33
  // source: services/settings/accounts.proto
24
34
  // source: services/settings/config.proto
@@ -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();