@fivenet-app/gen 2026.5.0 → 2026.7.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 (87) hide show
  1. package/clients.ts +6 -0
  2. package/codegen/perms/perms.ts +74 -40
  3. package/codegen/sanitizer/sanitizer.ts +6 -0
  4. package/google/protobuf/descriptor.ts +11 -3
  5. package/google/protobuf/timestamp.ts +7 -6
  6. package/package.json +1 -1
  7. package/perms.ts +387 -41
  8. package/resources/access/access.ts +481 -0
  9. package/resources/accounts/accounts.ts +41 -30
  10. package/resources/audit/audit.ts +5 -1
  11. package/resources/calendar/access/access.ts +0 -330
  12. package/resources/calendar/calendar.ts +307 -25
  13. package/resources/calendar/entries/entries.ts +204 -11
  14. package/resources/centrum/units/access/access.ts +0 -373
  15. package/resources/centrum/units/units.ts +20 -8
  16. package/resources/citizens/labels/access.ts +0 -191
  17. package/resources/citizens/labels/labels.ts +20 -8
  18. package/resources/common/content/diff_activity.ts +1 -1
  19. package/resources/cron/cron.ts +1 -1
  20. package/resources/documents/access/access.ts +0 -329
  21. package/resources/documents/activity/activity.ts +49 -45
  22. package/resources/documents/documents.ts +1 -1
  23. package/resources/documents/requests/requests.ts +1 -1
  24. package/resources/documents/stamps/stamp.ts +40 -210
  25. package/resources/documents/templates/templates.ts +158 -318
  26. package/resources/jobs/colleagues/activity/activity.ts +2 -2
  27. package/resources/jobs/conduct/conduct.ts +2 -2
  28. package/resources/jobs/jobs.ts +22 -0
  29. package/resources/jobs/labels/labels.ts +9 -9
  30. package/resources/laws/laws.ts +96 -50
  31. package/resources/livemap/markers/marker_marker.ts +311 -4
  32. package/resources/mailer/access/access.ts +0 -457
  33. package/resources/mailer/emails/email.ts +4 -4
  34. package/resources/notifications/events/events.ts +18 -1
  35. package/resources/permissions/attributes/attributes.ts +51 -39
  36. package/resources/permissions/permissions/permissions.ts +46 -34
  37. package/resources/qualifications/access/access.ts +0 -248
  38. package/resources/qualifications/qualifications.ts +9 -9
  39. package/resources/settings/config.ts +53 -5
  40. package/resources/settings/data.ts +1 -1
  41. package/resources/stats/stats.ts +32 -20
  42. package/resources/sync/data/data.ts +22 -10
  43. package/resources/userinfo/userinfo.ts +202 -51
  44. package/resources/users/activity/activity.ts +70 -77
  45. package/resources/wiki/access/access.ts +0 -330
  46. package/resources/wiki/activity/activity.ts +45 -45
  47. package/resources/wiki/page.ts +9 -9
  48. package/services/auth/auth.ts +1 -1
  49. package/services/calendar/calendar.ts +1 -1
  50. package/services/calendar/entries.ts +13 -2
  51. package/services/centrum/dispatches.ts +32 -12
  52. package/services/centrum/units.client.ts +15 -2
  53. package/services/centrum/units.ts +237 -129
  54. package/services/citizens/citizens.ts +1 -1
  55. package/services/citizens/labels.client.ts +13 -0
  56. package/services/citizens/labels.ts +135 -4
  57. package/services/completor/completor.client.ts +0 -13
  58. package/services/completor/completor.ts +2 -116
  59. package/services/documents/approval.ts +20 -9
  60. package/services/documents/categories.ts +1 -1
  61. package/services/documents/collab.ts +1 -1
  62. package/services/documents/comments.ts +4 -4
  63. package/services/documents/documents.ts +38 -38
  64. package/services/documents/stats.ts +14 -2
  65. package/services/documents/templates.ts +1 -1
  66. package/services/filestore/filestore.ts +4 -4
  67. package/services/jobs/colleagues.ts +4 -4
  68. package/services/jobs/conduct.ts +2 -2
  69. package/services/jobs/groups.client.ts +22 -0
  70. package/services/jobs/groups.ts +9 -0
  71. package/services/jobs/timeclock.ts +2 -2
  72. package/services/mailer/settings.ts +1 -1
  73. package/services/mailer/thread.ts +3 -3
  74. package/services/qualifications/exam.ts +5 -5
  75. package/services/qualifications/qualifications.ts +52 -34
  76. package/services/settings/accounts.ts +19 -6
  77. package/services/settings/config.ts +2 -2
  78. package/services/settings/cron.ts +2 -2
  79. package/services/settings/laws.client.ts +44 -5
  80. package/services/settings/laws.ts +357 -4
  81. package/services/settings/system.ts +6 -6
  82. package/services/sync/sync.client.ts +42 -14
  83. package/services/sync/sync.ts +162 -13
  84. package/services/wiki/collab.ts +1 -1
  85. package/services/wiki/wiki.client.ts +15 -2
  86. package/services/wiki/wiki.ts +122 -0
  87. package/svcs.ts +19 -1
@@ -11,8 +11,9 @@ 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 { CalendarAccess } from "./access/access";
14
+ import { Access } from "../access/access";
15
15
  import { UserShort } from "../users/short/user";
16
+ import { Content } from "../common/content/content";
16
17
  import { Timestamp } from "../timestamp/timestamp";
17
18
  /**
18
19
  * @generated from protobuf message resources.calendar.Calendar
@@ -38,14 +39,18 @@ export interface Calendar {
38
39
  * @generated from protobuf field: optional string job = 5
39
40
  */
40
41
  job?: string;
42
+ /**
43
+ * @generated from protobuf field: optional resources.calendar.CalendarSystemKind system_kind = 16
44
+ */
45
+ systemKind?: CalendarSystemKind;
41
46
  /**
42
47
  * @generated from protobuf field: string name = 6
43
48
  */
44
49
  name: string;
45
50
  /**
46
- * @generated from protobuf field: optional string description = 7
51
+ * @generated from protobuf field: optional resources.common.content.Content description = 7
47
52
  */
48
- description?: string;
53
+ description?: Content;
49
54
  /**
50
55
  * @generated from protobuf field: bool public = 8
51
56
  */
@@ -75,9 +80,13 @@ export interface Calendar {
75
80
  */
76
81
  subscription?: CalendarSub;
77
82
  /**
78
- * @generated from protobuf field: resources.calendar.access.CalendarAccess access = 15
83
+ * @generated from protobuf field: resources.access.Access access = 15
84
+ */
85
+ access?: Access;
86
+ /**
87
+ * @generated from protobuf field: optional resources.calendar.CalendarDiscordSettings discord_settings = 17
79
88
  */
80
- access?: CalendarAccess;
89
+ discordSettings?: CalendarDiscordSettings;
81
90
  }
82
91
  /**
83
92
  * @generated from protobuf message resources.calendar.CalendarShort
@@ -100,9 +109,9 @@ export interface CalendarShort {
100
109
  */
101
110
  name: string;
102
111
  /**
103
- * @generated from protobuf field: optional string description = 7
112
+ * @generated from protobuf field: optional resources.common.content.Content description = 7
104
113
  */
105
- description?: string;
114
+ description?: Content;
106
115
  /**
107
116
  * @generated from protobuf field: bool public = 8
108
117
  */
@@ -119,6 +128,10 @@ export interface CalendarShort {
119
128
  * @generated from protobuf field: optional resources.calendar.CalendarSub subscription = 14
120
129
  */
121
130
  subscription?: CalendarSub;
131
+ /**
132
+ * @generated from protobuf field: optional resources.calendar.CalendarSystemKind system_kind = 15
133
+ */
134
+ systemKind?: CalendarSystemKind;
122
135
  }
123
136
  /**
124
137
  * @generated from protobuf message resources.calendar.CalendarSub
@@ -149,6 +162,70 @@ export interface CalendarSub {
149
162
  */
150
163
  muted: boolean;
151
164
  }
165
+ /**
166
+ * @generated from protobuf message resources.calendar.CalendarDiscordSettings
167
+ */
168
+ export interface CalendarDiscordSettings {
169
+ /**
170
+ * @generated from protobuf field: bool enabled = 1
171
+ */
172
+ enabled: boolean;
173
+ /**
174
+ * @generated from protobuf field: string channel_id = 2
175
+ */
176
+ channelId: string;
177
+ /**
178
+ * @generated from protobuf field: repeated resources.calendar.CalendarDiscordReminderStep reminder_steps = 3
179
+ */
180
+ reminderSteps: CalendarDiscordReminderStep[];
181
+ }
182
+ /**
183
+ * @generated from protobuf message resources.calendar.CalendarDiscordReminderStep
184
+ */
185
+ export interface CalendarDiscordReminderStep {
186
+ /**
187
+ * @generated from protobuf field: int32 at_minute = 1
188
+ */
189
+ atMinute: number;
190
+ /**
191
+ * @generated from protobuf field: optional string message = 2
192
+ */
193
+ message?: string;
194
+ /**
195
+ * @generated from protobuf field: optional resources.calendar.CalendarDiscordReminderEmbed embed = 3
196
+ */
197
+ embed?: CalendarDiscordReminderEmbed;
198
+ }
199
+ /**
200
+ * @generated from protobuf message resources.calendar.CalendarDiscordReminderEmbed
201
+ */
202
+ export interface CalendarDiscordReminderEmbed {
203
+ /**
204
+ * @generated from protobuf field: optional string title = 1
205
+ */
206
+ title?: string;
207
+ /**
208
+ * @generated from protobuf field: optional string description = 2
209
+ */
210
+ description?: string;
211
+ /**
212
+ * @generated from protobuf field: optional string color = 3
213
+ */
214
+ color?: string;
215
+ }
216
+ /**
217
+ * @generated from protobuf enum resources.calendar.CalendarSystemKind
218
+ */
219
+ export enum CalendarSystemKind {
220
+ /**
221
+ * @generated from protobuf enum value: CALENDAR_SYSTEM_KIND_UNSPECIFIED = 0;
222
+ */
223
+ UNSPECIFIED = 0,
224
+ /**
225
+ * @generated from protobuf enum value: CALENDAR_SYSTEM_KIND_JOB_BIRTHDAYS = 1;
226
+ */
227
+ JOB_BIRTHDAYS = 1
228
+ }
152
229
  // @generated message type with reflection information, may provide speed optimized methods
153
230
  class Calendar$Type extends MessageType<Calendar> {
154
231
  constructor() {
@@ -158,8 +235,9 @@ class Calendar$Type extends MessageType<Calendar> {
158
235
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
159
236
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
160
237
  { no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
238
+ { no: 16, name: "system_kind", kind: "enum", opt: true, T: () => ["resources.calendar.CalendarSystemKind", CalendarSystemKind, "CALENDAR_SYSTEM_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
161
239
  { 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*/ },
240
+ { no: 7, name: "description", kind: "message", T: () => Content },
163
241
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
164
242
  { no: 9, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
165
243
  { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
@@ -167,7 +245,8 @@ class Calendar$Type extends MessageType<Calendar> {
167
245
  { no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
168
246
  { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
169
247
  { no: 14, name: "subscription", kind: "message", T: () => CalendarSub },
170
- { no: 15, name: "access", kind: "message", T: () => CalendarAccess }
248
+ { no: 15, name: "access", kind: "message", T: () => Access },
249
+ { no: 17, name: "discord_settings", kind: "message", T: () => CalendarDiscordSettings }
171
250
  ]);
172
251
  }
173
252
  create(value?: PartialMessage<Calendar>): Calendar {
@@ -202,11 +281,14 @@ class Calendar$Type extends MessageType<Calendar> {
202
281
  case /* optional string job */ 5:
203
282
  message.job = reader.string();
204
283
  break;
284
+ case /* optional resources.calendar.CalendarSystemKind system_kind */ 16:
285
+ message.systemKind = reader.int32();
286
+ break;
205
287
  case /* string name */ 6:
206
288
  message.name = reader.string();
207
289
  break;
208
- case /* optional string description */ 7:
209
- message.description = reader.string();
290
+ case /* optional resources.common.content.Content description */ 7:
291
+ message.description = Content.internalBinaryRead(reader, reader.uint32(), options, message.description);
210
292
  break;
211
293
  case /* bool public */ 8:
212
294
  message.public = reader.bool();
@@ -229,8 +311,11 @@ class Calendar$Type extends MessageType<Calendar> {
229
311
  case /* optional resources.calendar.CalendarSub subscription */ 14:
230
312
  message.subscription = CalendarSub.internalBinaryRead(reader, reader.uint32(), options, message.subscription);
231
313
  break;
232
- case /* resources.calendar.access.CalendarAccess access */ 15:
233
- message.access = CalendarAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
314
+ case /* resources.access.Access access */ 15:
315
+ message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
316
+ break;
317
+ case /* optional resources.calendar.CalendarDiscordSettings discord_settings */ 17:
318
+ message.discordSettings = CalendarDiscordSettings.internalBinaryRead(reader, reader.uint32(), options, message.discordSettings);
234
319
  break;
235
320
  default:
236
321
  let u = options.readUnknownField;
@@ -262,9 +347,9 @@ class Calendar$Type extends MessageType<Calendar> {
262
347
  /* string name = 6; */
263
348
  if (message.name !== "")
264
349
  writer.tag(6, WireType.LengthDelimited).string(message.name);
265
- /* optional string description = 7; */
266
- if (message.description !== undefined)
267
- writer.tag(7, WireType.LengthDelimited).string(message.description);
350
+ /* optional resources.common.content.Content description = 7; */
351
+ if (message.description)
352
+ Content.internalBinaryWrite(message.description, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
268
353
  /* bool public = 8; */
269
354
  if (message.public !== false)
270
355
  writer.tag(8, WireType.Varint).bool(message.public);
@@ -286,9 +371,15 @@ class Calendar$Type extends MessageType<Calendar> {
286
371
  /* optional resources.calendar.CalendarSub subscription = 14; */
287
372
  if (message.subscription)
288
373
  CalendarSub.internalBinaryWrite(message.subscription, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
289
- /* resources.calendar.access.CalendarAccess access = 15; */
374
+ /* resources.access.Access access = 15; */
290
375
  if (message.access)
291
- CalendarAccess.internalBinaryWrite(message.access, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
376
+ Access.internalBinaryWrite(message.access, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
377
+ /* optional resources.calendar.CalendarSystemKind system_kind = 16; */
378
+ if (message.systemKind !== undefined)
379
+ writer.tag(16, WireType.Varint).int32(message.systemKind);
380
+ /* optional resources.calendar.CalendarDiscordSettings discord_settings = 17; */
381
+ if (message.discordSettings)
382
+ CalendarDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
292
383
  let u = options.writeUnknownFields;
293
384
  if (u !== false)
294
385
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -307,11 +398,12 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
307
398
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
308
399
  { no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
309
400
  { 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*/ },
401
+ { no: 7, name: "description", kind: "message", T: () => Content },
311
402
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
312
403
  { no: 9, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
313
404
  { no: 10, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
314
- { no: 14, name: "subscription", kind: "message", T: () => CalendarSub }
405
+ { no: 14, name: "subscription", kind: "message", T: () => CalendarSub },
406
+ { no: 15, name: "system_kind", kind: "enum", opt: true, T: () => ["resources.calendar.CalendarSystemKind", CalendarSystemKind, "CALENDAR_SYSTEM_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
315
407
  ]);
316
408
  }
317
409
  create(value?: PartialMessage<CalendarShort>): CalendarShort {
@@ -342,8 +434,8 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
342
434
  case /* string name */ 6:
343
435
  message.name = reader.string();
344
436
  break;
345
- case /* optional string description */ 7:
346
- message.description = reader.string();
437
+ case /* optional resources.common.content.Content description */ 7:
438
+ message.description = Content.internalBinaryRead(reader, reader.uint32(), options, message.description);
347
439
  break;
348
440
  case /* bool public */ 8:
349
441
  message.public = reader.bool();
@@ -357,6 +449,9 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
357
449
  case /* optional resources.calendar.CalendarSub subscription */ 14:
358
450
  message.subscription = CalendarSub.internalBinaryRead(reader, reader.uint32(), options, message.subscription);
359
451
  break;
452
+ case /* optional resources.calendar.CalendarSystemKind system_kind */ 15:
453
+ message.systemKind = reader.int32();
454
+ break;
360
455
  default:
361
456
  let u = options.readUnknownField;
362
457
  if (u === "throw")
@@ -381,9 +476,9 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
381
476
  /* string name = 6; */
382
477
  if (message.name !== "")
383
478
  writer.tag(6, WireType.LengthDelimited).string(message.name);
384
- /* optional string description = 7; */
385
- if (message.description !== undefined)
386
- writer.tag(7, WireType.LengthDelimited).string(message.description);
479
+ /* optional resources.common.content.Content description = 7; */
480
+ if (message.description)
481
+ Content.internalBinaryWrite(message.description, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
387
482
  /* bool public = 8; */
388
483
  if (message.public !== false)
389
484
  writer.tag(8, WireType.Varint).bool(message.public);
@@ -396,6 +491,9 @@ class CalendarShort$Type extends MessageType<CalendarShort> {
396
491
  /* optional resources.calendar.CalendarSub subscription = 14; */
397
492
  if (message.subscription)
398
493
  CalendarSub.internalBinaryWrite(message.subscription, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
494
+ /* optional resources.calendar.CalendarSystemKind system_kind = 15; */
495
+ if (message.systemKind !== undefined)
496
+ writer.tag(15, WireType.Varint).int32(message.systemKind);
399
497
  let u = options.writeUnknownFields;
400
498
  if (u !== false)
401
499
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -491,3 +589,187 @@ class CalendarSub$Type extends MessageType<CalendarSub> {
491
589
  * @generated MessageType for protobuf message resources.calendar.CalendarSub
492
590
  */
493
591
  export const CalendarSub = new CalendarSub$Type();
592
+ // @generated message type with reflection information, may provide speed optimized methods
593
+ class CalendarDiscordSettings$Type extends MessageType<CalendarDiscordSettings> {
594
+ constructor() {
595
+ super("resources.calendar.CalendarDiscordSettings", [
596
+ { no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
597
+ { no: 2, name: "channel_id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
598
+ { no: 3, name: "reminder_steps", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CalendarDiscordReminderStep, options: { "buf.validate.field": { repeated: { maxItems: "2" } } } }
599
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
600
+ }
601
+ create(value?: PartialMessage<CalendarDiscordSettings>): CalendarDiscordSettings {
602
+ const message = globalThis.Object.create((this.messagePrototype!));
603
+ message.enabled = false;
604
+ message.channelId = "";
605
+ message.reminderSteps = [];
606
+ if (value !== undefined)
607
+ reflectionMergePartial<CalendarDiscordSettings>(this, message, value);
608
+ return message;
609
+ }
610
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarDiscordSettings): CalendarDiscordSettings {
611
+ let message = target ?? this.create(), end = reader.pos + length;
612
+ while (reader.pos < end) {
613
+ let [fieldNo, wireType] = reader.tag();
614
+ switch (fieldNo) {
615
+ case /* bool enabled */ 1:
616
+ message.enabled = reader.bool();
617
+ break;
618
+ case /* string channel_id */ 2:
619
+ message.channelId = reader.string();
620
+ break;
621
+ case /* repeated resources.calendar.CalendarDiscordReminderStep reminder_steps */ 3:
622
+ message.reminderSteps.push(CalendarDiscordReminderStep.internalBinaryRead(reader, reader.uint32(), options));
623
+ break;
624
+ default:
625
+ let u = options.readUnknownField;
626
+ if (u === "throw")
627
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
628
+ let d = reader.skip(wireType);
629
+ if (u !== false)
630
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
631
+ }
632
+ }
633
+ return message;
634
+ }
635
+ internalBinaryWrite(message: CalendarDiscordSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
636
+ /* bool enabled = 1; */
637
+ if (message.enabled !== false)
638
+ writer.tag(1, WireType.Varint).bool(message.enabled);
639
+ /* string channel_id = 2; */
640
+ if (message.channelId !== "")
641
+ writer.tag(2, WireType.LengthDelimited).string(message.channelId);
642
+ /* repeated resources.calendar.CalendarDiscordReminderStep reminder_steps = 3; */
643
+ for (let i = 0; i < message.reminderSteps.length; i++)
644
+ CalendarDiscordReminderStep.internalBinaryWrite(message.reminderSteps[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
645
+ let u = options.writeUnknownFields;
646
+ if (u !== false)
647
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
648
+ return writer;
649
+ }
650
+ }
651
+ /**
652
+ * @generated MessageType for protobuf message resources.calendar.CalendarDiscordSettings
653
+ */
654
+ export const CalendarDiscordSettings = new CalendarDiscordSettings$Type();
655
+ // @generated message type with reflection information, may provide speed optimized methods
656
+ class CalendarDiscordReminderStep$Type extends MessageType<CalendarDiscordReminderStep> {
657
+ constructor() {
658
+ super("resources.calendar.CalendarDiscordReminderStep", [
659
+ { no: 1, name: "at_minute", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 10080, gte: 0 } } } },
660
+ { no: 2, name: "message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "2000" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
661
+ { no: 3, name: "embed", kind: "message", T: () => CalendarDiscordReminderEmbed }
662
+ ]);
663
+ }
664
+ create(value?: PartialMessage<CalendarDiscordReminderStep>): CalendarDiscordReminderStep {
665
+ const message = globalThis.Object.create((this.messagePrototype!));
666
+ message.atMinute = 0;
667
+ if (value !== undefined)
668
+ reflectionMergePartial<CalendarDiscordReminderStep>(this, message, value);
669
+ return message;
670
+ }
671
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarDiscordReminderStep): CalendarDiscordReminderStep {
672
+ let message = target ?? this.create(), end = reader.pos + length;
673
+ while (reader.pos < end) {
674
+ let [fieldNo, wireType] = reader.tag();
675
+ switch (fieldNo) {
676
+ case /* int32 at_minute */ 1:
677
+ message.atMinute = reader.int32();
678
+ break;
679
+ case /* optional string message */ 2:
680
+ message.message = reader.string();
681
+ break;
682
+ case /* optional resources.calendar.CalendarDiscordReminderEmbed embed */ 3:
683
+ message.embed = CalendarDiscordReminderEmbed.internalBinaryRead(reader, reader.uint32(), options, message.embed);
684
+ break;
685
+ default:
686
+ let u = options.readUnknownField;
687
+ if (u === "throw")
688
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
689
+ let d = reader.skip(wireType);
690
+ if (u !== false)
691
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
692
+ }
693
+ }
694
+ return message;
695
+ }
696
+ internalBinaryWrite(message: CalendarDiscordReminderStep, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
697
+ /* int32 at_minute = 1; */
698
+ if (message.atMinute !== 0)
699
+ writer.tag(1, WireType.Varint).int32(message.atMinute);
700
+ /* optional string message = 2; */
701
+ if (message.message !== undefined)
702
+ writer.tag(2, WireType.LengthDelimited).string(message.message);
703
+ /* optional resources.calendar.CalendarDiscordReminderEmbed embed = 3; */
704
+ if (message.embed)
705
+ CalendarDiscordReminderEmbed.internalBinaryWrite(message.embed, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
706
+ let u = options.writeUnknownFields;
707
+ if (u !== false)
708
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
709
+ return writer;
710
+ }
711
+ }
712
+ /**
713
+ * @generated MessageType for protobuf message resources.calendar.CalendarDiscordReminderStep
714
+ */
715
+ export const CalendarDiscordReminderStep = new CalendarDiscordReminderStep$Type();
716
+ // @generated message type with reflection information, may provide speed optimized methods
717
+ class CalendarDiscordReminderEmbed$Type extends MessageType<CalendarDiscordReminderEmbed> {
718
+ constructor() {
719
+ super("resources.calendar.CalendarDiscordReminderEmbed", [
720
+ { no: 1, name: "title", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "256" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
721
+ { no: 2, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "4096" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
722
+ { no: 3, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } } } }
723
+ ]);
724
+ }
725
+ create(value?: PartialMessage<CalendarDiscordReminderEmbed>): CalendarDiscordReminderEmbed {
726
+ const message = globalThis.Object.create((this.messagePrototype!));
727
+ if (value !== undefined)
728
+ reflectionMergePartial<CalendarDiscordReminderEmbed>(this, message, value);
729
+ return message;
730
+ }
731
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalendarDiscordReminderEmbed): CalendarDiscordReminderEmbed {
732
+ let message = target ?? this.create(), end = reader.pos + length;
733
+ while (reader.pos < end) {
734
+ let [fieldNo, wireType] = reader.tag();
735
+ switch (fieldNo) {
736
+ case /* optional string title */ 1:
737
+ message.title = reader.string();
738
+ break;
739
+ case /* optional string description */ 2:
740
+ message.description = reader.string();
741
+ break;
742
+ case /* optional string color */ 3:
743
+ message.color = reader.string();
744
+ break;
745
+ default:
746
+ let u = options.readUnknownField;
747
+ if (u === "throw")
748
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
749
+ let d = reader.skip(wireType);
750
+ if (u !== false)
751
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
752
+ }
753
+ }
754
+ return message;
755
+ }
756
+ internalBinaryWrite(message: CalendarDiscordReminderEmbed, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
757
+ /* optional string title = 1; */
758
+ if (message.title !== undefined)
759
+ writer.tag(1, WireType.LengthDelimited).string(message.title);
760
+ /* optional string description = 2; */
761
+ if (message.description !== undefined)
762
+ writer.tag(2, WireType.LengthDelimited).string(message.description);
763
+ /* optional string color = 3; */
764
+ if (message.color !== undefined)
765
+ writer.tag(3, WireType.LengthDelimited).string(message.color);
766
+ let u = options.writeUnknownFields;
767
+ if (u !== false)
768
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
769
+ return writer;
770
+ }
771
+ }
772
+ /**
773
+ * @generated MessageType for protobuf message resources.calendar.CalendarDiscordReminderEmbed
774
+ */
775
+ export const CalendarDiscordReminderEmbed = new CalendarDiscordReminderEmbed$Type();