@fivenet-app/gen 2025.5.3 → 2026.3.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 (195) hide show
  1. package/README.md +1 -1
  2. package/buf/validate/validate.ts +11301 -0
  3. package/clients.ts +193 -154
  4. package/codegen/dbscanner/dbscanner.ts +91 -0
  5. package/codegen/perms/perms.ts +287 -0
  6. package/codegen/sanitizer/sanitizer.ts +113 -0
  7. package/google/protobuf/any.ts +4 -3
  8. package/google/protobuf/descriptor.ts +393 -239
  9. package/google/protobuf/duration.ts +4 -3
  10. package/google/protobuf/struct.ts +485 -0
  11. package/google/protobuf/timestamp.ts +4 -3
  12. package/package.json +3 -3
  13. package/perms.ts +217 -160
  14. package/resources/accounts/accounts.ts +115 -47
  15. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
  16. package/resources/audit/audit.ts +172 -53
  17. package/resources/calendar/{access.ts → access/access.ts} +72 -71
  18. package/resources/calendar/calendar.ts +79 -543
  19. package/resources/calendar/entries/entries.ts +474 -0
  20. package/resources/centrum/access/access.ts +345 -0
  21. package/resources/centrum/dispatchers/dispatchers.ts +149 -0
  22. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
  23. package/resources/centrum/joblist.ts +136 -0
  24. package/resources/centrum/settings/settings.ts +657 -0
  25. package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
  26. package/resources/centrum/{units.ts → units/units.ts} +230 -130
  27. package/resources/clientconfig/clientconfig.ts +1015 -0
  28. package/resources/collab/collab.ts +805 -0
  29. package/resources/common/content/content.ts +169 -63
  30. package/resources/common/content/diff_activity.ts +267 -0
  31. package/resources/common/database/database.ts +92 -35
  32. package/resources/common/error.ts +17 -16
  33. package/resources/common/i18n.ts +20 -24
  34. package/resources/common/id_mapping.ts +69 -0
  35. package/resources/common/tests/objects.ts +4 -3
  36. package/resources/{common/cron → cron}/cron.ts +77 -65
  37. package/resources/discord/discord.ts +209 -0
  38. package/resources/documents/{access.ts → access/access.ts} +75 -76
  39. package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
  40. package/resources/documents/approval/approval.ts +945 -0
  41. package/resources/documents/{category.ts → category/category.ts} +25 -32
  42. package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
  43. package/resources/documents/data/data.ts +303 -0
  44. package/resources/documents/documents.ts +374 -686
  45. package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
  46. package/resources/documents/pins/pins.ts +127 -0
  47. package/resources/documents/references/references.ts +187 -0
  48. package/resources/documents/relations/relations.ts +184 -0
  49. package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
  50. package/resources/documents/stamps/stamp.ts +355 -0
  51. package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
  52. package/resources/documents/workflow/workflow.ts +600 -0
  53. package/resources/file/file.ts +152 -0
  54. package/{services/settings → resources/file}/filestore.ts +179 -165
  55. package/resources/file/meta.ts +148 -0
  56. package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
  57. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
  58. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
  59. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
  60. package/resources/jobs/jobs.ts +14 -13
  61. package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
  62. package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
  63. package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
  64. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
  65. package/resources/laws/laws.ts +40 -49
  66. package/resources/livemap/coords.ts +81 -0
  67. package/resources/livemap/heatmap/heatmap.ts +93 -0
  68. package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
  69. package/resources/livemap/markers/user_marker.ts +377 -0
  70. package/resources/mailer/{access.ts → access/access.ts} +119 -118
  71. package/resources/mailer/{email.ts → emails/email.ts} +38 -41
  72. package/resources/mailer/{events.ts → events/events.ts} +44 -43
  73. package/resources/mailer/{message.ts → messages/message.ts} +69 -74
  74. package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
  75. package/resources/mailer/{template.ts → templates/template.ts} +37 -40
  76. package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
  77. package/resources/notifications/clientview/clientview.ts +239 -0
  78. package/resources/notifications/{events.ts → events/events.ts} +67 -130
  79. package/resources/notifications/notifications.ts +55 -60
  80. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
  81. package/resources/permissions/events/events.ts +149 -0
  82. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
  83. package/resources/qualifications/{access.ts → access/access.ts} +43 -42
  84. package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
  85. package/resources/qualifications/qualifications.ts +327 -388
  86. package/resources/settings/banner.ts +14 -21
  87. package/resources/settings/config.ts +663 -79
  88. package/resources/settings/data.ts +90 -0
  89. package/resources/settings/perms.ts +151 -0
  90. package/resources/settings/status.ts +533 -0
  91. package/resources/stats/stats.ts +382 -2
  92. package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
  93. package/resources/sync/data/data.ts +1001 -0
  94. package/resources/sync/data/v2/data.ts +220 -0
  95. package/resources/timestamp/timestamp.ts +3 -2
  96. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  97. package/resources/userinfo/userinfo.ts +442 -0
  98. package/resources/users/{activity.ts → activity/activity.ts} +182 -166
  99. package/resources/users/{labels.ts → labels/labels.ts} +27 -30
  100. package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
  101. package/resources/users/{props.ts → props/props.ts} +109 -77
  102. package/resources/users/short/user.ts +184 -0
  103. package/resources/users/user.ts +528 -0
  104. package/resources/vehicles/activity/activity.ts +231 -0
  105. package/resources/vehicles/props/props.ts +125 -0
  106. package/resources/vehicles/vehicles.ts +43 -18
  107. package/resources/wiki/{access.ts → access/access.ts} +72 -71
  108. package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
  109. package/resources/wiki/page.ts +164 -93
  110. package/services/auth/auth.client.ts +45 -35
  111. package/services/auth/auth.ts +498 -288
  112. package/services/calendar/calendar.client.ts +32 -91
  113. package/services/calendar/calendar.ts +157 -134
  114. package/services/centrum/centrum.client.ts +97 -137
  115. package/services/centrum/centrum.ts +755 -352
  116. package/services/citizens/citizens.client.ts +70 -39
  117. package/services/citizens/citizens.ts +226 -112
  118. package/services/completor/completor.client.ts +16 -35
  119. package/services/completor/completor.ts +95 -54
  120. package/services/documents/approval.client.ts +188 -0
  121. package/services/documents/approval.ts +1776 -0
  122. package/services/documents/collab.client.ts +46 -0
  123. package/services/documents/collab.ts +13 -0
  124. package/services/documents/documents.client.ts +88 -217
  125. package/services/documents/documents.ts +579 -619
  126. package/services/documents/forms.client.ts +51 -0
  127. package/services/documents/forms.ts +232 -0
  128. package/services/documents/stamps.client.ts +77 -0
  129. package/services/documents/stamps.ts +481 -0
  130. package/services/documents/stats.client.ts +38 -0
  131. package/services/documents/stats.ts +245 -0
  132. package/services/filestore/filestore.client.ts +86 -0
  133. package/services/filestore/filestore.ts +262 -0
  134. package/services/jobs/conduct.client.ts +40 -28
  135. package/services/jobs/conduct.ts +183 -56
  136. package/services/jobs/jobs.client.ts +22 -61
  137. package/services/jobs/jobs.ts +138 -121
  138. package/services/jobs/stats.client.ts +38 -0
  139. package/services/jobs/stats.ts +207 -0
  140. package/services/jobs/timeclock.client.ts +8 -19
  141. package/services/jobs/timeclock.ts +76 -75
  142. package/services/livemap/livemap.client.ts +8 -19
  143. package/services/livemap/livemap.ts +297 -126
  144. package/services/mailer/mailer.client.ts +44 -127
  145. package/services/mailer/mailer.ts +266 -269
  146. package/services/notifications/notifications.client.ts +65 -0
  147. package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
  148. package/services/qualifications/qualifications.client.ts +46 -91
  149. package/services/qualifications/qualifications.ts +250 -209
  150. package/services/settings/accounts.client.ts +31 -33
  151. package/services/settings/accounts.ts +251 -67
  152. package/services/settings/config.client.ts +6 -13
  153. package/services/settings/config.ts +8 -7
  154. package/services/settings/cron.client.ts +4 -7
  155. package/services/settings/cron.ts +7 -6
  156. package/services/settings/laws.client.ts +10 -25
  157. package/services/settings/laws.ts +30 -29
  158. package/services/settings/settings.client.ts +57 -103
  159. package/services/settings/settings.ts +237 -633
  160. package/services/settings/system.client.ts +103 -0
  161. package/services/settings/system.ts +718 -0
  162. package/services/stats/stats.client.ts +9 -8
  163. package/services/stats/stats.ts +27 -26
  164. package/services/sync/sync.client.ts +16 -15
  165. package/services/sync/sync.ts +174 -97
  166. package/services/sync/v2/sync.client.ts +331 -0
  167. package/services/sync/v2/sync.ts +1766 -0
  168. package/services/vehicles/vehicles.client.ts +17 -7
  169. package/services/vehicles/vehicles.ts +170 -25
  170. package/services/wiki/collab.client.ts +46 -0
  171. package/services/wiki/collab.ts +13 -0
  172. package/services/wiki/wiki.client.ts +28 -37
  173. package/services/wiki/wiki.ts +97 -67
  174. package/svcs.ts +174 -106
  175. package/resources/centrum/attributes.ts +0 -186
  176. package/resources/centrum/disponents.ts +0 -81
  177. package/resources/centrum/settings.ts +0 -307
  178. package/resources/documents/workflow.ts +0 -351
  179. package/resources/filestore/file.ts +0 -204
  180. package/resources/internet/access.ts +0 -358
  181. package/resources/internet/ads.ts +0 -257
  182. package/resources/internet/domain.ts +0 -328
  183. package/resources/internet/page.ts +0 -428
  184. package/resources/internet/search.ts +0 -128
  185. package/resources/livemap/tracker.ts +0 -81
  186. package/resources/sync/data.ts +0 -587
  187. package/resources/users/users.ts +0 -435
  188. package/services/internet/ads.client.ts +0 -41
  189. package/services/internet/ads.ts +0 -145
  190. package/services/internet/domain.client.ts +0 -109
  191. package/services/internet/domain.ts +0 -658
  192. package/services/internet/internet.client.ts +0 -58
  193. package/services/internet/internet.ts +0 -268
  194. package/services/notificator/notificator.client.ts +0 -76
  195. package/services/settings/filestore.client.ts +0 -75
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  //
5
6
  // Protocol Buffers - Google's data interchange format
@@ -115,7 +116,7 @@ export interface Duration {
115
116
  * to +315,576,000,000 inclusive. Note: these bounds are computed from:
116
117
  * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
117
118
  *
118
- * @generated from protobuf field: int64 seconds = 1;
119
+ * @generated from protobuf field: int64 seconds = 1
119
120
  */
120
121
  seconds: number;
121
122
  /**
@@ -126,7 +127,7 @@ export interface Duration {
126
127
  * of the same sign as the `seconds` field. Must be from -999,999,999
127
128
  * to +999,999,999 inclusive.
128
129
  *
129
- * @generated from protobuf field: int32 nanos = 2;
130
+ * @generated from protobuf field: int32 nanos = 2
130
131
  */
131
132
  nanos: number;
132
133
  }
@@ -0,0 +1,485 @@
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 "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ //
6
+ // Protocol Buffers - Google's data interchange format
7
+ // Copyright 2008 Google Inc. All rights reserved.
8
+ // https://developers.google.com/protocol-buffers/
9
+ //
10
+ // Redistribution and use in source and binary forms, with or without
11
+ // modification, are permitted provided that the following conditions are
12
+ // met:
13
+ //
14
+ // * Redistributions of source code must retain the above copyright
15
+ // notice, this list of conditions and the following disclaimer.
16
+ // * Redistributions in binary form must reproduce the above
17
+ // copyright notice, this list of conditions and the following disclaimer
18
+ // in the documentation and/or other materials provided with the
19
+ // distribution.
20
+ // * Neither the name of Google Inc. nor the names of its
21
+ // contributors may be used to endorse or promote products derived from
22
+ // this software without specific prior written permission.
23
+ //
24
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ //
36
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
37
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
38
+ import { WireType } from "@protobuf-ts/runtime";
39
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
40
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
41
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
42
+ import type { PartialMessage } from "@protobuf-ts/runtime";
43
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
44
+ import { isJsonObject } from "@protobuf-ts/runtime";
45
+ import { typeofJsonValue } from "@protobuf-ts/runtime";
46
+ import type { JsonValue } from "@protobuf-ts/runtime";
47
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
48
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
49
+ import type { JsonObject } from "@protobuf-ts/runtime";
50
+ import { MessageType } from "@protobuf-ts/runtime";
51
+ /**
52
+ * `Struct` represents a structured data value, consisting of fields
53
+ * which map to dynamically typed values. In some languages, `Struct`
54
+ * might be supported by a native representation. For example, in
55
+ * scripting languages like JS a struct is represented as an
56
+ * object. The details of that representation are described together
57
+ * with the proto support for the language.
58
+ *
59
+ * The JSON representation for `Struct` is JSON object.
60
+ *
61
+ * @generated from protobuf message google.protobuf.Struct
62
+ */
63
+ export interface Struct {
64
+ /**
65
+ * Unordered map of dynamically typed values.
66
+ *
67
+ * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1
68
+ */
69
+ fields: {
70
+ [key: string]: Value;
71
+ };
72
+ }
73
+ /**
74
+ * `Value` represents a dynamically typed value which can be either
75
+ * null, a number, a string, a boolean, a recursive struct value, or a
76
+ * list of values. A producer of value is expected to set one of these
77
+ * variants. Absence of any variant indicates an error.
78
+ *
79
+ * The JSON representation for `Value` is JSON value.
80
+ *
81
+ * @generated from protobuf message google.protobuf.Value
82
+ */
83
+ export interface Value {
84
+ /**
85
+ * The kind of value.
86
+ *
87
+ * @generated from protobuf oneof: kind
88
+ */
89
+ kind: {
90
+ oneofKind: "nullValue";
91
+ /**
92
+ * Represents a null value.
93
+ *
94
+ * @generated from protobuf field: google.protobuf.NullValue null_value = 1
95
+ */
96
+ nullValue: NullValue;
97
+ } | {
98
+ oneofKind: "numberValue";
99
+ /**
100
+ * Represents a double value.
101
+ *
102
+ * @generated from protobuf field: double number_value = 2
103
+ */
104
+ numberValue: number;
105
+ } | {
106
+ oneofKind: "stringValue";
107
+ /**
108
+ * Represents a string value.
109
+ *
110
+ * @generated from protobuf field: string string_value = 3
111
+ */
112
+ stringValue: string;
113
+ } | {
114
+ oneofKind: "boolValue";
115
+ /**
116
+ * Represents a boolean value.
117
+ *
118
+ * @generated from protobuf field: bool bool_value = 4
119
+ */
120
+ boolValue: boolean;
121
+ } | {
122
+ oneofKind: "structValue";
123
+ /**
124
+ * Represents a structured value.
125
+ *
126
+ * @generated from protobuf field: google.protobuf.Struct struct_value = 5
127
+ */
128
+ structValue: Struct;
129
+ } | {
130
+ oneofKind: "listValue";
131
+ /**
132
+ * Represents a repeated `Value`.
133
+ *
134
+ * @generated from protobuf field: google.protobuf.ListValue list_value = 6
135
+ */
136
+ listValue: ListValue;
137
+ } | {
138
+ oneofKind: undefined;
139
+ };
140
+ }
141
+ /**
142
+ * `ListValue` is a wrapper around a repeated field of values.
143
+ *
144
+ * The JSON representation for `ListValue` is JSON array.
145
+ *
146
+ * @generated from protobuf message google.protobuf.ListValue
147
+ */
148
+ export interface ListValue {
149
+ /**
150
+ * Repeated field of dynamically typed values.
151
+ *
152
+ * @generated from protobuf field: repeated google.protobuf.Value values = 1
153
+ */
154
+ values: Value[];
155
+ }
156
+ /**
157
+ * `NullValue` is a singleton enumeration to represent the null value for the
158
+ * `Value` type union.
159
+ *
160
+ * The JSON representation for `NullValue` is JSON `null`.
161
+ *
162
+ * @generated from protobuf enum google.protobuf.NullValue
163
+ */
164
+ export enum NullValue {
165
+ /**
166
+ * Null value.
167
+ *
168
+ * @generated from protobuf enum value: NULL_VALUE = 0;
169
+ */
170
+ NULL_VALUE = 0
171
+ }
172
+ // @generated message type with reflection information, may provide speed optimized methods
173
+ class Struct$Type extends MessageType<Struct> {
174
+ constructor() {
175
+ super("google.protobuf.Struct", [
176
+ { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } }
177
+ ]);
178
+ }
179
+ /**
180
+ * Encode `Struct` to JSON object.
181
+ */
182
+ internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
183
+ let json: JsonObject = {};
184
+ for (let [k, v] of Object.entries(message.fields)) {
185
+ json[k] = Value.toJson(v);
186
+ }
187
+ return json;
188
+ }
189
+ /**
190
+ * Decode `Struct` from JSON object.
191
+ */
192
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
193
+ if (!isJsonObject(json))
194
+ throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + ".");
195
+ if (!target)
196
+ target = this.create();
197
+ for (let [k, v] of globalThis.Object.entries(json)) {
198
+ target.fields[k] = Value.fromJson(v);
199
+ }
200
+ return target;
201
+ }
202
+ create(value?: PartialMessage<Struct>): Struct {
203
+ const message = globalThis.Object.create((this.messagePrototype!));
204
+ message.fields = {};
205
+ if (value !== undefined)
206
+ reflectionMergePartial<Struct>(this, message, value);
207
+ return message;
208
+ }
209
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
210
+ let message = target ?? this.create(), end = reader.pos + length;
211
+ while (reader.pos < end) {
212
+ let [fieldNo, wireType] = reader.tag();
213
+ switch (fieldNo) {
214
+ case /* map<string, google.protobuf.Value> fields */ 1:
215
+ this.binaryReadMap1(message.fields, reader, options);
216
+ break;
217
+ default:
218
+ let u = options.readUnknownField;
219
+ if (u === "throw")
220
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
221
+ let d = reader.skip(wireType);
222
+ if (u !== false)
223
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
224
+ }
225
+ }
226
+ return message;
227
+ }
228
+ private binaryReadMap1(map: Struct["fields"], reader: IBinaryReader, options: BinaryReadOptions): void {
229
+ let len = reader.uint32(), end = reader.pos + len, key: keyof Struct["fields"] | undefined, val: Struct["fields"][any] | undefined;
230
+ while (reader.pos < end) {
231
+ let [fieldNo, wireType] = reader.tag();
232
+ switch (fieldNo) {
233
+ case 1:
234
+ key = reader.string();
235
+ break;
236
+ case 2:
237
+ val = Value.internalBinaryRead(reader, reader.uint32(), options);
238
+ break;
239
+ default: throw new globalThis.Error("unknown map entry field for google.protobuf.Struct.fields");
240
+ }
241
+ }
242
+ map[key ?? ""] = val ?? Value.create();
243
+ }
244
+ internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
245
+ /* map<string, google.protobuf.Value> fields = 1; */
246
+ for (let k of globalThis.Object.keys(message.fields)) {
247
+ writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
248
+ writer.tag(2, WireType.LengthDelimited).fork();
249
+ Value.internalBinaryWrite(message.fields[k], writer, options);
250
+ writer.join().join();
251
+ }
252
+ let u = options.writeUnknownFields;
253
+ if (u !== false)
254
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
255
+ return writer;
256
+ }
257
+ }
258
+ /**
259
+ * @generated MessageType for protobuf message google.protobuf.Struct
260
+ */
261
+ export const Struct = new Struct$Type();
262
+ // @generated message type with reflection information, may provide speed optimized methods
263
+ class Value$Type extends MessageType<Value> {
264
+ constructor() {
265
+ super("google.protobuf.Value", [
266
+ { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] },
267
+ { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ },
268
+ { no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ },
269
+ { no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ },
270
+ { no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
271
+ { no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
272
+ ]);
273
+ }
274
+ /**
275
+ * Encode `Value` to JSON value.
276
+ */
277
+ internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
278
+ if (message.kind.oneofKind === undefined)
279
+ throw new globalThis.Error();
280
+ switch (message.kind.oneofKind) {
281
+ case undefined: throw new globalThis.Error();
282
+ case "boolValue": return message.kind.boolValue;
283
+ case "nullValue": return null;
284
+ case "numberValue":
285
+ let numberValue = message.kind.numberValue;
286
+ if (typeof numberValue == "number" && !Number.isFinite(numberValue))
287
+ throw new globalThis.Error();
288
+ return numberValue;
289
+ case "stringValue": return message.kind.stringValue;
290
+ case "listValue":
291
+ let listValueField = this.fields.find(f => f.no === 6);
292
+ if (listValueField?.kind !== "message")
293
+ throw new globalThis.Error();
294
+ return listValueField.T().toJson(message.kind.listValue);
295
+ case "structValue":
296
+ let structValueField = this.fields.find(f => f.no === 5);
297
+ if (structValueField?.kind !== "message")
298
+ throw new globalThis.Error();
299
+ return structValueField.T().toJson(message.kind.structValue);
300
+ }
301
+ }
302
+ /**
303
+ * Decode `Value` from JSON value.
304
+ */
305
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
306
+ if (!target)
307
+ target = this.create();
308
+ switch (typeof json) {
309
+ case "number":
310
+ target.kind = { oneofKind: "numberValue", numberValue: json };
311
+ break;
312
+ case "string":
313
+ target.kind = { oneofKind: "stringValue", stringValue: json };
314
+ break;
315
+ case "boolean":
316
+ target.kind = { oneofKind: "boolValue", boolValue: json };
317
+ break;
318
+ case "object":
319
+ if (json === null) {
320
+ target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE };
321
+ }
322
+ else if (globalThis.Array.isArray(json)) {
323
+ target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) };
324
+ }
325
+ else {
326
+ target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
327
+ }
328
+ break;
329
+ default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
330
+ }
331
+ return target;
332
+ }
333
+ create(value?: PartialMessage<Value>): Value {
334
+ const message = globalThis.Object.create((this.messagePrototype!));
335
+ message.kind = { oneofKind: undefined };
336
+ if (value !== undefined)
337
+ reflectionMergePartial<Value>(this, message, value);
338
+ return message;
339
+ }
340
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
341
+ let message = target ?? this.create(), end = reader.pos + length;
342
+ while (reader.pos < end) {
343
+ let [fieldNo, wireType] = reader.tag();
344
+ switch (fieldNo) {
345
+ case /* google.protobuf.NullValue null_value */ 1:
346
+ message.kind = {
347
+ oneofKind: "nullValue",
348
+ nullValue: reader.int32()
349
+ };
350
+ break;
351
+ case /* double number_value */ 2:
352
+ message.kind = {
353
+ oneofKind: "numberValue",
354
+ numberValue: reader.double()
355
+ };
356
+ break;
357
+ case /* string string_value */ 3:
358
+ message.kind = {
359
+ oneofKind: "stringValue",
360
+ stringValue: reader.string()
361
+ };
362
+ break;
363
+ case /* bool bool_value */ 4:
364
+ message.kind = {
365
+ oneofKind: "boolValue",
366
+ boolValue: reader.bool()
367
+ };
368
+ break;
369
+ case /* google.protobuf.Struct struct_value */ 5:
370
+ message.kind = {
371
+ oneofKind: "structValue",
372
+ structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
373
+ };
374
+ break;
375
+ case /* google.protobuf.ListValue list_value */ 6:
376
+ message.kind = {
377
+ oneofKind: "listValue",
378
+ listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
379
+ };
380
+ break;
381
+ default:
382
+ let u = options.readUnknownField;
383
+ if (u === "throw")
384
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
385
+ let d = reader.skip(wireType);
386
+ if (u !== false)
387
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
388
+ }
389
+ }
390
+ return message;
391
+ }
392
+ internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
393
+ /* google.protobuf.NullValue null_value = 1; */
394
+ if (message.kind.oneofKind === "nullValue")
395
+ writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
396
+ /* double number_value = 2; */
397
+ if (message.kind.oneofKind === "numberValue")
398
+ writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
399
+ /* string string_value = 3; */
400
+ if (message.kind.oneofKind === "stringValue")
401
+ writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
402
+ /* bool bool_value = 4; */
403
+ if (message.kind.oneofKind === "boolValue")
404
+ writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
405
+ /* google.protobuf.Struct struct_value = 5; */
406
+ if (message.kind.oneofKind === "structValue")
407
+ Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
408
+ /* google.protobuf.ListValue list_value = 6; */
409
+ if (message.kind.oneofKind === "listValue")
410
+ ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
411
+ let u = options.writeUnknownFields;
412
+ if (u !== false)
413
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
414
+ return writer;
415
+ }
416
+ }
417
+ /**
418
+ * @generated MessageType for protobuf message google.protobuf.Value
419
+ */
420
+ export const Value = new Value$Type();
421
+ // @generated message type with reflection information, may provide speed optimized methods
422
+ class ListValue$Type extends MessageType<ListValue> {
423
+ constructor() {
424
+ super("google.protobuf.ListValue", [
425
+ { no: 1, name: "values", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Value }
426
+ ]);
427
+ }
428
+ /**
429
+ * Encode `ListValue` to JSON array.
430
+ */
431
+ internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
432
+ return message.values.map(v => Value.toJson(v));
433
+ }
434
+ /**
435
+ * Decode `ListValue` from JSON array.
436
+ */
437
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
438
+ if (!globalThis.Array.isArray(json))
439
+ throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
440
+ if (!target)
441
+ target = this.create();
442
+ let values = json.map(v => Value.fromJson(v));
443
+ target.values.push(...values);
444
+ return target;
445
+ }
446
+ create(value?: PartialMessage<ListValue>): ListValue {
447
+ const message = globalThis.Object.create((this.messagePrototype!));
448
+ message.values = [];
449
+ if (value !== undefined)
450
+ reflectionMergePartial<ListValue>(this, message, value);
451
+ return message;
452
+ }
453
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
454
+ let message = target ?? this.create(), end = reader.pos + length;
455
+ while (reader.pos < end) {
456
+ let [fieldNo, wireType] = reader.tag();
457
+ switch (fieldNo) {
458
+ case /* repeated google.protobuf.Value values */ 1:
459
+ message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
460
+ break;
461
+ default:
462
+ let u = options.readUnknownField;
463
+ if (u === "throw")
464
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
465
+ let d = reader.skip(wireType);
466
+ if (u !== false)
467
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
468
+ }
469
+ }
470
+ return message;
471
+ }
472
+ internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
473
+ /* repeated google.protobuf.Value values = 1; */
474
+ for (let i = 0; i < message.values.length; i++)
475
+ Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
476
+ let u = options.writeUnknownFields;
477
+ if (u !== false)
478
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
479
+ return writer;
480
+ }
481
+ }
482
+ /**
483
+ * @generated MessageType for protobuf message google.protobuf.ListValue
484
+ */
485
+ export const ListValue = new ListValue$Type();
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  //
5
6
  // Protocol Buffers - Google's data interchange format
@@ -146,7 +147,7 @@ export interface Timestamp {
146
147
  * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
147
148
  * 9999-12-31T23:59:59Z inclusive.
148
149
  *
149
- * @generated from protobuf field: int64 seconds = 1;
150
+ * @generated from protobuf field: int64 seconds = 1
150
151
  */
151
152
  seconds: number;
152
153
  /**
@@ -155,7 +156,7 @@ export interface Timestamp {
155
156
  * that count forward in time. Must be from 0 to 999,999,999
156
157
  * inclusive.
157
158
  *
158
- * @generated from protobuf field: int32 nanos = 2;
159
+ * @generated from protobuf field: int32 nanos = 2
159
160
  */
160
161
  nanos: number;
161
162
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fivenet-app/gen",
3
3
  "private": false,
4
- "version": "2025.5.3",
4
+ "version": "2026.3.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "homepage": "https://fivenet.app",
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/fivenet-app/fivenet.git"
11
11
  },
12
12
  "devDependencies": {
13
- "@protobuf-ts/plugin": "2.10.0",
14
- "google-protobuf": "3.21.4"
13
+ "@protobuf-ts/plugin": "2.11.1",
14
+ "google-protobuf": "4.0.2"
15
15
  }
16
16
  }