@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,344 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/internet/internet.proto" (package "resources.internet", 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 { Timestamp } from "../timestamp/timestamp";
14
+ /**
15
+ * @generated from protobuf message resources.internet.Domain
16
+ */
17
+ export interface Domain {
18
+ /**
19
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
20
+ */
21
+ id: string;
22
+ /**
23
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
24
+ */
25
+ createdAt?: Timestamp;
26
+ /**
27
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
28
+ */
29
+ updatedAt?: Timestamp;
30
+ /**
31
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
32
+ */
33
+ deletedAt?: Timestamp;
34
+ /**
35
+ * @generated from protobuf field: string name = 5;
36
+ */
37
+ name: string;
38
+ /**
39
+ * @generated from protobuf field: optional string creator_job = 6;
40
+ */
41
+ creatorJob?: string;
42
+ /**
43
+ * @generated from protobuf field: optional int32 creator_id = 7;
44
+ */
45
+ creatorId?: number;
46
+ }
47
+ /**
48
+ * @generated from protobuf message resources.internet.Page
49
+ */
50
+ export interface Page {
51
+ /**
52
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
53
+ */
54
+ id: string;
55
+ /**
56
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
57
+ */
58
+ createdAt?: Timestamp;
59
+ /**
60
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
61
+ */
62
+ updatedAt?: Timestamp;
63
+ /**
64
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
65
+ */
66
+ deletedAt?: Timestamp;
67
+ /**
68
+ * @generated from protobuf field: uint64 domain_id = 5 [jstype = JS_STRING];
69
+ */
70
+ domainId: string;
71
+ /**
72
+ * @sanitize: method=StripTags
73
+ *
74
+ * @generated from protobuf field: string path = 6;
75
+ */
76
+ path: string;
77
+ /**
78
+ * @sanitize: method=StripTags
79
+ *
80
+ * @generated from protobuf field: string title = 7;
81
+ */
82
+ title: string;
83
+ /**
84
+ * @sanitize: method=StripTags
85
+ *
86
+ * @generated from protobuf field: string description = 8;
87
+ */
88
+ description: string;
89
+ /**
90
+ * @generated from protobuf field: resources.internet.PageData data = 9;
91
+ */
92
+ data?: PageData;
93
+ /**
94
+ * @generated from protobuf field: optional string creator_job = 10;
95
+ */
96
+ creatorJob?: string;
97
+ /**
98
+ * @generated from protobuf field: optional int32 creator_id = 11;
99
+ */
100
+ creatorId?: number;
101
+ }
102
+ /**
103
+ * TODO
104
+ *
105
+ * @generated from protobuf message resources.internet.PageData
106
+ */
107
+ export interface PageData {
108
+ }
109
+ // @generated message type with reflection information, may provide speed optimized methods
110
+ class Domain$Type extends MessageType<Domain> {
111
+ constructor() {
112
+ super("resources.internet.Domain", [
113
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
114
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
115
+ { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
116
+ { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
117
+ { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
118
+ { no: 6, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
119
+ { no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
120
+ ]);
121
+ }
122
+ create(value?: PartialMessage<Domain>): Domain {
123
+ const message = globalThis.Object.create((this.messagePrototype!));
124
+ message.id = "0";
125
+ message.name = "";
126
+ if (value !== undefined)
127
+ reflectionMergePartial<Domain>(this, message, value);
128
+ return message;
129
+ }
130
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Domain): Domain {
131
+ let message = target ?? this.create(), end = reader.pos + length;
132
+ while (reader.pos < end) {
133
+ let [fieldNo, wireType] = reader.tag();
134
+ switch (fieldNo) {
135
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
136
+ message.id = reader.uint64().toString();
137
+ break;
138
+ case /* resources.timestamp.Timestamp created_at */ 2:
139
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
140
+ break;
141
+ case /* optional resources.timestamp.Timestamp updated_at */ 3:
142
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
143
+ break;
144
+ case /* optional resources.timestamp.Timestamp deleted_at */ 4:
145
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
146
+ break;
147
+ case /* string name */ 5:
148
+ message.name = reader.string();
149
+ break;
150
+ case /* optional string creator_job */ 6:
151
+ message.creatorJob = reader.string();
152
+ break;
153
+ case /* optional int32 creator_id */ 7:
154
+ message.creatorId = reader.int32();
155
+ break;
156
+ default:
157
+ let u = options.readUnknownField;
158
+ if (u === "throw")
159
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
160
+ let d = reader.skip(wireType);
161
+ if (u !== false)
162
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
163
+ }
164
+ }
165
+ return message;
166
+ }
167
+ internalBinaryWrite(message: Domain, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
168
+ /* uint64 id = 1 [jstype = JS_STRING]; */
169
+ if (message.id !== "0")
170
+ writer.tag(1, WireType.Varint).uint64(message.id);
171
+ /* resources.timestamp.Timestamp created_at = 2; */
172
+ if (message.createdAt)
173
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
174
+ /* optional resources.timestamp.Timestamp updated_at = 3; */
175
+ if (message.updatedAt)
176
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
177
+ /* optional resources.timestamp.Timestamp deleted_at = 4; */
178
+ if (message.deletedAt)
179
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
180
+ /* string name = 5; */
181
+ if (message.name !== "")
182
+ writer.tag(5, WireType.LengthDelimited).string(message.name);
183
+ /* optional string creator_job = 6; */
184
+ if (message.creatorJob !== undefined)
185
+ writer.tag(6, WireType.LengthDelimited).string(message.creatorJob);
186
+ /* optional int32 creator_id = 7; */
187
+ if (message.creatorId !== undefined)
188
+ writer.tag(7, WireType.Varint).int32(message.creatorId);
189
+ let u = options.writeUnknownFields;
190
+ if (u !== false)
191
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
192
+ return writer;
193
+ }
194
+ }
195
+ /**
196
+ * @generated MessageType for protobuf message resources.internet.Domain
197
+ */
198
+ export const Domain = new Domain$Type();
199
+ // @generated message type with reflection information, may provide speed optimized methods
200
+ class Page$Type extends MessageType<Page> {
201
+ constructor() {
202
+ super("resources.internet.Page", [
203
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
204
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
205
+ { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
206
+ { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
207
+ { no: 5, name: "domain_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
208
+ { no: 6, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
209
+ { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "255" } } } },
210
+ { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "512" } } } },
211
+ { no: 9, name: "data", kind: "message", T: () => PageData },
212
+ { no: 10, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
213
+ { no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
214
+ ]);
215
+ }
216
+ create(value?: PartialMessage<Page>): Page {
217
+ const message = globalThis.Object.create((this.messagePrototype!));
218
+ message.id = "0";
219
+ message.domainId = "0";
220
+ message.path = "";
221
+ message.title = "";
222
+ message.description = "";
223
+ if (value !== undefined)
224
+ reflectionMergePartial<Page>(this, message, value);
225
+ return message;
226
+ }
227
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Page): Page {
228
+ let message = target ?? this.create(), end = reader.pos + length;
229
+ while (reader.pos < end) {
230
+ let [fieldNo, wireType] = reader.tag();
231
+ switch (fieldNo) {
232
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
233
+ message.id = reader.uint64().toString();
234
+ break;
235
+ case /* resources.timestamp.Timestamp created_at */ 2:
236
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
237
+ break;
238
+ case /* optional resources.timestamp.Timestamp updated_at */ 3:
239
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
240
+ break;
241
+ case /* optional resources.timestamp.Timestamp deleted_at */ 4:
242
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
243
+ break;
244
+ case /* uint64 domain_id = 5 [jstype = JS_STRING];*/ 5:
245
+ message.domainId = reader.uint64().toString();
246
+ break;
247
+ case /* string path */ 6:
248
+ message.path = reader.string();
249
+ break;
250
+ case /* string title */ 7:
251
+ message.title = reader.string();
252
+ break;
253
+ case /* string description */ 8:
254
+ message.description = reader.string();
255
+ break;
256
+ case /* resources.internet.PageData data */ 9:
257
+ message.data = PageData.internalBinaryRead(reader, reader.uint32(), options, message.data);
258
+ break;
259
+ case /* optional string creator_job */ 10:
260
+ message.creatorJob = reader.string();
261
+ break;
262
+ case /* optional int32 creator_id */ 11:
263
+ message.creatorId = reader.int32();
264
+ break;
265
+ default:
266
+ let u = options.readUnknownField;
267
+ if (u === "throw")
268
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
269
+ let d = reader.skip(wireType);
270
+ if (u !== false)
271
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
272
+ }
273
+ }
274
+ return message;
275
+ }
276
+ internalBinaryWrite(message: Page, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
277
+ /* uint64 id = 1 [jstype = JS_STRING]; */
278
+ if (message.id !== "0")
279
+ writer.tag(1, WireType.Varint).uint64(message.id);
280
+ /* resources.timestamp.Timestamp created_at = 2; */
281
+ if (message.createdAt)
282
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
283
+ /* optional resources.timestamp.Timestamp updated_at = 3; */
284
+ if (message.updatedAt)
285
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
286
+ /* optional resources.timestamp.Timestamp deleted_at = 4; */
287
+ if (message.deletedAt)
288
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
289
+ /* uint64 domain_id = 5 [jstype = JS_STRING]; */
290
+ if (message.domainId !== "0")
291
+ writer.tag(5, WireType.Varint).uint64(message.domainId);
292
+ /* string path = 6; */
293
+ if (message.path !== "")
294
+ writer.tag(6, WireType.LengthDelimited).string(message.path);
295
+ /* string title = 7; */
296
+ if (message.title !== "")
297
+ writer.tag(7, WireType.LengthDelimited).string(message.title);
298
+ /* string description = 8; */
299
+ if (message.description !== "")
300
+ writer.tag(8, WireType.LengthDelimited).string(message.description);
301
+ /* resources.internet.PageData data = 9; */
302
+ if (message.data)
303
+ PageData.internalBinaryWrite(message.data, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
304
+ /* optional string creator_job = 10; */
305
+ if (message.creatorJob !== undefined)
306
+ writer.tag(10, WireType.LengthDelimited).string(message.creatorJob);
307
+ /* optional int32 creator_id = 11; */
308
+ if (message.creatorId !== undefined)
309
+ writer.tag(11, WireType.Varint).int32(message.creatorId);
310
+ let u = options.writeUnknownFields;
311
+ if (u !== false)
312
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
313
+ return writer;
314
+ }
315
+ }
316
+ /**
317
+ * @generated MessageType for protobuf message resources.internet.Page
318
+ */
319
+ export const Page = new Page$Type();
320
+ // @generated message type with reflection information, may provide speed optimized methods
321
+ class PageData$Type extends MessageType<PageData> {
322
+ constructor() {
323
+ super("resources.internet.PageData", []);
324
+ }
325
+ create(value?: PartialMessage<PageData>): PageData {
326
+ const message = globalThis.Object.create((this.messagePrototype!));
327
+ if (value !== undefined)
328
+ reflectionMergePartial<PageData>(this, message, value);
329
+ return message;
330
+ }
331
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PageData): PageData {
332
+ return target ?? this.create();
333
+ }
334
+ internalBinaryWrite(message: PageData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
335
+ let u = options.writeUnknownFields;
336
+ if (u !== false)
337
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
338
+ return writer;
339
+ }
340
+ }
341
+ /**
342
+ * @generated MessageType for protobuf message resources.internet.PageData
343
+ */
344
+ export const PageData = new PageData$Type();
@@ -0,0 +1,236 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/internet/page.proto" (package "resources.internet", 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 { Timestamp } from "../timestamp/timestamp";
14
+ /**
15
+ * @generated from protobuf message resources.internet.Page
16
+ */
17
+ export interface Page {
18
+ /**
19
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
20
+ */
21
+ id: string;
22
+ /**
23
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
24
+ */
25
+ createdAt?: Timestamp;
26
+ /**
27
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
28
+ */
29
+ updatedAt?: Timestamp;
30
+ /**
31
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
32
+ */
33
+ deletedAt?: Timestamp;
34
+ /**
35
+ * @generated from protobuf field: uint64 domain_id = 5 [jstype = JS_STRING];
36
+ */
37
+ domainId: string;
38
+ /**
39
+ * @sanitize: method=StripTags
40
+ *
41
+ * @generated from protobuf field: string path = 6;
42
+ */
43
+ path: string;
44
+ /**
45
+ * @sanitize: method=StripTags
46
+ *
47
+ * @generated from protobuf field: string title = 7;
48
+ */
49
+ title: string;
50
+ /**
51
+ * @sanitize: method=StripTags
52
+ *
53
+ * @generated from protobuf field: string description = 8;
54
+ */
55
+ description: string;
56
+ /**
57
+ * @generated from protobuf field: resources.internet.PageData data = 9;
58
+ */
59
+ data?: PageData;
60
+ /**
61
+ * @generated from protobuf field: optional string creator_job = 10;
62
+ */
63
+ creatorJob?: string;
64
+ /**
65
+ * @generated from protobuf field: optional int32 creator_id = 11;
66
+ */
67
+ creatorId?: number;
68
+ }
69
+ /**
70
+ * @generated from protobuf message resources.internet.PageData
71
+ */
72
+ export interface PageData {
73
+ }
74
+ /**
75
+ * @generated from protobuf enum resources.internet.PageLayoutType
76
+ */
77
+ export enum PageLayoutType {
78
+ /**
79
+ * @generated from protobuf enum value: PAGE_LAYOUT_TYPE_UNSPECIFIED = 0;
80
+ */
81
+ UNSPECIFIED = 0,
82
+ /**
83
+ * @generated from protobuf enum value: PAGE_LAYOUT_TYPE_LANDING = 1;
84
+ */
85
+ LANDING = 1,
86
+ /**
87
+ * @generated from protobuf enum value: PAGE_LAYOUT_TYPE_BASIC_PAGE = 2;
88
+ */
89
+ BASIC_PAGE = 2
90
+ }
91
+ // @generated message type with reflection information, may provide speed optimized methods
92
+ class Page$Type extends MessageType<Page> {
93
+ constructor() {
94
+ super("resources.internet.Page", [
95
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
96
+ { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
97
+ { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
98
+ { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
99
+ { no: 5, name: "domain_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
100
+ { no: 6, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
101
+ { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "255" } } } },
102
+ { no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "512" } } } },
103
+ { no: 9, name: "data", kind: "message", T: () => PageData, options: { "validate.rules": { message: { required: true } } } },
104
+ { no: 10, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
105
+ { no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
106
+ ]);
107
+ }
108
+ create(value?: PartialMessage<Page>): Page {
109
+ const message = globalThis.Object.create((this.messagePrototype!));
110
+ message.id = "0";
111
+ message.domainId = "0";
112
+ message.path = "";
113
+ message.title = "";
114
+ message.description = "";
115
+ if (value !== undefined)
116
+ reflectionMergePartial<Page>(this, message, value);
117
+ return message;
118
+ }
119
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Page): Page {
120
+ let message = target ?? this.create(), end = reader.pos + length;
121
+ while (reader.pos < end) {
122
+ let [fieldNo, wireType] = reader.tag();
123
+ switch (fieldNo) {
124
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
125
+ message.id = reader.uint64().toString();
126
+ break;
127
+ case /* resources.timestamp.Timestamp created_at */ 2:
128
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
129
+ break;
130
+ case /* optional resources.timestamp.Timestamp updated_at */ 3:
131
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
132
+ break;
133
+ case /* optional resources.timestamp.Timestamp deleted_at */ 4:
134
+ message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
135
+ break;
136
+ case /* uint64 domain_id = 5 [jstype = JS_STRING];*/ 5:
137
+ message.domainId = reader.uint64().toString();
138
+ break;
139
+ case /* string path */ 6:
140
+ message.path = reader.string();
141
+ break;
142
+ case /* string title */ 7:
143
+ message.title = reader.string();
144
+ break;
145
+ case /* string description */ 8:
146
+ message.description = reader.string();
147
+ break;
148
+ case /* resources.internet.PageData data */ 9:
149
+ message.data = PageData.internalBinaryRead(reader, reader.uint32(), options, message.data);
150
+ break;
151
+ case /* optional string creator_job */ 10:
152
+ message.creatorJob = reader.string();
153
+ break;
154
+ case /* optional int32 creator_id */ 11:
155
+ message.creatorId = reader.int32();
156
+ break;
157
+ default:
158
+ let u = options.readUnknownField;
159
+ if (u === "throw")
160
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
161
+ let d = reader.skip(wireType);
162
+ if (u !== false)
163
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
164
+ }
165
+ }
166
+ return message;
167
+ }
168
+ internalBinaryWrite(message: Page, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
169
+ /* uint64 id = 1 [jstype = JS_STRING]; */
170
+ if (message.id !== "0")
171
+ writer.tag(1, WireType.Varint).uint64(message.id);
172
+ /* resources.timestamp.Timestamp created_at = 2; */
173
+ if (message.createdAt)
174
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
175
+ /* optional resources.timestamp.Timestamp updated_at = 3; */
176
+ if (message.updatedAt)
177
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
178
+ /* optional resources.timestamp.Timestamp deleted_at = 4; */
179
+ if (message.deletedAt)
180
+ Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
181
+ /* uint64 domain_id = 5 [jstype = JS_STRING]; */
182
+ if (message.domainId !== "0")
183
+ writer.tag(5, WireType.Varint).uint64(message.domainId);
184
+ /* string path = 6; */
185
+ if (message.path !== "")
186
+ writer.tag(6, WireType.LengthDelimited).string(message.path);
187
+ /* string title = 7; */
188
+ if (message.title !== "")
189
+ writer.tag(7, WireType.LengthDelimited).string(message.title);
190
+ /* string description = 8; */
191
+ if (message.description !== "")
192
+ writer.tag(8, WireType.LengthDelimited).string(message.description);
193
+ /* resources.internet.PageData data = 9; */
194
+ if (message.data)
195
+ PageData.internalBinaryWrite(message.data, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
196
+ /* optional string creator_job = 10; */
197
+ if (message.creatorJob !== undefined)
198
+ writer.tag(10, WireType.LengthDelimited).string(message.creatorJob);
199
+ /* optional int32 creator_id = 11; */
200
+ if (message.creatorId !== undefined)
201
+ writer.tag(11, WireType.Varint).int32(message.creatorId);
202
+ let u = options.writeUnknownFields;
203
+ if (u !== false)
204
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
205
+ return writer;
206
+ }
207
+ }
208
+ /**
209
+ * @generated MessageType for protobuf message resources.internet.Page
210
+ */
211
+ export const Page = new Page$Type();
212
+ // @generated message type with reflection information, may provide speed optimized methods
213
+ class PageData$Type extends MessageType<PageData> {
214
+ constructor() {
215
+ super("resources.internet.PageData", []);
216
+ }
217
+ create(value?: PartialMessage<PageData>): PageData {
218
+ const message = globalThis.Object.create((this.messagePrototype!));
219
+ if (value !== undefined)
220
+ reflectionMergePartial<PageData>(this, message, value);
221
+ return message;
222
+ }
223
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PageData): PageData {
224
+ return target ?? this.create();
225
+ }
226
+ internalBinaryWrite(message: PageData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
227
+ let u = options.writeUnknownFields;
228
+ if (u !== false)
229
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
230
+ return writer;
231
+ }
232
+ }
233
+ /**
234
+ * @generated MessageType for protobuf message resources.internet.PageData
235
+ */
236
+ export const PageData = new PageData$Type();
@@ -0,0 +1,104 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/internet/search.proto" (package "resources.internet", 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
+ /**
14
+ * @generated from protobuf message resources.internet.SearchResult
15
+ */
16
+ export interface SearchResult {
17
+ /**
18
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
19
+ */
20
+ id: string;
21
+ /**
22
+ * @generated from protobuf field: string title = 2;
23
+ */
24
+ title: string;
25
+ /**
26
+ * @generated from protobuf field: string description = 3;
27
+ */
28
+ description: string;
29
+ /**
30
+ * @generated from protobuf field: string url = 4;
31
+ */
32
+ url: string;
33
+ }
34
+ // @generated message type with reflection information, may provide speed optimized methods
35
+ class SearchResult$Type extends MessageType<SearchResult> {
36
+ constructor() {
37
+ super("resources.internet.SearchResult", [
38
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
39
+ { no: 2, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
40
+ { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
41
+ { no: 4, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
42
+ ]);
43
+ }
44
+ create(value?: PartialMessage<SearchResult>): SearchResult {
45
+ const message = globalThis.Object.create((this.messagePrototype!));
46
+ message.id = "0";
47
+ message.title = "";
48
+ message.description = "";
49
+ message.url = "";
50
+ if (value !== undefined)
51
+ reflectionMergePartial<SearchResult>(this, message, value);
52
+ return message;
53
+ }
54
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SearchResult): SearchResult {
55
+ let message = target ?? this.create(), end = reader.pos + length;
56
+ while (reader.pos < end) {
57
+ let [fieldNo, wireType] = reader.tag();
58
+ switch (fieldNo) {
59
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
60
+ message.id = reader.uint64().toString();
61
+ break;
62
+ case /* string title */ 2:
63
+ message.title = reader.string();
64
+ break;
65
+ case /* string description */ 3:
66
+ message.description = reader.string();
67
+ break;
68
+ case /* string url */ 4:
69
+ message.url = reader.string();
70
+ break;
71
+ default:
72
+ let u = options.readUnknownField;
73
+ if (u === "throw")
74
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
75
+ let d = reader.skip(wireType);
76
+ if (u !== false)
77
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
78
+ }
79
+ }
80
+ return message;
81
+ }
82
+ internalBinaryWrite(message: SearchResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
83
+ /* uint64 id = 1 [jstype = JS_STRING]; */
84
+ if (message.id !== "0")
85
+ writer.tag(1, WireType.Varint).uint64(message.id);
86
+ /* string title = 2; */
87
+ if (message.title !== "")
88
+ writer.tag(2, WireType.LengthDelimited).string(message.title);
89
+ /* string description = 3; */
90
+ if (message.description !== "")
91
+ writer.tag(3, WireType.LengthDelimited).string(message.description);
92
+ /* string url = 4; */
93
+ if (message.url !== "")
94
+ writer.tag(4, WireType.LengthDelimited).string(message.url);
95
+ let u = options.writeUnknownFields;
96
+ if (u !== false)
97
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
98
+ return writer;
99
+ }
100
+ }
101
+ /**
102
+ * @generated MessageType for protobuf message resources.internet.SearchResult
103
+ */
104
+ export const SearchResult = new SearchResult$Type();