@fivenet-app/gen 2025.9.1 → 2026.4.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 (134) hide show
  1. package/README.md +1 -1
  2. package/clients.ts +36 -0
  3. package/codegen/perms/perms.ts +186 -15
  4. package/codegen/sanitizer/sanitizer.ts +34 -1
  5. package/package.json +2 -2
  6. package/perms.ts +140 -8
  7. package/resources/accounts/accounts.ts +98 -31
  8. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
  9. package/resources/audit/audit.ts +156 -38
  10. package/resources/calendar/{access.ts → access/access.ts} +30 -30
  11. package/resources/calendar/calendar.ts +17 -477
  12. package/resources/calendar/entries/entries.ts +474 -0
  13. package/resources/centrum/{access.ts → access/access.ts} +22 -22
  14. package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
  15. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
  16. package/resources/centrum/joblist.ts +136 -0
  17. package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
  18. package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
  19. package/resources/centrum/{units.ts → units/units.ts} +131 -51
  20. package/resources/citizens/labels/labels.ts +526 -0
  21. package/resources/{users → citizens/licenses}/licenses.ts +17 -17
  22. package/resources/clientconfig/clientconfig.ts +126 -258
  23. package/resources/collab/collab.ts +4 -16
  24. package/resources/common/content/content.ts +108 -85
  25. package/resources/common/content/diff_activity.ts +267 -0
  26. package/resources/common/i18n.ts +2 -2
  27. package/resources/{common/cron → cron}/cron.ts +43 -43
  28. package/resources/documents/{access.ts → access/access.ts} +29 -52
  29. package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
  30. package/resources/documents/approval/approval.ts +945 -0
  31. package/resources/documents/{category.ts → category/category.ts} +7 -7
  32. package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
  33. package/resources/documents/data/data.ts +303 -0
  34. package/resources/documents/documents.ts +282 -667
  35. package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
  36. package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
  37. package/resources/documents/references/references.ts +187 -0
  38. package/resources/documents/relations/relations.ts +184 -0
  39. package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
  40. package/resources/documents/stamps/stamp.ts +355 -0
  41. package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
  42. package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
  43. package/resources/file/filestore.ts +1 -1
  44. package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
  45. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
  46. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
  47. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
  48. package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
  49. package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
  50. package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
  51. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
  52. package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
  53. package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
  54. package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
  55. package/resources/mailer/{access.ts → access/access.ts} +67 -67
  56. package/resources/mailer/{email.ts → emails/email.ts} +19 -19
  57. package/resources/mailer/{events.ts → events/events.ts} +24 -24
  58. package/resources/mailer/{message.ts → messages/message.ts} +29 -29
  59. package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
  60. package/resources/mailer/{template.ts → templates/template.ts} +15 -15
  61. package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
  62. package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
  63. package/resources/notifications/{events.ts → events/events.ts} +20 -20
  64. package/resources/notifications/notifications.ts +4 -4
  65. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
  66. package/resources/permissions/{events.ts → events/events.ts} +7 -7
  67. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
  68. package/resources/qualifications/{access.ts → access/access.ts} +19 -19
  69. package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
  70. package/resources/qualifications/qualifications.ts +51 -179
  71. package/resources/settings/banner.ts +3 -3
  72. package/resources/settings/config.ts +527 -25
  73. package/resources/{documents/state.ts → settings/data.ts} +41 -20
  74. package/resources/settings/perms.ts +14 -14
  75. package/resources/stats/stats.ts +379 -0
  76. package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
  77. package/resources/sync/{data.ts → data/data.ts} +405 -59
  78. package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
  79. package/resources/users/{activity.ts → activity/activity.ts} +242 -101
  80. package/resources/users/{props.ts → props/props.ts} +91 -69
  81. package/resources/users/short/user.ts +184 -0
  82. package/resources/users/{users.ts → user.ts} +266 -195
  83. package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
  84. package/resources/vehicles/{props.ts → props/props.ts} +28 -6
  85. package/resources/vehicles/vehicles.ts +20 -8
  86. package/resources/wiki/{access.ts → access/access.ts} +30 -30
  87. package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
  88. package/resources/wiki/page.ts +39 -15
  89. package/services/auth/auth.client.ts +23 -10
  90. package/services/auth/auth.ts +445 -262
  91. package/services/calendar/calendar.ts +56 -34
  92. package/services/centrum/centrum.ts +127 -127
  93. package/services/citizens/citizens.client.ts +0 -13
  94. package/services/citizens/citizens.ts +44 -134
  95. package/services/citizens/labels.client.ts +77 -0
  96. package/services/citizens/labels.ts +455 -0
  97. package/services/completor/completor.ts +36 -16
  98. package/services/documents/approval.client.ts +188 -0
  99. package/services/documents/approval.ts +1776 -0
  100. package/services/documents/documents.ts +164 -186
  101. package/services/documents/forms.client.ts +51 -0
  102. package/services/documents/forms.ts +232 -0
  103. package/services/documents/stamps.client.ts +77 -0
  104. package/services/documents/stamps.ts +481 -0
  105. package/services/documents/stats.client.ts +38 -0
  106. package/services/documents/stats.ts +245 -0
  107. package/services/jobs/conduct.client.ts +30 -3
  108. package/services/jobs/conduct.ts +159 -33
  109. package/services/jobs/jobs.ts +43 -43
  110. package/services/jobs/stats.client.ts +38 -0
  111. package/services/jobs/stats.ts +207 -0
  112. package/services/jobs/timeclock.ts +39 -39
  113. package/services/livemap/livemap.ts +18 -18
  114. package/services/mailer/mailer.ts +78 -78
  115. package/services/notifications/notifications.ts +35 -35
  116. package/services/qualifications/qualifications.ts +81 -46
  117. package/services/settings/accounts.client.ts +23 -10
  118. package/services/settings/accounts.ts +191 -30
  119. package/services/settings/cron.client.ts +13 -0
  120. package/services/settings/cron.ts +118 -5
  121. package/services/settings/laws.ts +1 -1
  122. package/services/settings/settings.ts +73 -52
  123. package/services/settings/system.client.ts +13 -0
  124. package/services/settings/system.ts +115 -15
  125. package/services/stats/stats.client.ts +7 -7
  126. package/services/stats/stats.ts +24 -24
  127. package/services/sync/sync.client.ts +271 -37
  128. package/services/sync/sync.ts +1525 -421
  129. package/services/vehicles/vehicles.ts +8 -8
  130. package/services/wiki/wiki.ts +8 -8
  131. package/svcs.ts +100 -6
  132. package/resources/centrum/attributes.ts +0 -183
  133. package/resources/documents/signoff.ts +0 -55
  134. package/resources/users/labels.ts +0 -160
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FiveNet Proto Generated Typescript Files
2
2
 
3
- [![Container Images on GHCR.io](https://img.shields.io/badge/Container%20Images%20on-GHCR.io-blue)](https://github.com/fivenet-app/fivenet/v2025/pkgs/container/fivenet) [![Helm Logo](https://img.shields.io/badge/Helm%20Chart%20-available?logo=Helm&labelColor=0F1689)](https://github.com/FiveNet-app/charts) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.gg/ASRPPr8CeT) [![fivenet.app Website](https://img.shields.io/badge/Website-fivenet.app-purple)](https://fivenet.app)
3
+ [![Container Images on GHCR.io](https://img.shields.io/badge/Container%20Images%20on-GHCR.io-blue)](https://github.com/fivenet-app/fivenet/v2026/pkgs/container/fivenet) [![Helm Logo](https://img.shields.io/badge/Helm%20Chart%20-available?logo=Helm&labelColor=0F1689)](https://github.com/FiveNet-app/charts) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.gg/ASRPPr8CeT) [![fivenet.app Website](https://img.shields.io/badge/Website-fivenet.app-purple)](https://fivenet.app)
4
4
 
5
5
  [![Go](https://img.shields.io/badge/Go-%2300ADD8.svg?&logo=go&logoColor=white)](https://go.dev/) [![Nuxt.js](https://img.shields.io/badge/Nuxt.js-00DC82?logo=nuxtdotjs&logoColor=fff)](https://nuxt.com/) [![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro) [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=fff)](#) [![NATS.io](https://img.shields.io/badge/nats.io-gray.svg?logo=natsdotio)](https://nats.io/) [![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker&logoColor=fff)](https://www.docker.com/)
6
6
 
package/clients.ts CHANGED
@@ -26,12 +26,24 @@ export async function getCitizensCitizensClient() {
26
26
  return new CitizensServiceClient(useGRPCTransport());
27
27
  }
28
28
 
29
+ // Factory for citizens.labels client.
30
+ export async function getCitizensLabelsClient() {
31
+ const { LabelsServiceClient } = await import('~~/gen/ts/services/citizens/labels.client');
32
+ return new LabelsServiceClient(useGRPCTransport());
33
+ }
34
+
29
35
  // Factory for completor.completor client.
30
36
  export async function getCompletorCompletorClient() {
31
37
  const { CompletorServiceClient } = await import('~~/gen/ts/services/completor/completor.client');
32
38
  return new CompletorServiceClient(useGRPCTransport());
33
39
  }
34
40
 
41
+ // Factory for documents.approval client.
42
+ export async function getDocumentsApprovalClient() {
43
+ const { ApprovalServiceClient } = await import('~~/gen/ts/services/documents/approval.client');
44
+ return new ApprovalServiceClient(useGRPCTransport());
45
+ }
46
+
35
47
  // Factory for documents.collab client.
36
48
  export async function getDocumentsCollabClient() {
37
49
  const { CollabServiceClient } = await import('~~/gen/ts/services/documents/collab.client');
@@ -44,6 +56,24 @@ export async function getDocumentsDocumentsClient() {
44
56
  return new DocumentsServiceClient(useGRPCTransport());
45
57
  }
46
58
 
59
+ // Factory for documents.forms client.
60
+ export async function getDocumentsFormsClient() {
61
+ const { FormsServiceClient } = await import('~~/gen/ts/services/documents/forms.client');
62
+ return new FormsServiceClient(useGRPCTransport());
63
+ }
64
+
65
+ // Factory for documents.stamps client.
66
+ export async function getDocumentsStampsClient() {
67
+ const { StampsServiceClient } = await import('~~/gen/ts/services/documents/stamps.client');
68
+ return new StampsServiceClient(useGRPCTransport());
69
+ }
70
+
71
+ // Factory for documents.stats client.
72
+ export async function getDocumentsStatsClient() {
73
+ const { StatsServiceClient } = await import('~~/gen/ts/services/documents/stats.client');
74
+ return new StatsServiceClient(useGRPCTransport());
75
+ }
76
+
47
77
  // Factory for filestore.filestore client.
48
78
  export async function getFilestoreFilestoreClient() {
49
79
  const { FilestoreServiceClient } = await import('~~/gen/ts/services/filestore/filestore.client');
@@ -62,6 +92,12 @@ export async function getJobsJobsClient() {
62
92
  return new JobsServiceClient(useGRPCTransport());
63
93
  }
64
94
 
95
+ // Factory for jobs.stats client.
96
+ export async function getJobsStatsClient() {
97
+ const { StatsServiceClient } = await import('~~/gen/ts/services/jobs/stats.client');
98
+ return new StatsServiceClient(useGRPCTransport());
99
+ }
100
+
65
101
  // Factory for jobs.timeclock client.
66
102
  export async function getJobsTimeclockClient() {
67
103
  const { TimeclockServiceClient } = await import('~~/gen/ts/services/jobs/timeclock.client');
@@ -11,11 +11,11 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
- import { AttributeType } from "../../resources/permissions/attributes";
14
+ import { AttributeType } from "../../resources/permissions/attributes/attributes";
15
15
  /**
16
- * @generated from protobuf message codegen.perms.FieldOptions
16
+ * @generated from protobuf message codegen.perms.PermsOptions
17
17
  */
18
- export interface FieldOptions {
18
+ export interface PermsOptions {
19
19
  /**
20
20
  * @generated from protobuf field: bool enabled = 1
21
21
  */
@@ -28,6 +28,10 @@ export interface FieldOptions {
28
28
  * @generated from protobuf field: optional string name = 3
29
29
  */
30
30
  name?: string;
31
+ /**
32
+ * @generated from protobuf field: repeated string names = 6
33
+ */
34
+ names: string[];
31
35
  /**
32
36
  * @generated from protobuf field: int32 order = 4
33
37
  */
@@ -50,7 +54,7 @@ export interface Attr {
50
54
  */
51
55
  value: string;
52
56
  /**
53
- * @generated from protobuf field: resources.permissions.AttributeType type = 3
57
+ * @generated from protobuf field: resources.permissions.attributes.AttributeType type = 3
54
58
  */
55
59
  type: AttributeType;
56
60
  /**
@@ -58,27 +62,63 @@ export interface Attr {
58
62
  */
59
63
  validStringList: string[];
60
64
  }
65
+ /**
66
+ * @generated from protobuf message codegen.perms.ServiceOptions
67
+ */
68
+ export interface ServiceOptions {
69
+ /**
70
+ * @generated from protobuf field: int32 order = 1
71
+ */
72
+ order: number;
73
+ /**
74
+ * @generated from protobuf field: optional string icon = 2
75
+ */
76
+ icon?: string;
77
+ /**
78
+ * @generated from protobuf field: repeated codegen.perms.AdditionalServicePerm additional_perms = 3
79
+ */
80
+ additionalPerms: AdditionalServicePerm[];
81
+ }
82
+ /**
83
+ * @generated from protobuf message codegen.perms.AdditionalServicePerm
84
+ */
85
+ export interface AdditionalServicePerm {
86
+ /**
87
+ * @generated from protobuf field: string name = 3
88
+ */
89
+ name: string;
90
+ /**
91
+ * @generated from protobuf field: int32 order = 4
92
+ */
93
+ order: number;
94
+ /**
95
+ * @generated from protobuf field: repeated codegen.perms.Attr attrs = 5
96
+ */
97
+ attrs: Attr[];
98
+ }
61
99
  // @generated message type with reflection information, may provide speed optimized methods
62
- class FieldOptions$Type extends MessageType<FieldOptions> {
100
+ class PermsOptions$Type extends MessageType<PermsOptions> {
63
101
  constructor() {
64
- super("codegen.perms.FieldOptions", [
102
+ super("codegen.perms.PermsOptions", [
65
103
  { no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
66
104
  { no: 2, name: "service", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
67
105
  { no: 3, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
106
+ { no: 6, name: "names", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
68
107
  { no: 4, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
69
108
  { no: 5, name: "attrs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attr }
70
109
  ]);
71
110
  }
72
- create(value?: PartialMessage<FieldOptions>): FieldOptions {
111
+ create(value?: PartialMessage<PermsOptions>): PermsOptions {
73
112
  const message = globalThis.Object.create((this.messagePrototype!));
74
113
  message.enabled = false;
114
+ message.names = [];
75
115
  message.order = 0;
76
116
  message.attrs = [];
77
117
  if (value !== undefined)
78
- reflectionMergePartial<FieldOptions>(this, message, value);
118
+ reflectionMergePartial<PermsOptions>(this, message, value);
79
119
  return message;
80
120
  }
81
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions {
121
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PermsOptions): PermsOptions {
82
122
  let message = target ?? this.create(), end = reader.pos + length;
83
123
  while (reader.pos < end) {
84
124
  let [fieldNo, wireType] = reader.tag();
@@ -92,6 +132,9 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
92
132
  case /* optional string name */ 3:
93
133
  message.name = reader.string();
94
134
  break;
135
+ case /* repeated string names */ 6:
136
+ message.names.push(reader.string());
137
+ break;
95
138
  case /* int32 order */ 4:
96
139
  message.order = reader.int32();
97
140
  break;
@@ -109,7 +152,7 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
109
152
  }
110
153
  return message;
111
154
  }
112
- internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
155
+ internalBinaryWrite(message: PermsOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
113
156
  /* bool enabled = 1; */
114
157
  if (message.enabled !== false)
115
158
  writer.tag(1, WireType.Varint).bool(message.enabled);
@@ -125,6 +168,9 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
125
168
  /* repeated codegen.perms.Attr attrs = 5; */
126
169
  for (let i = 0; i < message.attrs.length; i++)
127
170
  Attr.internalBinaryWrite(message.attrs[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
171
+ /* repeated string names = 6; */
172
+ for (let i = 0; i < message.names.length; i++)
173
+ writer.tag(6, WireType.LengthDelimited).string(message.names[i]);
128
174
  let u = options.writeUnknownFields;
129
175
  if (u !== false)
130
176
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -132,16 +178,16 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
132
178
  }
133
179
  }
134
180
  /**
135
- * @generated MessageType for protobuf message codegen.perms.FieldOptions
181
+ * @generated MessageType for protobuf message codegen.perms.PermsOptions
136
182
  */
137
- export const FieldOptions = new FieldOptions$Type();
183
+ export const PermsOptions = new PermsOptions$Type();
138
184
  // @generated message type with reflection information, may provide speed optimized methods
139
185
  class Attr$Type extends MessageType<Attr> {
140
186
  constructor() {
141
187
  super("codegen.perms.Attr", [
142
188
  { no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
143
189
  { no: 2, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
144
- { no: 3, name: "type", kind: "enum", T: () => ["resources.permissions.AttributeType", AttributeType, "ATTRIBUTE_TYPE_"] },
190
+ { no: 3, name: "type", kind: "enum", T: () => ["resources.permissions.attributes.AttributeType", AttributeType, "ATTRIBUTE_TYPE_"] },
145
191
  { no: 4, name: "valid_string_list", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
146
192
  ]);
147
193
  }
@@ -166,7 +212,7 @@ class Attr$Type extends MessageType<Attr> {
166
212
  case /* string value */ 2:
167
213
  message.value = reader.string();
168
214
  break;
169
- case /* resources.permissions.AttributeType type */ 3:
215
+ case /* resources.permissions.attributes.AttributeType type */ 3:
170
216
  message.type = reader.int32();
171
217
  break;
172
218
  case /* repeated string valid_string_list */ 4:
@@ -190,7 +236,7 @@ class Attr$Type extends MessageType<Attr> {
190
236
  /* string value = 2; */
191
237
  if (message.value !== "")
192
238
  writer.tag(2, WireType.LengthDelimited).string(message.value);
193
- /* resources.permissions.AttributeType type = 3; */
239
+ /* resources.permissions.attributes.AttributeType type = 3; */
194
240
  if (message.type !== 0)
195
241
  writer.tag(3, WireType.Varint).int32(message.type);
196
242
  /* repeated string valid_string_list = 4; */
@@ -206,3 +252,128 @@ class Attr$Type extends MessageType<Attr> {
206
252
  * @generated MessageType for protobuf message codegen.perms.Attr
207
253
  */
208
254
  export const Attr = new Attr$Type();
255
+ // @generated message type with reflection information, may provide speed optimized methods
256
+ class ServiceOptions$Type extends MessageType<ServiceOptions> {
257
+ constructor() {
258
+ super("codegen.perms.ServiceOptions", [
259
+ { no: 1, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
260
+ { no: 2, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
261
+ { no: 3, name: "additional_perms", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AdditionalServicePerm }
262
+ ]);
263
+ }
264
+ create(value?: PartialMessage<ServiceOptions>): ServiceOptions {
265
+ const message = globalThis.Object.create((this.messagePrototype!));
266
+ message.order = 0;
267
+ message.additionalPerms = [];
268
+ if (value !== undefined)
269
+ reflectionMergePartial<ServiceOptions>(this, message, value);
270
+ return message;
271
+ }
272
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions {
273
+ let message = target ?? this.create(), end = reader.pos + length;
274
+ while (reader.pos < end) {
275
+ let [fieldNo, wireType] = reader.tag();
276
+ switch (fieldNo) {
277
+ case /* int32 order */ 1:
278
+ message.order = reader.int32();
279
+ break;
280
+ case /* optional string icon */ 2:
281
+ message.icon = reader.string();
282
+ break;
283
+ case /* repeated codegen.perms.AdditionalServicePerm additional_perms */ 3:
284
+ message.additionalPerms.push(AdditionalServicePerm.internalBinaryRead(reader, reader.uint32(), options));
285
+ break;
286
+ default:
287
+ let u = options.readUnknownField;
288
+ if (u === "throw")
289
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
290
+ let d = reader.skip(wireType);
291
+ if (u !== false)
292
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
293
+ }
294
+ }
295
+ return message;
296
+ }
297
+ internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
298
+ /* int32 order = 1; */
299
+ if (message.order !== 0)
300
+ writer.tag(1, WireType.Varint).int32(message.order);
301
+ /* optional string icon = 2; */
302
+ if (message.icon !== undefined)
303
+ writer.tag(2, WireType.LengthDelimited).string(message.icon);
304
+ /* repeated codegen.perms.AdditionalServicePerm additional_perms = 3; */
305
+ for (let i = 0; i < message.additionalPerms.length; i++)
306
+ AdditionalServicePerm.internalBinaryWrite(message.additionalPerms[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
307
+ let u = options.writeUnknownFields;
308
+ if (u !== false)
309
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
310
+ return writer;
311
+ }
312
+ }
313
+ /**
314
+ * @generated MessageType for protobuf message codegen.perms.ServiceOptions
315
+ */
316
+ export const ServiceOptions = new ServiceOptions$Type();
317
+ // @generated message type with reflection information, may provide speed optimized methods
318
+ class AdditionalServicePerm$Type extends MessageType<AdditionalServicePerm> {
319
+ constructor() {
320
+ super("codegen.perms.AdditionalServicePerm", [
321
+ { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
322
+ { no: 4, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
323
+ { no: 5, name: "attrs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attr }
324
+ ]);
325
+ }
326
+ create(value?: PartialMessage<AdditionalServicePerm>): AdditionalServicePerm {
327
+ const message = globalThis.Object.create((this.messagePrototype!));
328
+ message.name = "";
329
+ message.order = 0;
330
+ message.attrs = [];
331
+ if (value !== undefined)
332
+ reflectionMergePartial<AdditionalServicePerm>(this, message, value);
333
+ return message;
334
+ }
335
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdditionalServicePerm): AdditionalServicePerm {
336
+ let message = target ?? this.create(), end = reader.pos + length;
337
+ while (reader.pos < end) {
338
+ let [fieldNo, wireType] = reader.tag();
339
+ switch (fieldNo) {
340
+ case /* string name */ 3:
341
+ message.name = reader.string();
342
+ break;
343
+ case /* int32 order */ 4:
344
+ message.order = reader.int32();
345
+ break;
346
+ case /* repeated codegen.perms.Attr attrs */ 5:
347
+ message.attrs.push(Attr.internalBinaryRead(reader, reader.uint32(), options));
348
+ break;
349
+ default:
350
+ let u = options.readUnknownField;
351
+ if (u === "throw")
352
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
353
+ let d = reader.skip(wireType);
354
+ if (u !== false)
355
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
356
+ }
357
+ }
358
+ return message;
359
+ }
360
+ internalBinaryWrite(message: AdditionalServicePerm, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
361
+ /* string name = 3; */
362
+ if (message.name !== "")
363
+ writer.tag(3, WireType.LengthDelimited).string(message.name);
364
+ /* int32 order = 4; */
365
+ if (message.order !== 0)
366
+ writer.tag(4, WireType.Varint).int32(message.order);
367
+ /* repeated codegen.perms.Attr attrs = 5; */
368
+ for (let i = 0; i < message.attrs.length; i++)
369
+ Attr.internalBinaryWrite(message.attrs[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
370
+ let u = options.writeUnknownFields;
371
+ if (u !== false)
372
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
373
+ return writer;
374
+ }
375
+ }
376
+ /**
377
+ * @generated MessageType for protobuf message codegen.perms.AdditionalServicePerm
378
+ */
379
+ export const AdditionalServicePerm = new AdditionalServicePerm$Type();
@@ -23,13 +23,28 @@ export interface FieldOptions {
23
23
  * @generated from protobuf field: optional string method = 2
24
24
  */
25
25
  method?: string;
26
+ /**
27
+ * @generated from protobuf field: optional bool strip_html_tags = 3
28
+ */
29
+ stripHtmlTags?: boolean;
30
+ /**
31
+ * @generated from protobuf field: optional bool tiptap_json = 4
32
+ */
33
+ tiptapJson?: boolean;
34
+ /**
35
+ * @generated from protobuf field: optional uint32 max_bytes = 5
36
+ */
37
+ maxBytes?: number;
26
38
  }
27
39
  // @generated message type with reflection information, may provide speed optimized methods
28
40
  class FieldOptions$Type extends MessageType<FieldOptions> {
29
41
  constructor() {
30
42
  super("codegen.sanitizer.FieldOptions", [
31
43
  { no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
32
- { no: 2, name: "method", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
44
+ { no: 2, name: "method", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
45
+ { no: 3, name: "strip_html_tags", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
46
+ { no: 4, name: "tiptap_json", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
47
+ { no: 5, name: "max_bytes", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }
33
48
  ]);
34
49
  }
35
50
  create(value?: PartialMessage<FieldOptions>): FieldOptions {
@@ -50,6 +65,15 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
50
65
  case /* optional string method */ 2:
51
66
  message.method = reader.string();
52
67
  break;
68
+ case /* optional bool strip_html_tags */ 3:
69
+ message.stripHtmlTags = reader.bool();
70
+ break;
71
+ case /* optional bool tiptap_json */ 4:
72
+ message.tiptapJson = reader.bool();
73
+ break;
74
+ case /* optional uint32 max_bytes */ 5:
75
+ message.maxBytes = reader.uint32();
76
+ break;
53
77
  default:
54
78
  let u = options.readUnknownField;
55
79
  if (u === "throw")
@@ -68,6 +92,15 @@ class FieldOptions$Type extends MessageType<FieldOptions> {
68
92
  /* optional string method = 2; */
69
93
  if (message.method !== undefined)
70
94
  writer.tag(2, WireType.LengthDelimited).string(message.method);
95
+ /* optional bool strip_html_tags = 3; */
96
+ if (message.stripHtmlTags !== undefined)
97
+ writer.tag(3, WireType.Varint).bool(message.stripHtmlTags);
98
+ /* optional bool tiptap_json = 4; */
99
+ if (message.tiptapJson !== undefined)
100
+ writer.tag(4, WireType.Varint).bool(message.tiptapJson);
101
+ /* optional uint32 max_bytes = 5; */
102
+ if (message.maxBytes !== undefined)
103
+ writer.tag(5, WireType.Varint).uint32(message.maxBytes);
71
104
  let u = options.writeUnknownFields;
72
105
  if (u !== false)
73
106
  (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": "2025.9.1",
4
+ "version": "2026.4.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "homepage": "https://fivenet.app",
@@ -11,6 +11,6 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@protobuf-ts/plugin": "2.11.1",
14
- "google-protobuf": "4.0.0"
14
+ "google-protobuf": "4.0.2"
15
15
  }
16
16
  }
package/perms.ts CHANGED
@@ -3,12 +3,18 @@
3
3
  // source: services/calendar/calendar.proto
4
4
  // source: services/centrum/centrum.proto
5
5
  // source: services/citizens/citizens.proto
6
+ // source: services/citizens/labels.proto
6
7
  // source: services/completor/completor.proto
8
+ // source: services/documents/approval.proto
7
9
  // source: services/documents/collab.proto
8
10
  // source: services/documents/documents.proto
11
+ // source: services/documents/forms.proto
12
+ // source: services/documents/stamps.proto
13
+ // source: services/documents/stats.proto
9
14
  // source: services/filestore/filestore.proto
10
15
  // source: services/jobs/conduct.proto
11
16
  // source: services/jobs/jobs.proto
17
+ // source: services/jobs/stats.proto
12
18
  // source: services/jobs/timeclock.proto
13
19
  // source: services/livemap/livemap.proto
14
20
  // source: services/mailer/mailer.proto
@@ -26,10 +32,11 @@
26
32
  // source: services/wiki/collab.proto
27
33
  // source: services/wiki/wiki.proto
28
34
 
29
- export type Perms =
30
- | 'Superuser/CanBeSuperuser'
31
- | 'Superuser/Superuser'
32
- | 'TODOService/TODOMethod'
35
+ export type Perms = SystemPerms | GRPCServicePerms;
36
+
37
+ export type SystemPerms = 'Superuser/CanBeSuperuser' | 'Superuser/Superuser' | 'TODOService/TODOMethod';
38
+
39
+ export type GRPCServicePerms =
33
40
  | 'auth.AuthService/ChooseCharacter'
34
41
  | 'calendar.CalendarService/CreateCalendar'
35
42
  | 'centrum.CentrumService/CreateDispatch'
@@ -45,11 +52,14 @@ export type Perms =
45
52
  | 'citizens.CitizensService/GetUser'
46
53
  | 'citizens.CitizensService/ListCitizens'
47
54
  | 'citizens.CitizensService/ListUserActivity'
48
- | 'citizens.CitizensService/ManageLabels'
49
55
  | 'citizens.CitizensService/SetUserProps'
56
+ | 'citizens.LabelsService/CreateOrUpdateLabel'
57
+ | 'citizens.LabelsService/DeleteLabel'
50
58
  | 'completor.CompletorService/CompleteCitizenLabels'
51
- | 'completor.CompletorService/CompleteCitizens'
52
- | 'completor.CompletorService/CompleteDocumentCategories'
59
+ | 'documents.ApprovalService/DeleteApprovalTasks'
60
+ | 'documents.ApprovalService/RevokeApproval'
61
+ | 'documents.ApprovalService/UpsertApprovalPolicy'
62
+ | 'documents.ApprovalService/UpsertApprovalTasks'
53
63
  | 'documents.DocumentsService/AddDocumentReference'
54
64
  | 'documents.DocumentsService/AddDocumentRelation'
55
65
  | 'documents.DocumentsService/ChangeDocumentOwner'
@@ -71,16 +81,22 @@ export type Perms =
71
81
  | 'documents.DocumentsService/ToggleDocument'
72
82
  | 'documents.DocumentsService/ToggleDocumentPin'
73
83
  | 'documents.DocumentsService/UpdateDocument'
84
+ | 'documents.StampsService/DeleteStamp'
85
+ | 'documents.StampsService/ListUsableStamps'
86
+ | 'documents.StampsService/UpsertStamp'
87
+ | 'documents.StatsService/GetStats'
74
88
  | 'jobs.ConductService/CreateConductEntry'
75
89
  | 'jobs.ConductService/DeleteConductEntry'
76
90
  | 'jobs.ConductService/ListConductEntries'
77
91
  | 'jobs.ConductService/UpdateConductEntry'
92
+ | 'jobs.ConductService/UploadFile'
78
93
  | 'jobs.JobsService/GetColleague'
79
94
  | 'jobs.JobsService/ListColleagueActivity'
80
95
  | 'jobs.JobsService/ListColleagues'
81
96
  | 'jobs.JobsService/ManageLabels'
82
97
  | 'jobs.JobsService/SetColleagueProps'
83
98
  | 'jobs.JobsService/SetMOTD'
99
+ | 'jobs.StatsService/GetStats'
84
100
  | 'jobs.TimeclockService/ListInactiveEmployees'
85
101
  | 'jobs.TimeclockService/ListTimeclock'
86
102
  | 'livemap.LivemapService/CreateOrUpdateMarker'
@@ -103,7 +119,123 @@ export type Perms =
103
119
  | 'settings.SettingsService/ViewAuditLog'
104
120
  | 'vehicles.VehiclesService/ListVehicles'
105
121
  | 'vehicles.VehiclesService/SetVehicleProps'
122
+ | 'wiki.WikiService/CreatePage'
106
123
  | 'wiki.WikiService/DeletePage'
107
124
  | 'wiki.WikiService/ListPageActivity'
108
125
  | 'wiki.WikiService/ListPages'
109
- | 'wiki.WikiService/UpdatePage';
126
+ | 'wiki.WikiService/UpdatePage'
127
+ | 'wiki.WikiService/UploadFile';
128
+
129
+ export const GRPCServices = [
130
+ 'auth.AuthService',
131
+ 'calendar.CalendarService',
132
+ 'centrum.CentrumService',
133
+ 'citizens.CitizensService',
134
+ 'citizens.LabelsService',
135
+ 'completor.CompletorService',
136
+ 'documents.ApprovalService',
137
+ 'documents.DocumentsService',
138
+ 'documents.StampsService',
139
+ 'documents.StatsService',
140
+ 'jobs.ConductService',
141
+ 'jobs.JobsService',
142
+ 'jobs.StatsService',
143
+ 'jobs.TimeclockService',
144
+ 'livemap.LivemapService',
145
+ 'mailer.MailerService',
146
+ 'qualifications.QualificationsService',
147
+ 'settings.LawsService',
148
+ 'settings.SettingsService',
149
+ 'vehicles.VehiclesService',
150
+ 'wiki.WikiService',
151
+ ];
152
+
153
+ export const GRPCServiceMethods = [
154
+ 'auth.AuthService/ChooseCharacter',
155
+ 'calendar.CalendarService/CreateCalendar',
156
+ 'centrum.CentrumService/CreateDispatch',
157
+ 'centrum.CentrumService/CreateOrUpdateUnit',
158
+ 'centrum.CentrumService/DeleteDispatch',
159
+ 'centrum.CentrumService/DeleteUnit',
160
+ 'centrum.CentrumService/Stream',
161
+ 'centrum.CentrumService/TakeControl',
162
+ 'centrum.CentrumService/TakeDispatch',
163
+ 'centrum.CentrumService/UpdateDispatch',
164
+ 'centrum.CentrumService/UpdateDispatchers',
165
+ 'centrum.CentrumService/UpdateSettings',
166
+ 'citizens.CitizensService/GetUser',
167
+ 'citizens.CitizensService/ListCitizens',
168
+ 'citizens.CitizensService/ListUserActivity',
169
+ 'citizens.CitizensService/SetUserProps',
170
+ 'citizens.LabelsService/CreateOrUpdateLabel',
171
+ 'citizens.LabelsService/DeleteLabel',
172
+ 'completor.CompletorService/CompleteCitizenLabels',
173
+ 'documents.ApprovalService/DeleteApprovalTasks',
174
+ 'documents.ApprovalService/RevokeApproval',
175
+ 'documents.ApprovalService/UpsertApprovalPolicy',
176
+ 'documents.ApprovalService/UpsertApprovalTasks',
177
+ 'documents.DocumentsService/AddDocumentReference',
178
+ 'documents.DocumentsService/AddDocumentRelation',
179
+ 'documents.DocumentsService/ChangeDocumentOwner',
180
+ 'documents.DocumentsService/CreateDocumentReq',
181
+ 'documents.DocumentsService/CreateOrUpdateCategory',
182
+ 'documents.DocumentsService/CreateTemplate',
183
+ 'documents.DocumentsService/DeleteCategory',
184
+ 'documents.DocumentsService/DeleteComment',
185
+ 'documents.DocumentsService/DeleteDocument',
186
+ 'documents.DocumentsService/DeleteDocumentReq',
187
+ 'documents.DocumentsService/DeleteTemplate',
188
+ 'documents.DocumentsService/ListCategories',
189
+ 'documents.DocumentsService/ListDocumentActivity',
190
+ 'documents.DocumentsService/ListDocumentReqs',
191
+ 'documents.DocumentsService/ListDocuments',
192
+ 'documents.DocumentsService/ListTemplates',
193
+ 'documents.DocumentsService/ListUserDocuments',
194
+ 'documents.DocumentsService/SetDocumentReminder',
195
+ 'documents.DocumentsService/ToggleDocument',
196
+ 'documents.DocumentsService/ToggleDocumentPin',
197
+ 'documents.DocumentsService/UpdateDocument',
198
+ 'documents.StampsService/DeleteStamp',
199
+ 'documents.StampsService/ListUsableStamps',
200
+ 'documents.StampsService/UpsertStamp',
201
+ 'documents.StatsService/GetStats',
202
+ 'jobs.ConductService/CreateConductEntry',
203
+ 'jobs.ConductService/DeleteConductEntry',
204
+ 'jobs.ConductService/ListConductEntries',
205
+ 'jobs.ConductService/UpdateConductEntry',
206
+ 'jobs.ConductService/UploadFile',
207
+ 'jobs.JobsService/GetColleague',
208
+ 'jobs.JobsService/ListColleagueActivity',
209
+ 'jobs.JobsService/ListColleagues',
210
+ 'jobs.JobsService/ManageLabels',
211
+ 'jobs.JobsService/SetColleagueProps',
212
+ 'jobs.JobsService/SetMOTD',
213
+ 'jobs.StatsService/GetStats',
214
+ 'jobs.TimeclockService/ListInactiveEmployees',
215
+ 'jobs.TimeclockService/ListTimeclock',
216
+ 'livemap.LivemapService/CreateOrUpdateMarker',
217
+ 'livemap.LivemapService/DeleteMarker',
218
+ 'livemap.LivemapService/Stream',
219
+ 'mailer.MailerService/CreateOrUpdateEmail',
220
+ 'mailer.MailerService/DeleteEmail',
221
+ 'mailer.MailerService/ListEmails',
222
+ 'qualifications.QualificationsService/DeleteQualification',
223
+ 'qualifications.QualificationsService/ListQualifications',
224
+ 'qualifications.QualificationsService/UpdateQualification',
225
+ 'settings.LawsService/CreateOrUpdateLawBook',
226
+ 'settings.LawsService/DeleteLawBook',
227
+ 'settings.SettingsService/CreateRole',
228
+ 'settings.SettingsService/DeleteRole',
229
+ 'settings.SettingsService/GetJobProps',
230
+ 'settings.SettingsService/GetRoles',
231
+ 'settings.SettingsService/SetJobProps',
232
+ 'settings.SettingsService/UpdateRolePerms',
233
+ 'settings.SettingsService/ViewAuditLog',
234
+ 'vehicles.VehiclesService/ListVehicles',
235
+ 'vehicles.VehiclesService/SetVehicleProps',
236
+ 'wiki.WikiService/CreatePage',
237
+ 'wiki.WikiService/DeletePage',
238
+ 'wiki.WikiService/ListPageActivity',
239
+ 'wiki.WikiService/ListPages',
240
+ 'wiki.WikiService/UpdatePage',
241
+ 'wiki.WikiService/UploadFile',];