@fivenet-app/gen 2026.7.3 → 2026.8.5

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 (40) hide show
  1. package/google/protobuf/descriptor.ts +3 -11
  2. package/google/protobuf/timestamp.ts +6 -7
  3. package/package.json +1 -1
  4. package/perms.ts +21 -4
  5. package/resources/audit/audit.ts +19 -9
  6. package/resources/calendar/calendar.ts +11 -0
  7. package/resources/calendar/entries/entries.ts +23 -0
  8. package/resources/centrum/dispatches/dispatches.ts +8 -8
  9. package/resources/centrum/units/units.ts +5 -5
  10. package/resources/citizens/labels/access.ts +10 -6
  11. package/resources/dbsync/state.ts +192 -0
  12. package/resources/documents/stamps/access.ts +25 -0
  13. package/resources/documents/stamps/stamp.ts +0 -21
  14. package/resources/documents/templates/templates.ts +61 -83
  15. package/resources/documents/workflow/workflow.ts +61 -1
  16. package/resources/jobs/groups/access/access.ts +29 -0
  17. package/resources/jobs/groups/activity.ts +332 -0
  18. package/resources/jobs/groups/group.ts +1666 -0
  19. package/resources/jobs/user_selector.ts +184 -0
  20. package/resources/settings/status.ts +197 -105
  21. package/services/calendar/calendar.ts +1 -1
  22. package/services/calendar/entries.ts +3 -3
  23. package/services/centrum/units.ts +3 -3
  24. package/services/completor/completor.ts +2 -2
  25. package/services/documents/approval.ts +2 -2
  26. package/services/documents/documents.ts +9 -9
  27. package/services/documents/templates.client.ts +13 -0
  28. package/services/documents/templates.ts +136 -14
  29. package/services/jobs/colleagues.client.ts +34 -8
  30. package/services/jobs/colleagues.ts +263 -74
  31. package/services/jobs/conduct.ts +11 -19
  32. package/services/jobs/groups.client.ts +311 -0
  33. package/services/jobs/groups.ts +3596 -1
  34. package/services/jobs/timeclock.ts +30 -27
  35. package/services/qualifications/qualifications.ts +26 -4
  36. package/services/settings/settings.ts +1 -1
  37. package/services/sync/sync.client.ts +90 -37
  38. package/services/sync/sync.ts +555 -6
  39. package/services/vehicles/vehicles.ts +2 -2
  40. package/svcs.ts +31 -1
@@ -0,0 +1,192 @@
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 "resources/dbsync/state.proto" (package "resources.dbsync", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MessageType } from "@protobuf-ts/runtime";
14
+ import { Timestamp } from "../timestamp/timestamp";
15
+ /**
16
+ * @generated from protobuf message resources.dbsync.DBSyncCheckpoint
17
+ */
18
+ export interface DBSyncCheckpoint {
19
+ /**
20
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_check = 1
21
+ */
22
+ lastCheck?: Timestamp;
23
+ /**
24
+ * @generated from protobuf field: optional string last_id = 2
25
+ */
26
+ lastId?: string;
27
+ }
28
+ /**
29
+ * @generated from protobuf message resources.dbsync.DBSyncTableSyncState
30
+ */
31
+ export interface DBSyncTableSyncState {
32
+ /**
33
+ * @generated from protobuf field: string table = 1
34
+ */
35
+ table: string;
36
+ /**
37
+ * @generated from protobuf field: optional resources.dbsync.DBSyncCheckpoint checkpoint = 2
38
+ */
39
+ checkpoint?: DBSyncCheckpoint;
40
+ /**
41
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_synced_at = 3
42
+ */
43
+ lastSyncedAt?: Timestamp;
44
+ /**
45
+ * @generated from protobuf field: optional resources.timestamp.Timestamp last_attempt_at = 4
46
+ */
47
+ lastAttemptAt?: Timestamp;
48
+ /**
49
+ * @generated from protobuf field: optional string last_error = 5
50
+ */
51
+ lastError?: string;
52
+ /**
53
+ * @generated from protobuf field: bool enabled = 6
54
+ */
55
+ enabled: boolean;
56
+ }
57
+ // @generated message type with reflection information, may provide speed optimized methods
58
+ class DBSyncCheckpoint$Type extends MessageType<DBSyncCheckpoint> {
59
+ constructor() {
60
+ super("resources.dbsync.DBSyncCheckpoint", [
61
+ { no: 1, name: "last_check", kind: "message", T: () => Timestamp },
62
+ { no: 2, name: "last_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
63
+ ]);
64
+ }
65
+ create(value?: PartialMessage<DBSyncCheckpoint>): DBSyncCheckpoint {
66
+ const message = globalThis.Object.create((this.messagePrototype!));
67
+ if (value !== undefined)
68
+ reflectionMergePartial<DBSyncCheckpoint>(this, message, value);
69
+ return message;
70
+ }
71
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DBSyncCheckpoint): DBSyncCheckpoint {
72
+ let message = target ?? this.create(), end = reader.pos + length;
73
+ while (reader.pos < end) {
74
+ let [fieldNo, wireType] = reader.tag();
75
+ switch (fieldNo) {
76
+ case /* optional resources.timestamp.Timestamp last_check */ 1:
77
+ message.lastCheck = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastCheck);
78
+ break;
79
+ case /* optional string last_id */ 2:
80
+ message.lastId = reader.string();
81
+ break;
82
+ default:
83
+ let u = options.readUnknownField;
84
+ if (u === "throw")
85
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
86
+ let d = reader.skip(wireType);
87
+ if (u !== false)
88
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
89
+ }
90
+ }
91
+ return message;
92
+ }
93
+ internalBinaryWrite(message: DBSyncCheckpoint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
94
+ /* optional resources.timestamp.Timestamp last_check = 1; */
95
+ if (message.lastCheck)
96
+ Timestamp.internalBinaryWrite(message.lastCheck, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
97
+ /* optional string last_id = 2; */
98
+ if (message.lastId !== undefined)
99
+ writer.tag(2, WireType.LengthDelimited).string(message.lastId);
100
+ let u = options.writeUnknownFields;
101
+ if (u !== false)
102
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
103
+ return writer;
104
+ }
105
+ }
106
+ /**
107
+ * @generated MessageType for protobuf message resources.dbsync.DBSyncCheckpoint
108
+ */
109
+ export const DBSyncCheckpoint = new DBSyncCheckpoint$Type();
110
+ // @generated message type with reflection information, may provide speed optimized methods
111
+ class DBSyncTableSyncState$Type extends MessageType<DBSyncTableSyncState> {
112
+ constructor() {
113
+ super("resources.dbsync.DBSyncTableSyncState", [
114
+ { no: 1, name: "table", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
115
+ { no: 2, name: "checkpoint", kind: "message", T: () => DBSyncCheckpoint },
116
+ { no: 3, name: "last_synced_at", kind: "message", T: () => Timestamp },
117
+ { no: 4, name: "last_attempt_at", kind: "message", T: () => Timestamp },
118
+ { no: 5, name: "last_error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "256" } } } },
119
+ { no: 6, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
120
+ ]);
121
+ }
122
+ create(value?: PartialMessage<DBSyncTableSyncState>): DBSyncTableSyncState {
123
+ const message = globalThis.Object.create((this.messagePrototype!));
124
+ message.table = "";
125
+ message.enabled = false;
126
+ if (value !== undefined)
127
+ reflectionMergePartial<DBSyncTableSyncState>(this, message, value);
128
+ return message;
129
+ }
130
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DBSyncTableSyncState): DBSyncTableSyncState {
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 /* string table */ 1:
136
+ message.table = reader.string();
137
+ break;
138
+ case /* optional resources.dbsync.DBSyncCheckpoint checkpoint */ 2:
139
+ message.checkpoint = DBSyncCheckpoint.internalBinaryRead(reader, reader.uint32(), options, message.checkpoint);
140
+ break;
141
+ case /* optional resources.timestamp.Timestamp last_synced_at */ 3:
142
+ message.lastSyncedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastSyncedAt);
143
+ break;
144
+ case /* optional resources.timestamp.Timestamp last_attempt_at */ 4:
145
+ message.lastAttemptAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAttemptAt);
146
+ break;
147
+ case /* optional string last_error */ 5:
148
+ message.lastError = reader.string();
149
+ break;
150
+ case /* bool enabled */ 6:
151
+ message.enabled = reader.bool();
152
+ break;
153
+ default:
154
+ let u = options.readUnknownField;
155
+ if (u === "throw")
156
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
157
+ let d = reader.skip(wireType);
158
+ if (u !== false)
159
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
160
+ }
161
+ }
162
+ return message;
163
+ }
164
+ internalBinaryWrite(message: DBSyncTableSyncState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
165
+ /* string table = 1; */
166
+ if (message.table !== "")
167
+ writer.tag(1, WireType.LengthDelimited).string(message.table);
168
+ /* optional resources.dbsync.DBSyncCheckpoint checkpoint = 2; */
169
+ if (message.checkpoint)
170
+ DBSyncCheckpoint.internalBinaryWrite(message.checkpoint, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
171
+ /* optional resources.timestamp.Timestamp last_synced_at = 3; */
172
+ if (message.lastSyncedAt)
173
+ Timestamp.internalBinaryWrite(message.lastSyncedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
174
+ /* optional resources.timestamp.Timestamp last_attempt_at = 4; */
175
+ if (message.lastAttemptAt)
176
+ Timestamp.internalBinaryWrite(message.lastAttemptAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
177
+ /* optional string last_error = 5; */
178
+ if (message.lastError !== undefined)
179
+ writer.tag(5, WireType.LengthDelimited).string(message.lastError);
180
+ /* bool enabled = 6; */
181
+ if (message.enabled !== false)
182
+ writer.tag(6, WireType.Varint).bool(message.enabled);
183
+ let u = options.writeUnknownFields;
184
+ if (u !== false)
185
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
186
+ return writer;
187
+ }
188
+ }
189
+ /**
190
+ * @generated MessageType for protobuf message resources.dbsync.DBSyncTableSyncState
191
+ */
192
+ export const DBSyncTableSyncState = new DBSyncTableSyncState$Type();
@@ -0,0 +1,25 @@
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 "resources/documents/stamps/access.proto" (package "resources.documents.stamps", syntax proto3)
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ /**
6
+ * @generated from protobuf enum resources.documents.stamps.AccessLevel
7
+ */
8
+ export enum AccessLevel {
9
+ /**
10
+ * @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
11
+ */
12
+ UNSPECIFIED = 0,
13
+ /**
14
+ * @generated from protobuf enum value: ACCESS_LEVEL_BLOCKED = 1;
15
+ */
16
+ BLOCKED = 1,
17
+ /**
18
+ * @generated from protobuf enum value: ACCESS_LEVEL_USE = 2;
19
+ */
20
+ USE = 2,
21
+ /**
22
+ * @generated from protobuf enum value: ACCESS_LEVEL_MANAGE = 3;
23
+ */
24
+ MANAGE = 3
25
+ }
@@ -56,27 +56,6 @@ export interface Stamp {
56
56
  */
57
57
  access?: Access;
58
58
  }
59
- /**
60
- * @generated from protobuf enum resources.documents.stamps.StampAccessLevel
61
- */
62
- export enum StampAccessLevel {
63
- /**
64
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_UNSPECIFIED = 0;
65
- */
66
- UNSPECIFIED = 0,
67
- /**
68
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_BLOCKED = 1;
69
- */
70
- BLOCKED = 1,
71
- /**
72
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_USE = 2;
73
- */
74
- USE = 2,
75
- /**
76
- * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_MANAGE = 3;
77
- */
78
- MANAGE = 3
79
- }
80
59
  // @generated message type with reflection information, may provide speed optimized methods
81
60
  class Stamp$Type extends MessageType<Stamp> {
82
61
  constructor() {
@@ -13,10 +13,6 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
14
  import { OnEditBehavior } from "../approval/approval";
15
15
  import { ApprovalRuleKind } from "../approval/approval";
16
- import { Vehicle } from "../../vehicles/vehicles";
17
- import { UserShort } from "../../users/short/user";
18
- import { DocumentShort } from "../documents";
19
- import { User } from "../../users/user";
20
16
  import { Workflow } from "../workflow/workflow";
21
17
  import { Access } from "../../access/access";
22
18
  import { JobAccess } from "../../access/access";
@@ -46,10 +42,6 @@ export interface Template {
46
42
  * @generated from protobuf field: resources.documents.category.Category category = 5
47
43
  */
48
44
  category?: Category;
49
- /**
50
- * @generated from protobuf field: uint32 weight = 6
51
- */
52
- weight: number;
53
45
  /**
54
46
  * @generated from protobuf field: string title = 7
55
47
  */
@@ -131,10 +123,6 @@ export interface TemplateShort {
131
123
  * @generated from protobuf field: resources.documents.category.Category category = 5
132
124
  */
133
125
  category?: Category;
134
- /**
135
- * @generated from protobuf field: uint32 weight = 6
136
- */
137
- weight: number;
138
126
  /**
139
127
  * @generated from protobuf field: string title = 7
140
128
  */
@@ -199,9 +187,9 @@ export interface TemplateRequirements {
199
187
  */
200
188
  export interface ObjectSpecs {
201
189
  /**
202
- * @generated from protobuf field: optional bool required = 1
190
+ * @generated from protobuf field: bool required = 1
203
191
  */
204
- required?: boolean;
192
+ required: boolean;
205
193
  /**
206
194
  * @generated from protobuf field: optional int32 min = 2
207
195
  */
@@ -212,25 +200,21 @@ export interface ObjectSpecs {
212
200
  max?: number;
213
201
  }
214
202
  /**
215
- * @generated from protobuf message resources.documents.templates.TemplateData
203
+ * @generated from protobuf message resources.documents.templates.TemplateSelection
216
204
  */
217
- export interface TemplateData {
218
- /**
219
- * @generated from protobuf field: resources.users.User active_char = 1
220
- */
221
- activeChar?: User;
205
+ export interface TemplateSelection {
222
206
  /**
223
- * @generated from protobuf field: repeated resources.documents.DocumentShort documents = 2
207
+ * @generated from protobuf field: repeated int32 user_ids = 1
224
208
  */
225
- documents: DocumentShort[];
209
+ userIds: number[];
226
210
  /**
227
- * @generated from protobuf field: repeated resources.users.short.UserShort users = 3
211
+ * @generated from protobuf field: repeated int64 document_ids = 2
228
212
  */
229
- users: UserShort[];
213
+ documentIds: number[];
230
214
  /**
231
- * @generated from protobuf field: repeated resources.vehicles.Vehicle vehicles = 4
215
+ * @generated from protobuf field: repeated string plates = 3
232
216
  */
233
- vehicles: Vehicle[];
217
+ plates: string[];
234
218
  }
235
219
  /**
236
220
  * @generated from protobuf message resources.documents.templates.TemplateApproval
@@ -330,12 +314,11 @@ class Template$Type extends MessageType<Template> {
330
314
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
331
315
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
332
316
  { no: 5, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
333
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
334
317
  { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
335
318
  { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
336
319
  { no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
337
320
  { no: 10, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
338
- { no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content_title\"" } },
321
+ { no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content_title\"" } },
339
322
  { no: 12, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "0", maxBytes: "2000000" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content\"" } },
340
323
  { no: 13, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "tagger.tags": "alias:\"state\"" } },
341
324
  { no: 14, name: "schema", kind: "message", T: () => TemplateSchema, options: { "tagger.tags": "alias:\"schema\"" } },
@@ -350,7 +333,6 @@ class Template$Type extends MessageType<Template> {
350
333
  create(value?: PartialMessage<Template>): Template {
351
334
  const message = globalThis.Object.create((this.messagePrototype!));
352
335
  message.id = 0;
353
- message.weight = 0;
354
336
  message.title = "";
355
337
  message.description = "";
356
338
  message.contentTitle = "";
@@ -382,9 +364,6 @@ class Template$Type extends MessageType<Template> {
382
364
  case /* resources.documents.category.Category category */ 5:
383
365
  message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
384
366
  break;
385
- case /* uint32 weight */ 6:
386
- message.weight = reader.uint32();
387
- break;
388
367
  case /* string title */ 7:
389
368
  message.title = reader.string();
390
369
  break;
@@ -454,9 +433,6 @@ class Template$Type extends MessageType<Template> {
454
433
  /* resources.documents.category.Category category = 5; */
455
434
  if (message.category)
456
435
  Category.internalBinaryWrite(message.category, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
457
- /* uint32 weight = 6; */
458
- if (message.weight !== 0)
459
- writer.tag(6, WireType.Varint).uint32(message.weight);
460
436
  /* string title = 7; */
461
437
  if (message.title !== "")
462
438
  writer.tag(7, WireType.LengthDelimited).string(message.title);
@@ -518,7 +494,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
518
494
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
519
495
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
520
496
  { no: 5, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
521
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
522
497
  { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
523
498
  { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
524
499
  { no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
@@ -532,7 +507,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
532
507
  create(value?: PartialMessage<TemplateShort>): TemplateShort {
533
508
  const message = globalThis.Object.create((this.messagePrototype!));
534
509
  message.id = 0;
535
- message.weight = 0;
536
510
  message.title = "";
537
511
  message.description = "";
538
512
  message.creatorJob = "";
@@ -560,9 +534,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
560
534
  case /* resources.documents.category.Category category */ 5:
561
535
  message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
562
536
  break;
563
- case /* uint32 weight */ 6:
564
- message.weight = reader.uint32();
565
- break;
566
537
  case /* string title */ 7:
567
538
  message.title = reader.string();
568
539
  break;
@@ -614,9 +585,6 @@ class TemplateShort$Type extends MessageType<TemplateShort> {
614
585
  /* resources.documents.category.Category category = 5; */
615
586
  if (message.category)
616
587
  Category.internalBinaryWrite(message.category, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
617
- /* uint32 weight = 6; */
618
- if (message.weight !== 0)
619
- writer.tag(6, WireType.Varint).uint32(message.weight);
620
588
  /* string title = 7; */
621
589
  if (message.title !== "")
622
590
  writer.tag(7, WireType.LengthDelimited).string(message.title);
@@ -761,13 +729,14 @@ export const TemplateRequirements = new TemplateRequirements$Type();
761
729
  class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
762
730
  constructor() {
763
731
  super("resources.documents.templates.ObjectSpecs", [
764
- { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
732
+ { no: 1, name: "required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
765
733
  { no: 2, name: "min", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
766
734
  { no: 3, name: "max", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
767
735
  ]);
768
736
  }
769
737
  create(value?: PartialMessage<ObjectSpecs>): ObjectSpecs {
770
738
  const message = globalThis.Object.create((this.messagePrototype!));
739
+ message.required = false;
771
740
  if (value !== undefined)
772
741
  reflectionMergePartial<ObjectSpecs>(this, message, value);
773
742
  return message;
@@ -777,7 +746,7 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
777
746
  while (reader.pos < end) {
778
747
  let [fieldNo, wireType] = reader.tag();
779
748
  switch (fieldNo) {
780
- case /* optional bool required */ 1:
749
+ case /* bool required */ 1:
781
750
  message.required = reader.bool();
782
751
  break;
783
752
  case /* optional int32 min */ 2:
@@ -798,8 +767,8 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
798
767
  return message;
799
768
  }
800
769
  internalBinaryWrite(message: ObjectSpecs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
801
- /* optional bool required = 1; */
802
- if (message.required !== undefined)
770
+ /* bool required = 1; */
771
+ if (message.required !== false)
803
772
  writer.tag(1, WireType.Varint).bool(message.required);
804
773
  /* optional int32 min = 2; */
805
774
  if (message.min !== undefined)
@@ -818,40 +787,44 @@ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
818
787
  */
819
788
  export const ObjectSpecs = new ObjectSpecs$Type();
820
789
  // @generated message type with reflection information, may provide speed optimized methods
821
- class TemplateData$Type extends MessageType<TemplateData> {
790
+ class TemplateSelection$Type extends MessageType<TemplateSelection> {
822
791
  constructor() {
823
- super("resources.documents.templates.TemplateData", [
824
- { no: 1, name: "active_char", kind: "message", T: () => User, options: { "buf.validate.field": { required: true } } },
825
- { no: 2, name: "documents", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentShort, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } },
826
- { no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserShort, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } },
827
- { no: 4, name: "vehicles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Vehicle, options: { "buf.validate.field": { repeated: { maxItems: "12" } } } }
792
+ super("resources.documents.templates.TemplateSelection", [
793
+ { no: 1, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { int32: { gt: 0 } } } } } },
794
+ { no: 2, name: "document_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { int64: { gt: "0" } } } } } },
795
+ { no: 3, name: "plates", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "12", items: { string: { minLen: "1", maxLen: "32" } } } } } }
828
796
  ]);
829
797
  }
830
- create(value?: PartialMessage<TemplateData>): TemplateData {
798
+ create(value?: PartialMessage<TemplateSelection>): TemplateSelection {
831
799
  const message = globalThis.Object.create((this.messagePrototype!));
832
- message.documents = [];
833
- message.users = [];
834
- message.vehicles = [];
800
+ message.userIds = [];
801
+ message.documentIds = [];
802
+ message.plates = [];
835
803
  if (value !== undefined)
836
- reflectionMergePartial<TemplateData>(this, message, value);
804
+ reflectionMergePartial<TemplateSelection>(this, message, value);
837
805
  return message;
838
806
  }
839
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateData): TemplateData {
807
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateSelection): TemplateSelection {
840
808
  let message = target ?? this.create(), end = reader.pos + length;
841
809
  while (reader.pos < end) {
842
810
  let [fieldNo, wireType] = reader.tag();
843
811
  switch (fieldNo) {
844
- case /* resources.users.User active_char */ 1:
845
- message.activeChar = User.internalBinaryRead(reader, reader.uint32(), options, message.activeChar);
846
- break;
847
- case /* repeated resources.documents.DocumentShort documents */ 2:
848
- message.documents.push(DocumentShort.internalBinaryRead(reader, reader.uint32(), options));
812
+ case /* repeated int32 user_ids */ 1:
813
+ if (wireType === WireType.LengthDelimited)
814
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
815
+ message.userIds.push(reader.int32());
816
+ else
817
+ message.userIds.push(reader.int32());
849
818
  break;
850
- case /* repeated resources.users.short.UserShort users */ 3:
851
- message.users.push(UserShort.internalBinaryRead(reader, reader.uint32(), options));
819
+ case /* repeated int64 document_ids */ 2:
820
+ if (wireType === WireType.LengthDelimited)
821
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
822
+ message.documentIds.push(reader.int64().toNumber());
823
+ else
824
+ message.documentIds.push(reader.int64().toNumber());
852
825
  break;
853
- case /* repeated resources.vehicles.Vehicle vehicles */ 4:
854
- message.vehicles.push(Vehicle.internalBinaryRead(reader, reader.uint32(), options));
826
+ case /* repeated string plates */ 3:
827
+ message.plates.push(reader.string());
855
828
  break;
856
829
  default:
857
830
  let u = options.readUnknownField;
@@ -864,19 +837,24 @@ class TemplateData$Type extends MessageType<TemplateData> {
864
837
  }
865
838
  return message;
866
839
  }
867
- internalBinaryWrite(message: TemplateData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
868
- /* resources.users.User active_char = 1; */
869
- if (message.activeChar)
870
- User.internalBinaryWrite(message.activeChar, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
871
- /* repeated resources.documents.DocumentShort documents = 2; */
872
- for (let i = 0; i < message.documents.length; i++)
873
- DocumentShort.internalBinaryWrite(message.documents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
874
- /* repeated resources.users.short.UserShort users = 3; */
875
- for (let i = 0; i < message.users.length; i++)
876
- UserShort.internalBinaryWrite(message.users[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
877
- /* repeated resources.vehicles.Vehicle vehicles = 4; */
878
- for (let i = 0; i < message.vehicles.length; i++)
879
- Vehicle.internalBinaryWrite(message.vehicles[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
840
+ internalBinaryWrite(message: TemplateSelection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
841
+ /* repeated int32 user_ids = 1; */
842
+ if (message.userIds.length) {
843
+ writer.tag(1, WireType.LengthDelimited).fork();
844
+ for (let i = 0; i < message.userIds.length; i++)
845
+ writer.int32(message.userIds[i]);
846
+ writer.join();
847
+ }
848
+ /* repeated int64 document_ids = 2; */
849
+ if (message.documentIds.length) {
850
+ writer.tag(2, WireType.LengthDelimited).fork();
851
+ for (let i = 0; i < message.documentIds.length; i++)
852
+ writer.int64(message.documentIds[i]);
853
+ writer.join();
854
+ }
855
+ /* repeated string plates = 3; */
856
+ for (let i = 0; i < message.plates.length; i++)
857
+ writer.tag(3, WireType.LengthDelimited).string(message.plates[i]);
880
858
  let u = options.writeUnknownFields;
881
859
  if (u !== false)
882
860
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -884,9 +862,9 @@ class TemplateData$Type extends MessageType<TemplateData> {
884
862
  }
885
863
  }
886
864
  /**
887
- * @generated MessageType for protobuf message resources.documents.templates.TemplateData
865
+ * @generated MessageType for protobuf message resources.documents.templates.TemplateSelection
888
866
  */
889
- export const TemplateData = new TemplateData$Type();
867
+ export const TemplateSelection = new TemplateSelection$Type();
890
868
  // @generated message type with reflection information, may provide speed optimized methods
891
869
  class TemplateApproval$Type extends MessageType<TemplateApproval> {
892
870
  constructor() {
@@ -81,6 +81,26 @@ export interface WorkflowCronData {
81
81
  * @generated from protobuf field: int64 last_doc_id = 1
82
82
  */
83
83
  lastDocId: number;
84
+ /**
85
+ * @generated from protobuf field: int64 processed_rows = 2
86
+ */
87
+ processedRows: number;
88
+ /**
89
+ * @generated from protobuf field: int64 reminders_sent = 3
90
+ */
91
+ remindersSent: number;
92
+ /**
93
+ * @generated from protobuf field: int64 auto_closed_rows = 4
94
+ */
95
+ autoClosedRows: number;
96
+ /**
97
+ * @generated from protobuf field: int64 deleted_rows = 5
98
+ */
99
+ deletedRows: number;
100
+ /**
101
+ * @generated from protobuf field: int64 updated_rows = 6
102
+ */
103
+ updatedRows: number;
84
104
  }
85
105
  /**
86
106
  * @generated from protobuf message resources.documents.workflow.WorkflowState
@@ -380,12 +400,22 @@ export const AutoCloseSettings = new AutoCloseSettings$Type();
380
400
  class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
381
401
  constructor() {
382
402
  super("resources.documents.workflow.WorkflowCronData", [
383
- { no: 1, name: "last_doc_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
403
+ { no: 1, name: "last_doc_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
404
+ { no: 2, name: "processed_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
405
+ { no: 3, name: "reminders_sent", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
406
+ { no: 4, name: "auto_closed_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
407
+ { no: 5, name: "deleted_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
408
+ { no: 6, name: "updated_rows", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
384
409
  ]);
385
410
  }
386
411
  create(value?: PartialMessage<WorkflowCronData>): WorkflowCronData {
387
412
  const message = globalThis.Object.create((this.messagePrototype!));
388
413
  message.lastDocId = 0;
414
+ message.processedRows = 0;
415
+ message.remindersSent = 0;
416
+ message.autoClosedRows = 0;
417
+ message.deletedRows = 0;
418
+ message.updatedRows = 0;
389
419
  if (value !== undefined)
390
420
  reflectionMergePartial<WorkflowCronData>(this, message, value);
391
421
  return message;
@@ -398,6 +428,21 @@ class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
398
428
  case /* int64 last_doc_id */ 1:
399
429
  message.lastDocId = reader.int64().toNumber();
400
430
  break;
431
+ case /* int64 processed_rows */ 2:
432
+ message.processedRows = reader.int64().toNumber();
433
+ break;
434
+ case /* int64 reminders_sent */ 3:
435
+ message.remindersSent = reader.int64().toNumber();
436
+ break;
437
+ case /* int64 auto_closed_rows */ 4:
438
+ message.autoClosedRows = reader.int64().toNumber();
439
+ break;
440
+ case /* int64 deleted_rows */ 5:
441
+ message.deletedRows = reader.int64().toNumber();
442
+ break;
443
+ case /* int64 updated_rows */ 6:
444
+ message.updatedRows = reader.int64().toNumber();
445
+ break;
401
446
  default:
402
447
  let u = options.readUnknownField;
403
448
  if (u === "throw")
@@ -413,6 +458,21 @@ class WorkflowCronData$Type extends MessageType<WorkflowCronData> {
413
458
  /* int64 last_doc_id = 1; */
414
459
  if (message.lastDocId !== 0)
415
460
  writer.tag(1, WireType.Varint).int64(message.lastDocId);
461
+ /* int64 processed_rows = 2; */
462
+ if (message.processedRows !== 0)
463
+ writer.tag(2, WireType.Varint).int64(message.processedRows);
464
+ /* int64 reminders_sent = 3; */
465
+ if (message.remindersSent !== 0)
466
+ writer.tag(3, WireType.Varint).int64(message.remindersSent);
467
+ /* int64 auto_closed_rows = 4; */
468
+ if (message.autoClosedRows !== 0)
469
+ writer.tag(4, WireType.Varint).int64(message.autoClosedRows);
470
+ /* int64 deleted_rows = 5; */
471
+ if (message.deletedRows !== 0)
472
+ writer.tag(5, WireType.Varint).int64(message.deletedRows);
473
+ /* int64 updated_rows = 6; */
474
+ if (message.updatedRows !== 0)
475
+ writer.tag(6, WireType.Varint).int64(message.updatedRows);
416
476
  let u = options.writeUnknownFields;
417
477
  if (u !== false)
418
478
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);