@fivenet-app/gen 2025.5.2 → 2025.9.1

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 (169) hide show
  1. package/buf/validate/validate.ts +11301 -0
  2. package/clients.ts +157 -154
  3. package/codegen/dbscanner/dbscanner.ts +91 -0
  4. package/codegen/perms/perms.ts +208 -0
  5. package/codegen/sanitizer/sanitizer.ts +80 -0
  6. package/google/protobuf/any.ts +4 -3
  7. package/google/protobuf/descriptor.ts +393 -239
  8. package/google/protobuf/duration.ts +4 -3
  9. package/google/protobuf/struct.ts +485 -0
  10. package/google/protobuf/timestamp.ts +4 -3
  11. package/package.json +3 -3
  12. package/perms.ts +85 -159
  13. package/resources/accounts/accounts.ts +26 -25
  14. package/resources/accounts/oauth2.ts +30 -29
  15. package/resources/audit/audit.ts +36 -35
  16. package/resources/calendar/access.ts +49 -48
  17. package/resources/calendar/calendar.ts +122 -126
  18. package/resources/centrum/access.ts +345 -0
  19. package/resources/centrum/attributes.ts +8 -11
  20. package/resources/centrum/dispatchers.ts +149 -0
  21. package/resources/centrum/dispatches.ts +252 -115
  22. package/resources/centrum/settings.ts +384 -34
  23. package/resources/centrum/units.ts +112 -92
  24. package/resources/centrum/units_access.ts +54 -55
  25. package/resources/clientconfig/clientconfig.ts +890 -0
  26. package/resources/collab/collab.ts +817 -0
  27. package/resources/common/content/content.ts +113 -30
  28. package/resources/common/cron/cron.ts +43 -31
  29. package/resources/common/database/database.ts +92 -35
  30. package/resources/common/error.ts +17 -16
  31. package/resources/common/grpcws/grpcws.ts +24 -23
  32. package/resources/common/i18n.ts +20 -24
  33. package/resources/common/id_mapping.ts +69 -0
  34. package/resources/common/tests/objects.ts +4 -3
  35. package/resources/common/uuid.ts +4 -3
  36. package/resources/discord/discord.ts +209 -0
  37. package/resources/documents/access.ts +52 -53
  38. package/resources/documents/activity.ts +235 -58
  39. package/resources/documents/category.ts +20 -27
  40. package/resources/documents/comment.ts +26 -25
  41. package/resources/documents/documents.ts +335 -262
  42. package/resources/documents/pins.ts +127 -0
  43. package/resources/documents/requests.ts +31 -30
  44. package/resources/documents/signoff.ts +55 -0
  45. package/resources/documents/state.ts +69 -0
  46. package/resources/documents/templates.ts +119 -136
  47. package/resources/documents/workflow.ts +35 -24
  48. package/resources/file/file.ts +152 -0
  49. package/{services/settings → resources/file}/filestore.ts +179 -165
  50. package/resources/file/meta.ts +148 -0
  51. package/resources/jobs/activity.ts +39 -42
  52. package/resources/jobs/colleagues.ts +67 -60
  53. package/resources/jobs/conduct.ts +29 -30
  54. package/resources/jobs/job_props.ts +46 -48
  55. package/resources/jobs/job_settings.ts +45 -52
  56. package/resources/jobs/jobs.ts +14 -13
  57. package/resources/jobs/labels.ts +21 -22
  58. package/resources/jobs/timeclock.ts +26 -25
  59. package/resources/laws/laws.ts +40 -49
  60. package/resources/livemap/coords.ts +81 -0
  61. package/resources/livemap/heatmap.ts +93 -0
  62. package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
  63. package/resources/livemap/user_marker.ts +298 -0
  64. package/resources/mailer/access.ts +75 -74
  65. package/resources/mailer/email.ts +24 -27
  66. package/resources/mailer/events.ts +25 -24
  67. package/resources/mailer/message.ts +45 -50
  68. package/resources/mailer/settings.ts +12 -15
  69. package/resources/mailer/template.ts +25 -28
  70. package/resources/mailer/thread.ts +70 -71
  71. package/resources/notifications/client_view.ts +239 -0
  72. package/resources/notifications/events.ts +50 -101
  73. package/resources/notifications/notifications.ts +52 -57
  74. package/resources/permissions/attributes.ts +63 -206
  75. package/resources/permissions/events.ts +149 -0
  76. package/resources/permissions/permissions.ts +103 -34
  77. package/resources/qualifications/access.ts +27 -26
  78. package/resources/qualifications/exam.ts +188 -126
  79. package/resources/qualifications/qualifications.ts +370 -303
  80. package/resources/settings/banner.ts +14 -21
  81. package/resources/settings/config.ts +163 -79
  82. package/resources/settings/perms.ts +151 -0
  83. package/resources/settings/status.ts +533 -0
  84. package/resources/stats/stats.ts +3 -2
  85. package/resources/sync/activity.ts +24 -23
  86. package/resources/sync/data.ts +94 -26
  87. package/resources/timestamp/timestamp.ts +3 -2
  88. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  89. package/resources/userinfo/user_info.ts +464 -0
  90. package/resources/users/activity.ts +80 -85
  91. package/resources/users/labels.ts +18 -21
  92. package/resources/users/licenses.ts +9 -8
  93. package/resources/users/props.ts +61 -51
  94. package/resources/users/users.ts +100 -78
  95. package/resources/vehicles/activity.ts +231 -0
  96. package/resources/vehicles/props.ts +103 -0
  97. package/resources/vehicles/vehicles.ts +28 -15
  98. package/resources/wiki/access.ts +49 -48
  99. package/resources/wiki/activity.ts +133 -51
  100. package/resources/wiki/page.ts +134 -87
  101. package/services/auth/auth.client.ts +24 -27
  102. package/services/auth/auth.ts +222 -195
  103. package/services/calendar/calendar.client.ts +32 -91
  104. package/services/calendar/calendar.ts +110 -109
  105. package/services/centrum/centrum.client.ts +97 -137
  106. package/services/centrum/centrum.ts +701 -298
  107. package/services/citizens/citizens.client.ts +70 -39
  108. package/services/citizens/citizens.ts +183 -93
  109. package/services/completor/completor.client.ts +16 -35
  110. package/services/completor/completor.ts +65 -44
  111. package/services/documents/collab.client.ts +46 -0
  112. package/services/documents/collab.ts +13 -0
  113. package/services/documents/documents.client.ts +88 -217
  114. package/services/documents/documents.ts +490 -508
  115. package/services/filestore/filestore.client.ts +86 -0
  116. package/services/filestore/filestore.ts +262 -0
  117. package/services/jobs/conduct.client.ts +10 -25
  118. package/services/jobs/conduct.ts +36 -35
  119. package/services/jobs/jobs.client.ts +22 -61
  120. package/services/jobs/jobs.ts +108 -91
  121. package/services/jobs/timeclock.client.ts +8 -19
  122. package/services/jobs/timeclock.ts +47 -46
  123. package/services/livemap/livemap.client.ts +8 -19
  124. package/services/livemap/livemap.ts +290 -119
  125. package/services/mailer/mailer.client.ts +44 -127
  126. package/services/mailer/mailer.ts +213 -216
  127. package/services/notifications/notifications.client.ts +65 -0
  128. package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
  129. package/services/qualifications/qualifications.client.ts +46 -91
  130. package/services/qualifications/qualifications.ts +181 -175
  131. package/services/settings/accounts.client.ts +10 -25
  132. package/services/settings/accounts.ts +64 -41
  133. package/services/settings/config.client.ts +6 -13
  134. package/services/settings/config.ts +8 -7
  135. package/services/settings/cron.client.ts +4 -7
  136. package/services/settings/cron.ts +4 -3
  137. package/services/settings/laws.client.ts +10 -25
  138. package/services/settings/laws.ts +29 -28
  139. package/services/settings/settings.client.ts +57 -103
  140. package/services/settings/settings.ts +190 -607
  141. package/services/settings/system.client.ts +90 -0
  142. package/services/settings/system.ts +618 -0
  143. package/services/stats/stats.client.ts +4 -3
  144. package/services/stats/stats.ts +4 -3
  145. package/services/sync/sync.client.ts +16 -15
  146. package/services/sync/sync.ts +82 -52
  147. package/services/vehicles/vehicles.client.ts +17 -7
  148. package/services/vehicles/vehicles.ts +169 -24
  149. package/services/wiki/collab.client.ts +46 -0
  150. package/services/wiki/collab.ts +13 -0
  151. package/services/wiki/wiki.client.ts +28 -37
  152. package/services/wiki/wiki.ts +93 -63
  153. package/svcs.ts +79 -103
  154. package/resources/centrum/disponents.ts +0 -81
  155. package/resources/filestore/file.ts +0 -204
  156. package/resources/internet/access.ts +0 -358
  157. package/resources/internet/ads.ts +0 -257
  158. package/resources/internet/domain.ts +0 -328
  159. package/resources/internet/page.ts +0 -428
  160. package/resources/internet/search.ts +0 -128
  161. package/resources/livemap/tracker.ts +0 -81
  162. package/services/internet/ads.client.ts +0 -41
  163. package/services/internet/ads.ts +0 -145
  164. package/services/internet/domain.client.ts +0 -109
  165. package/services/internet/domain.ts +0 -658
  166. package/services/internet/internet.client.ts +0 -58
  167. package/services/internet/internet.ts +0 -268
  168. package/services/notificator/notificator.client.ts +0 -76
  169. 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.2",
4
+ "version": "2025.9.1",
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.0"
15
15
  }
16
16
  }