@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
@@ -0,0 +1,245 @@
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 "services/documents/stats.proto" (package "services.documents", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
6
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
+ import { WireType } from "@protobuf-ts/runtime";
9
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
10
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
11
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
+ import type { PartialMessage } from "@protobuf-ts/runtime";
13
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
+ import { MessageType } from "@protobuf-ts/runtime";
15
+ import { PeriodSeriesValue } from "../../resources/stats/stats";
16
+ import { CategoryValue } from "../../resources/stats/stats";
17
+ import { DailyValue } from "../../resources/stats/stats";
18
+ import { KeyValue } from "../../resources/stats/stats";
19
+ import { StatsCategory } from "../../resources/stats/stats";
20
+ import { StatsPeriod } from "../../resources/stats/stats";
21
+ import { Timestamp } from "../../resources/timestamp/timestamp";
22
+ /**
23
+ * @generated from protobuf message services.documents.GetStatsRequest
24
+ */
25
+ export interface GetStatsRequest {
26
+ /**
27
+ * @generated from protobuf field: resources.timestamp.Timestamp start = 1
28
+ */
29
+ start?: Timestamp;
30
+ /**
31
+ * @generated from protobuf field: resources.timestamp.Timestamp end = 2
32
+ */
33
+ end?: Timestamp;
34
+ /**
35
+ * @generated from protobuf field: resources.stats.StatsPeriod period = 3
36
+ */
37
+ period: StatsPeriod;
38
+ /**
39
+ * @generated from protobuf field: resources.stats.StatsCategory category = 4
40
+ */
41
+ category: StatsCategory;
42
+ }
43
+ /**
44
+ * @generated from protobuf message services.documents.GetStatsResponse
45
+ */
46
+ export interface GetStatsResponse {
47
+ /**
48
+ * @generated from protobuf field: repeated resources.stats.KeyValue top_laws = 1
49
+ */
50
+ topLaws: KeyValue[];
51
+ /**
52
+ * @generated from protobuf field: repeated resources.stats.DailyValue fines_over_time = 2
53
+ */
54
+ finesOverTime: DailyValue[];
55
+ /**
56
+ * @generated from protobuf field: repeated resources.stats.CategoryValue documents_by_category = 3
57
+ */
58
+ documentsByCategory: CategoryValue[];
59
+ /**
60
+ * @generated from protobuf field: repeated resources.stats.DailyValue period_values = 4
61
+ */
62
+ periodValues: DailyValue[];
63
+ /**
64
+ * @generated from protobuf field: repeated resources.stats.PeriodSeriesValue period_series_values = 5
65
+ */
66
+ periodSeriesValues: PeriodSeriesValue[];
67
+ /**
68
+ * @generated from protobuf field: int64 total_value = 6
69
+ */
70
+ totalValue: number;
71
+ /**
72
+ * @generated from protobuf field: double average_value = 7
73
+ */
74
+ averageValue: number;
75
+ }
76
+ // @generated message type with reflection information, may provide speed optimized methods
77
+ class GetStatsRequest$Type extends MessageType<GetStatsRequest> {
78
+ constructor() {
79
+ super("services.documents.GetStatsRequest", [
80
+ { no: 1, name: "start", kind: "message", T: () => Timestamp },
81
+ { no: 2, name: "end", kind: "message", T: () => Timestamp },
82
+ { no: 3, name: "period", kind: "enum", T: () => ["resources.stats.StatsPeriod", StatsPeriod, "STATS_PERIOD_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
83
+ { no: 4, name: "category", kind: "enum", T: () => ["resources.stats.StatsCategory", StatsCategory, "STATS_CATEGORY_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
84
+ ]);
85
+ }
86
+ create(value?: PartialMessage<GetStatsRequest>): GetStatsRequest {
87
+ const message = globalThis.Object.create((this.messagePrototype!));
88
+ message.period = 0;
89
+ message.category = 0;
90
+ if (value !== undefined)
91
+ reflectionMergePartial<GetStatsRequest>(this, message, value);
92
+ return message;
93
+ }
94
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetStatsRequest): GetStatsRequest {
95
+ let message = target ?? this.create(), end = reader.pos + length;
96
+ while (reader.pos < end) {
97
+ let [fieldNo, wireType] = reader.tag();
98
+ switch (fieldNo) {
99
+ case /* resources.timestamp.Timestamp start */ 1:
100
+ message.start = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.start);
101
+ break;
102
+ case /* resources.timestamp.Timestamp end */ 2:
103
+ message.end = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.end);
104
+ break;
105
+ case /* resources.stats.StatsPeriod period */ 3:
106
+ message.period = reader.int32();
107
+ break;
108
+ case /* resources.stats.StatsCategory category */ 4:
109
+ message.category = reader.int32();
110
+ break;
111
+ default:
112
+ let u = options.readUnknownField;
113
+ if (u === "throw")
114
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
115
+ let d = reader.skip(wireType);
116
+ if (u !== false)
117
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
118
+ }
119
+ }
120
+ return message;
121
+ }
122
+ internalBinaryWrite(message: GetStatsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
123
+ /* resources.timestamp.Timestamp start = 1; */
124
+ if (message.start)
125
+ Timestamp.internalBinaryWrite(message.start, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
126
+ /* resources.timestamp.Timestamp end = 2; */
127
+ if (message.end)
128
+ Timestamp.internalBinaryWrite(message.end, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
129
+ /* resources.stats.StatsPeriod period = 3; */
130
+ if (message.period !== 0)
131
+ writer.tag(3, WireType.Varint).int32(message.period);
132
+ /* resources.stats.StatsCategory category = 4; */
133
+ if (message.category !== 0)
134
+ writer.tag(4, WireType.Varint).int32(message.category);
135
+ let u = options.writeUnknownFields;
136
+ if (u !== false)
137
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
138
+ return writer;
139
+ }
140
+ }
141
+ /**
142
+ * @generated MessageType for protobuf message services.documents.GetStatsRequest
143
+ */
144
+ export const GetStatsRequest = new GetStatsRequest$Type();
145
+ // @generated message type with reflection information, may provide speed optimized methods
146
+ class GetStatsResponse$Type extends MessageType<GetStatsResponse> {
147
+ constructor() {
148
+ super("services.documents.GetStatsResponse", [
149
+ { no: 1, name: "top_laws", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => KeyValue },
150
+ { no: 2, name: "fines_over_time", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DailyValue },
151
+ { no: 3, name: "documents_by_category", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CategoryValue },
152
+ { no: 4, name: "period_values", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DailyValue },
153
+ { no: 5, name: "period_series_values", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PeriodSeriesValue },
154
+ { no: 6, name: "total_value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
155
+ { no: 7, name: "average_value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }
156
+ ]);
157
+ }
158
+ create(value?: PartialMessage<GetStatsResponse>): GetStatsResponse {
159
+ const message = globalThis.Object.create((this.messagePrototype!));
160
+ message.topLaws = [];
161
+ message.finesOverTime = [];
162
+ message.documentsByCategory = [];
163
+ message.periodValues = [];
164
+ message.periodSeriesValues = [];
165
+ message.totalValue = 0;
166
+ message.averageValue = 0;
167
+ if (value !== undefined)
168
+ reflectionMergePartial<GetStatsResponse>(this, message, value);
169
+ return message;
170
+ }
171
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetStatsResponse): GetStatsResponse {
172
+ let message = target ?? this.create(), end = reader.pos + length;
173
+ while (reader.pos < end) {
174
+ let [fieldNo, wireType] = reader.tag();
175
+ switch (fieldNo) {
176
+ case /* repeated resources.stats.KeyValue top_laws */ 1:
177
+ message.topLaws.push(KeyValue.internalBinaryRead(reader, reader.uint32(), options));
178
+ break;
179
+ case /* repeated resources.stats.DailyValue fines_over_time */ 2:
180
+ message.finesOverTime.push(DailyValue.internalBinaryRead(reader, reader.uint32(), options));
181
+ break;
182
+ case /* repeated resources.stats.CategoryValue documents_by_category */ 3:
183
+ message.documentsByCategory.push(CategoryValue.internalBinaryRead(reader, reader.uint32(), options));
184
+ break;
185
+ case /* repeated resources.stats.DailyValue period_values */ 4:
186
+ message.periodValues.push(DailyValue.internalBinaryRead(reader, reader.uint32(), options));
187
+ break;
188
+ case /* repeated resources.stats.PeriodSeriesValue period_series_values */ 5:
189
+ message.periodSeriesValues.push(PeriodSeriesValue.internalBinaryRead(reader, reader.uint32(), options));
190
+ break;
191
+ case /* int64 total_value */ 6:
192
+ message.totalValue = reader.int64().toNumber();
193
+ break;
194
+ case /* double average_value */ 7:
195
+ message.averageValue = reader.double();
196
+ break;
197
+ default:
198
+ let u = options.readUnknownField;
199
+ if (u === "throw")
200
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
201
+ let d = reader.skip(wireType);
202
+ if (u !== false)
203
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
204
+ }
205
+ }
206
+ return message;
207
+ }
208
+ internalBinaryWrite(message: GetStatsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
209
+ /* repeated resources.stats.KeyValue top_laws = 1; */
210
+ for (let i = 0; i < message.topLaws.length; i++)
211
+ KeyValue.internalBinaryWrite(message.topLaws[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
212
+ /* repeated resources.stats.DailyValue fines_over_time = 2; */
213
+ for (let i = 0; i < message.finesOverTime.length; i++)
214
+ DailyValue.internalBinaryWrite(message.finesOverTime[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
215
+ /* repeated resources.stats.CategoryValue documents_by_category = 3; */
216
+ for (let i = 0; i < message.documentsByCategory.length; i++)
217
+ CategoryValue.internalBinaryWrite(message.documentsByCategory[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
218
+ /* repeated resources.stats.DailyValue period_values = 4; */
219
+ for (let i = 0; i < message.periodValues.length; i++)
220
+ DailyValue.internalBinaryWrite(message.periodValues[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
221
+ /* repeated resources.stats.PeriodSeriesValue period_series_values = 5; */
222
+ for (let i = 0; i < message.periodSeriesValues.length; i++)
223
+ PeriodSeriesValue.internalBinaryWrite(message.periodSeriesValues[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
224
+ /* int64 total_value = 6; */
225
+ if (message.totalValue !== 0)
226
+ writer.tag(6, WireType.Varint).int64(message.totalValue);
227
+ /* double average_value = 7; */
228
+ if (message.averageValue !== 0)
229
+ writer.tag(7, WireType.Bit64).double(message.averageValue);
230
+ let u = options.writeUnknownFields;
231
+ if (u !== false)
232
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
233
+ return writer;
234
+ }
235
+ }
236
+ /**
237
+ * @generated MessageType for protobuf message services.documents.GetStatsResponse
238
+ */
239
+ export const GetStatsResponse = new GetStatsResponse$Type();
240
+ /**
241
+ * @generated ServiceType for protobuf service services.documents.StatsService
242
+ */
243
+ export const StatsService = new ServiceType("services.documents.StatsService", [
244
+ { name: "GetStats", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Categories", type: "ATTRIBUTE_TYPE_STRING_LIST", validStringList: ["PenaltyCalculator"] }] } }, I: GetStatsRequest, O: GetStatsResponse }
245
+ ], { "codegen.perms.perms_svc": { order: 58, icon: "i-mdi-graph-box-multiple-outline" } });
@@ -0,0 +1,86 @@
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 "services/filestore/filestore.proto" (package "services.filestore", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
+ import { FilestoreService } from "./filestore";
8
+ import type { DeleteFileByPathResponse } from "./filestore";
9
+ import type { DeleteFileByPathRequest } from "./filestore";
10
+ import type { DeleteFileResponse } from "../../resources/file/filestore";
11
+ import type { DeleteFileRequest } from "../../resources/file/filestore";
12
+ import type { ListFilesResponse } from "./filestore";
13
+ import type { ListFilesRequest } from "./filestore";
14
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
15
+ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
16
+ import type { UploadFileResponse } from "../../resources/file/filestore";
17
+ import type { UploadFileRequest } from "../../resources/file/filestore";
18
+ import type { ClientStreamingCall } from "@protobuf-ts/runtime-rpc";
19
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
20
+ /**
21
+ * @generated from protobuf service services.filestore.FilestoreService
22
+ */
23
+ export interface IFilestoreServiceClient {
24
+ /**
25
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
26
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
27
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
28
+ *
29
+ * @generated from protobuf rpc: Upload
30
+ */
31
+ upload(options?: RpcOptions): ClientStreamingCall<UploadFileRequest, UploadFileResponse>;
32
+ /**
33
+ * @generated from protobuf rpc: ListFiles
34
+ */
35
+ listFiles(input: ListFilesRequest, options?: RpcOptions): UnaryCall<ListFilesRequest, ListFilesResponse>;
36
+ /**
37
+ * @generated from protobuf rpc: DeleteFile
38
+ */
39
+ deleteFile(input: DeleteFileRequest, options?: RpcOptions): UnaryCall<DeleteFileRequest, DeleteFileResponse>;
40
+ /**
41
+ * @generated from protobuf rpc: DeleteFileByPath
42
+ */
43
+ deleteFileByPath(input: DeleteFileByPathRequest, options?: RpcOptions): UnaryCall<DeleteFileByPathRequest, DeleteFileByPathResponse>;
44
+ }
45
+ /**
46
+ * @generated from protobuf service services.filestore.FilestoreService
47
+ */
48
+ export class FilestoreServiceClient implements IFilestoreServiceClient, ServiceInfo {
49
+ typeName = FilestoreService.typeName;
50
+ methods = FilestoreService.methods;
51
+ options = FilestoreService.options;
52
+ constructor(private readonly _transport: RpcTransport) {
53
+ }
54
+ /**
55
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
56
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
57
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
58
+ *
59
+ * @generated from protobuf rpc: Upload
60
+ */
61
+ upload(options?: RpcOptions): ClientStreamingCall<UploadFileRequest, UploadFileResponse> {
62
+ const method = this.methods[0], opt = this._transport.mergeOptions(options);
63
+ return stackIntercept<UploadFileRequest, UploadFileResponse>("clientStreaming", this._transport, method, opt);
64
+ }
65
+ /**
66
+ * @generated from protobuf rpc: ListFiles
67
+ */
68
+ listFiles(input: ListFilesRequest, options?: RpcOptions): UnaryCall<ListFilesRequest, ListFilesResponse> {
69
+ const method = this.methods[1], opt = this._transport.mergeOptions(options);
70
+ return stackIntercept<ListFilesRequest, ListFilesResponse>("unary", this._transport, method, opt, input);
71
+ }
72
+ /**
73
+ * @generated from protobuf rpc: DeleteFile
74
+ */
75
+ deleteFile(input: DeleteFileRequest, options?: RpcOptions): UnaryCall<DeleteFileRequest, DeleteFileResponse> {
76
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
77
+ return stackIntercept<DeleteFileRequest, DeleteFileResponse>("unary", this._transport, method, opt, input);
78
+ }
79
+ /**
80
+ * @generated from protobuf rpc: DeleteFileByPath
81
+ */
82
+ deleteFileByPath(input: DeleteFileByPathRequest, options?: RpcOptions): UnaryCall<DeleteFileByPathRequest, DeleteFileByPathResponse> {
83
+ const method = this.methods[3], opt = this._transport.mergeOptions(options);
84
+ return stackIntercept<DeleteFileByPathRequest, DeleteFileByPathResponse>("unary", this._transport, method, opt, input);
85
+ }
86
+ }
@@ -0,0 +1,262 @@
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 "services/filestore/filestore.proto" (package "services.filestore", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import { DeleteFileResponse } from "../../resources/file/filestore";
6
+ import { DeleteFileRequest } from "../../resources/file/filestore";
7
+ import { UploadFileResponse } from "../../resources/file/filestore";
8
+ import { UploadFileRequest } from "../../resources/file/filestore";
9
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
10
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
11
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
12
+ import { WireType } from "@protobuf-ts/runtime";
13
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
14
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
15
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
16
+ import type { PartialMessage } from "@protobuf-ts/runtime";
17
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
18
+ import { MessageType } from "@protobuf-ts/runtime";
19
+ import { File } from "../../resources/file/file";
20
+ import { PaginationResponse } from "../../resources/common/database/database";
21
+ import { PaginationRequest } from "../../resources/common/database/database";
22
+ /**
23
+ * @generated from protobuf message services.filestore.ListFilesRequest
24
+ */
25
+ export interface ListFilesRequest {
26
+ /**
27
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
28
+ */
29
+ pagination?: PaginationRequest;
30
+ /**
31
+ * @generated from protobuf field: optional string path = 2
32
+ */
33
+ path?: string;
34
+ }
35
+ /**
36
+ * @generated from protobuf message services.filestore.ListFilesResponse
37
+ */
38
+ export interface ListFilesResponse {
39
+ /**
40
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
41
+ */
42
+ pagination?: PaginationResponse;
43
+ /**
44
+ * @generated from protobuf field: repeated resources.file.File files = 2
45
+ */
46
+ files: File[];
47
+ }
48
+ /**
49
+ * @generated from protobuf message services.filestore.DeleteFileByPathRequest
50
+ */
51
+ export interface DeleteFileByPathRequest {
52
+ /**
53
+ * @generated from protobuf field: string path = 1
54
+ */
55
+ path: string;
56
+ }
57
+ /**
58
+ * @generated from protobuf message services.filestore.DeleteFileByPathResponse
59
+ */
60
+ export interface DeleteFileByPathResponse {
61
+ }
62
+ // @generated message type with reflection information, may provide speed optimized methods
63
+ class ListFilesRequest$Type extends MessageType<ListFilesRequest> {
64
+ constructor() {
65
+ super("services.filestore.ListFilesRequest", [
66
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
67
+ { no: 2, name: "path", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
68
+ ]);
69
+ }
70
+ create(value?: PartialMessage<ListFilesRequest>): ListFilesRequest {
71
+ const message = globalThis.Object.create((this.messagePrototype!));
72
+ if (value !== undefined)
73
+ reflectionMergePartial<ListFilesRequest>(this, message, value);
74
+ return message;
75
+ }
76
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListFilesRequest): ListFilesRequest {
77
+ let message = target ?? this.create(), end = reader.pos + length;
78
+ while (reader.pos < end) {
79
+ let [fieldNo, wireType] = reader.tag();
80
+ switch (fieldNo) {
81
+ case /* resources.common.database.PaginationRequest pagination */ 1:
82
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
83
+ break;
84
+ case /* optional string path */ 2:
85
+ message.path = reader.string();
86
+ break;
87
+ default:
88
+ let u = options.readUnknownField;
89
+ if (u === "throw")
90
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
91
+ let d = reader.skip(wireType);
92
+ if (u !== false)
93
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
94
+ }
95
+ }
96
+ return message;
97
+ }
98
+ internalBinaryWrite(message: ListFilesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
99
+ /* resources.common.database.PaginationRequest pagination = 1; */
100
+ if (message.pagination)
101
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
102
+ /* optional string path = 2; */
103
+ if (message.path !== undefined)
104
+ writer.tag(2, WireType.LengthDelimited).string(message.path);
105
+ let u = options.writeUnknownFields;
106
+ if (u !== false)
107
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
108
+ return writer;
109
+ }
110
+ }
111
+ /**
112
+ * @generated MessageType for protobuf message services.filestore.ListFilesRequest
113
+ */
114
+ export const ListFilesRequest = new ListFilesRequest$Type();
115
+ // @generated message type with reflection information, may provide speed optimized methods
116
+ class ListFilesResponse$Type extends MessageType<ListFilesResponse> {
117
+ constructor() {
118
+ super("services.filestore.ListFilesResponse", [
119
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
120
+ { no: 2, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "codegen.itemslen.enabled": true } }
121
+ ]);
122
+ }
123
+ create(value?: PartialMessage<ListFilesResponse>): ListFilesResponse {
124
+ const message = globalThis.Object.create((this.messagePrototype!));
125
+ message.files = [];
126
+ if (value !== undefined)
127
+ reflectionMergePartial<ListFilesResponse>(this, message, value);
128
+ return message;
129
+ }
130
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListFilesResponse): ListFilesResponse {
131
+ let message = target ?? this.create(), end = reader.pos + length;
132
+ while (reader.pos < end) {
133
+ let [fieldNo, wireType] = reader.tag();
134
+ switch (fieldNo) {
135
+ case /* resources.common.database.PaginationResponse pagination */ 1:
136
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
137
+ break;
138
+ case /* repeated resources.file.File files */ 2:
139
+ message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
140
+ break;
141
+ default:
142
+ let u = options.readUnknownField;
143
+ if (u === "throw")
144
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
145
+ let d = reader.skip(wireType);
146
+ if (u !== false)
147
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
148
+ }
149
+ }
150
+ return message;
151
+ }
152
+ internalBinaryWrite(message: ListFilesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
153
+ /* resources.common.database.PaginationResponse pagination = 1; */
154
+ if (message.pagination)
155
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
156
+ /* repeated resources.file.File files = 2; */
157
+ for (let i = 0; i < message.files.length; i++)
158
+ File.internalBinaryWrite(message.files[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
159
+ let u = options.writeUnknownFields;
160
+ if (u !== false)
161
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
162
+ return writer;
163
+ }
164
+ }
165
+ /**
166
+ * @generated MessageType for protobuf message services.filestore.ListFilesResponse
167
+ */
168
+ export const ListFilesResponse = new ListFilesResponse$Type();
169
+ // @generated message type with reflection information, may provide speed optimized methods
170
+ class DeleteFileByPathRequest$Type extends MessageType<DeleteFileByPathRequest> {
171
+ constructor() {
172
+ super("services.filestore.DeleteFileByPathRequest", [
173
+ { no: 1, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
174
+ ]);
175
+ }
176
+ create(value?: PartialMessage<DeleteFileByPathRequest>): DeleteFileByPathRequest {
177
+ const message = globalThis.Object.create((this.messagePrototype!));
178
+ message.path = "";
179
+ if (value !== undefined)
180
+ reflectionMergePartial<DeleteFileByPathRequest>(this, message, value);
181
+ return message;
182
+ }
183
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteFileByPathRequest): DeleteFileByPathRequest {
184
+ let message = target ?? this.create(), end = reader.pos + length;
185
+ while (reader.pos < end) {
186
+ let [fieldNo, wireType] = reader.tag();
187
+ switch (fieldNo) {
188
+ case /* string path */ 1:
189
+ message.path = reader.string();
190
+ break;
191
+ default:
192
+ let u = options.readUnknownField;
193
+ if (u === "throw")
194
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
195
+ let d = reader.skip(wireType);
196
+ if (u !== false)
197
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
198
+ }
199
+ }
200
+ return message;
201
+ }
202
+ internalBinaryWrite(message: DeleteFileByPathRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
203
+ /* string path = 1; */
204
+ if (message.path !== "")
205
+ writer.tag(1, WireType.LengthDelimited).string(message.path);
206
+ let u = options.writeUnknownFields;
207
+ if (u !== false)
208
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
209
+ return writer;
210
+ }
211
+ }
212
+ /**
213
+ * @generated MessageType for protobuf message services.filestore.DeleteFileByPathRequest
214
+ */
215
+ export const DeleteFileByPathRequest = new DeleteFileByPathRequest$Type();
216
+ // @generated message type with reflection information, may provide speed optimized methods
217
+ class DeleteFileByPathResponse$Type extends MessageType<DeleteFileByPathResponse> {
218
+ constructor() {
219
+ super("services.filestore.DeleteFileByPathResponse", []);
220
+ }
221
+ create(value?: PartialMessage<DeleteFileByPathResponse>): DeleteFileByPathResponse {
222
+ const message = globalThis.Object.create((this.messagePrototype!));
223
+ if (value !== undefined)
224
+ reflectionMergePartial<DeleteFileByPathResponse>(this, message, value);
225
+ return message;
226
+ }
227
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteFileByPathResponse): DeleteFileByPathResponse {
228
+ let message = target ?? this.create(), end = reader.pos + length;
229
+ while (reader.pos < end) {
230
+ let [fieldNo, wireType] = reader.tag();
231
+ switch (fieldNo) {
232
+ default:
233
+ let u = options.readUnknownField;
234
+ if (u === "throw")
235
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
236
+ let d = reader.skip(wireType);
237
+ if (u !== false)
238
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
239
+ }
240
+ }
241
+ return message;
242
+ }
243
+ internalBinaryWrite(message: DeleteFileByPathResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
244
+ let u = options.writeUnknownFields;
245
+ if (u !== false)
246
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
247
+ return writer;
248
+ }
249
+ }
250
+ /**
251
+ * @generated MessageType for protobuf message services.filestore.DeleteFileByPathResponse
252
+ */
253
+ export const DeleteFileByPathResponse = new DeleteFileByPathResponse$Type();
254
+ /**
255
+ * @generated ServiceType for protobuf service services.filestore.FilestoreService
256
+ */
257
+ export const FilestoreService = new ServiceType("services.filestore.FilestoreService", [
258
+ { name: "Upload", clientStreaming: true, options: { "codegen.perms.perms": { enabled: true, name: "Superuser" } }, I: UploadFileRequest, O: UploadFileResponse },
259
+ { name: "ListFiles", options: { "codegen.perms.perms": { enabled: true, name: "Superuser" } }, I: ListFilesRequest, O: ListFilesResponse },
260
+ { name: "DeleteFile", options: { "codegen.perms.perms": { enabled: true, name: "Superuser" } }, I: DeleteFileRequest, O: DeleteFileResponse },
261
+ { name: "DeleteFileByPath", options: { "codegen.perms.perms": { enabled: true, name: "Superuser" } }, I: DeleteFileByPathRequest, O: DeleteFileByPathResponse }
262
+ ]);