@fivenet-app/gen 2025.9.1 → 2026.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/clients.ts +36 -0
  3. package/codegen/perms/perms.ts +186 -15
  4. package/codegen/sanitizer/sanitizer.ts +34 -1
  5. package/package.json +2 -2
  6. package/perms.ts +140 -8
  7. package/resources/accounts/accounts.ts +98 -31
  8. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
  9. package/resources/audit/audit.ts +156 -38
  10. package/resources/calendar/{access.ts → access/access.ts} +30 -30
  11. package/resources/calendar/calendar.ts +17 -477
  12. package/resources/calendar/entries/entries.ts +474 -0
  13. package/resources/centrum/{access.ts → access/access.ts} +22 -22
  14. package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
  15. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
  16. package/resources/centrum/joblist.ts +136 -0
  17. package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
  18. package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
  19. package/resources/centrum/{units.ts → units/units.ts} +131 -51
  20. package/resources/citizens/labels/labels.ts +526 -0
  21. package/resources/{users → citizens/licenses}/licenses.ts +17 -17
  22. package/resources/clientconfig/clientconfig.ts +126 -258
  23. package/resources/collab/collab.ts +4 -16
  24. package/resources/common/content/content.ts +108 -85
  25. package/resources/common/content/diff_activity.ts +267 -0
  26. package/resources/common/i18n.ts +2 -2
  27. package/resources/{common/cron → cron}/cron.ts +43 -43
  28. package/resources/documents/{access.ts → access/access.ts} +29 -52
  29. package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
  30. package/resources/documents/approval/approval.ts +945 -0
  31. package/resources/documents/{category.ts → category/category.ts} +7 -7
  32. package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
  33. package/resources/documents/data/data.ts +303 -0
  34. package/resources/documents/documents.ts +282 -667
  35. package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
  36. package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
  37. package/resources/documents/references/references.ts +187 -0
  38. package/resources/documents/relations/relations.ts +184 -0
  39. package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
  40. package/resources/documents/stamps/stamp.ts +355 -0
  41. package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
  42. package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
  43. package/resources/file/filestore.ts +1 -1
  44. package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
  45. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
  46. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
  47. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
  48. package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
  49. package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
  50. package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
  51. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
  52. package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
  53. package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
  54. package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
  55. package/resources/mailer/{access.ts → access/access.ts} +67 -67
  56. package/resources/mailer/{email.ts → emails/email.ts} +19 -19
  57. package/resources/mailer/{events.ts → events/events.ts} +24 -24
  58. package/resources/mailer/{message.ts → messages/message.ts} +29 -29
  59. package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
  60. package/resources/mailer/{template.ts → templates/template.ts} +15 -15
  61. package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
  62. package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
  63. package/resources/notifications/{events.ts → events/events.ts} +20 -20
  64. package/resources/notifications/notifications.ts +4 -4
  65. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
  66. package/resources/permissions/{events.ts → events/events.ts} +7 -7
  67. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
  68. package/resources/qualifications/{access.ts → access/access.ts} +19 -19
  69. package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
  70. package/resources/qualifications/qualifications.ts +51 -179
  71. package/resources/settings/banner.ts +3 -3
  72. package/resources/settings/config.ts +527 -25
  73. package/resources/{documents/state.ts → settings/data.ts} +41 -20
  74. package/resources/settings/perms.ts +14 -14
  75. package/resources/stats/stats.ts +379 -0
  76. package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
  77. package/resources/sync/{data.ts → data/data.ts} +405 -59
  78. package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
  79. package/resources/users/{activity.ts → activity/activity.ts} +242 -101
  80. package/resources/users/{props.ts → props/props.ts} +91 -69
  81. package/resources/users/short/user.ts +184 -0
  82. package/resources/users/{users.ts → user.ts} +266 -195
  83. package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
  84. package/resources/vehicles/{props.ts → props/props.ts} +28 -6
  85. package/resources/vehicles/vehicles.ts +20 -8
  86. package/resources/wiki/{access.ts → access/access.ts} +30 -30
  87. package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
  88. package/resources/wiki/page.ts +39 -15
  89. package/services/auth/auth.client.ts +23 -10
  90. package/services/auth/auth.ts +445 -262
  91. package/services/calendar/calendar.ts +56 -34
  92. package/services/centrum/centrum.ts +127 -127
  93. package/services/citizens/citizens.client.ts +0 -13
  94. package/services/citizens/citizens.ts +44 -134
  95. package/services/citizens/labels.client.ts +77 -0
  96. package/services/citizens/labels.ts +455 -0
  97. package/services/completor/completor.ts +36 -16
  98. package/services/documents/approval.client.ts +188 -0
  99. package/services/documents/approval.ts +1776 -0
  100. package/services/documents/documents.ts +164 -186
  101. package/services/documents/forms.client.ts +51 -0
  102. package/services/documents/forms.ts +232 -0
  103. package/services/documents/stamps.client.ts +77 -0
  104. package/services/documents/stamps.ts +481 -0
  105. package/services/documents/stats.client.ts +38 -0
  106. package/services/documents/stats.ts +245 -0
  107. package/services/jobs/conduct.client.ts +30 -3
  108. package/services/jobs/conduct.ts +159 -33
  109. package/services/jobs/jobs.ts +43 -43
  110. package/services/jobs/stats.client.ts +38 -0
  111. package/services/jobs/stats.ts +207 -0
  112. package/services/jobs/timeclock.ts +39 -39
  113. package/services/livemap/livemap.ts +18 -18
  114. package/services/mailer/mailer.ts +78 -78
  115. package/services/notifications/notifications.ts +35 -35
  116. package/services/qualifications/qualifications.ts +81 -46
  117. package/services/settings/accounts.client.ts +23 -10
  118. package/services/settings/accounts.ts +191 -30
  119. package/services/settings/cron.client.ts +13 -0
  120. package/services/settings/cron.ts +118 -5
  121. package/services/settings/laws.ts +1 -1
  122. package/services/settings/settings.ts +73 -52
  123. package/services/settings/system.client.ts +13 -0
  124. package/services/settings/system.ts +115 -15
  125. package/services/stats/stats.client.ts +7 -7
  126. package/services/stats/stats.ts +24 -24
  127. package/services/sync/sync.client.ts +271 -37
  128. package/services/sync/sync.ts +1525 -421
  129. package/services/vehicles/vehicles.ts +8 -8
  130. package/services/wiki/wiki.ts +8 -8
  131. package/svcs.ts +100 -6
  132. package/resources/centrum/attributes.ts +0 -183
  133. package/resources/documents/signoff.ts +0 -55
  134. package/resources/users/labels.ts +0 -160
@@ -11,9 +11,8 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
- import { Content } from "../common/content/content";
15
- import { CalendarAccess } from "./access";
16
- import { UserShort } from "../users/users";
14
+ import { CalendarAccess } from "./access/access";
15
+ import { UserShort } from "../users/short/user";
17
16
  import { Timestamp } from "../timestamp/timestamp";
18
17
  /**
19
18
  * @generated from protobuf message resources.calendar.Calendar
@@ -64,7 +63,7 @@ export interface Calendar {
64
63
  */
65
64
  creatorId?: number;
66
65
  /**
67
- * @generated from protobuf field: optional resources.users.UserShort creator = 12
66
+ * @generated from protobuf field: optional resources.users.short.UserShort creator = 12
68
67
  */
69
68
  creator?: UserShort;
70
69
  /**
@@ -76,7 +75,7 @@ export interface Calendar {
76
75
  */
77
76
  subscription?: CalendarSub;
78
77
  /**
79
- * @generated from protobuf field: resources.calendar.CalendarAccess access = 15
78
+ * @generated from protobuf field: resources.calendar.access.CalendarAccess access = 15
80
79
  */
81
80
  access?: CalendarAccess;
82
81
  }
@@ -134,7 +133,7 @@ export interface CalendarSub {
134
133
  */
135
134
  userId: number;
136
135
  /**
137
- * @generated from protobuf field: optional resources.users.UserShort user = 3
136
+ * @generated from protobuf field: optional resources.users.short.UserShort user = 3
138
137
  */
139
138
  user?: UserShort;
140
139
  /**
@@ -150,156 +149,6 @@ export interface CalendarSub {
150
149
  */
151
150
  muted: boolean;
152
151
  }
153
- // Entry
154
-
155
- /**
156
- * @generated from protobuf message resources.calendar.CalendarEntry
157
- */
158
- export interface CalendarEntry {
159
- /**
160
- * @generated from protobuf field: int64 id = 1
161
- */
162
- id: number;
163
- /**
164
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
165
- */
166
- createdAt?: Timestamp;
167
- /**
168
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
169
- */
170
- updatedAt?: Timestamp;
171
- /**
172
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
173
- */
174
- deletedAt?: Timestamp;
175
- /**
176
- * @generated from protobuf field: int64 calendar_id = 5
177
- */
178
- calendarId: number;
179
- /**
180
- * @generated from protobuf field: optional resources.calendar.Calendar calendar = 6
181
- */
182
- calendar?: Calendar;
183
- /**
184
- * @generated from protobuf field: optional string job = 7
185
- */
186
- job?: string;
187
- /**
188
- * @generated from protobuf field: resources.timestamp.Timestamp start_time = 8
189
- */
190
- startTime?: Timestamp;
191
- /**
192
- * @generated from protobuf field: optional resources.timestamp.Timestamp end_time = 9
193
- */
194
- endTime?: Timestamp;
195
- /**
196
- * @generated from protobuf field: string title = 10
197
- */
198
- title: string;
199
- /**
200
- * @generated from protobuf field: resources.common.content.Content content = 11
201
- */
202
- content?: Content;
203
- /**
204
- * @generated from protobuf field: bool closed = 12
205
- */
206
- closed: boolean;
207
- /**
208
- * @generated from protobuf field: optional bool rsvp_open = 13
209
- */
210
- rsvpOpen?: boolean;
211
- /**
212
- * @generated from protobuf field: optional int32 creator_id = 14
213
- */
214
- creatorId?: number;
215
- /**
216
- * @generated from protobuf field: optional resources.users.UserShort creator = 15
217
- */
218
- creator?: UserShort;
219
- /**
220
- * @generated from protobuf field: string creator_job = 16
221
- */
222
- creatorJob: string;
223
- /**
224
- * @generated from protobuf field: optional resources.calendar.CalendarEntryRecurring recurring = 17
225
- */
226
- recurring?: CalendarEntryRecurring;
227
- /**
228
- * @generated from protobuf field: optional resources.calendar.CalendarEntryRSVP rsvp = 18
229
- */
230
- rsvp?: CalendarEntryRSVP;
231
- }
232
- /**
233
- * @generated from protobuf message resources.calendar.CalendarEntryRecurring
234
- */
235
- export interface CalendarEntryRecurring {
236
- /**
237
- * @generated from protobuf field: string every = 1
238
- */
239
- every: string;
240
- /**
241
- * @generated from protobuf field: int32 count = 2
242
- */
243
- count: number;
244
- /**
245
- * @generated from protobuf field: optional resources.timestamp.Timestamp until = 3
246
- */
247
- until?: Timestamp;
248
- }
249
- /**
250
- * @generated from protobuf message resources.calendar.CalendarEntryRSVP
251
- */
252
- export interface CalendarEntryRSVP {
253
- /**
254
- * @generated from protobuf field: int64 entry_id = 1
255
- */
256
- entryId: number;
257
- /**
258
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
259
- */
260
- createdAt?: Timestamp;
261
- /**
262
- * @generated from protobuf field: int32 user_id = 3
263
- */
264
- userId: number;
265
- /**
266
- * @generated from protobuf field: optional resources.users.UserShort user = 4
267
- */
268
- user?: UserShort;
269
- /**
270
- * @generated from protobuf field: resources.calendar.RsvpResponses response = 5
271
- */
272
- response: RsvpResponses;
273
- }
274
- /**
275
- * @generated from protobuf enum resources.calendar.RsvpResponses
276
- */
277
- export enum RsvpResponses {
278
- /**
279
- * @generated from protobuf enum value: RSVP_RESPONSES_UNSPECIFIED = 0;
280
- */
281
- UNSPECIFIED = 0,
282
- /**
283
- * @generated from protobuf enum value: RSVP_RESPONSES_HIDDEN = 1;
284
- */
285
- HIDDEN = 1,
286
- /**
287
- * @generated from protobuf enum value: RSVP_RESPONSES_INVITED = 2;
288
- */
289
- INVITED = 2,
290
- /**
291
- * @generated from protobuf enum value: RSVP_RESPONSES_NO = 3;
292
- */
293
- NO = 3,
294
- /**
295
- * @generated from protobuf enum value: RSVP_RESPONSES_MAYBE = 4;
296
- */
297
- MAYBE = 4,
298
- /**
299
- * @generated from protobuf enum value: RSVP_RESPONSES_YES = 5;
300
- */
301
- YES = 5
302
- }
303
152
  // @generated message type with reflection information, may provide speed optimized methods
304
153
  class Calendar$Type extends MessageType<Calendar> {
305
154
  constructor() {
@@ -309,11 +158,11 @@ class Calendar$Type extends MessageType<Calendar> {
309
158
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
310
159
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
311
160
  { no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
312
- { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
313
- { no: 7, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
161
+ { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
162
+ { no: 7, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
314
163
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
315
164
  { no: 9, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
316
- { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
165
+ { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
317
166
  { no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
318
167
  { no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
319
168
  { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
@@ -371,7 +220,7 @@ class Calendar$Type extends MessageType<Calendar> {
371
220
  case /* optional int32 creator_id */ 11:
372
221
  message.creatorId = reader.int32();
373
222
  break;
374
- case /* optional resources.users.UserShort creator */ 12:
223
+ case /* optional resources.users.short.UserShort creator */ 12:
375
224
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
376
225
  break;
377
226
  case /* string creator_job */ 13:
@@ -380,7 +229,7 @@ class Calendar$Type extends MessageType<Calendar> {
380
229
  case /* optional resources.calendar.CalendarSub subscription */ 14:
381
230
  message.subscription = CalendarSub.internalBinaryRead(reader, reader.uint32(), options, message.subscription);
382
231
  break;
383
- case /* resources.calendar.CalendarAccess access */ 15:
232
+ case /* resources.calendar.access.CalendarAccess access */ 15:
384
233
  message.access = CalendarAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
385
234
  break;
386
235
  default:
@@ -428,7 +277,7 @@ class Calendar$Type extends MessageType<Calendar> {
428
277
  /* optional int32 creator_id = 11; */
429
278
  if (message.creatorId !== undefined)
430
279
  writer.tag(11, WireType.Varint).int32(message.creatorId);
431
- /* optional resources.users.UserShort creator = 12; */
280
+ /* optional resources.users.short.UserShort creator = 12; */
432
281
  if (message.creator)
433
282
  UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
434
283
  /* string creator_job = 13; */
@@ -437,7 +286,7 @@ class Calendar$Type extends MessageType<Calendar> {
437
286
  /* optional resources.calendar.CalendarSub subscription = 14; */
438
287
  if (message.subscription)
439
288
  CalendarSub.internalBinaryWrite(message.subscription, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
440
- /* resources.calendar.CalendarAccess access = 15; */
289
+ /* resources.calendar.access.CalendarAccess access = 15; */
441
290
  if (message.access)
442
291
  CalendarAccess.internalBinaryWrite(message.access, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
443
292
  let u = options.writeUnknownFields;
@@ -457,11 +306,11 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
457
306
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
458
307
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
459
308
  { no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
460
- { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
461
- { no: 7, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
309
+ { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
310
+ { no: 7, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
462
311
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
463
312
  { no: 9, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
464
- { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
313
+ { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
465
314
  { no: 14, name: "subscription", kind: "message", T: () => CalendarSub }
466
315
  ]);
467
316
  }
@@ -590,7 +439,7 @@ class CalendarSub$Type extends MessageType<CalendarSub> {
590
439
  case /* int32 user_id */ 2:
591
440
  message.userId = reader.int32();
592
441
  break;
593
- case /* optional resources.users.UserShort user */ 3:
442
+ case /* optional resources.users.short.UserShort user */ 3:
594
443
  message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
595
444
  break;
596
445
  case /* optional resources.timestamp.Timestamp created_at */ 4:
@@ -620,7 +469,7 @@ class CalendarSub$Type extends MessageType<CalendarSub> {
620
469
  /* int32 user_id = 2; */
621
470
  if (message.userId !== 0)
622
471
  writer.tag(2, WireType.Varint).int32(message.userId);
623
- /* optional resources.users.UserShort user = 3; */
472
+ /* optional resources.users.short.UserShort user = 3; */
624
473
  if (message.user)
625
474
  UserShort.internalBinaryWrite(message.user, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
626
475
  /* optional resources.timestamp.Timestamp created_at = 4; */
@@ -642,312 +491,3 @@ class CalendarSub$Type extends MessageType<CalendarSub> {
642
491
  * @generated MessageType for protobuf message resources.calendar.CalendarSub
643
492
  */
644
493
  export const CalendarSub = new CalendarSub$Type();
645
- // @generated message type with reflection information, may provide speed optimized methods
646
- class CalendarEntry$Type extends MessageType<CalendarEntry> {
647
- constructor() {
648
- super("resources.calendar.CalendarEntry", [
649
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
650
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
651
- { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
652
- { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
653
- { no: 5, name: "calendar_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
654
- { no: 6, name: "calendar", kind: "message", T: () => Calendar },
655
- { no: 7, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
656
- { no: 8, name: "start_time", kind: "message", T: () => Timestamp },
657
- { no: 9, name: "end_time", kind: "message", T: () => Timestamp },
658
- { no: 10, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
659
- { no: 11, name: "content", kind: "message", T: () => Content },
660
- { no: 12, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
661
- { no: 13, name: "rsvp_open", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
662
- { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
663
- { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
664
- { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
665
- { no: 17, name: "recurring", kind: "message", T: () => CalendarEntryRecurring },
666
- { no: 18, name: "rsvp", kind: "message", T: () => CalendarEntryRSVP }
667
- ]);
668
- }
669
- create(value?: PartialMessage<CalendarEntry>): CalendarEntry {
670
- const message = globalThis.Object.create((this.messagePrototype!));
671
- message.id = 0;
672
- message.calendarId = 0;
673
- message.title = "";
674
- message.closed = false;
675
- message.creatorJob = "";
676
- if (value !== undefined)
677
- reflectionMergePartial<CalendarEntry>(this, message, value);
678
- return message;
679
- }
680
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarEntry): CalendarEntry {
681
- let message = target ?? this.create(), end = reader.pos + length;
682
- while (reader.pos < end) {
683
- let [fieldNo, wireType] = reader.tag();
684
- switch (fieldNo) {
685
- case /* int64 id */ 1:
686
- message.id = reader.int64().toNumber();
687
- break;
688
- case /* optional resources.timestamp.Timestamp created_at */ 2:
689
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
690
- break;
691
- case /* optional resources.timestamp.Timestamp updated_at */ 3:
692
- message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
693
- break;
694
- case /* optional resources.timestamp.Timestamp deleted_at */ 4:
695
- message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
696
- break;
697
- case /* int64 calendar_id */ 5:
698
- message.calendarId = reader.int64().toNumber();
699
- break;
700
- case /* optional resources.calendar.Calendar calendar */ 6:
701
- message.calendar = Calendar.internalBinaryRead(reader, reader.uint32(), options, message.calendar);
702
- break;
703
- case /* optional string job */ 7:
704
- message.job = reader.string();
705
- break;
706
- case /* resources.timestamp.Timestamp start_time */ 8:
707
- message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime);
708
- break;
709
- case /* optional resources.timestamp.Timestamp end_time */ 9:
710
- message.endTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endTime);
711
- break;
712
- case /* string title */ 10:
713
- message.title = reader.string();
714
- break;
715
- case /* resources.common.content.Content content */ 11:
716
- message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
717
- break;
718
- case /* bool closed */ 12:
719
- message.closed = reader.bool();
720
- break;
721
- case /* optional bool rsvp_open */ 13:
722
- message.rsvpOpen = reader.bool();
723
- break;
724
- case /* optional int32 creator_id */ 14:
725
- message.creatorId = reader.int32();
726
- break;
727
- case /* optional resources.users.UserShort creator */ 15:
728
- message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
729
- break;
730
- case /* string creator_job */ 16:
731
- message.creatorJob = reader.string();
732
- break;
733
- case /* optional resources.calendar.CalendarEntryRecurring recurring */ 17:
734
- message.recurring = CalendarEntryRecurring.internalBinaryRead(reader, reader.uint32(), options, message.recurring);
735
- break;
736
- case /* optional resources.calendar.CalendarEntryRSVP rsvp */ 18:
737
- message.rsvp = CalendarEntryRSVP.internalBinaryRead(reader, reader.uint32(), options, message.rsvp);
738
- break;
739
- default:
740
- let u = options.readUnknownField;
741
- if (u === "throw")
742
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
743
- let d = reader.skip(wireType);
744
- if (u !== false)
745
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
746
- }
747
- }
748
- return message;
749
- }
750
- internalBinaryWrite(message: CalendarEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
751
- /* int64 id = 1; */
752
- if (message.id !== 0)
753
- writer.tag(1, WireType.Varint).int64(message.id);
754
- /* optional resources.timestamp.Timestamp created_at = 2; */
755
- if (message.createdAt)
756
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
757
- /* optional resources.timestamp.Timestamp updated_at = 3; */
758
- if (message.updatedAt)
759
- Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
760
- /* optional resources.timestamp.Timestamp deleted_at = 4; */
761
- if (message.deletedAt)
762
- Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
763
- /* int64 calendar_id = 5; */
764
- if (message.calendarId !== 0)
765
- writer.tag(5, WireType.Varint).int64(message.calendarId);
766
- /* optional resources.calendar.Calendar calendar = 6; */
767
- if (message.calendar)
768
- Calendar.internalBinaryWrite(message.calendar, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
769
- /* optional string job = 7; */
770
- if (message.job !== undefined)
771
- writer.tag(7, WireType.LengthDelimited).string(message.job);
772
- /* resources.timestamp.Timestamp start_time = 8; */
773
- if (message.startTime)
774
- Timestamp.internalBinaryWrite(message.startTime, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
775
- /* optional resources.timestamp.Timestamp end_time = 9; */
776
- if (message.endTime)
777
- Timestamp.internalBinaryWrite(message.endTime, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
778
- /* string title = 10; */
779
- if (message.title !== "")
780
- writer.tag(10, WireType.LengthDelimited).string(message.title);
781
- /* resources.common.content.Content content = 11; */
782
- if (message.content)
783
- Content.internalBinaryWrite(message.content, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
784
- /* bool closed = 12; */
785
- if (message.closed !== false)
786
- writer.tag(12, WireType.Varint).bool(message.closed);
787
- /* optional bool rsvp_open = 13; */
788
- if (message.rsvpOpen !== undefined)
789
- writer.tag(13, WireType.Varint).bool(message.rsvpOpen);
790
- /* optional int32 creator_id = 14; */
791
- if (message.creatorId !== undefined)
792
- writer.tag(14, WireType.Varint).int32(message.creatorId);
793
- /* optional resources.users.UserShort creator = 15; */
794
- if (message.creator)
795
- UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
796
- /* string creator_job = 16; */
797
- if (message.creatorJob !== "")
798
- writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
799
- /* optional resources.calendar.CalendarEntryRecurring recurring = 17; */
800
- if (message.recurring)
801
- CalendarEntryRecurring.internalBinaryWrite(message.recurring, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
802
- /* optional resources.calendar.CalendarEntryRSVP rsvp = 18; */
803
- if (message.rsvp)
804
- CalendarEntryRSVP.internalBinaryWrite(message.rsvp, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
805
- let u = options.writeUnknownFields;
806
- if (u !== false)
807
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
808
- return writer;
809
- }
810
- }
811
- /**
812
- * @generated MessageType for protobuf message resources.calendar.CalendarEntry
813
- */
814
- export const CalendarEntry = new CalendarEntry$Type();
815
- // @generated message type with reflection information, may provide speed optimized methods
816
- class CalendarEntryRecurring$Type extends MessageType<CalendarEntryRecurring> {
817
- constructor() {
818
- super("resources.calendar.CalendarEntryRecurring", [
819
- { no: 1, name: "every", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
820
- { no: 2, name: "count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
821
- { no: 3, name: "until", kind: "message", T: () => Timestamp }
822
- ], { "codegen.dbscanner.dbscanner": { enabled: true } });
823
- }
824
- create(value?: PartialMessage<CalendarEntryRecurring>): CalendarEntryRecurring {
825
- const message = globalThis.Object.create((this.messagePrototype!));
826
- message.every = "";
827
- message.count = 0;
828
- if (value !== undefined)
829
- reflectionMergePartial<CalendarEntryRecurring>(this, message, value);
830
- return message;
831
- }
832
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarEntryRecurring): CalendarEntryRecurring {
833
- let message = target ?? this.create(), end = reader.pos + length;
834
- while (reader.pos < end) {
835
- let [fieldNo, wireType] = reader.tag();
836
- switch (fieldNo) {
837
- case /* string every */ 1:
838
- message.every = reader.string();
839
- break;
840
- case /* int32 count */ 2:
841
- message.count = reader.int32();
842
- break;
843
- case /* optional resources.timestamp.Timestamp until */ 3:
844
- message.until = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.until);
845
- break;
846
- default:
847
- let u = options.readUnknownField;
848
- if (u === "throw")
849
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
850
- let d = reader.skip(wireType);
851
- if (u !== false)
852
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
853
- }
854
- }
855
- return message;
856
- }
857
- internalBinaryWrite(message: CalendarEntryRecurring, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
858
- /* string every = 1; */
859
- if (message.every !== "")
860
- writer.tag(1, WireType.LengthDelimited).string(message.every);
861
- /* int32 count = 2; */
862
- if (message.count !== 0)
863
- writer.tag(2, WireType.Varint).int32(message.count);
864
- /* optional resources.timestamp.Timestamp until = 3; */
865
- if (message.until)
866
- Timestamp.internalBinaryWrite(message.until, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
867
- let u = options.writeUnknownFields;
868
- if (u !== false)
869
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
870
- return writer;
871
- }
872
- }
873
- /**
874
- * @generated MessageType for protobuf message resources.calendar.CalendarEntryRecurring
875
- */
876
- export const CalendarEntryRecurring = new CalendarEntryRecurring$Type();
877
- // @generated message type with reflection information, may provide speed optimized methods
878
- class CalendarEntryRSVP$Type extends MessageType<CalendarEntryRSVP> {
879
- constructor() {
880
- super("resources.calendar.CalendarEntryRSVP", [
881
- { no: 1, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
882
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
883
- { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
884
- { no: 4, name: "user", kind: "message", T: () => UserShort },
885
- { no: 5, name: "response", kind: "enum", T: () => ["resources.calendar.RsvpResponses", RsvpResponses, "RSVP_RESPONSES_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
886
- ]);
887
- }
888
- create(value?: PartialMessage<CalendarEntryRSVP>): CalendarEntryRSVP {
889
- const message = globalThis.Object.create((this.messagePrototype!));
890
- message.entryId = 0;
891
- message.userId = 0;
892
- message.response = 0;
893
- if (value !== undefined)
894
- reflectionMergePartial<CalendarEntryRSVP>(this, message, value);
895
- return message;
896
- }
897
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarEntryRSVP): CalendarEntryRSVP {
898
- let message = target ?? this.create(), end = reader.pos + length;
899
- while (reader.pos < end) {
900
- let [fieldNo, wireType] = reader.tag();
901
- switch (fieldNo) {
902
- case /* int64 entry_id */ 1:
903
- message.entryId = reader.int64().toNumber();
904
- break;
905
- case /* optional resources.timestamp.Timestamp created_at */ 2:
906
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
907
- break;
908
- case /* int32 user_id */ 3:
909
- message.userId = reader.int32();
910
- break;
911
- case /* optional resources.users.UserShort user */ 4:
912
- message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
913
- break;
914
- case /* resources.calendar.RsvpResponses response */ 5:
915
- message.response = reader.int32();
916
- break;
917
- default:
918
- let u = options.readUnknownField;
919
- if (u === "throw")
920
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
921
- let d = reader.skip(wireType);
922
- if (u !== false)
923
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
924
- }
925
- }
926
- return message;
927
- }
928
- internalBinaryWrite(message: CalendarEntryRSVP, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
929
- /* int64 entry_id = 1; */
930
- if (message.entryId !== 0)
931
- writer.tag(1, WireType.Varint).int64(message.entryId);
932
- /* optional resources.timestamp.Timestamp created_at = 2; */
933
- if (message.createdAt)
934
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
935
- /* int32 user_id = 3; */
936
- if (message.userId !== 0)
937
- writer.tag(3, WireType.Varint).int32(message.userId);
938
- /* optional resources.users.UserShort user = 4; */
939
- if (message.user)
940
- UserShort.internalBinaryWrite(message.user, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
941
- /* resources.calendar.RsvpResponses response = 5; */
942
- if (message.response !== 0)
943
- writer.tag(5, WireType.Varint).int32(message.response);
944
- let u = options.writeUnknownFields;
945
- if (u !== false)
946
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
947
- return writer;
948
- }
949
- }
950
- /**
951
- * @generated MessageType for protobuf message resources.calendar.CalendarEntryRSVP
952
- */
953
- export const CalendarEntryRSVP = new CalendarEntryRSVP$Type();