@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
@@ -0,0 +1,355 @@
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/stamp.proto" (package "resources.documents.stamps", 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.documents.stamps.Stamp
17
+ */
18
+ export interface Stamp {
19
+ /**
20
+ * @generated from protobuf field: int64 id = 1
21
+ */
22
+ id: number;
23
+ /**
24
+ * @generated from protobuf field: string job = 2
25
+ */
26
+ job: string;
27
+ /**
28
+ * @generated from protobuf field: optional string job_label = 3
29
+ */
30
+ jobLabel?: string;
31
+ /**
32
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 4
33
+ */
34
+ createdAt?: Timestamp;
35
+ /**
36
+ * @generated from protobuf field: string name = 5
37
+ */
38
+ name: string;
39
+ /**
40
+ * Parameterized SVG with slots
41
+ *
42
+ * @generated from protobuf field: string svg_template = 6
43
+ */
44
+ svgTemplate: string;
45
+ /**
46
+ * @generated from protobuf field: resources.documents.stamps.StampAccess access = 7
47
+ */
48
+ access?: StampAccess;
49
+ }
50
+ /**
51
+ * @generated from protobuf message resources.documents.stamps.StampAccess
52
+ */
53
+ export interface StampAccess {
54
+ /**
55
+ * @generated from protobuf field: repeated resources.documents.stamps.StampJobAccess jobs = 1
56
+ */
57
+ jobs: StampJobAccess[];
58
+ }
59
+ /**
60
+ * @generated from protobuf message resources.documents.stamps.StampJobAccess
61
+ */
62
+ export interface StampJobAccess {
63
+ /**
64
+ * @generated from protobuf field: int64 id = 1
65
+ */
66
+ id: number;
67
+ /**
68
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
69
+ */
70
+ createdAt?: Timestamp;
71
+ /**
72
+ * @generated from protobuf field: int64 target_id = 3
73
+ */
74
+ targetId: number;
75
+ /**
76
+ * @generated from protobuf field: string job = 4
77
+ */
78
+ job: string;
79
+ /**
80
+ * @generated from protobuf field: optional string job_label = 5
81
+ */
82
+ jobLabel?: string;
83
+ /**
84
+ * @generated from protobuf field: int32 minimum_grade = 6
85
+ */
86
+ minimumGrade: number;
87
+ /**
88
+ * @generated from protobuf field: optional string job_grade_label = 7
89
+ */
90
+ jobGradeLabel?: string;
91
+ /**
92
+ * @generated from protobuf field: resources.documents.stamps.StampAccessLevel access = 8
93
+ */
94
+ access: StampAccessLevel;
95
+ }
96
+ /**
97
+ * @generated from protobuf enum resources.documents.stamps.StampAccessLevel
98
+ */
99
+ export enum StampAccessLevel {
100
+ /**
101
+ * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_UNSPECIFIED = 0;
102
+ */
103
+ UNSPECIFIED = 0,
104
+ /**
105
+ * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_BLOCKED = 1;
106
+ */
107
+ BLOCKED = 1,
108
+ /**
109
+ * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_USE = 2;
110
+ */
111
+ USE = 2,
112
+ /**
113
+ * @generated from protobuf enum value: STAMP_ACCESS_LEVEL_MANAGE = 3;
114
+ */
115
+ MANAGE = 3
116
+ }
117
+ // @generated message type with reflection information, may provide speed optimized methods
118
+ class Stamp$Type extends MessageType<Stamp> {
119
+ constructor() {
120
+ super("resources.documents.stamps.Stamp", [
121
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
122
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
123
+ { no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
124
+ { no: 4, name: "created_at", kind: "message", T: () => Timestamp },
125
+ { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "120" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
126
+ { no: 6, name: "svg_template", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "SanitizeSVG" } } },
127
+ { no: 7, name: "access", kind: "message", T: () => StampAccess }
128
+ ]);
129
+ }
130
+ create(value?: PartialMessage<Stamp>): Stamp {
131
+ const message = globalThis.Object.create((this.messagePrototype!));
132
+ message.id = 0;
133
+ message.job = "";
134
+ message.name = "";
135
+ message.svgTemplate = "";
136
+ if (value !== undefined)
137
+ reflectionMergePartial<Stamp>(this, message, value);
138
+ return message;
139
+ }
140
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Stamp): Stamp {
141
+ let message = target ?? this.create(), end = reader.pos + length;
142
+ while (reader.pos < end) {
143
+ let [fieldNo, wireType] = reader.tag();
144
+ switch (fieldNo) {
145
+ case /* int64 id */ 1:
146
+ message.id = reader.int64().toNumber();
147
+ break;
148
+ case /* string job */ 2:
149
+ message.job = reader.string();
150
+ break;
151
+ case /* optional string job_label */ 3:
152
+ message.jobLabel = reader.string();
153
+ break;
154
+ case /* resources.timestamp.Timestamp created_at */ 4:
155
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
156
+ break;
157
+ case /* string name */ 5:
158
+ message.name = reader.string();
159
+ break;
160
+ case /* string svg_template */ 6:
161
+ message.svgTemplate = reader.string();
162
+ break;
163
+ case /* resources.documents.stamps.StampAccess access */ 7:
164
+ message.access = StampAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
165
+ break;
166
+ default:
167
+ let u = options.readUnknownField;
168
+ if (u === "throw")
169
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
170
+ let d = reader.skip(wireType);
171
+ if (u !== false)
172
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
173
+ }
174
+ }
175
+ return message;
176
+ }
177
+ internalBinaryWrite(message: Stamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
178
+ /* int64 id = 1; */
179
+ if (message.id !== 0)
180
+ writer.tag(1, WireType.Varint).int64(message.id);
181
+ /* string job = 2; */
182
+ if (message.job !== "")
183
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
184
+ /* optional string job_label = 3; */
185
+ if (message.jobLabel !== undefined)
186
+ writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
187
+ /* resources.timestamp.Timestamp created_at = 4; */
188
+ if (message.createdAt)
189
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
190
+ /* string name = 5; */
191
+ if (message.name !== "")
192
+ writer.tag(5, WireType.LengthDelimited).string(message.name);
193
+ /* string svg_template = 6; */
194
+ if (message.svgTemplate !== "")
195
+ writer.tag(6, WireType.LengthDelimited).string(message.svgTemplate);
196
+ /* resources.documents.stamps.StampAccess access = 7; */
197
+ if (message.access)
198
+ StampAccess.internalBinaryWrite(message.access, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
199
+ let u = options.writeUnknownFields;
200
+ if (u !== false)
201
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
202
+ return writer;
203
+ }
204
+ }
205
+ /**
206
+ * @generated MessageType for protobuf message resources.documents.stamps.Stamp
207
+ */
208
+ export const Stamp = new Stamp$Type();
209
+ // @generated message type with reflection information, may provide speed optimized methods
210
+ class StampAccess$Type extends MessageType<StampAccess> {
211
+ constructor() {
212
+ super("resources.documents.stamps.StampAccess", [
213
+ { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => StampJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } }
214
+ ]);
215
+ }
216
+ create(value?: PartialMessage<StampAccess>): StampAccess {
217
+ const message = globalThis.Object.create((this.messagePrototype!));
218
+ message.jobs = [];
219
+ if (value !== undefined)
220
+ reflectionMergePartial<StampAccess>(this, message, value);
221
+ return message;
222
+ }
223
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StampAccess): StampAccess {
224
+ let message = target ?? this.create(), end = reader.pos + length;
225
+ while (reader.pos < end) {
226
+ let [fieldNo, wireType] = reader.tag();
227
+ switch (fieldNo) {
228
+ case /* repeated resources.documents.stamps.StampJobAccess jobs */ 1:
229
+ message.jobs.push(StampJobAccess.internalBinaryRead(reader, reader.uint32(), options));
230
+ break;
231
+ default:
232
+ let u = options.readUnknownField;
233
+ if (u === "throw")
234
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
235
+ let d = reader.skip(wireType);
236
+ if (u !== false)
237
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
238
+ }
239
+ }
240
+ return message;
241
+ }
242
+ internalBinaryWrite(message: StampAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
243
+ /* repeated resources.documents.stamps.StampJobAccess jobs = 1; */
244
+ for (let i = 0; i < message.jobs.length; i++)
245
+ StampJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
246
+ let u = options.writeUnknownFields;
247
+ if (u !== false)
248
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
249
+ return writer;
250
+ }
251
+ }
252
+ /**
253
+ * @generated MessageType for protobuf message resources.documents.stamps.StampAccess
254
+ */
255
+ export const StampAccess = new StampAccess$Type();
256
+ // @generated message type with reflection information, may provide speed optimized methods
257
+ class StampJobAccess$Type extends MessageType<StampJobAccess> {
258
+ constructor() {
259
+ super("resources.documents.stamps.StampJobAccess", [
260
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
261
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
262
+ { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
263
+ { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
264
+ { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
265
+ { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
266
+ { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
267
+ { no: 8, name: "access", kind: "enum", T: () => ["resources.documents.stamps.StampAccessLevel", StampAccessLevel, "STAMP_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
268
+ ]);
269
+ }
270
+ create(value?: PartialMessage<StampJobAccess>): StampJobAccess {
271
+ const message = globalThis.Object.create((this.messagePrototype!));
272
+ message.id = 0;
273
+ message.targetId = 0;
274
+ message.job = "";
275
+ message.minimumGrade = 0;
276
+ message.access = 0;
277
+ if (value !== undefined)
278
+ reflectionMergePartial<StampJobAccess>(this, message, value);
279
+ return message;
280
+ }
281
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StampJobAccess): StampJobAccess {
282
+ let message = target ?? this.create(), end = reader.pos + length;
283
+ while (reader.pos < end) {
284
+ let [fieldNo, wireType] = reader.tag();
285
+ switch (fieldNo) {
286
+ case /* int64 id */ 1:
287
+ message.id = reader.int64().toNumber();
288
+ break;
289
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
290
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
291
+ break;
292
+ case /* int64 target_id */ 3:
293
+ message.targetId = reader.int64().toNumber();
294
+ break;
295
+ case /* string job */ 4:
296
+ message.job = reader.string();
297
+ break;
298
+ case /* optional string job_label */ 5:
299
+ message.jobLabel = reader.string();
300
+ break;
301
+ case /* int32 minimum_grade */ 6:
302
+ message.minimumGrade = reader.int32();
303
+ break;
304
+ case /* optional string job_grade_label */ 7:
305
+ message.jobGradeLabel = reader.string();
306
+ break;
307
+ case /* resources.documents.stamps.StampAccessLevel access */ 8:
308
+ message.access = reader.int32();
309
+ break;
310
+ default:
311
+ let u = options.readUnknownField;
312
+ if (u === "throw")
313
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
314
+ let d = reader.skip(wireType);
315
+ if (u !== false)
316
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
317
+ }
318
+ }
319
+ return message;
320
+ }
321
+ internalBinaryWrite(message: StampJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
322
+ /* int64 id = 1; */
323
+ if (message.id !== 0)
324
+ writer.tag(1, WireType.Varint).int64(message.id);
325
+ /* optional resources.timestamp.Timestamp created_at = 2; */
326
+ if (message.createdAt)
327
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
328
+ /* int64 target_id = 3; */
329
+ if (message.targetId !== 0)
330
+ writer.tag(3, WireType.Varint).int64(message.targetId);
331
+ /* string job = 4; */
332
+ if (message.job !== "")
333
+ writer.tag(4, WireType.LengthDelimited).string(message.job);
334
+ /* optional string job_label = 5; */
335
+ if (message.jobLabel !== undefined)
336
+ writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
337
+ /* int32 minimum_grade = 6; */
338
+ if (message.minimumGrade !== 0)
339
+ writer.tag(6, WireType.Varint).int32(message.minimumGrade);
340
+ /* optional string job_grade_label = 7; */
341
+ if (message.jobGradeLabel !== undefined)
342
+ writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
343
+ /* resources.documents.stamps.StampAccessLevel access = 8; */
344
+ if (message.access !== 0)
345
+ writer.tag(8, WireType.Varint).int32(message.access);
346
+ let u = options.writeUnknownFields;
347
+ if (u !== false)
348
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
349
+ return writer;
350
+ }
351
+ }
352
+ /**
353
+ * @generated MessageType for protobuf message resources.documents.stamps.StampJobAccess
354
+ */
355
+ export const StampJobAccess = new StampJobAccess$Type();