@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,548 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/wiki/page.proto" (package "resources.wiki", 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 { File } from "../filestore/file";
14
+ import { ContentType } from "../common/content/content";
15
+ import { UserShort } from "../users/users";
16
+ import { Timestamp } from "../timestamp/timestamp";
17
+ import { PageAccess } from "./access";
18
+ import { Content } from "../common/content/content";
19
+ /**
20
+ * @generated from protobuf message resources.wiki.Page
21
+ */
22
+ export interface Page {
23
+ /**
24
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
25
+ */
26
+ id: string; // @gotags: sql:"primary_key" alias:"id"
27
+ /**
28
+ * @sanitize: method=StripTags
29
+ *
30
+ * @generated from protobuf field: string job = 2;
31
+ */
32
+ job: string;
33
+ /**
34
+ * @generated from protobuf field: optional string job_label = 3;
35
+ */
36
+ jobLabel?: string;
37
+ /**
38
+ * @generated from protobuf field: optional uint64 parent_id = 4 [jstype = JS_STRING];
39
+ */
40
+ parentId?: string;
41
+ /**
42
+ * @generated from protobuf field: resources.wiki.PageMeta meta = 5;
43
+ */
44
+ meta?: PageMeta;
45
+ /**
46
+ * @generated from protobuf field: resources.common.content.Content content = 6;
47
+ */
48
+ content?: Content;
49
+ /**
50
+ * @generated from protobuf field: resources.wiki.PageAccess access = 7;
51
+ */
52
+ access?: PageAccess;
53
+ }
54
+ /**
55
+ * @generated from protobuf message resources.wiki.PageMeta
56
+ */
57
+ export interface PageMeta {
58
+ /**
59
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 1;
60
+ */
61
+ createdAt?: Timestamp;
62
+ /**
63
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 2;
64
+ */
65
+ updatedAt?: Timestamp;
66
+ /**
67
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3;
68
+ */
69
+ deletedAt?: Timestamp;
70
+ /**
71
+ * @sanitize: method=StripTags
72
+ *
73
+ * @generated from protobuf field: optional string slug = 4;
74
+ */
75
+ slug?: string;
76
+ /**
77
+ * @sanitize
78
+ *
79
+ * @generated from protobuf field: string title = 5;
80
+ */
81
+ title: string;
82
+ /**
83
+ * @sanitize: method=StripTags
84
+ *
85
+ * @generated from protobuf field: string description = 6;
86
+ */
87
+ description: string;
88
+ /**
89
+ * @generated from protobuf field: optional int32 creator_id = 7;
90
+ */
91
+ creatorId?: number;
92
+ /**
93
+ * @generated from protobuf field: optional resources.users.UserShort creator = 8;
94
+ */
95
+ creator?: UserShort; // @gotags: alias:"creator"
96
+ /**
97
+ * @generated from protobuf field: resources.common.content.ContentType content_type = 9;
98
+ */
99
+ contentType: ContentType;
100
+ /**
101
+ * @sanitize: method=StripTags
102
+ *
103
+ * @generated from protobuf field: repeated string tags = 10;
104
+ */
105
+ tags: string[];
106
+ /**
107
+ * @generated from protobuf field: optional bool toc = 11;
108
+ */
109
+ toc?: boolean;
110
+ /**
111
+ * @generated from protobuf field: bool public = 12;
112
+ */
113
+ public: boolean;
114
+ }
115
+ /**
116
+ * @generated from protobuf message resources.wiki.PageShort
117
+ */
118
+ export interface PageShort {
119
+ /**
120
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
121
+ */
122
+ id: string; // @gotags: sql:"primary_key" alias:"id"
123
+ /**
124
+ * @generated from protobuf field: string job = 2;
125
+ */
126
+ job: string;
127
+ /**
128
+ * @generated from protobuf field: optional string job_label = 3;
129
+ */
130
+ jobLabel?: string;
131
+ /**
132
+ * @generated from protobuf field: optional uint64 parent_id = 4 [jstype = JS_STRING];
133
+ */
134
+ parentId?: string;
135
+ /**
136
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5;
137
+ */
138
+ deletedAt?: Timestamp;
139
+ /**
140
+ * @sanitize: method=StripTags
141
+ *
142
+ * @generated from protobuf field: optional string slug = 6;
143
+ */
144
+ slug?: string;
145
+ /**
146
+ * @generated from protobuf field: string title = 7;
147
+ */
148
+ title: string;
149
+ /**
150
+ * @generated from protobuf field: string description = 8;
151
+ */
152
+ description: string;
153
+ /**
154
+ * @generated from protobuf field: repeated resources.wiki.PageShort children = 9;
155
+ */
156
+ children: PageShort[];
157
+ /**
158
+ * @generated from protobuf field: optional resources.wiki.PageRootInfo root_info = 10;
159
+ */
160
+ rootInfo?: PageRootInfo;
161
+ }
162
+ /**
163
+ * @generated from protobuf message resources.wiki.PageRootInfo
164
+ */
165
+ export interface PageRootInfo {
166
+ /**
167
+ * @generated from protobuf field: optional resources.filestore.File logo = 1;
168
+ */
169
+ logo?: File;
170
+ }
171
+ // @generated message type with reflection information, may provide speed optimized methods
172
+ class Page$Type extends MessageType<Page> {
173
+ constructor() {
174
+ super("resources.wiki.Page", [
175
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
176
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
177
+ { no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
178
+ { no: 4, name: "parent_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
179
+ { no: 5, name: "meta", kind: "message", T: () => PageMeta, options: { "validate.rules": { message: { required: true } } } },
180
+ { no: 6, name: "content", kind: "message", T: () => Content },
181
+ { no: 7, name: "access", kind: "message", T: () => PageAccess, options: { "validate.rules": { message: { required: true } } } }
182
+ ]);
183
+ }
184
+ create(value?: PartialMessage<Page>): Page {
185
+ const message = globalThis.Object.create((this.messagePrototype!));
186
+ message.id = "0";
187
+ message.job = "";
188
+ if (value !== undefined)
189
+ reflectionMergePartial<Page>(this, message, value);
190
+ return message;
191
+ }
192
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Page): Page {
193
+ let message = target ?? this.create(), end = reader.pos + length;
194
+ while (reader.pos < end) {
195
+ let [fieldNo, wireType] = reader.tag();
196
+ switch (fieldNo) {
197
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
198
+ message.id = reader.uint64().toString();
199
+ break;
200
+ case /* string job */ 2:
201
+ message.job = reader.string();
202
+ break;
203
+ case /* optional string job_label */ 3:
204
+ message.jobLabel = reader.string();
205
+ break;
206
+ case /* optional uint64 parent_id = 4 [jstype = JS_STRING];*/ 4:
207
+ message.parentId = reader.uint64().toString();
208
+ break;
209
+ case /* resources.wiki.PageMeta meta */ 5:
210
+ message.meta = PageMeta.internalBinaryRead(reader, reader.uint32(), options, message.meta);
211
+ break;
212
+ case /* resources.common.content.Content content */ 6:
213
+ message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
214
+ break;
215
+ case /* resources.wiki.PageAccess access */ 7:
216
+ message.access = PageAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
217
+ break;
218
+ default:
219
+ let u = options.readUnknownField;
220
+ if (u === "throw")
221
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
222
+ let d = reader.skip(wireType);
223
+ if (u !== false)
224
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
225
+ }
226
+ }
227
+ return message;
228
+ }
229
+ internalBinaryWrite(message: Page, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
230
+ /* uint64 id = 1 [jstype = JS_STRING]; */
231
+ if (message.id !== "0")
232
+ writer.tag(1, WireType.Varint).uint64(message.id);
233
+ /* string job = 2; */
234
+ if (message.job !== "")
235
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
236
+ /* optional string job_label = 3; */
237
+ if (message.jobLabel !== undefined)
238
+ writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
239
+ /* optional uint64 parent_id = 4 [jstype = JS_STRING]; */
240
+ if (message.parentId !== undefined)
241
+ writer.tag(4, WireType.Varint).uint64(message.parentId);
242
+ /* resources.wiki.PageMeta meta = 5; */
243
+ if (message.meta)
244
+ PageMeta.internalBinaryWrite(message.meta, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
245
+ /* resources.common.content.Content content = 6; */
246
+ if (message.content)
247
+ Content.internalBinaryWrite(message.content, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
248
+ /* resources.wiki.PageAccess access = 7; */
249
+ if (message.access)
250
+ PageAccess.internalBinaryWrite(message.access, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
251
+ let u = options.writeUnknownFields;
252
+ if (u !== false)
253
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
254
+ return writer;
255
+ }
256
+ }
257
+ /**
258
+ * @generated MessageType for protobuf message resources.wiki.Page
259
+ */
260
+ export const Page = new Page$Type();
261
+ // @generated message type with reflection information, may provide speed optimized methods
262
+ class PageMeta$Type extends MessageType<PageMeta> {
263
+ constructor() {
264
+ super("resources.wiki.PageMeta", [
265
+ { no: 1, name: "created_at", kind: "message", T: () => Timestamp },
266
+ { no: 2, name: "updated_at", kind: "message", T: () => Timestamp },
267
+ { no: 3, name: "deleted_at", kind: "message", T: () => Timestamp },
268
+ { no: 4, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "100" } } } },
269
+ { no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "1024" } } } },
270
+ { no: 6, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
271
+ { no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
272
+ { no: 8, name: "creator", kind: "message", T: () => UserShort },
273
+ { no: 9, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
274
+ { no: 10, name: "tags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
275
+ { no: 11, name: "toc", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
276
+ { no: 12, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
277
+ ]);
278
+ }
279
+ create(value?: PartialMessage<PageMeta>): PageMeta {
280
+ const message = globalThis.Object.create((this.messagePrototype!));
281
+ message.title = "";
282
+ message.description = "";
283
+ message.contentType = 0;
284
+ message.tags = [];
285
+ message.public = false;
286
+ if (value !== undefined)
287
+ reflectionMergePartial<PageMeta>(this, message, value);
288
+ return message;
289
+ }
290
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PageMeta): PageMeta {
291
+ let message = target ?? this.create(), end = reader.pos + length;
292
+ while (reader.pos < end) {
293
+ let [fieldNo, wireType] = reader.tag();
294
+ switch (fieldNo) {
295
+ case /* resources.timestamp.Timestamp created_at */ 1:
296
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
297
+ break;
298
+ case /* optional resources.timestamp.Timestamp updated_at */ 2:
299
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
300
+ break;
301
+ case /* optional resources.timestamp.Timestamp deleted_at */ 3:
302
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
303
+ break;
304
+ case /* optional string slug */ 4:
305
+ message.slug = reader.string();
306
+ break;
307
+ case /* string title */ 5:
308
+ message.title = reader.string();
309
+ break;
310
+ case /* string description */ 6:
311
+ message.description = reader.string();
312
+ break;
313
+ case /* optional int32 creator_id */ 7:
314
+ message.creatorId = reader.int32();
315
+ break;
316
+ case /* optional resources.users.UserShort creator */ 8:
317
+ message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
318
+ break;
319
+ case /* resources.common.content.ContentType content_type */ 9:
320
+ message.contentType = reader.int32();
321
+ break;
322
+ case /* repeated string tags */ 10:
323
+ message.tags.push(reader.string());
324
+ break;
325
+ case /* optional bool toc */ 11:
326
+ message.toc = reader.bool();
327
+ break;
328
+ case /* bool public */ 12:
329
+ message.public = reader.bool();
330
+ break;
331
+ default:
332
+ let u = options.readUnknownField;
333
+ if (u === "throw")
334
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
335
+ let d = reader.skip(wireType);
336
+ if (u !== false)
337
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
338
+ }
339
+ }
340
+ return message;
341
+ }
342
+ internalBinaryWrite(message: PageMeta, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
343
+ /* resources.timestamp.Timestamp created_at = 1; */
344
+ if (message.createdAt)
345
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
346
+ /* optional resources.timestamp.Timestamp updated_at = 2; */
347
+ if (message.updatedAt)
348
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
349
+ /* optional resources.timestamp.Timestamp deleted_at = 3; */
350
+ if (message.deletedAt)
351
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
352
+ /* optional string slug = 4; */
353
+ if (message.slug !== undefined)
354
+ writer.tag(4, WireType.LengthDelimited).string(message.slug);
355
+ /* string title = 5; */
356
+ if (message.title !== "")
357
+ writer.tag(5, WireType.LengthDelimited).string(message.title);
358
+ /* string description = 6; */
359
+ if (message.description !== "")
360
+ writer.tag(6, WireType.LengthDelimited).string(message.description);
361
+ /* optional int32 creator_id = 7; */
362
+ if (message.creatorId !== undefined)
363
+ writer.tag(7, WireType.Varint).int32(message.creatorId);
364
+ /* optional resources.users.UserShort creator = 8; */
365
+ if (message.creator)
366
+ UserShort.internalBinaryWrite(message.creator, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
367
+ /* resources.common.content.ContentType content_type = 9; */
368
+ if (message.contentType !== 0)
369
+ writer.tag(9, WireType.Varint).int32(message.contentType);
370
+ /* repeated string tags = 10; */
371
+ for (let i = 0; i < message.tags.length; i++)
372
+ writer.tag(10, WireType.LengthDelimited).string(message.tags[i]);
373
+ /* optional bool toc = 11; */
374
+ if (message.toc !== undefined)
375
+ writer.tag(11, WireType.Varint).bool(message.toc);
376
+ /* bool public = 12; */
377
+ if (message.public !== false)
378
+ writer.tag(12, WireType.Varint).bool(message.public);
379
+ let u = options.writeUnknownFields;
380
+ if (u !== false)
381
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
382
+ return writer;
383
+ }
384
+ }
385
+ /**
386
+ * @generated MessageType for protobuf message resources.wiki.PageMeta
387
+ */
388
+ export const PageMeta = new PageMeta$Type();
389
+ // @generated message type with reflection information, may provide speed optimized methods
390
+ class PageShort$Type extends MessageType<PageShort> {
391
+ constructor() {
392
+ super("resources.wiki.PageShort", [
393
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
394
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
395
+ { no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
396
+ { no: 4, name: "parent_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
397
+ { no: 5, name: "deleted_at", kind: "message", T: () => Timestamp },
398
+ { no: 6, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "100" } } } },
399
+ { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
400
+ { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
401
+ { no: 9, name: "children", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PageShort },
402
+ { no: 10, name: "root_info", kind: "message", T: () => PageRootInfo }
403
+ ]);
404
+ }
405
+ create(value?: PartialMessage<PageShort>): PageShort {
406
+ const message = globalThis.Object.create((this.messagePrototype!));
407
+ message.id = "0";
408
+ message.job = "";
409
+ message.title = "";
410
+ message.description = "";
411
+ message.children = [];
412
+ if (value !== undefined)
413
+ reflectionMergePartial<PageShort>(this, message, value);
414
+ return message;
415
+ }
416
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PageShort): PageShort {
417
+ let message = target ?? this.create(), end = reader.pos + length;
418
+ while (reader.pos < end) {
419
+ let [fieldNo, wireType] = reader.tag();
420
+ switch (fieldNo) {
421
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
422
+ message.id = reader.uint64().toString();
423
+ break;
424
+ case /* string job */ 2:
425
+ message.job = reader.string();
426
+ break;
427
+ case /* optional string job_label */ 3:
428
+ message.jobLabel = reader.string();
429
+ break;
430
+ case /* optional uint64 parent_id = 4 [jstype = JS_STRING];*/ 4:
431
+ message.parentId = reader.uint64().toString();
432
+ break;
433
+ case /* optional resources.timestamp.Timestamp deleted_at */ 5:
434
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
435
+ break;
436
+ case /* optional string slug */ 6:
437
+ message.slug = reader.string();
438
+ break;
439
+ case /* string title */ 7:
440
+ message.title = reader.string();
441
+ break;
442
+ case /* string description */ 8:
443
+ message.description = reader.string();
444
+ break;
445
+ case /* repeated resources.wiki.PageShort children */ 9:
446
+ message.children.push(PageShort.internalBinaryRead(reader, reader.uint32(), options));
447
+ break;
448
+ case /* optional resources.wiki.PageRootInfo root_info */ 10:
449
+ message.rootInfo = PageRootInfo.internalBinaryRead(reader, reader.uint32(), options, message.rootInfo);
450
+ break;
451
+ default:
452
+ let u = options.readUnknownField;
453
+ if (u === "throw")
454
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
455
+ let d = reader.skip(wireType);
456
+ if (u !== false)
457
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
458
+ }
459
+ }
460
+ return message;
461
+ }
462
+ internalBinaryWrite(message: PageShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
463
+ /* uint64 id = 1 [jstype = JS_STRING]; */
464
+ if (message.id !== "0")
465
+ writer.tag(1, WireType.Varint).uint64(message.id);
466
+ /* string job = 2; */
467
+ if (message.job !== "")
468
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
469
+ /* optional string job_label = 3; */
470
+ if (message.jobLabel !== undefined)
471
+ writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
472
+ /* optional uint64 parent_id = 4 [jstype = JS_STRING]; */
473
+ if (message.parentId !== undefined)
474
+ writer.tag(4, WireType.Varint).uint64(message.parentId);
475
+ /* optional resources.timestamp.Timestamp deleted_at = 5; */
476
+ if (message.deletedAt)
477
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
478
+ /* optional string slug = 6; */
479
+ if (message.slug !== undefined)
480
+ writer.tag(6, WireType.LengthDelimited).string(message.slug);
481
+ /* string title = 7; */
482
+ if (message.title !== "")
483
+ writer.tag(7, WireType.LengthDelimited).string(message.title);
484
+ /* string description = 8; */
485
+ if (message.description !== "")
486
+ writer.tag(8, WireType.LengthDelimited).string(message.description);
487
+ /* repeated resources.wiki.PageShort children = 9; */
488
+ for (let i = 0; i < message.children.length; i++)
489
+ PageShort.internalBinaryWrite(message.children[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
490
+ /* optional resources.wiki.PageRootInfo root_info = 10; */
491
+ if (message.rootInfo)
492
+ PageRootInfo.internalBinaryWrite(message.rootInfo, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
493
+ let u = options.writeUnknownFields;
494
+ if (u !== false)
495
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
496
+ return writer;
497
+ }
498
+ }
499
+ /**
500
+ * @generated MessageType for protobuf message resources.wiki.PageShort
501
+ */
502
+ export const PageShort = new PageShort$Type();
503
+ // @generated message type with reflection information, may provide speed optimized methods
504
+ class PageRootInfo$Type extends MessageType<PageRootInfo> {
505
+ constructor() {
506
+ super("resources.wiki.PageRootInfo", [
507
+ { no: 1, name: "logo", kind: "message", T: () => File }
508
+ ]);
509
+ }
510
+ create(value?: PartialMessage<PageRootInfo>): PageRootInfo {
511
+ const message = globalThis.Object.create((this.messagePrototype!));
512
+ if (value !== undefined)
513
+ reflectionMergePartial<PageRootInfo>(this, message, value);
514
+ return message;
515
+ }
516
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PageRootInfo): PageRootInfo {
517
+ let message = target ?? this.create(), end = reader.pos + length;
518
+ while (reader.pos < end) {
519
+ let [fieldNo, wireType] = reader.tag();
520
+ switch (fieldNo) {
521
+ case /* optional resources.filestore.File logo */ 1:
522
+ message.logo = File.internalBinaryRead(reader, reader.uint32(), options, message.logo);
523
+ break;
524
+ default:
525
+ let u = options.readUnknownField;
526
+ if (u === "throw")
527
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
528
+ let d = reader.skip(wireType);
529
+ if (u !== false)
530
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
531
+ }
532
+ }
533
+ return message;
534
+ }
535
+ internalBinaryWrite(message: PageRootInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
536
+ /* optional resources.filestore.File logo = 1; */
537
+ if (message.logo)
538
+ File.internalBinaryWrite(message.logo, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
539
+ let u = options.writeUnknownFields;
540
+ if (u !== false)
541
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
542
+ return writer;
543
+ }
544
+ }
545
+ /**
546
+ * @generated MessageType for protobuf message resources.wiki.PageRootInfo
547
+ */
548
+ export const PageRootInfo = new PageRootInfo$Type();