@fivenet-app/gen 0.9.3-1

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 (123) hide show
  1. package/README.md +1 -0
  2. package/google/protobuf/any.ts +322 -0
  3. package/google/protobuf/descriptor.ts +3475 -0
  4. package/google/protobuf/duration.ts +231 -0
  5. package/google/protobuf/timestamp.ts +290 -0
  6. package/package.json +15 -0
  7. package/perms.ts +178 -0
  8. package/resources/accounts/accounts.ts +195 -0
  9. package/resources/accounts/oauth2.ts +230 -0
  10. package/resources/calendar/access.ts +362 -0
  11. package/resources/calendar/calendar.ts +955 -0
  12. package/resources/centrum/access.ts +380 -0
  13. package/resources/centrum/dispatches.ts +854 -0
  14. package/resources/centrum/general.ts +231 -0
  15. package/resources/centrum/settings.ts +303 -0
  16. package/resources/centrum/units.ts +620 -0
  17. package/resources/common/access/dummy.ts +309 -0
  18. package/resources/common/content/content.ts +252 -0
  19. package/resources/common/cron/cron.ts +536 -0
  20. package/resources/common/database/database.ts +306 -0
  21. package/resources/common/error.ts +79 -0
  22. package/resources/common/grpcws/grpcws.ts +615 -0
  23. package/resources/common/i18n.ts +102 -0
  24. package/resources/common/uuid.ts +68 -0
  25. package/resources/documents/access.ts +388 -0
  26. package/resources/documents/activity.ts +803 -0
  27. package/resources/documents/category.ts +132 -0
  28. package/resources/documents/comment.ts +161 -0
  29. package/resources/documents/documents.ts +1124 -0
  30. package/resources/documents/requests.ts +196 -0
  31. package/resources/documents/templates.ts +949 -0
  32. package/resources/documents/workflow.ts +349 -0
  33. package/resources/filestore/file.ts +204 -0
  34. package/resources/internet/ads.ts +257 -0
  35. package/resources/internet/domain.ts +136 -0
  36. package/resources/internet/internet.ts +344 -0
  37. package/resources/internet/page.ts +236 -0
  38. package/resources/internet/search.ts +104 -0
  39. package/resources/jobs/activity.ts +600 -0
  40. package/resources/jobs/colleagues.ts +346 -0
  41. package/resources/jobs/conduct.ts +220 -0
  42. package/resources/jobs/labels.ts +240 -0
  43. package/resources/jobs/timeclock.ts +372 -0
  44. package/resources/laws/laws.ts +293 -0
  45. package/resources/livemap/livemap.ts +728 -0
  46. package/resources/livemap/tracker.ts +81 -0
  47. package/resources/mailer/access.ts +485 -0
  48. package/resources/mailer/email.ts +222 -0
  49. package/resources/mailer/events.ts +196 -0
  50. package/resources/mailer/message.ts +285 -0
  51. package/resources/mailer/settings.ts +95 -0
  52. package/resources/mailer/template.ts +164 -0
  53. package/resources/mailer/thread.ts +422 -0
  54. package/resources/mailer/user.ts +93 -0
  55. package/resources/notifications/events.ts +287 -0
  56. package/resources/notifications/notifications.ts +444 -0
  57. package/resources/permissions/permissions.ts +829 -0
  58. package/resources/qualifications/access.ts +275 -0
  59. package/resources/qualifications/exam.ts +1421 -0
  60. package/resources/qualifications/qualifications.ts +1289 -0
  61. package/resources/rector/audit.ts +226 -0
  62. package/resources/rector/config.ts +922 -0
  63. package/resources/stats/stats.ts +67 -0
  64. package/resources/sync/activity.ts +356 -0
  65. package/resources/sync/data.ts +455 -0
  66. package/resources/timestamp/timestamp.ts +78 -0
  67. package/resources/users/activity.ts +211 -0
  68. package/resources/users/job_props.ts +992 -0
  69. package/resources/users/jobs.ts +171 -0
  70. package/resources/users/labels.ts +161 -0
  71. package/resources/users/props.ts +207 -0
  72. package/resources/users/users.ts +570 -0
  73. package/resources/vehicles/vehicles.ts +114 -0
  74. package/resources/wiki/access.ts +362 -0
  75. package/resources/wiki/activity.ts +591 -0
  76. package/resources/wiki/page.ts +548 -0
  77. package/services/auth/auth.client.ts +171 -0
  78. package/services/auth/auth.ts +1331 -0
  79. package/services/calendar/calendar.client.ts +262 -0
  80. package/services/calendar/calendar.ts +1733 -0
  81. package/services/centrum/centrum.client.ts +365 -0
  82. package/services/centrum/centrum.ts +2619 -0
  83. package/services/citizenstore/citizenstore.client.ts +126 -0
  84. package/services/citizenstore/citizenstore.ts +847 -0
  85. package/services/completor/completor.client.ts +109 -0
  86. package/services/completor/completor.ts +616 -0
  87. package/services/dmv/vehicles.client.ts +41 -0
  88. package/services/dmv/vehicles.ts +191 -0
  89. package/services/docstore/docstore.client.ts +653 -0
  90. package/services/docstore/docstore.ts +4571 -0
  91. package/services/internet/ads.client.ts +41 -0
  92. package/services/internet/ads.ts +145 -0
  93. package/services/internet/internet.client.ts +58 -0
  94. package/services/internet/internet.ts +257 -0
  95. package/services/jobs/conduct.client.ts +92 -0
  96. package/services/jobs/conduct.ts +541 -0
  97. package/services/jobs/jobs.client.ts +194 -0
  98. package/services/jobs/jobs.ts +1301 -0
  99. package/services/jobs/timeclock.client.ts +75 -0
  100. package/services/jobs/timeclock.ts +808 -0
  101. package/services/livemapper/livemap.client.ts +76 -0
  102. package/services/livemapper/livemap.ts +552 -0
  103. package/services/mailer/mailer.client.ts +381 -0
  104. package/services/mailer/mailer.ts +2590 -0
  105. package/services/notificator/notificator.client.ts +76 -0
  106. package/services/notificator/notificator.ts +510 -0
  107. package/services/qualifications/qualifications.client.ts +279 -0
  108. package/services/qualifications/qualifications.ts +2142 -0
  109. package/services/rector/config.client.ts +58 -0
  110. package/services/rector/config.ts +216 -0
  111. package/services/rector/filestore.client.ts +75 -0
  112. package/services/rector/filestore.ts +378 -0
  113. package/services/rector/laws.client.ts +92 -0
  114. package/services/rector/laws.ts +416 -0
  115. package/services/rector/rector.client.ts +211 -0
  116. package/services/rector/rector.ts +1540 -0
  117. package/services/stats/stats.client.ts +37 -0
  118. package/services/stats/stats.ts +128 -0
  119. package/services/sync/sync.client.ts +110 -0
  120. package/services/sync/sync.ts +831 -0
  121. package/services/wiki/wiki.client.ts +126 -0
  122. package/services/wiki/wiki.ts +749 -0
  123. package/svcs.ts +307 -0
@@ -0,0 +1,949 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/documents/templates.proto" (package "resources.documents", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ import { AccessLevel } from "./access";
14
+ import { Vehicle } from "../vehicles/vehicles";
15
+ import { UserShort } from "../users/users";
16
+ import { DocumentShort } from "./documents";
17
+ import { User } from "../users/users";
18
+ import { Workflow } from "./workflow";
19
+ import { DocumentAccess } from "./access";
20
+ import { Category } from "./category";
21
+ import { Timestamp } from "../timestamp/timestamp";
22
+ /**
23
+ * @generated from protobuf message resources.documents.Template
24
+ */
25
+ export interface Template {
26
+ /**
27
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
28
+ */
29
+ id: string; // @gotags: alias:"id"
30
+ /**
31
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
32
+ */
33
+ createdAt?: Timestamp;
34
+ /**
35
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
36
+ */
37
+ updatedAt?: Timestamp;
38
+ /**
39
+ * @generated from protobuf field: resources.documents.Category category = 4;
40
+ */
41
+ category?: Category; // @gotags: alias:"category"
42
+ /**
43
+ * @generated from protobuf field: uint32 weight = 5;
44
+ */
45
+ weight: number;
46
+ /**
47
+ * @sanitize
48
+ *
49
+ * @generated from protobuf field: string title = 6;
50
+ */
51
+ title: string;
52
+ /**
53
+ * @sanitize
54
+ *
55
+ * @generated from protobuf field: string description = 7;
56
+ */
57
+ description: string;
58
+ /**
59
+ * @sanitize: method=StripTags
60
+ *
61
+ * @generated from protobuf field: optional string color = 8;
62
+ */
63
+ color?: string;
64
+ /**
65
+ * @sanitize: method=StripTags
66
+ *
67
+ * @generated from protobuf field: optional string icon = 9;
68
+ */
69
+ icon?: string;
70
+ /**
71
+ * @generated from protobuf field: string content_title = 10;
72
+ */
73
+ contentTitle: string; // @gotags: alias:"content_title"
74
+ /**
75
+ * @generated from protobuf field: string content = 11;
76
+ */
77
+ content: string; // @gotags: alias:"content"
78
+ /**
79
+ * @generated from protobuf field: string state = 12;
80
+ */
81
+ state: string; // @gotags: alias:"state"
82
+ /**
83
+ * @generated from protobuf field: resources.documents.TemplateSchema schema = 13;
84
+ */
85
+ schema?: TemplateSchema; // @gotags: alias:"schema"
86
+ /**
87
+ * @generated from protobuf field: string creator_job = 14;
88
+ */
89
+ creatorJob: string;
90
+ /**
91
+ * @generated from protobuf field: optional string creator_job_label = 15;
92
+ */
93
+ creatorJobLabel?: string;
94
+ /**
95
+ * @generated from protobuf field: repeated resources.documents.TemplateJobAccess job_access = 16;
96
+ */
97
+ jobAccess: TemplateJobAccess[];
98
+ /**
99
+ * @generated from protobuf field: resources.documents.DocumentAccess content_access = 17;
100
+ */
101
+ contentAccess?: DocumentAccess; // @gotags: alias:"access"
102
+ /**
103
+ * @generated from protobuf field: optional resources.documents.Workflow workflow = 18;
104
+ */
105
+ workflow?: Workflow;
106
+ }
107
+ /**
108
+ * @generated from protobuf message resources.documents.TemplateShort
109
+ */
110
+ export interface TemplateShort {
111
+ /**
112
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
113
+ */
114
+ id: string; // @gotags: alias:"id"
115
+ /**
116
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
117
+ */
118
+ createdAt?: Timestamp;
119
+ /**
120
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
121
+ */
122
+ updatedAt?: Timestamp;
123
+ /**
124
+ * @generated from protobuf field: resources.documents.Category category = 4;
125
+ */
126
+ category?: Category; // @gotags: alias:"category"
127
+ /**
128
+ * @generated from protobuf field: uint32 weight = 5;
129
+ */
130
+ weight: number;
131
+ /**
132
+ * @sanitize
133
+ *
134
+ * @generated from protobuf field: string title = 6;
135
+ */
136
+ title: string;
137
+ /**
138
+ * @sanitize
139
+ *
140
+ * @generated from protobuf field: string description = 7;
141
+ */
142
+ description: string;
143
+ /**
144
+ * @sanitize: method=StripTags
145
+ *
146
+ * @generated from protobuf field: optional string color = 8;
147
+ */
148
+ color?: string;
149
+ /**
150
+ * @sanitize: method=StripTags
151
+ *
152
+ * @generated from protobuf field: optional string icon = 9;
153
+ */
154
+ icon?: string;
155
+ /**
156
+ * @generated from protobuf field: resources.documents.TemplateSchema schema = 10;
157
+ */
158
+ schema?: TemplateSchema; // @gotags: alias:"schema"
159
+ /**
160
+ * @generated from protobuf field: string creator_job = 11;
161
+ */
162
+ creatorJob: string;
163
+ /**
164
+ * @generated from protobuf field: optional string creator_job_label = 12;
165
+ */
166
+ creatorJobLabel?: string;
167
+ /**
168
+ * @generated from protobuf field: optional resources.documents.Workflow workflow = 18;
169
+ */
170
+ workflow?: Workflow;
171
+ }
172
+ /**
173
+ * @generated from protobuf message resources.documents.TemplateSchema
174
+ */
175
+ export interface TemplateSchema {
176
+ /**
177
+ * @generated from protobuf field: resources.documents.TemplateRequirements requirements = 1;
178
+ */
179
+ requirements?: TemplateRequirements;
180
+ }
181
+ /**
182
+ * @generated from protobuf message resources.documents.TemplateRequirements
183
+ */
184
+ export interface TemplateRequirements {
185
+ /**
186
+ * @generated from protobuf field: optional resources.documents.ObjectSpecs documents = 1;
187
+ */
188
+ documents?: ObjectSpecs;
189
+ /**
190
+ * @generated from protobuf field: optional resources.documents.ObjectSpecs users = 2;
191
+ */
192
+ users?: ObjectSpecs;
193
+ /**
194
+ * @generated from protobuf field: optional resources.documents.ObjectSpecs vehicles = 3;
195
+ */
196
+ vehicles?: ObjectSpecs;
197
+ }
198
+ /**
199
+ * @generated from protobuf message resources.documents.ObjectSpecs
200
+ */
201
+ export interface ObjectSpecs {
202
+ /**
203
+ * @generated from protobuf field: optional bool required = 1;
204
+ */
205
+ required?: boolean;
206
+ /**
207
+ * @generated from protobuf field: optional int32 min = 2;
208
+ */
209
+ min?: number;
210
+ /**
211
+ * @generated from protobuf field: optional int32 max = 3;
212
+ */
213
+ max?: number;
214
+ }
215
+ /**
216
+ * @generated from protobuf message resources.documents.TemplateData
217
+ */
218
+ export interface TemplateData {
219
+ /**
220
+ * @generated from protobuf field: resources.users.User activeChar = 1;
221
+ */
222
+ activeChar?: User;
223
+ /**
224
+ * @generated from protobuf field: repeated resources.documents.DocumentShort documents = 2;
225
+ */
226
+ documents: DocumentShort[];
227
+ /**
228
+ * @generated from protobuf field: repeated resources.users.UserShort users = 3;
229
+ */
230
+ users: UserShort[];
231
+ /**
232
+ * @generated from protobuf field: repeated resources.vehicles.Vehicle vehicles = 4;
233
+ */
234
+ vehicles: Vehicle[];
235
+ }
236
+ /**
237
+ * @generated from protobuf message resources.documents.TemplateJobAccess
238
+ */
239
+ export interface TemplateJobAccess {
240
+ /**
241
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
242
+ */
243
+ id: string; // @gotags: alias:"id"
244
+ /**
245
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
246
+ */
247
+ createdAt?: Timestamp;
248
+ /**
249
+ * @generated from protobuf field: uint64 target_id = 3 [jstype = JS_STRING];
250
+ */
251
+ targetId: string; // @gotags: alias:"template_id"
252
+ /**
253
+ * @generated from protobuf field: string job = 4;
254
+ */
255
+ job: string;
256
+ /**
257
+ * @generated from protobuf field: optional string job_label = 5;
258
+ */
259
+ jobLabel?: string;
260
+ /**
261
+ * @generated from protobuf field: int32 minimum_grade = 6;
262
+ */
263
+ minimumGrade: number;
264
+ /**
265
+ * @generated from protobuf field: optional string job_grade_label = 7;
266
+ */
267
+ jobGradeLabel?: string;
268
+ /**
269
+ * @generated from protobuf field: resources.documents.AccessLevel access = 8;
270
+ */
271
+ access: AccessLevel;
272
+ }
273
+ /**
274
+ * Dummy - DO NOT USE!
275
+ *
276
+ * @generated from protobuf message resources.documents.TemplateUserAccess
277
+ */
278
+ export interface TemplateUserAccess {
279
+ }
280
+ // @generated message type with reflection information, may provide speed optimized methods
281
+ class Template$Type extends MessageType<Template> {
282
+ constructor() {
283
+ super("resources.documents.Template", [
284
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
285
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
286
+ { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
287
+ { no: 4, name: "category", kind: "message", T: () => Category },
288
+ { no: 5, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "validate.rules": { uint32: { lt: 4294967295 } } } },
289
+ { no: 6, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3" } } } },
290
+ { no: 7, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
291
+ { no: 8, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "7" } } } },
292
+ { no: 9, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
293
+ { no: 10, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxBytes: "10240" } } } },
294
+ { no: 11, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "0", maxBytes: "2000000" } } } },
295
+ { no: 12, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "32" } } } },
296
+ { no: 13, name: "schema", kind: "message", T: () => TemplateSchema },
297
+ { no: 14, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
298
+ { no: 15, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
299
+ { no: 16, name: "job_access", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TemplateJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
300
+ { no: 17, name: "content_access", kind: "message", T: () => DocumentAccess },
301
+ { no: 18, name: "workflow", kind: "message", T: () => Workflow }
302
+ ]);
303
+ }
304
+ create(value?: PartialMessage<Template>): Template {
305
+ const message = globalThis.Object.create((this.messagePrototype!));
306
+ message.id = "0";
307
+ message.weight = 0;
308
+ message.title = "";
309
+ message.description = "";
310
+ message.contentTitle = "";
311
+ message.content = "";
312
+ message.state = "";
313
+ message.creatorJob = "";
314
+ message.jobAccess = [];
315
+ if (value !== undefined)
316
+ reflectionMergePartial<Template>(this, message, value);
317
+ return message;
318
+ }
319
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Template): Template {
320
+ let message = target ?? this.create(), end = reader.pos + length;
321
+ while (reader.pos < end) {
322
+ let [fieldNo, wireType] = reader.tag();
323
+ switch (fieldNo) {
324
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
325
+ message.id = reader.uint64().toString();
326
+ break;
327
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
328
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
329
+ break;
330
+ case /* optional resources.timestamp.Timestamp updated_at */ 3:
331
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
332
+ break;
333
+ case /* resources.documents.Category category */ 4:
334
+ message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
335
+ break;
336
+ case /* uint32 weight */ 5:
337
+ message.weight = reader.uint32();
338
+ break;
339
+ case /* string title */ 6:
340
+ message.title = reader.string();
341
+ break;
342
+ case /* string description */ 7:
343
+ message.description = reader.string();
344
+ break;
345
+ case /* optional string color */ 8:
346
+ message.color = reader.string();
347
+ break;
348
+ case /* optional string icon */ 9:
349
+ message.icon = reader.string();
350
+ break;
351
+ case /* string content_title */ 10:
352
+ message.contentTitle = reader.string();
353
+ break;
354
+ case /* string content */ 11:
355
+ message.content = reader.string();
356
+ break;
357
+ case /* string state */ 12:
358
+ message.state = reader.string();
359
+ break;
360
+ case /* resources.documents.TemplateSchema schema */ 13:
361
+ message.schema = TemplateSchema.internalBinaryRead(reader, reader.uint32(), options, message.schema);
362
+ break;
363
+ case /* string creator_job */ 14:
364
+ message.creatorJob = reader.string();
365
+ break;
366
+ case /* optional string creator_job_label */ 15:
367
+ message.creatorJobLabel = reader.string();
368
+ break;
369
+ case /* repeated resources.documents.TemplateJobAccess job_access */ 16:
370
+ message.jobAccess.push(TemplateJobAccess.internalBinaryRead(reader, reader.uint32(), options));
371
+ break;
372
+ case /* resources.documents.DocumentAccess content_access */ 17:
373
+ message.contentAccess = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.contentAccess);
374
+ break;
375
+ case /* optional resources.documents.Workflow workflow */ 18:
376
+ message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
377
+ break;
378
+ default:
379
+ let u = options.readUnknownField;
380
+ if (u === "throw")
381
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
382
+ let d = reader.skip(wireType);
383
+ if (u !== false)
384
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
385
+ }
386
+ }
387
+ return message;
388
+ }
389
+ internalBinaryWrite(message: Template, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
390
+ /* uint64 id = 1 [jstype = JS_STRING]; */
391
+ if (message.id !== "0")
392
+ writer.tag(1, WireType.Varint).uint64(message.id);
393
+ /* optional resources.timestamp.Timestamp created_at = 2; */
394
+ if (message.createdAt)
395
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
396
+ /* optional resources.timestamp.Timestamp updated_at = 3; */
397
+ if (message.updatedAt)
398
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
399
+ /* resources.documents.Category category = 4; */
400
+ if (message.category)
401
+ Category.internalBinaryWrite(message.category, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
402
+ /* uint32 weight = 5; */
403
+ if (message.weight !== 0)
404
+ writer.tag(5, WireType.Varint).uint32(message.weight);
405
+ /* string title = 6; */
406
+ if (message.title !== "")
407
+ writer.tag(6, WireType.LengthDelimited).string(message.title);
408
+ /* string description = 7; */
409
+ if (message.description !== "")
410
+ writer.tag(7, WireType.LengthDelimited).string(message.description);
411
+ /* optional string color = 8; */
412
+ if (message.color !== undefined)
413
+ writer.tag(8, WireType.LengthDelimited).string(message.color);
414
+ /* optional string icon = 9; */
415
+ if (message.icon !== undefined)
416
+ writer.tag(9, WireType.LengthDelimited).string(message.icon);
417
+ /* string content_title = 10; */
418
+ if (message.contentTitle !== "")
419
+ writer.tag(10, WireType.LengthDelimited).string(message.contentTitle);
420
+ /* string content = 11; */
421
+ if (message.content !== "")
422
+ writer.tag(11, WireType.LengthDelimited).string(message.content);
423
+ /* string state = 12; */
424
+ if (message.state !== "")
425
+ writer.tag(12, WireType.LengthDelimited).string(message.state);
426
+ /* resources.documents.TemplateSchema schema = 13; */
427
+ if (message.schema)
428
+ TemplateSchema.internalBinaryWrite(message.schema, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
429
+ /* string creator_job = 14; */
430
+ if (message.creatorJob !== "")
431
+ writer.tag(14, WireType.LengthDelimited).string(message.creatorJob);
432
+ /* optional string creator_job_label = 15; */
433
+ if (message.creatorJobLabel !== undefined)
434
+ writer.tag(15, WireType.LengthDelimited).string(message.creatorJobLabel);
435
+ /* repeated resources.documents.TemplateJobAccess job_access = 16; */
436
+ for (let i = 0; i < message.jobAccess.length; i++)
437
+ TemplateJobAccess.internalBinaryWrite(message.jobAccess[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
438
+ /* resources.documents.DocumentAccess content_access = 17; */
439
+ if (message.contentAccess)
440
+ DocumentAccess.internalBinaryWrite(message.contentAccess, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
441
+ /* optional resources.documents.Workflow workflow = 18; */
442
+ if (message.workflow)
443
+ Workflow.internalBinaryWrite(message.workflow, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
444
+ let u = options.writeUnknownFields;
445
+ if (u !== false)
446
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
447
+ return writer;
448
+ }
449
+ }
450
+ /**
451
+ * @generated MessageType for protobuf message resources.documents.Template
452
+ */
453
+ export const Template = new Template$Type();
454
+ // @generated message type with reflection information, may provide speed optimized methods
455
+ class TemplateShort$Type extends MessageType<TemplateShort> {
456
+ constructor() {
457
+ super("resources.documents.TemplateShort", [
458
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
459
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
460
+ { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
461
+ { no: 4, name: "category", kind: "message", T: () => Category },
462
+ { no: 5, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "validate.rules": { uint32: { lt: 4294967295 } } } },
463
+ { no: 6, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3" } } } },
464
+ { no: 7, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
465
+ { no: 8, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "7" } } } },
466
+ { no: 9, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
467
+ { no: 10, name: "schema", kind: "message", T: () => TemplateSchema },
468
+ { no: 11, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
469
+ { no: 12, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
470
+ { no: 18, name: "workflow", kind: "message", T: () => Workflow }
471
+ ]);
472
+ }
473
+ create(value?: PartialMessage<TemplateShort>): TemplateShort {
474
+ const message = globalThis.Object.create((this.messagePrototype!));
475
+ message.id = "0";
476
+ message.weight = 0;
477
+ message.title = "";
478
+ message.description = "";
479
+ message.creatorJob = "";
480
+ if (value !== undefined)
481
+ reflectionMergePartial<TemplateShort>(this, message, value);
482
+ return message;
483
+ }
484
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateShort): TemplateShort {
485
+ let message = target ?? this.create(), end = reader.pos + length;
486
+ while (reader.pos < end) {
487
+ let [fieldNo, wireType] = reader.tag();
488
+ switch (fieldNo) {
489
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
490
+ message.id = reader.uint64().toString();
491
+ break;
492
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
493
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
494
+ break;
495
+ case /* optional resources.timestamp.Timestamp updated_at */ 3:
496
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
497
+ break;
498
+ case /* resources.documents.Category category */ 4:
499
+ message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
500
+ break;
501
+ case /* uint32 weight */ 5:
502
+ message.weight = reader.uint32();
503
+ break;
504
+ case /* string title */ 6:
505
+ message.title = reader.string();
506
+ break;
507
+ case /* string description */ 7:
508
+ message.description = reader.string();
509
+ break;
510
+ case /* optional string color */ 8:
511
+ message.color = reader.string();
512
+ break;
513
+ case /* optional string icon */ 9:
514
+ message.icon = reader.string();
515
+ break;
516
+ case /* resources.documents.TemplateSchema schema */ 10:
517
+ message.schema = TemplateSchema.internalBinaryRead(reader, reader.uint32(), options, message.schema);
518
+ break;
519
+ case /* string creator_job */ 11:
520
+ message.creatorJob = reader.string();
521
+ break;
522
+ case /* optional string creator_job_label */ 12:
523
+ message.creatorJobLabel = reader.string();
524
+ break;
525
+ case /* optional resources.documents.Workflow workflow */ 18:
526
+ message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
527
+ break;
528
+ default:
529
+ let u = options.readUnknownField;
530
+ if (u === "throw")
531
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
532
+ let d = reader.skip(wireType);
533
+ if (u !== false)
534
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
535
+ }
536
+ }
537
+ return message;
538
+ }
539
+ internalBinaryWrite(message: TemplateShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
540
+ /* uint64 id = 1 [jstype = JS_STRING]; */
541
+ if (message.id !== "0")
542
+ writer.tag(1, WireType.Varint).uint64(message.id);
543
+ /* optional resources.timestamp.Timestamp created_at = 2; */
544
+ if (message.createdAt)
545
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
546
+ /* optional resources.timestamp.Timestamp updated_at = 3; */
547
+ if (message.updatedAt)
548
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
549
+ /* resources.documents.Category category = 4; */
550
+ if (message.category)
551
+ Category.internalBinaryWrite(message.category, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
552
+ /* uint32 weight = 5; */
553
+ if (message.weight !== 0)
554
+ writer.tag(5, WireType.Varint).uint32(message.weight);
555
+ /* string title = 6; */
556
+ if (message.title !== "")
557
+ writer.tag(6, WireType.LengthDelimited).string(message.title);
558
+ /* string description = 7; */
559
+ if (message.description !== "")
560
+ writer.tag(7, WireType.LengthDelimited).string(message.description);
561
+ /* optional string color = 8; */
562
+ if (message.color !== undefined)
563
+ writer.tag(8, WireType.LengthDelimited).string(message.color);
564
+ /* optional string icon = 9; */
565
+ if (message.icon !== undefined)
566
+ writer.tag(9, WireType.LengthDelimited).string(message.icon);
567
+ /* resources.documents.TemplateSchema schema = 10; */
568
+ if (message.schema)
569
+ TemplateSchema.internalBinaryWrite(message.schema, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
570
+ /* string creator_job = 11; */
571
+ if (message.creatorJob !== "")
572
+ writer.tag(11, WireType.LengthDelimited).string(message.creatorJob);
573
+ /* optional string creator_job_label = 12; */
574
+ if (message.creatorJobLabel !== undefined)
575
+ writer.tag(12, WireType.LengthDelimited).string(message.creatorJobLabel);
576
+ /* optional resources.documents.Workflow workflow = 18; */
577
+ if (message.workflow)
578
+ Workflow.internalBinaryWrite(message.workflow, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
579
+ let u = options.writeUnknownFields;
580
+ if (u !== false)
581
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
582
+ return writer;
583
+ }
584
+ }
585
+ /**
586
+ * @generated MessageType for protobuf message resources.documents.TemplateShort
587
+ */
588
+ export const TemplateShort = new TemplateShort$Type();
589
+ // @generated message type with reflection information, may provide speed optimized methods
590
+ class TemplateSchema$Type extends MessageType<TemplateSchema> {
591
+ constructor() {
592
+ super("resources.documents.TemplateSchema", [
593
+ { no: 1, name: "requirements", kind: "message", T: () => TemplateRequirements }
594
+ ]);
595
+ }
596
+ create(value?: PartialMessage<TemplateSchema>): TemplateSchema {
597
+ const message = globalThis.Object.create((this.messagePrototype!));
598
+ if (value !== undefined)
599
+ reflectionMergePartial<TemplateSchema>(this, message, value);
600
+ return message;
601
+ }
602
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateSchema): TemplateSchema {
603
+ let message = target ?? this.create(), end = reader.pos + length;
604
+ while (reader.pos < end) {
605
+ let [fieldNo, wireType] = reader.tag();
606
+ switch (fieldNo) {
607
+ case /* resources.documents.TemplateRequirements requirements */ 1:
608
+ message.requirements = TemplateRequirements.internalBinaryRead(reader, reader.uint32(), options, message.requirements);
609
+ break;
610
+ default:
611
+ let u = options.readUnknownField;
612
+ if (u === "throw")
613
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
614
+ let d = reader.skip(wireType);
615
+ if (u !== false)
616
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
617
+ }
618
+ }
619
+ return message;
620
+ }
621
+ internalBinaryWrite(message: TemplateSchema, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
622
+ /* resources.documents.TemplateRequirements requirements = 1; */
623
+ if (message.requirements)
624
+ TemplateRequirements.internalBinaryWrite(message.requirements, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
625
+ let u = options.writeUnknownFields;
626
+ if (u !== false)
627
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
628
+ return writer;
629
+ }
630
+ }
631
+ /**
632
+ * @generated MessageType for protobuf message resources.documents.TemplateSchema
633
+ */
634
+ export const TemplateSchema = new TemplateSchema$Type();
635
+ // @generated message type with reflection information, may provide speed optimized methods
636
+ class TemplateRequirements$Type extends MessageType<TemplateRequirements> {
637
+ constructor() {
638
+ super("resources.documents.TemplateRequirements", [
639
+ { no: 1, name: "documents", kind: "message", T: () => ObjectSpecs },
640
+ { no: 2, name: "users", kind: "message", T: () => ObjectSpecs },
641
+ { no: 3, name: "vehicles", kind: "message", T: () => ObjectSpecs }
642
+ ]);
643
+ }
644
+ create(value?: PartialMessage<TemplateRequirements>): TemplateRequirements {
645
+ const message = globalThis.Object.create((this.messagePrototype!));
646
+ if (value !== undefined)
647
+ reflectionMergePartial<TemplateRequirements>(this, message, value);
648
+ return message;
649
+ }
650
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateRequirements): TemplateRequirements {
651
+ let message = target ?? this.create(), end = reader.pos + length;
652
+ while (reader.pos < end) {
653
+ let [fieldNo, wireType] = reader.tag();
654
+ switch (fieldNo) {
655
+ case /* optional resources.documents.ObjectSpecs documents */ 1:
656
+ message.documents = ObjectSpecs.internalBinaryRead(reader, reader.uint32(), options, message.documents);
657
+ break;
658
+ case /* optional resources.documents.ObjectSpecs users */ 2:
659
+ message.users = ObjectSpecs.internalBinaryRead(reader, reader.uint32(), options, message.users);
660
+ break;
661
+ case /* optional resources.documents.ObjectSpecs vehicles */ 3:
662
+ message.vehicles = ObjectSpecs.internalBinaryRead(reader, reader.uint32(), options, message.vehicles);
663
+ break;
664
+ default:
665
+ let u = options.readUnknownField;
666
+ if (u === "throw")
667
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
668
+ let d = reader.skip(wireType);
669
+ if (u !== false)
670
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
671
+ }
672
+ }
673
+ return message;
674
+ }
675
+ internalBinaryWrite(message: TemplateRequirements, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
676
+ /* optional resources.documents.ObjectSpecs documents = 1; */
677
+ if (message.documents)
678
+ ObjectSpecs.internalBinaryWrite(message.documents, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
679
+ /* optional resources.documents.ObjectSpecs users = 2; */
680
+ if (message.users)
681
+ ObjectSpecs.internalBinaryWrite(message.users, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
682
+ /* optional resources.documents.ObjectSpecs vehicles = 3; */
683
+ if (message.vehicles)
684
+ ObjectSpecs.internalBinaryWrite(message.vehicles, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
685
+ let u = options.writeUnknownFields;
686
+ if (u !== false)
687
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
688
+ return writer;
689
+ }
690
+ }
691
+ /**
692
+ * @generated MessageType for protobuf message resources.documents.TemplateRequirements
693
+ */
694
+ export const TemplateRequirements = new TemplateRequirements$Type();
695
+ // @generated message type with reflection information, may provide speed optimized methods
696
+ class ObjectSpecs$Type extends MessageType<ObjectSpecs> {
697
+ constructor() {
698
+ super("resources.documents.ObjectSpecs", [
699
+ { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
700
+ { no: 2, name: "min", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
701
+ { no: 3, name: "max", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
702
+ ]);
703
+ }
704
+ create(value?: PartialMessage<ObjectSpecs>): ObjectSpecs {
705
+ const message = globalThis.Object.create((this.messagePrototype!));
706
+ if (value !== undefined)
707
+ reflectionMergePartial<ObjectSpecs>(this, message, value);
708
+ return message;
709
+ }
710
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ObjectSpecs): ObjectSpecs {
711
+ let message = target ?? this.create(), end = reader.pos + length;
712
+ while (reader.pos < end) {
713
+ let [fieldNo, wireType] = reader.tag();
714
+ switch (fieldNo) {
715
+ case /* optional bool required */ 1:
716
+ message.required = reader.bool();
717
+ break;
718
+ case /* optional int32 min */ 2:
719
+ message.min = reader.int32();
720
+ break;
721
+ case /* optional int32 max */ 3:
722
+ message.max = reader.int32();
723
+ break;
724
+ default:
725
+ let u = options.readUnknownField;
726
+ if (u === "throw")
727
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
728
+ let d = reader.skip(wireType);
729
+ if (u !== false)
730
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
731
+ }
732
+ }
733
+ return message;
734
+ }
735
+ internalBinaryWrite(message: ObjectSpecs, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
736
+ /* optional bool required = 1; */
737
+ if (message.required !== undefined)
738
+ writer.tag(1, WireType.Varint).bool(message.required);
739
+ /* optional int32 min = 2; */
740
+ if (message.min !== undefined)
741
+ writer.tag(2, WireType.Varint).int32(message.min);
742
+ /* optional int32 max = 3; */
743
+ if (message.max !== undefined)
744
+ writer.tag(3, WireType.Varint).int32(message.max);
745
+ let u = options.writeUnknownFields;
746
+ if (u !== false)
747
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
748
+ return writer;
749
+ }
750
+ }
751
+ /**
752
+ * @generated MessageType for protobuf message resources.documents.ObjectSpecs
753
+ */
754
+ export const ObjectSpecs = new ObjectSpecs$Type();
755
+ // @generated message type with reflection information, may provide speed optimized methods
756
+ class TemplateData$Type extends MessageType<TemplateData> {
757
+ constructor() {
758
+ super("resources.documents.TemplateData", [
759
+ { no: 1, name: "activeChar", kind: "message", T: () => User, options: { "validate.rules": { message: { required: true } } } },
760
+ { no: 2, name: "documents", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentShort, options: { "validate.rules": { repeated: { maxItems: "12" } } } },
761
+ { no: 3, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UserShort, options: { "validate.rules": { repeated: { maxItems: "12" } } } },
762
+ { no: 4, name: "vehicles", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Vehicle, options: { "validate.rules": { repeated: { maxItems: "12" } } } }
763
+ ]);
764
+ }
765
+ create(value?: PartialMessage<TemplateData>): TemplateData {
766
+ const message = globalThis.Object.create((this.messagePrototype!));
767
+ message.documents = [];
768
+ message.users = [];
769
+ message.vehicles = [];
770
+ if (value !== undefined)
771
+ reflectionMergePartial<TemplateData>(this, message, value);
772
+ return message;
773
+ }
774
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateData): TemplateData {
775
+ let message = target ?? this.create(), end = reader.pos + length;
776
+ while (reader.pos < end) {
777
+ let [fieldNo, wireType] = reader.tag();
778
+ switch (fieldNo) {
779
+ case /* resources.users.User activeChar */ 1:
780
+ message.activeChar = User.internalBinaryRead(reader, reader.uint32(), options, message.activeChar);
781
+ break;
782
+ case /* repeated resources.documents.DocumentShort documents */ 2:
783
+ message.documents.push(DocumentShort.internalBinaryRead(reader, reader.uint32(), options));
784
+ break;
785
+ case /* repeated resources.users.UserShort users */ 3:
786
+ message.users.push(UserShort.internalBinaryRead(reader, reader.uint32(), options));
787
+ break;
788
+ case /* repeated resources.vehicles.Vehicle vehicles */ 4:
789
+ message.vehicles.push(Vehicle.internalBinaryRead(reader, reader.uint32(), options));
790
+ break;
791
+ default:
792
+ let u = options.readUnknownField;
793
+ if (u === "throw")
794
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
795
+ let d = reader.skip(wireType);
796
+ if (u !== false)
797
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
798
+ }
799
+ }
800
+ return message;
801
+ }
802
+ internalBinaryWrite(message: TemplateData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
803
+ /* resources.users.User activeChar = 1; */
804
+ if (message.activeChar)
805
+ User.internalBinaryWrite(message.activeChar, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
806
+ /* repeated resources.documents.DocumentShort documents = 2; */
807
+ for (let i = 0; i < message.documents.length; i++)
808
+ DocumentShort.internalBinaryWrite(message.documents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
809
+ /* repeated resources.users.UserShort users = 3; */
810
+ for (let i = 0; i < message.users.length; i++)
811
+ UserShort.internalBinaryWrite(message.users[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
812
+ /* repeated resources.vehicles.Vehicle vehicles = 4; */
813
+ for (let i = 0; i < message.vehicles.length; i++)
814
+ Vehicle.internalBinaryWrite(message.vehicles[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
815
+ let u = options.writeUnknownFields;
816
+ if (u !== false)
817
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
818
+ return writer;
819
+ }
820
+ }
821
+ /**
822
+ * @generated MessageType for protobuf message resources.documents.TemplateData
823
+ */
824
+ export const TemplateData = new TemplateData$Type();
825
+ // @generated message type with reflection information, may provide speed optimized methods
826
+ class TemplateJobAccess$Type extends MessageType<TemplateJobAccess> {
827
+ constructor() {
828
+ super("resources.documents.TemplateJobAccess", [
829
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
830
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
831
+ { no: 3, name: "target_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
832
+ { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
833
+ { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
834
+ { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
835
+ { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
836
+ { no: 8, name: "access", kind: "enum", T: () => ["resources.documents.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } }
837
+ ]);
838
+ }
839
+ create(value?: PartialMessage<TemplateJobAccess>): TemplateJobAccess {
840
+ const message = globalThis.Object.create((this.messagePrototype!));
841
+ message.id = "0";
842
+ message.targetId = "0";
843
+ message.job = "";
844
+ message.minimumGrade = 0;
845
+ message.access = 0;
846
+ if (value !== undefined)
847
+ reflectionMergePartial<TemplateJobAccess>(this, message, value);
848
+ return message;
849
+ }
850
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateJobAccess): TemplateJobAccess {
851
+ let message = target ?? this.create(), end = reader.pos + length;
852
+ while (reader.pos < end) {
853
+ let [fieldNo, wireType] = reader.tag();
854
+ switch (fieldNo) {
855
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
856
+ message.id = reader.uint64().toString();
857
+ break;
858
+ case /* optional resources.timestamp.Timestamp created_at */ 2:
859
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
860
+ break;
861
+ case /* uint64 target_id = 3 [jstype = JS_STRING];*/ 3:
862
+ message.targetId = reader.uint64().toString();
863
+ break;
864
+ case /* string job */ 4:
865
+ message.job = reader.string();
866
+ break;
867
+ case /* optional string job_label */ 5:
868
+ message.jobLabel = reader.string();
869
+ break;
870
+ case /* int32 minimum_grade */ 6:
871
+ message.minimumGrade = reader.int32();
872
+ break;
873
+ case /* optional string job_grade_label */ 7:
874
+ message.jobGradeLabel = reader.string();
875
+ break;
876
+ case /* resources.documents.AccessLevel access */ 8:
877
+ message.access = reader.int32();
878
+ break;
879
+ default:
880
+ let u = options.readUnknownField;
881
+ if (u === "throw")
882
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
883
+ let d = reader.skip(wireType);
884
+ if (u !== false)
885
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
886
+ }
887
+ }
888
+ return message;
889
+ }
890
+ internalBinaryWrite(message: TemplateJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
891
+ /* uint64 id = 1 [jstype = JS_STRING]; */
892
+ if (message.id !== "0")
893
+ writer.tag(1, WireType.Varint).uint64(message.id);
894
+ /* optional resources.timestamp.Timestamp created_at = 2; */
895
+ if (message.createdAt)
896
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
897
+ /* uint64 target_id = 3 [jstype = JS_STRING]; */
898
+ if (message.targetId !== "0")
899
+ writer.tag(3, WireType.Varint).uint64(message.targetId);
900
+ /* string job = 4; */
901
+ if (message.job !== "")
902
+ writer.tag(4, WireType.LengthDelimited).string(message.job);
903
+ /* optional string job_label = 5; */
904
+ if (message.jobLabel !== undefined)
905
+ writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
906
+ /* int32 minimum_grade = 6; */
907
+ if (message.minimumGrade !== 0)
908
+ writer.tag(6, WireType.Varint).int32(message.minimumGrade);
909
+ /* optional string job_grade_label = 7; */
910
+ if (message.jobGradeLabel !== undefined)
911
+ writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
912
+ /* resources.documents.AccessLevel access = 8; */
913
+ if (message.access !== 0)
914
+ writer.tag(8, WireType.Varint).int32(message.access);
915
+ let u = options.writeUnknownFields;
916
+ if (u !== false)
917
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
918
+ return writer;
919
+ }
920
+ }
921
+ /**
922
+ * @generated MessageType for protobuf message resources.documents.TemplateJobAccess
923
+ */
924
+ export const TemplateJobAccess = new TemplateJobAccess$Type();
925
+ // @generated message type with reflection information, may provide speed optimized methods
926
+ class TemplateUserAccess$Type extends MessageType<TemplateUserAccess> {
927
+ constructor() {
928
+ super("resources.documents.TemplateUserAccess", []);
929
+ }
930
+ create(value?: PartialMessage<TemplateUserAccess>): TemplateUserAccess {
931
+ const message = globalThis.Object.create((this.messagePrototype!));
932
+ if (value !== undefined)
933
+ reflectionMergePartial<TemplateUserAccess>(this, message, value);
934
+ return message;
935
+ }
936
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateUserAccess): TemplateUserAccess {
937
+ return target ?? this.create();
938
+ }
939
+ internalBinaryWrite(message: TemplateUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
940
+ let u = options.writeUnknownFields;
941
+ if (u !== false)
942
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
943
+ return writer;
944
+ }
945
+ }
946
+ /**
947
+ * @generated MessageType for protobuf message resources.documents.TemplateUserAccess
948
+ */
949
+ export const TemplateUserAccess = new TemplateUserAccess$Type();