@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,4571 @@
1
+ // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "services/docstore/docstore.proto" (package "services.docstore", syntax proto3)
3
+ // @ts-nocheck
4
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
+ import { WireType } from "@protobuf-ts/runtime";
6
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
9
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
10
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MessageType } from "@protobuf-ts/runtime";
14
+ import { Category } from "../../resources/documents/category";
15
+ import { DocRelation } from "../../resources/documents/documents";
16
+ import { DocActivityData } from "../../resources/documents/activity";
17
+ import { DocRequest } from "../../resources/documents/requests";
18
+ import { DocActivity } from "../../resources/documents/activity";
19
+ import { DocActivityType } from "../../resources/documents/activity";
20
+ import { ContentType } from "../../resources/common/content/content";
21
+ import { Content } from "../../resources/common/content/content";
22
+ import { Comment } from "../../resources/documents/comment";
23
+ import { DocumentRelation } from "../../resources/documents/documents";
24
+ import { DocumentReference } from "../../resources/documents/documents";
25
+ import { DocumentAccess } from "../../resources/documents/access";
26
+ import { Document } from "../../resources/documents/documents";
27
+ import { DocumentShort } from "../../resources/documents/documents";
28
+ import { PaginationResponse } from "../../resources/common/database/database";
29
+ import { Timestamp } from "../../resources/timestamp/timestamp";
30
+ import { Sort } from "../../resources/common/database/database";
31
+ import { PaginationRequest } from "../../resources/common/database/database";
32
+ import { Template } from "../../resources/documents/templates";
33
+ import { TemplateData } from "../../resources/documents/templates";
34
+ import { TemplateShort } from "../../resources/documents/templates";
35
+ // Templates ==================================================================
36
+
37
+ /**
38
+ * @generated from protobuf message services.docstore.ListTemplatesRequest
39
+ */
40
+ export interface ListTemplatesRequest {
41
+ }
42
+ /**
43
+ * @generated from protobuf message services.docstore.ListTemplatesResponse
44
+ */
45
+ export interface ListTemplatesResponse {
46
+ /**
47
+ * @generated from protobuf field: repeated resources.documents.TemplateShort templates = 1;
48
+ */
49
+ templates: TemplateShort[];
50
+ }
51
+ /**
52
+ * @generated from protobuf message services.docstore.GetTemplateRequest
53
+ */
54
+ export interface GetTemplateRequest {
55
+ /**
56
+ * @generated from protobuf field: uint64 template_id = 1 [jstype = JS_STRING];
57
+ */
58
+ templateId: string;
59
+ /**
60
+ * @generated from protobuf field: optional resources.documents.TemplateData data = 2;
61
+ */
62
+ data?: TemplateData;
63
+ /**
64
+ * @generated from protobuf field: optional bool render = 3;
65
+ */
66
+ render?: boolean;
67
+ }
68
+ /**
69
+ * @generated from protobuf message services.docstore.GetTemplateResponse
70
+ */
71
+ export interface GetTemplateResponse {
72
+ /**
73
+ * @generated from protobuf field: resources.documents.Template template = 1;
74
+ */
75
+ template?: Template;
76
+ /**
77
+ * @generated from protobuf field: bool rendered = 2;
78
+ */
79
+ rendered: boolean;
80
+ }
81
+ /**
82
+ * @generated from protobuf message services.docstore.CreateTemplateRequest
83
+ */
84
+ export interface CreateTemplateRequest {
85
+ /**
86
+ * @generated from protobuf field: resources.documents.Template template = 1;
87
+ */
88
+ template?: Template;
89
+ }
90
+ /**
91
+ * @generated from protobuf message services.docstore.CreateTemplateResponse
92
+ */
93
+ export interface CreateTemplateResponse {
94
+ /**
95
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
96
+ */
97
+ id: string;
98
+ }
99
+ /**
100
+ * @generated from protobuf message services.docstore.UpdateTemplateRequest
101
+ */
102
+ export interface UpdateTemplateRequest {
103
+ /**
104
+ * @generated from protobuf field: resources.documents.Template template = 1;
105
+ */
106
+ template?: Template;
107
+ }
108
+ /**
109
+ * @generated from protobuf message services.docstore.UpdateTemplateResponse
110
+ */
111
+ export interface UpdateTemplateResponse {
112
+ /**
113
+ * @generated from protobuf field: resources.documents.Template template = 1;
114
+ */
115
+ template?: Template;
116
+ }
117
+ /**
118
+ * @generated from protobuf message services.docstore.DeleteTemplateRequest
119
+ */
120
+ export interface DeleteTemplateRequest {
121
+ /**
122
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
123
+ */
124
+ id: string;
125
+ }
126
+ /**
127
+ * @generated from protobuf message services.docstore.DeleteTemplateResponse
128
+ */
129
+ export interface DeleteTemplateResponse {
130
+ }
131
+ // Documents ==================================================================
132
+
133
+ /**
134
+ * @generated from protobuf message services.docstore.ListDocumentsRequest
135
+ */
136
+ export interface ListDocumentsRequest {
137
+ /**
138
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
139
+ */
140
+ pagination?: PaginationRequest;
141
+ /**
142
+ * @generated from protobuf field: optional resources.common.database.Sort sort = 2;
143
+ */
144
+ sort?: Sort;
145
+ /**
146
+ * Search params
147
+ *
148
+ * @generated from protobuf field: optional string search = 3;
149
+ */
150
+ search?: string;
151
+ /**
152
+ * @generated from protobuf field: repeated uint64 category_ids = 4 [jstype = JS_STRING];
153
+ */
154
+ categoryIds: string[];
155
+ /**
156
+ * @generated from protobuf field: repeated int32 creator_ids = 5;
157
+ */
158
+ creatorIds: number[];
159
+ /**
160
+ * @generated from protobuf field: optional resources.timestamp.Timestamp from = 6;
161
+ */
162
+ from?: Timestamp;
163
+ /**
164
+ * @generated from protobuf field: optional resources.timestamp.Timestamp to = 7;
165
+ */
166
+ to?: Timestamp;
167
+ /**
168
+ * @generated from protobuf field: optional bool closed = 8;
169
+ */
170
+ closed?: boolean;
171
+ /**
172
+ * @generated from protobuf field: repeated uint64 document_ids = 9 [jstype = JS_STRING];
173
+ */
174
+ documentIds: string[];
175
+ }
176
+ /**
177
+ * @generated from protobuf message services.docstore.ListDocumentsResponse
178
+ */
179
+ export interface ListDocumentsResponse {
180
+ /**
181
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
182
+ */
183
+ pagination?: PaginationResponse;
184
+ /**
185
+ * @generated from protobuf field: repeated resources.documents.DocumentShort documents = 2;
186
+ */
187
+ documents: DocumentShort[];
188
+ }
189
+ /**
190
+ * @generated from protobuf message services.docstore.GetDocumentRequest
191
+ */
192
+ export interface GetDocumentRequest {
193
+ /**
194
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
195
+ */
196
+ documentId: string;
197
+ /**
198
+ * @generated from protobuf field: optional bool info_only = 2;
199
+ */
200
+ infoOnly?: boolean;
201
+ }
202
+ /**
203
+ * @generated from protobuf message services.docstore.GetDocumentResponse
204
+ */
205
+ export interface GetDocumentResponse {
206
+ /**
207
+ * @generated from protobuf field: resources.documents.Document document = 1;
208
+ */
209
+ document?: Document;
210
+ /**
211
+ * @generated from protobuf field: resources.documents.DocumentAccess access = 2;
212
+ */
213
+ access?: DocumentAccess;
214
+ }
215
+ /**
216
+ * @generated from protobuf message services.docstore.GetDocumentReferencesRequest
217
+ */
218
+ export interface GetDocumentReferencesRequest {
219
+ /**
220
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
221
+ */
222
+ documentId: string;
223
+ }
224
+ /**
225
+ * @generated from protobuf message services.docstore.GetDocumentReferencesResponse
226
+ */
227
+ export interface GetDocumentReferencesResponse {
228
+ /**
229
+ * @generated from protobuf field: repeated resources.documents.DocumentReference references = 1;
230
+ */
231
+ references: DocumentReference[]; // @gotags: alias:"reference"
232
+ }
233
+ /**
234
+ * @generated from protobuf message services.docstore.GetDocumentRelationsRequest
235
+ */
236
+ export interface GetDocumentRelationsRequest {
237
+ /**
238
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
239
+ */
240
+ documentId: string;
241
+ }
242
+ /**
243
+ * @generated from protobuf message services.docstore.GetDocumentRelationsResponse
244
+ */
245
+ export interface GetDocumentRelationsResponse {
246
+ /**
247
+ * @generated from protobuf field: repeated resources.documents.DocumentRelation relations = 1;
248
+ */
249
+ relations: DocumentRelation[]; // @gotags: alias:"relation"
250
+ }
251
+ /**
252
+ * @generated from protobuf message services.docstore.AddDocumentReferenceRequest
253
+ */
254
+ export interface AddDocumentReferenceRequest {
255
+ /**
256
+ * @generated from protobuf field: resources.documents.DocumentReference reference = 1;
257
+ */
258
+ reference?: DocumentReference;
259
+ }
260
+ /**
261
+ * @generated from protobuf message services.docstore.AddDocumentReferenceResponse
262
+ */
263
+ export interface AddDocumentReferenceResponse {
264
+ /**
265
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
266
+ */
267
+ id: string;
268
+ }
269
+ /**
270
+ * @generated from protobuf message services.docstore.RemoveDocumentReferenceRequest
271
+ */
272
+ export interface RemoveDocumentReferenceRequest {
273
+ /**
274
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
275
+ */
276
+ id: string;
277
+ }
278
+ /**
279
+ * @generated from protobuf message services.docstore.RemoveDocumentReferenceResponse
280
+ */
281
+ export interface RemoveDocumentReferenceResponse {
282
+ }
283
+ /**
284
+ * @generated from protobuf message services.docstore.AddDocumentRelationRequest
285
+ */
286
+ export interface AddDocumentRelationRequest {
287
+ /**
288
+ * @generated from protobuf field: resources.documents.DocumentRelation relation = 1;
289
+ */
290
+ relation?: DocumentRelation;
291
+ }
292
+ /**
293
+ * @generated from protobuf message services.docstore.AddDocumentRelationResponse
294
+ */
295
+ export interface AddDocumentRelationResponse {
296
+ /**
297
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
298
+ */
299
+ id: string;
300
+ }
301
+ /**
302
+ * @generated from protobuf message services.docstore.RemoveDocumentRelationRequest
303
+ */
304
+ export interface RemoveDocumentRelationRequest {
305
+ /**
306
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
307
+ */
308
+ id: string;
309
+ }
310
+ /**
311
+ * @generated from protobuf message services.docstore.RemoveDocumentRelationResponse
312
+ */
313
+ export interface RemoveDocumentRelationResponse {
314
+ }
315
+ // Comments ===============================================================
316
+
317
+ /**
318
+ * @generated from protobuf message services.docstore.GetCommentsRequest
319
+ */
320
+ export interface GetCommentsRequest {
321
+ /**
322
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
323
+ */
324
+ pagination?: PaginationRequest;
325
+ /**
326
+ * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
327
+ */
328
+ documentId: string;
329
+ }
330
+ /**
331
+ * @generated from protobuf message services.docstore.GetCommentsResponse
332
+ */
333
+ export interface GetCommentsResponse {
334
+ /**
335
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
336
+ */
337
+ pagination?: PaginationResponse;
338
+ /**
339
+ * @generated from protobuf field: repeated resources.documents.Comment comments = 2;
340
+ */
341
+ comments: Comment[];
342
+ }
343
+ /**
344
+ * @generated from protobuf message services.docstore.PostCommentRequest
345
+ */
346
+ export interface PostCommentRequest {
347
+ /**
348
+ * @generated from protobuf field: resources.documents.Comment comment = 1;
349
+ */
350
+ comment?: Comment;
351
+ }
352
+ /**
353
+ * @generated from protobuf message services.docstore.PostCommentResponse
354
+ */
355
+ export interface PostCommentResponse {
356
+ /**
357
+ * @generated from protobuf field: resources.documents.Comment comment = 1;
358
+ */
359
+ comment?: Comment;
360
+ }
361
+ /**
362
+ * @generated from protobuf message services.docstore.EditCommentRequest
363
+ */
364
+ export interface EditCommentRequest {
365
+ /**
366
+ * @generated from protobuf field: resources.documents.Comment comment = 1;
367
+ */
368
+ comment?: Comment;
369
+ }
370
+ /**
371
+ * @generated from protobuf message services.docstore.EditCommentResponse
372
+ */
373
+ export interface EditCommentResponse {
374
+ /**
375
+ * @generated from protobuf field: resources.documents.Comment comment = 1;
376
+ */
377
+ comment?: Comment;
378
+ }
379
+ /**
380
+ * @generated from protobuf message services.docstore.DeleteCommentRequest
381
+ */
382
+ export interface DeleteCommentRequest {
383
+ /**
384
+ * @generated from protobuf field: uint64 comment_id = 1 [jstype = JS_STRING];
385
+ */
386
+ commentId: string;
387
+ }
388
+ /**
389
+ * @generated from protobuf message services.docstore.DeleteCommentResponse
390
+ */
391
+ export interface DeleteCommentResponse {
392
+ }
393
+ /**
394
+ * @generated from protobuf message services.docstore.UpdateDocumentResponse
395
+ */
396
+ export interface UpdateDocumentResponse {
397
+ /**
398
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
399
+ */
400
+ documentId: string; // @gotags: alias:"id"
401
+ }
402
+ /**
403
+ * @generated from protobuf message services.docstore.DeleteDocumentRequest
404
+ */
405
+ export interface DeleteDocumentRequest {
406
+ /**
407
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
408
+ */
409
+ documentId: string; // @gotags: alias:"id"
410
+ }
411
+ /**
412
+ * @generated from protobuf message services.docstore.DeleteDocumentResponse
413
+ */
414
+ export interface DeleteDocumentResponse {
415
+ }
416
+ /**
417
+ * @generated from protobuf message services.docstore.ToggleDocumentRequest
418
+ */
419
+ export interface ToggleDocumentRequest {
420
+ /**
421
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
422
+ */
423
+ documentId: string;
424
+ /**
425
+ * @generated from protobuf field: bool closed = 2;
426
+ */
427
+ closed: boolean;
428
+ }
429
+ /**
430
+ * @generated from protobuf message services.docstore.ToggleDocumentResponse
431
+ */
432
+ export interface ToggleDocumentResponse {
433
+ }
434
+ /**
435
+ * @generated from protobuf message services.docstore.ChangeDocumentOwnerRequest
436
+ */
437
+ export interface ChangeDocumentOwnerRequest {
438
+ /**
439
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
440
+ */
441
+ documentId: string;
442
+ /**
443
+ * @generated from protobuf field: optional int32 new_user_id = 2;
444
+ */
445
+ newUserId?: number;
446
+ }
447
+ /**
448
+ * @generated from protobuf message services.docstore.ChangeDocumentOwnerResponse
449
+ */
450
+ export interface ChangeDocumentOwnerResponse {
451
+ }
452
+ /**
453
+ * @generated from protobuf message services.docstore.CreateDocumentRequest
454
+ */
455
+ export interface CreateDocumentRequest {
456
+ /**
457
+ * @generated from protobuf field: optional uint64 category_id = 1 [jstype = JS_STRING];
458
+ */
459
+ categoryId?: string; // @gotags: alias:"category_id"
460
+ /**
461
+ * @sanitize: method=StripTags
462
+ *
463
+ * @generated from protobuf field: string title = 2;
464
+ */
465
+ title: string; // @gotags: alias:"title"
466
+ /**
467
+ * @sanitize
468
+ *
469
+ * @generated from protobuf field: resources.common.content.Content content = 3;
470
+ */
471
+ content?: Content;
472
+ /**
473
+ * @generated from protobuf field: resources.common.content.ContentType content_type = 4;
474
+ */
475
+ contentType: ContentType; // @gotags: alias:"content_type"
476
+ /**
477
+ * @generated from protobuf field: optional string data = 5;
478
+ */
479
+ data?: string; // @gotags: alias:"data"
480
+ /**
481
+ * @sanitize
482
+ *
483
+ * @generated from protobuf field: string state = 6;
484
+ */
485
+ state: string; // @gotags: alias:"state"
486
+ /**
487
+ * @generated from protobuf field: bool closed = 7;
488
+ */
489
+ closed: boolean; // @gotags: alias:"closed"
490
+ /**
491
+ * @generated from protobuf field: bool public = 8;
492
+ */
493
+ public: boolean; // @gotags: alias:"public"
494
+ /**
495
+ * @generated from protobuf field: optional resources.documents.DocumentAccess access = 9;
496
+ */
497
+ access?: DocumentAccess;
498
+ /**
499
+ * @generated from protobuf field: optional uint64 template_id = 10 [jstype = JS_STRING];
500
+ */
501
+ templateId?: string;
502
+ }
503
+ /**
504
+ * @generated from protobuf message services.docstore.CreateDocumentResponse
505
+ */
506
+ export interface CreateDocumentResponse {
507
+ /**
508
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
509
+ */
510
+ documentId: string; // @gotags: alias:"id"
511
+ }
512
+ /**
513
+ * @generated from protobuf message services.docstore.UpdateDocumentRequest
514
+ */
515
+ export interface UpdateDocumentRequest {
516
+ /**
517
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
518
+ */
519
+ documentId: string; // @gotags: alias:"id"
520
+ /**
521
+ * @generated from protobuf field: optional uint64 category_id = 2 [jstype = JS_STRING];
522
+ */
523
+ categoryId?: string; // @gotags: alias:"category_id"
524
+ /**
525
+ * @sanitize: method=StripTags
526
+ *
527
+ * @generated from protobuf field: string title = 3;
528
+ */
529
+ title: string; // @gotags: alias:"title"
530
+ /**
531
+ * @sanitize
532
+ *
533
+ * @generated from protobuf field: resources.common.content.Content content = 4;
534
+ */
535
+ content?: Content;
536
+ /**
537
+ * @generated from protobuf field: resources.common.content.ContentType content_type = 5;
538
+ */
539
+ contentType: ContentType; // @gotags: alias:"content_type"
540
+ /**
541
+ * @generated from protobuf field: optional string data = 6;
542
+ */
543
+ data?: string; // @gotags: alias:"data"
544
+ /**
545
+ * @sanitize
546
+ *
547
+ * @generated from protobuf field: string state = 7;
548
+ */
549
+ state: string; // @gotags: alias:"state"
550
+ /**
551
+ * @generated from protobuf field: bool closed = 8;
552
+ */
553
+ closed: boolean; // @gotags: alias:"closed"
554
+ /**
555
+ * @generated from protobuf field: bool public = 9;
556
+ */
557
+ public: boolean; // @gotags: alias:"public"
558
+ /**
559
+ * @generated from protobuf field: optional resources.documents.DocumentAccess access = 10;
560
+ */
561
+ access?: DocumentAccess;
562
+ }
563
+ // Document Activity and Requests =============================================
564
+
565
+ /**
566
+ * @generated from protobuf message services.docstore.ListDocumentActivityRequest
567
+ */
568
+ export interface ListDocumentActivityRequest {
569
+ /**
570
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
571
+ */
572
+ pagination?: PaginationRequest;
573
+ /**
574
+ * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
575
+ */
576
+ documentId: string;
577
+ /**
578
+ * Search params
579
+ *
580
+ * @generated from protobuf field: repeated resources.documents.DocActivityType activity_types = 3;
581
+ */
582
+ activityTypes: DocActivityType[];
583
+ }
584
+ /**
585
+ * @generated from protobuf message services.docstore.ListDocumentActivityResponse
586
+ */
587
+ export interface ListDocumentActivityResponse {
588
+ /**
589
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
590
+ */
591
+ pagination?: PaginationResponse;
592
+ /**
593
+ * @generated from protobuf field: repeated resources.documents.DocActivity activity = 2;
594
+ */
595
+ activity: DocActivity[];
596
+ }
597
+ /**
598
+ * @generated from protobuf message services.docstore.ListDocumentReqsRequest
599
+ */
600
+ export interface ListDocumentReqsRequest {
601
+ /**
602
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
603
+ */
604
+ pagination?: PaginationRequest;
605
+ /**
606
+ * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
607
+ */
608
+ documentId: string;
609
+ }
610
+ /**
611
+ * @generated from protobuf message services.docstore.ListDocumentReqsResponse
612
+ */
613
+ export interface ListDocumentReqsResponse {
614
+ /**
615
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
616
+ */
617
+ pagination?: PaginationResponse;
618
+ /**
619
+ * @generated from protobuf field: repeated resources.documents.DocRequest requests = 2;
620
+ */
621
+ requests: DocRequest[];
622
+ }
623
+ /**
624
+ * @generated from protobuf message services.docstore.CreateDocumentReqRequest
625
+ */
626
+ export interface CreateDocumentReqRequest {
627
+ /**
628
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
629
+ */
630
+ documentId: string;
631
+ /**
632
+ * @generated from protobuf field: resources.documents.DocActivityType request_type = 2;
633
+ */
634
+ requestType: DocActivityType;
635
+ /**
636
+ * @sanitize
637
+ *
638
+ * @generated from protobuf field: optional string reason = 3;
639
+ */
640
+ reason?: string;
641
+ /**
642
+ * @generated from protobuf field: optional resources.documents.DocActivityData data = 4;
643
+ */
644
+ data?: DocActivityData;
645
+ }
646
+ /**
647
+ * @generated from protobuf message services.docstore.CreateDocumentReqResponse
648
+ */
649
+ export interface CreateDocumentReqResponse {
650
+ /**
651
+ * @generated from protobuf field: resources.documents.DocRequest request = 1;
652
+ */
653
+ request?: DocRequest;
654
+ }
655
+ /**
656
+ * @generated from protobuf message services.docstore.UpdateDocumentReqRequest
657
+ */
658
+ export interface UpdateDocumentReqRequest {
659
+ /**
660
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
661
+ */
662
+ documentId: string;
663
+ /**
664
+ * @generated from protobuf field: uint64 request_id = 2 [jstype = JS_STRING];
665
+ */
666
+ requestId: string;
667
+ /**
668
+ * @sanitize
669
+ *
670
+ * @generated from protobuf field: optional string reason = 3;
671
+ */
672
+ reason?: string;
673
+ /**
674
+ * @generated from protobuf field: optional resources.documents.DocActivityData data = 4;
675
+ */
676
+ data?: DocActivityData;
677
+ /**
678
+ * @generated from protobuf field: bool accepted = 5;
679
+ */
680
+ accepted: boolean;
681
+ }
682
+ /**
683
+ * @generated from protobuf message services.docstore.UpdateDocumentReqResponse
684
+ */
685
+ export interface UpdateDocumentReqResponse {
686
+ /**
687
+ * @generated from protobuf field: resources.documents.DocRequest request = 1;
688
+ */
689
+ request?: DocRequest;
690
+ }
691
+ /**
692
+ * @generated from protobuf message services.docstore.DeleteDocumentReqRequest
693
+ */
694
+ export interface DeleteDocumentReqRequest {
695
+ /**
696
+ * @generated from protobuf field: uint64 request_id = 1 [jstype = JS_STRING];
697
+ */
698
+ requestId: string;
699
+ }
700
+ /**
701
+ * @generated from protobuf message services.docstore.DeleteDocumentReqResponse
702
+ */
703
+ export interface DeleteDocumentReqResponse {
704
+ }
705
+ // Access =====================================================================
706
+
707
+ /**
708
+ * @generated from protobuf message services.docstore.GetDocumentAccessRequest
709
+ */
710
+ export interface GetDocumentAccessRequest {
711
+ /**
712
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
713
+ */
714
+ documentId: string;
715
+ }
716
+ /**
717
+ * @generated from protobuf message services.docstore.GetDocumentAccessResponse
718
+ */
719
+ export interface GetDocumentAccessResponse {
720
+ /**
721
+ * @generated from protobuf field: resources.documents.DocumentAccess access = 1;
722
+ */
723
+ access?: DocumentAccess;
724
+ }
725
+ /**
726
+ * @generated from protobuf message services.docstore.SetDocumentAccessRequest
727
+ */
728
+ export interface SetDocumentAccessRequest {
729
+ /**
730
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
731
+ */
732
+ documentId: string;
733
+ /**
734
+ * @generated from protobuf field: resources.documents.DocumentAccess access = 2;
735
+ */
736
+ access?: DocumentAccess;
737
+ }
738
+ /**
739
+ * @generated from protobuf message services.docstore.SetDocumentAccessResponse
740
+ */
741
+ export interface SetDocumentAccessResponse {
742
+ }
743
+ /**
744
+ * @generated from protobuf message services.docstore.ListUserDocumentsRequest
745
+ */
746
+ export interface ListUserDocumentsRequest {
747
+ /**
748
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
749
+ */
750
+ pagination?: PaginationRequest;
751
+ /**
752
+ * @generated from protobuf field: int32 user_id = 2;
753
+ */
754
+ userId: number;
755
+ /**
756
+ * @generated from protobuf field: repeated resources.documents.DocRelation relations = 3;
757
+ */
758
+ relations: DocRelation[];
759
+ /**
760
+ * @generated from protobuf field: optional bool closed = 8;
761
+ */
762
+ closed?: boolean;
763
+ }
764
+ /**
765
+ * @generated from protobuf message services.docstore.ListUserDocumentsResponse
766
+ */
767
+ export interface ListUserDocumentsResponse {
768
+ /**
769
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
770
+ */
771
+ pagination?: PaginationResponse;
772
+ /**
773
+ * @generated from protobuf field: repeated resources.documents.DocumentRelation relations = 2;
774
+ */
775
+ relations: DocumentRelation[];
776
+ }
777
+ // Categories =================================================================
778
+
779
+ /**
780
+ * @generated from protobuf message services.docstore.ListCategoriesRequest
781
+ */
782
+ export interface ListCategoriesRequest {
783
+ }
784
+ /**
785
+ * @generated from protobuf message services.docstore.ListCategoriesResponse
786
+ */
787
+ export interface ListCategoriesResponse {
788
+ /**
789
+ * @generated from protobuf field: repeated resources.documents.Category category = 1;
790
+ */
791
+ category: Category[];
792
+ }
793
+ /**
794
+ * @generated from protobuf message services.docstore.CreateCategoryRequest
795
+ */
796
+ export interface CreateCategoryRequest {
797
+ /**
798
+ * @generated from protobuf field: resources.documents.Category category = 1;
799
+ */
800
+ category?: Category;
801
+ }
802
+ /**
803
+ * @generated from protobuf message services.docstore.CreateCategoryResponse
804
+ */
805
+ export interface CreateCategoryResponse {
806
+ /**
807
+ * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
808
+ */
809
+ id: string;
810
+ }
811
+ /**
812
+ * @generated from protobuf message services.docstore.UpdateCategoryRequest
813
+ */
814
+ export interface UpdateCategoryRequest {
815
+ /**
816
+ * @generated from protobuf field: resources.documents.Category category = 1;
817
+ */
818
+ category?: Category;
819
+ }
820
+ /**
821
+ * @generated from protobuf message services.docstore.UpdateCategoryResponse
822
+ */
823
+ export interface UpdateCategoryResponse {
824
+ }
825
+ /**
826
+ * @generated from protobuf message services.docstore.DeleteCategoryRequest
827
+ */
828
+ export interface DeleteCategoryRequest {
829
+ /**
830
+ * @generated from protobuf field: repeated uint64 ids = 1 [jstype = JS_STRING];
831
+ */
832
+ ids: string[];
833
+ }
834
+ /**
835
+ * @generated from protobuf message services.docstore.DeleteCategoryResponse
836
+ */
837
+ export interface DeleteCategoryResponse {
838
+ }
839
+ // Pins =======================================================================
840
+
841
+ /**
842
+ * @generated from protobuf message services.docstore.ListDocumentPinsRequest
843
+ */
844
+ export interface ListDocumentPinsRequest {
845
+ /**
846
+ * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
847
+ */
848
+ pagination?: PaginationRequest;
849
+ }
850
+ /**
851
+ * @generated from protobuf message services.docstore.ListDocumentPinsResponse
852
+ */
853
+ export interface ListDocumentPinsResponse {
854
+ /**
855
+ * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
856
+ */
857
+ pagination?: PaginationResponse;
858
+ /**
859
+ * @generated from protobuf field: repeated resources.documents.DocumentShort documents = 2;
860
+ */
861
+ documents: DocumentShort[];
862
+ }
863
+ /**
864
+ * @generated from protobuf message services.docstore.ToggleDocumentPinRequest
865
+ */
866
+ export interface ToggleDocumentPinRequest {
867
+ /**
868
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
869
+ */
870
+ documentId: string;
871
+ /**
872
+ * @generated from protobuf field: bool state = 2;
873
+ */
874
+ state: boolean;
875
+ }
876
+ /**
877
+ * @generated from protobuf message services.docstore.ToggleDocumentPinResponse
878
+ */
879
+ export interface ToggleDocumentPinResponse {
880
+ /**
881
+ * @generated from protobuf field: bool state = 1;
882
+ */
883
+ state: boolean;
884
+ }
885
+ // Reminders ==================================================================
886
+
887
+ /**
888
+ * @generated from protobuf message services.docstore.SetDocumentReminderRequest
889
+ */
890
+ export interface SetDocumentReminderRequest {
891
+ /**
892
+ * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
893
+ */
894
+ documentId: string;
895
+ /**
896
+ * @generated from protobuf field: optional resources.timestamp.Timestamp reminder_time = 2;
897
+ */
898
+ reminderTime?: Timestamp;
899
+ /**
900
+ * @sanitize: method=StripTags
901
+ *
902
+ * @generated from protobuf field: optional string message = 3;
903
+ */
904
+ message?: string;
905
+ }
906
+ /**
907
+ * @generated from protobuf message services.docstore.SetDocumentReminderResponse
908
+ */
909
+ export interface SetDocumentReminderResponse {
910
+ }
911
+ // @generated message type with reflection information, may provide speed optimized methods
912
+ class ListTemplatesRequest$Type extends MessageType<ListTemplatesRequest> {
913
+ constructor() {
914
+ super("services.docstore.ListTemplatesRequest", []);
915
+ }
916
+ create(value?: PartialMessage<ListTemplatesRequest>): ListTemplatesRequest {
917
+ const message = globalThis.Object.create((this.messagePrototype!));
918
+ if (value !== undefined)
919
+ reflectionMergePartial<ListTemplatesRequest>(this, message, value);
920
+ return message;
921
+ }
922
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTemplatesRequest): ListTemplatesRequest {
923
+ return target ?? this.create();
924
+ }
925
+ internalBinaryWrite(message: ListTemplatesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
926
+ let u = options.writeUnknownFields;
927
+ if (u !== false)
928
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
929
+ return writer;
930
+ }
931
+ }
932
+ /**
933
+ * @generated MessageType for protobuf message services.docstore.ListTemplatesRequest
934
+ */
935
+ export const ListTemplatesRequest = new ListTemplatesRequest$Type();
936
+ // @generated message type with reflection information, may provide speed optimized methods
937
+ class ListTemplatesResponse$Type extends MessageType<ListTemplatesResponse> {
938
+ constructor() {
939
+ super("services.docstore.ListTemplatesResponse", [
940
+ { no: 1, name: "templates", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TemplateShort }
941
+ ]);
942
+ }
943
+ create(value?: PartialMessage<ListTemplatesResponse>): ListTemplatesResponse {
944
+ const message = globalThis.Object.create((this.messagePrototype!));
945
+ message.templates = [];
946
+ if (value !== undefined)
947
+ reflectionMergePartial<ListTemplatesResponse>(this, message, value);
948
+ return message;
949
+ }
950
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTemplatesResponse): ListTemplatesResponse {
951
+ let message = target ?? this.create(), end = reader.pos + length;
952
+ while (reader.pos < end) {
953
+ let [fieldNo, wireType] = reader.tag();
954
+ switch (fieldNo) {
955
+ case /* repeated resources.documents.TemplateShort templates */ 1:
956
+ message.templates.push(TemplateShort.internalBinaryRead(reader, reader.uint32(), options));
957
+ break;
958
+ default:
959
+ let u = options.readUnknownField;
960
+ if (u === "throw")
961
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
962
+ let d = reader.skip(wireType);
963
+ if (u !== false)
964
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
965
+ }
966
+ }
967
+ return message;
968
+ }
969
+ internalBinaryWrite(message: ListTemplatesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
970
+ /* repeated resources.documents.TemplateShort templates = 1; */
971
+ for (let i = 0; i < message.templates.length; i++)
972
+ TemplateShort.internalBinaryWrite(message.templates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
973
+ let u = options.writeUnknownFields;
974
+ if (u !== false)
975
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
976
+ return writer;
977
+ }
978
+ }
979
+ /**
980
+ * @generated MessageType for protobuf message services.docstore.ListTemplatesResponse
981
+ */
982
+ export const ListTemplatesResponse = new ListTemplatesResponse$Type();
983
+ // @generated message type with reflection information, may provide speed optimized methods
984
+ class GetTemplateRequest$Type extends MessageType<GetTemplateRequest> {
985
+ constructor() {
986
+ super("services.docstore.GetTemplateRequest", [
987
+ { no: 1, name: "template_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
988
+ { no: 2, name: "data", kind: "message", T: () => TemplateData },
989
+ { no: 3, name: "render", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
990
+ ]);
991
+ }
992
+ create(value?: PartialMessage<GetTemplateRequest>): GetTemplateRequest {
993
+ const message = globalThis.Object.create((this.messagePrototype!));
994
+ message.templateId = "0";
995
+ if (value !== undefined)
996
+ reflectionMergePartial<GetTemplateRequest>(this, message, value);
997
+ return message;
998
+ }
999
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetTemplateRequest): GetTemplateRequest {
1000
+ let message = target ?? this.create(), end = reader.pos + length;
1001
+ while (reader.pos < end) {
1002
+ let [fieldNo, wireType] = reader.tag();
1003
+ switch (fieldNo) {
1004
+ case /* uint64 template_id = 1 [jstype = JS_STRING];*/ 1:
1005
+ message.templateId = reader.uint64().toString();
1006
+ break;
1007
+ case /* optional resources.documents.TemplateData data */ 2:
1008
+ message.data = TemplateData.internalBinaryRead(reader, reader.uint32(), options, message.data);
1009
+ break;
1010
+ case /* optional bool render */ 3:
1011
+ message.render = reader.bool();
1012
+ break;
1013
+ default:
1014
+ let u = options.readUnknownField;
1015
+ if (u === "throw")
1016
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1017
+ let d = reader.skip(wireType);
1018
+ if (u !== false)
1019
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1020
+ }
1021
+ }
1022
+ return message;
1023
+ }
1024
+ internalBinaryWrite(message: GetTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1025
+ /* uint64 template_id = 1 [jstype = JS_STRING]; */
1026
+ if (message.templateId !== "0")
1027
+ writer.tag(1, WireType.Varint).uint64(message.templateId);
1028
+ /* optional resources.documents.TemplateData data = 2; */
1029
+ if (message.data)
1030
+ TemplateData.internalBinaryWrite(message.data, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1031
+ /* optional bool render = 3; */
1032
+ if (message.render !== undefined)
1033
+ writer.tag(3, WireType.Varint).bool(message.render);
1034
+ let u = options.writeUnknownFields;
1035
+ if (u !== false)
1036
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1037
+ return writer;
1038
+ }
1039
+ }
1040
+ /**
1041
+ * @generated MessageType for protobuf message services.docstore.GetTemplateRequest
1042
+ */
1043
+ export const GetTemplateRequest = new GetTemplateRequest$Type();
1044
+ // @generated message type with reflection information, may provide speed optimized methods
1045
+ class GetTemplateResponse$Type extends MessageType<GetTemplateResponse> {
1046
+ constructor() {
1047
+ super("services.docstore.GetTemplateResponse", [
1048
+ { no: 1, name: "template", kind: "message", T: () => Template },
1049
+ { no: 2, name: "rendered", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1050
+ ]);
1051
+ }
1052
+ create(value?: PartialMessage<GetTemplateResponse>): GetTemplateResponse {
1053
+ const message = globalThis.Object.create((this.messagePrototype!));
1054
+ message.rendered = false;
1055
+ if (value !== undefined)
1056
+ reflectionMergePartial<GetTemplateResponse>(this, message, value);
1057
+ return message;
1058
+ }
1059
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetTemplateResponse): GetTemplateResponse {
1060
+ let message = target ?? this.create(), end = reader.pos + length;
1061
+ while (reader.pos < end) {
1062
+ let [fieldNo, wireType] = reader.tag();
1063
+ switch (fieldNo) {
1064
+ case /* resources.documents.Template template */ 1:
1065
+ message.template = Template.internalBinaryRead(reader, reader.uint32(), options, message.template);
1066
+ break;
1067
+ case /* bool rendered */ 2:
1068
+ message.rendered = reader.bool();
1069
+ break;
1070
+ default:
1071
+ let u = options.readUnknownField;
1072
+ if (u === "throw")
1073
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1074
+ let d = reader.skip(wireType);
1075
+ if (u !== false)
1076
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1077
+ }
1078
+ }
1079
+ return message;
1080
+ }
1081
+ internalBinaryWrite(message: GetTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1082
+ /* resources.documents.Template template = 1; */
1083
+ if (message.template)
1084
+ Template.internalBinaryWrite(message.template, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1085
+ /* bool rendered = 2; */
1086
+ if (message.rendered !== false)
1087
+ writer.tag(2, WireType.Varint).bool(message.rendered);
1088
+ let u = options.writeUnknownFields;
1089
+ if (u !== false)
1090
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1091
+ return writer;
1092
+ }
1093
+ }
1094
+ /**
1095
+ * @generated MessageType for protobuf message services.docstore.GetTemplateResponse
1096
+ */
1097
+ export const GetTemplateResponse = new GetTemplateResponse$Type();
1098
+ // @generated message type with reflection information, may provide speed optimized methods
1099
+ class CreateTemplateRequest$Type extends MessageType<CreateTemplateRequest> {
1100
+ constructor() {
1101
+ super("services.docstore.CreateTemplateRequest", [
1102
+ { no: 1, name: "template", kind: "message", T: () => Template, options: { "validate.rules": { message: { required: true } } } }
1103
+ ]);
1104
+ }
1105
+ create(value?: PartialMessage<CreateTemplateRequest>): CreateTemplateRequest {
1106
+ const message = globalThis.Object.create((this.messagePrototype!));
1107
+ if (value !== undefined)
1108
+ reflectionMergePartial<CreateTemplateRequest>(this, message, value);
1109
+ return message;
1110
+ }
1111
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateTemplateRequest): CreateTemplateRequest {
1112
+ let message = target ?? this.create(), end = reader.pos + length;
1113
+ while (reader.pos < end) {
1114
+ let [fieldNo, wireType] = reader.tag();
1115
+ switch (fieldNo) {
1116
+ case /* resources.documents.Template template */ 1:
1117
+ message.template = Template.internalBinaryRead(reader, reader.uint32(), options, message.template);
1118
+ break;
1119
+ default:
1120
+ let u = options.readUnknownField;
1121
+ if (u === "throw")
1122
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1123
+ let d = reader.skip(wireType);
1124
+ if (u !== false)
1125
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1126
+ }
1127
+ }
1128
+ return message;
1129
+ }
1130
+ internalBinaryWrite(message: CreateTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1131
+ /* resources.documents.Template template = 1; */
1132
+ if (message.template)
1133
+ Template.internalBinaryWrite(message.template, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1134
+ let u = options.writeUnknownFields;
1135
+ if (u !== false)
1136
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1137
+ return writer;
1138
+ }
1139
+ }
1140
+ /**
1141
+ * @generated MessageType for protobuf message services.docstore.CreateTemplateRequest
1142
+ */
1143
+ export const CreateTemplateRequest = new CreateTemplateRequest$Type();
1144
+ // @generated message type with reflection information, may provide speed optimized methods
1145
+ class CreateTemplateResponse$Type extends MessageType<CreateTemplateResponse> {
1146
+ constructor() {
1147
+ super("services.docstore.CreateTemplateResponse", [
1148
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1149
+ ]);
1150
+ }
1151
+ create(value?: PartialMessage<CreateTemplateResponse>): CreateTemplateResponse {
1152
+ const message = globalThis.Object.create((this.messagePrototype!));
1153
+ message.id = "0";
1154
+ if (value !== undefined)
1155
+ reflectionMergePartial<CreateTemplateResponse>(this, message, value);
1156
+ return message;
1157
+ }
1158
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateTemplateResponse): CreateTemplateResponse {
1159
+ let message = target ?? this.create(), end = reader.pos + length;
1160
+ while (reader.pos < end) {
1161
+ let [fieldNo, wireType] = reader.tag();
1162
+ switch (fieldNo) {
1163
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1164
+ message.id = reader.uint64().toString();
1165
+ break;
1166
+ default:
1167
+ let u = options.readUnknownField;
1168
+ if (u === "throw")
1169
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1170
+ let d = reader.skip(wireType);
1171
+ if (u !== false)
1172
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1173
+ }
1174
+ }
1175
+ return message;
1176
+ }
1177
+ internalBinaryWrite(message: CreateTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1178
+ /* uint64 id = 1 [jstype = JS_STRING]; */
1179
+ if (message.id !== "0")
1180
+ writer.tag(1, WireType.Varint).uint64(message.id);
1181
+ let u = options.writeUnknownFields;
1182
+ if (u !== false)
1183
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1184
+ return writer;
1185
+ }
1186
+ }
1187
+ /**
1188
+ * @generated MessageType for protobuf message services.docstore.CreateTemplateResponse
1189
+ */
1190
+ export const CreateTemplateResponse = new CreateTemplateResponse$Type();
1191
+ // @generated message type with reflection information, may provide speed optimized methods
1192
+ class UpdateTemplateRequest$Type extends MessageType<UpdateTemplateRequest> {
1193
+ constructor() {
1194
+ super("services.docstore.UpdateTemplateRequest", [
1195
+ { no: 1, name: "template", kind: "message", T: () => Template, options: { "validate.rules": { message: { required: true } } } }
1196
+ ]);
1197
+ }
1198
+ create(value?: PartialMessage<UpdateTemplateRequest>): UpdateTemplateRequest {
1199
+ const message = globalThis.Object.create((this.messagePrototype!));
1200
+ if (value !== undefined)
1201
+ reflectionMergePartial<UpdateTemplateRequest>(this, message, value);
1202
+ return message;
1203
+ }
1204
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateTemplateRequest): UpdateTemplateRequest {
1205
+ let message = target ?? this.create(), end = reader.pos + length;
1206
+ while (reader.pos < end) {
1207
+ let [fieldNo, wireType] = reader.tag();
1208
+ switch (fieldNo) {
1209
+ case /* resources.documents.Template template */ 1:
1210
+ message.template = Template.internalBinaryRead(reader, reader.uint32(), options, message.template);
1211
+ break;
1212
+ default:
1213
+ let u = options.readUnknownField;
1214
+ if (u === "throw")
1215
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1216
+ let d = reader.skip(wireType);
1217
+ if (u !== false)
1218
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1219
+ }
1220
+ }
1221
+ return message;
1222
+ }
1223
+ internalBinaryWrite(message: UpdateTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1224
+ /* resources.documents.Template template = 1; */
1225
+ if (message.template)
1226
+ Template.internalBinaryWrite(message.template, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1227
+ let u = options.writeUnknownFields;
1228
+ if (u !== false)
1229
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1230
+ return writer;
1231
+ }
1232
+ }
1233
+ /**
1234
+ * @generated MessageType for protobuf message services.docstore.UpdateTemplateRequest
1235
+ */
1236
+ export const UpdateTemplateRequest = new UpdateTemplateRequest$Type();
1237
+ // @generated message type with reflection information, may provide speed optimized methods
1238
+ class UpdateTemplateResponse$Type extends MessageType<UpdateTemplateResponse> {
1239
+ constructor() {
1240
+ super("services.docstore.UpdateTemplateResponse", [
1241
+ { no: 1, name: "template", kind: "message", T: () => Template }
1242
+ ]);
1243
+ }
1244
+ create(value?: PartialMessage<UpdateTemplateResponse>): UpdateTemplateResponse {
1245
+ const message = globalThis.Object.create((this.messagePrototype!));
1246
+ if (value !== undefined)
1247
+ reflectionMergePartial<UpdateTemplateResponse>(this, message, value);
1248
+ return message;
1249
+ }
1250
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateTemplateResponse): UpdateTemplateResponse {
1251
+ let message = target ?? this.create(), end = reader.pos + length;
1252
+ while (reader.pos < end) {
1253
+ let [fieldNo, wireType] = reader.tag();
1254
+ switch (fieldNo) {
1255
+ case /* resources.documents.Template template */ 1:
1256
+ message.template = Template.internalBinaryRead(reader, reader.uint32(), options, message.template);
1257
+ break;
1258
+ default:
1259
+ let u = options.readUnknownField;
1260
+ if (u === "throw")
1261
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1262
+ let d = reader.skip(wireType);
1263
+ if (u !== false)
1264
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1265
+ }
1266
+ }
1267
+ return message;
1268
+ }
1269
+ internalBinaryWrite(message: UpdateTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1270
+ /* resources.documents.Template template = 1; */
1271
+ if (message.template)
1272
+ Template.internalBinaryWrite(message.template, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1273
+ let u = options.writeUnknownFields;
1274
+ if (u !== false)
1275
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1276
+ return writer;
1277
+ }
1278
+ }
1279
+ /**
1280
+ * @generated MessageType for protobuf message services.docstore.UpdateTemplateResponse
1281
+ */
1282
+ export const UpdateTemplateResponse = new UpdateTemplateResponse$Type();
1283
+ // @generated message type with reflection information, may provide speed optimized methods
1284
+ class DeleteTemplateRequest$Type extends MessageType<DeleteTemplateRequest> {
1285
+ constructor() {
1286
+ super("services.docstore.DeleteTemplateRequest", [
1287
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1288
+ ]);
1289
+ }
1290
+ create(value?: PartialMessage<DeleteTemplateRequest>): DeleteTemplateRequest {
1291
+ const message = globalThis.Object.create((this.messagePrototype!));
1292
+ message.id = "0";
1293
+ if (value !== undefined)
1294
+ reflectionMergePartial<DeleteTemplateRequest>(this, message, value);
1295
+ return message;
1296
+ }
1297
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteTemplateRequest): DeleteTemplateRequest {
1298
+ let message = target ?? this.create(), end = reader.pos + length;
1299
+ while (reader.pos < end) {
1300
+ let [fieldNo, wireType] = reader.tag();
1301
+ switch (fieldNo) {
1302
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1303
+ message.id = reader.uint64().toString();
1304
+ break;
1305
+ default:
1306
+ let u = options.readUnknownField;
1307
+ if (u === "throw")
1308
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1309
+ let d = reader.skip(wireType);
1310
+ if (u !== false)
1311
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1312
+ }
1313
+ }
1314
+ return message;
1315
+ }
1316
+ internalBinaryWrite(message: DeleteTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1317
+ /* uint64 id = 1 [jstype = JS_STRING]; */
1318
+ if (message.id !== "0")
1319
+ writer.tag(1, WireType.Varint).uint64(message.id);
1320
+ let u = options.writeUnknownFields;
1321
+ if (u !== false)
1322
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1323
+ return writer;
1324
+ }
1325
+ }
1326
+ /**
1327
+ * @generated MessageType for protobuf message services.docstore.DeleteTemplateRequest
1328
+ */
1329
+ export const DeleteTemplateRequest = new DeleteTemplateRequest$Type();
1330
+ // @generated message type with reflection information, may provide speed optimized methods
1331
+ class DeleteTemplateResponse$Type extends MessageType<DeleteTemplateResponse> {
1332
+ constructor() {
1333
+ super("services.docstore.DeleteTemplateResponse", []);
1334
+ }
1335
+ create(value?: PartialMessage<DeleteTemplateResponse>): DeleteTemplateResponse {
1336
+ const message = globalThis.Object.create((this.messagePrototype!));
1337
+ if (value !== undefined)
1338
+ reflectionMergePartial<DeleteTemplateResponse>(this, message, value);
1339
+ return message;
1340
+ }
1341
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteTemplateResponse): DeleteTemplateResponse {
1342
+ return target ?? this.create();
1343
+ }
1344
+ internalBinaryWrite(message: DeleteTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1345
+ let u = options.writeUnknownFields;
1346
+ if (u !== false)
1347
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1348
+ return writer;
1349
+ }
1350
+ }
1351
+ /**
1352
+ * @generated MessageType for protobuf message services.docstore.DeleteTemplateResponse
1353
+ */
1354
+ export const DeleteTemplateResponse = new DeleteTemplateResponse$Type();
1355
+ // @generated message type with reflection information, may provide speed optimized methods
1356
+ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1357
+ constructor() {
1358
+ super("services.docstore.ListDocumentsRequest", [
1359
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
1360
+ { no: 2, name: "sort", kind: "message", T: () => Sort },
1361
+ { no: 3, name: "search", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } },
1362
+ { no: 4, name: "category_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, options: { "validate.rules": { repeated: { maxItems: "5" } } } },
1363
+ { no: 5, name: "creator_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { repeated: { maxItems: "5" } } } },
1364
+ { no: 6, name: "from", kind: "message", T: () => Timestamp },
1365
+ { no: 7, name: "to", kind: "message", T: () => Timestamp },
1366
+ { no: 8, name: "closed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1367
+ { no: 9, name: "document_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/ }
1368
+ ]);
1369
+ }
1370
+ create(value?: PartialMessage<ListDocumentsRequest>): ListDocumentsRequest {
1371
+ const message = globalThis.Object.create((this.messagePrototype!));
1372
+ message.categoryIds = [];
1373
+ message.creatorIds = [];
1374
+ message.documentIds = [];
1375
+ if (value !== undefined)
1376
+ reflectionMergePartial<ListDocumentsRequest>(this, message, value);
1377
+ return message;
1378
+ }
1379
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentsRequest): ListDocumentsRequest {
1380
+ let message = target ?? this.create(), end = reader.pos + length;
1381
+ while (reader.pos < end) {
1382
+ let [fieldNo, wireType] = reader.tag();
1383
+ switch (fieldNo) {
1384
+ case /* resources.common.database.PaginationRequest pagination */ 1:
1385
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
1386
+ break;
1387
+ case /* optional resources.common.database.Sort sort */ 2:
1388
+ message.sort = Sort.internalBinaryRead(reader, reader.uint32(), options, message.sort);
1389
+ break;
1390
+ case /* optional string search */ 3:
1391
+ message.search = reader.string();
1392
+ break;
1393
+ case /* repeated uint64 category_ids = 4 [jstype = JS_STRING];*/ 4:
1394
+ if (wireType === WireType.LengthDelimited)
1395
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
1396
+ message.categoryIds.push(reader.uint64().toString());
1397
+ else
1398
+ message.categoryIds.push(reader.uint64().toString());
1399
+ break;
1400
+ case /* repeated int32 creator_ids */ 5:
1401
+ if (wireType === WireType.LengthDelimited)
1402
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
1403
+ message.creatorIds.push(reader.int32());
1404
+ else
1405
+ message.creatorIds.push(reader.int32());
1406
+ break;
1407
+ case /* optional resources.timestamp.Timestamp from */ 6:
1408
+ message.from = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.from);
1409
+ break;
1410
+ case /* optional resources.timestamp.Timestamp to */ 7:
1411
+ message.to = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.to);
1412
+ break;
1413
+ case /* optional bool closed */ 8:
1414
+ message.closed = reader.bool();
1415
+ break;
1416
+ case /* repeated uint64 document_ids = 9 [jstype = JS_STRING];*/ 9:
1417
+ if (wireType === WireType.LengthDelimited)
1418
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
1419
+ message.documentIds.push(reader.uint64().toString());
1420
+ else
1421
+ message.documentIds.push(reader.uint64().toString());
1422
+ break;
1423
+ default:
1424
+ let u = options.readUnknownField;
1425
+ if (u === "throw")
1426
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1427
+ let d = reader.skip(wireType);
1428
+ if (u !== false)
1429
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1430
+ }
1431
+ }
1432
+ return message;
1433
+ }
1434
+ internalBinaryWrite(message: ListDocumentsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1435
+ /* resources.common.database.PaginationRequest pagination = 1; */
1436
+ if (message.pagination)
1437
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1438
+ /* optional resources.common.database.Sort sort = 2; */
1439
+ if (message.sort)
1440
+ Sort.internalBinaryWrite(message.sort, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1441
+ /* optional string search = 3; */
1442
+ if (message.search !== undefined)
1443
+ writer.tag(3, WireType.LengthDelimited).string(message.search);
1444
+ /* repeated uint64 category_ids = 4 [jstype = JS_STRING]; */
1445
+ if (message.categoryIds.length) {
1446
+ writer.tag(4, WireType.LengthDelimited).fork();
1447
+ for (let i = 0; i < message.categoryIds.length; i++)
1448
+ writer.uint64(message.categoryIds[i]);
1449
+ writer.join();
1450
+ }
1451
+ /* repeated int32 creator_ids = 5; */
1452
+ if (message.creatorIds.length) {
1453
+ writer.tag(5, WireType.LengthDelimited).fork();
1454
+ for (let i = 0; i < message.creatorIds.length; i++)
1455
+ writer.int32(message.creatorIds[i]);
1456
+ writer.join();
1457
+ }
1458
+ /* optional resources.timestamp.Timestamp from = 6; */
1459
+ if (message.from)
1460
+ Timestamp.internalBinaryWrite(message.from, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1461
+ /* optional resources.timestamp.Timestamp to = 7; */
1462
+ if (message.to)
1463
+ Timestamp.internalBinaryWrite(message.to, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1464
+ /* optional bool closed = 8; */
1465
+ if (message.closed !== undefined)
1466
+ writer.tag(8, WireType.Varint).bool(message.closed);
1467
+ /* repeated uint64 document_ids = 9 [jstype = JS_STRING]; */
1468
+ if (message.documentIds.length) {
1469
+ writer.tag(9, WireType.LengthDelimited).fork();
1470
+ for (let i = 0; i < message.documentIds.length; i++)
1471
+ writer.uint64(message.documentIds[i]);
1472
+ writer.join();
1473
+ }
1474
+ let u = options.writeUnknownFields;
1475
+ if (u !== false)
1476
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1477
+ return writer;
1478
+ }
1479
+ }
1480
+ /**
1481
+ * @generated MessageType for protobuf message services.docstore.ListDocumentsRequest
1482
+ */
1483
+ export const ListDocumentsRequest = new ListDocumentsRequest$Type();
1484
+ // @generated message type with reflection information, may provide speed optimized methods
1485
+ class ListDocumentsResponse$Type extends MessageType<ListDocumentsResponse> {
1486
+ constructor() {
1487
+ super("services.docstore.ListDocumentsResponse", [
1488
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "validate.rules": { message: { required: true } } } },
1489
+ { no: 2, name: "documents", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentShort }
1490
+ ]);
1491
+ }
1492
+ create(value?: PartialMessage<ListDocumentsResponse>): ListDocumentsResponse {
1493
+ const message = globalThis.Object.create((this.messagePrototype!));
1494
+ message.documents = [];
1495
+ if (value !== undefined)
1496
+ reflectionMergePartial<ListDocumentsResponse>(this, message, value);
1497
+ return message;
1498
+ }
1499
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentsResponse): ListDocumentsResponse {
1500
+ let message = target ?? this.create(), end = reader.pos + length;
1501
+ while (reader.pos < end) {
1502
+ let [fieldNo, wireType] = reader.tag();
1503
+ switch (fieldNo) {
1504
+ case /* resources.common.database.PaginationResponse pagination */ 1:
1505
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
1506
+ break;
1507
+ case /* repeated resources.documents.DocumentShort documents */ 2:
1508
+ message.documents.push(DocumentShort.internalBinaryRead(reader, reader.uint32(), options));
1509
+ break;
1510
+ default:
1511
+ let u = options.readUnknownField;
1512
+ if (u === "throw")
1513
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1514
+ let d = reader.skip(wireType);
1515
+ if (u !== false)
1516
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1517
+ }
1518
+ }
1519
+ return message;
1520
+ }
1521
+ internalBinaryWrite(message: ListDocumentsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1522
+ /* resources.common.database.PaginationResponse pagination = 1; */
1523
+ if (message.pagination)
1524
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1525
+ /* repeated resources.documents.DocumentShort documents = 2; */
1526
+ for (let i = 0; i < message.documents.length; i++)
1527
+ DocumentShort.internalBinaryWrite(message.documents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1528
+ let u = options.writeUnknownFields;
1529
+ if (u !== false)
1530
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1531
+ return writer;
1532
+ }
1533
+ }
1534
+ /**
1535
+ * @generated MessageType for protobuf message services.docstore.ListDocumentsResponse
1536
+ */
1537
+ export const ListDocumentsResponse = new ListDocumentsResponse$Type();
1538
+ // @generated message type with reflection information, may provide speed optimized methods
1539
+ class GetDocumentRequest$Type extends MessageType<GetDocumentRequest> {
1540
+ constructor() {
1541
+ super("services.docstore.GetDocumentRequest", [
1542
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
1543
+ { no: 2, name: "info_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
1544
+ ]);
1545
+ }
1546
+ create(value?: PartialMessage<GetDocumentRequest>): GetDocumentRequest {
1547
+ const message = globalThis.Object.create((this.messagePrototype!));
1548
+ message.documentId = "0";
1549
+ if (value !== undefined)
1550
+ reflectionMergePartial<GetDocumentRequest>(this, message, value);
1551
+ return message;
1552
+ }
1553
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentRequest): GetDocumentRequest {
1554
+ let message = target ?? this.create(), end = reader.pos + length;
1555
+ while (reader.pos < end) {
1556
+ let [fieldNo, wireType] = reader.tag();
1557
+ switch (fieldNo) {
1558
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1559
+ message.documentId = reader.uint64().toString();
1560
+ break;
1561
+ case /* optional bool info_only */ 2:
1562
+ message.infoOnly = reader.bool();
1563
+ break;
1564
+ default:
1565
+ let u = options.readUnknownField;
1566
+ if (u === "throw")
1567
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1568
+ let d = reader.skip(wireType);
1569
+ if (u !== false)
1570
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1571
+ }
1572
+ }
1573
+ return message;
1574
+ }
1575
+ internalBinaryWrite(message: GetDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1576
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
1577
+ if (message.documentId !== "0")
1578
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
1579
+ /* optional bool info_only = 2; */
1580
+ if (message.infoOnly !== undefined)
1581
+ writer.tag(2, WireType.Varint).bool(message.infoOnly);
1582
+ let u = options.writeUnknownFields;
1583
+ if (u !== false)
1584
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1585
+ return writer;
1586
+ }
1587
+ }
1588
+ /**
1589
+ * @generated MessageType for protobuf message services.docstore.GetDocumentRequest
1590
+ */
1591
+ export const GetDocumentRequest = new GetDocumentRequest$Type();
1592
+ // @generated message type with reflection information, may provide speed optimized methods
1593
+ class GetDocumentResponse$Type extends MessageType<GetDocumentResponse> {
1594
+ constructor() {
1595
+ super("services.docstore.GetDocumentResponse", [
1596
+ { no: 1, name: "document", kind: "message", T: () => Document },
1597
+ { no: 2, name: "access", kind: "message", T: () => DocumentAccess }
1598
+ ]);
1599
+ }
1600
+ create(value?: PartialMessage<GetDocumentResponse>): GetDocumentResponse {
1601
+ const message = globalThis.Object.create((this.messagePrototype!));
1602
+ if (value !== undefined)
1603
+ reflectionMergePartial<GetDocumentResponse>(this, message, value);
1604
+ return message;
1605
+ }
1606
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentResponse): GetDocumentResponse {
1607
+ let message = target ?? this.create(), end = reader.pos + length;
1608
+ while (reader.pos < end) {
1609
+ let [fieldNo, wireType] = reader.tag();
1610
+ switch (fieldNo) {
1611
+ case /* resources.documents.Document document */ 1:
1612
+ message.document = Document.internalBinaryRead(reader, reader.uint32(), options, message.document);
1613
+ break;
1614
+ case /* resources.documents.DocumentAccess access */ 2:
1615
+ message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
1616
+ break;
1617
+ default:
1618
+ let u = options.readUnknownField;
1619
+ if (u === "throw")
1620
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1621
+ let d = reader.skip(wireType);
1622
+ if (u !== false)
1623
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1624
+ }
1625
+ }
1626
+ return message;
1627
+ }
1628
+ internalBinaryWrite(message: GetDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1629
+ /* resources.documents.Document document = 1; */
1630
+ if (message.document)
1631
+ Document.internalBinaryWrite(message.document, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1632
+ /* resources.documents.DocumentAccess access = 2; */
1633
+ if (message.access)
1634
+ DocumentAccess.internalBinaryWrite(message.access, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1635
+ let u = options.writeUnknownFields;
1636
+ if (u !== false)
1637
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1638
+ return writer;
1639
+ }
1640
+ }
1641
+ /**
1642
+ * @generated MessageType for protobuf message services.docstore.GetDocumentResponse
1643
+ */
1644
+ export const GetDocumentResponse = new GetDocumentResponse$Type();
1645
+ // @generated message type with reflection information, may provide speed optimized methods
1646
+ class GetDocumentReferencesRequest$Type extends MessageType<GetDocumentReferencesRequest> {
1647
+ constructor() {
1648
+ super("services.docstore.GetDocumentReferencesRequest", [
1649
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1650
+ ]);
1651
+ }
1652
+ create(value?: PartialMessage<GetDocumentReferencesRequest>): GetDocumentReferencesRequest {
1653
+ const message = globalThis.Object.create((this.messagePrototype!));
1654
+ message.documentId = "0";
1655
+ if (value !== undefined)
1656
+ reflectionMergePartial<GetDocumentReferencesRequest>(this, message, value);
1657
+ return message;
1658
+ }
1659
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentReferencesRequest): GetDocumentReferencesRequest {
1660
+ let message = target ?? this.create(), end = reader.pos + length;
1661
+ while (reader.pos < end) {
1662
+ let [fieldNo, wireType] = reader.tag();
1663
+ switch (fieldNo) {
1664
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1665
+ message.documentId = reader.uint64().toString();
1666
+ break;
1667
+ default:
1668
+ let u = options.readUnknownField;
1669
+ if (u === "throw")
1670
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1671
+ let d = reader.skip(wireType);
1672
+ if (u !== false)
1673
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1674
+ }
1675
+ }
1676
+ return message;
1677
+ }
1678
+ internalBinaryWrite(message: GetDocumentReferencesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1679
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
1680
+ if (message.documentId !== "0")
1681
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
1682
+ let u = options.writeUnknownFields;
1683
+ if (u !== false)
1684
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1685
+ return writer;
1686
+ }
1687
+ }
1688
+ /**
1689
+ * @generated MessageType for protobuf message services.docstore.GetDocumentReferencesRequest
1690
+ */
1691
+ export const GetDocumentReferencesRequest = new GetDocumentReferencesRequest$Type();
1692
+ // @generated message type with reflection information, may provide speed optimized methods
1693
+ class GetDocumentReferencesResponse$Type extends MessageType<GetDocumentReferencesResponse> {
1694
+ constructor() {
1695
+ super("services.docstore.GetDocumentReferencesResponse", [
1696
+ { no: 1, name: "references", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentReference }
1697
+ ]);
1698
+ }
1699
+ create(value?: PartialMessage<GetDocumentReferencesResponse>): GetDocumentReferencesResponse {
1700
+ const message = globalThis.Object.create((this.messagePrototype!));
1701
+ message.references = [];
1702
+ if (value !== undefined)
1703
+ reflectionMergePartial<GetDocumentReferencesResponse>(this, message, value);
1704
+ return message;
1705
+ }
1706
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentReferencesResponse): GetDocumentReferencesResponse {
1707
+ let message = target ?? this.create(), end = reader.pos + length;
1708
+ while (reader.pos < end) {
1709
+ let [fieldNo, wireType] = reader.tag();
1710
+ switch (fieldNo) {
1711
+ case /* repeated resources.documents.DocumentReference references */ 1:
1712
+ message.references.push(DocumentReference.internalBinaryRead(reader, reader.uint32(), options));
1713
+ break;
1714
+ default:
1715
+ let u = options.readUnknownField;
1716
+ if (u === "throw")
1717
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1718
+ let d = reader.skip(wireType);
1719
+ if (u !== false)
1720
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1721
+ }
1722
+ }
1723
+ return message;
1724
+ }
1725
+ internalBinaryWrite(message: GetDocumentReferencesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1726
+ /* repeated resources.documents.DocumentReference references = 1; */
1727
+ for (let i = 0; i < message.references.length; i++)
1728
+ DocumentReference.internalBinaryWrite(message.references[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1729
+ let u = options.writeUnknownFields;
1730
+ if (u !== false)
1731
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1732
+ return writer;
1733
+ }
1734
+ }
1735
+ /**
1736
+ * @generated MessageType for protobuf message services.docstore.GetDocumentReferencesResponse
1737
+ */
1738
+ export const GetDocumentReferencesResponse = new GetDocumentReferencesResponse$Type();
1739
+ // @generated message type with reflection information, may provide speed optimized methods
1740
+ class GetDocumentRelationsRequest$Type extends MessageType<GetDocumentRelationsRequest> {
1741
+ constructor() {
1742
+ super("services.docstore.GetDocumentRelationsRequest", [
1743
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1744
+ ]);
1745
+ }
1746
+ create(value?: PartialMessage<GetDocumentRelationsRequest>): GetDocumentRelationsRequest {
1747
+ const message = globalThis.Object.create((this.messagePrototype!));
1748
+ message.documentId = "0";
1749
+ if (value !== undefined)
1750
+ reflectionMergePartial<GetDocumentRelationsRequest>(this, message, value);
1751
+ return message;
1752
+ }
1753
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentRelationsRequest): GetDocumentRelationsRequest {
1754
+ let message = target ?? this.create(), end = reader.pos + length;
1755
+ while (reader.pos < end) {
1756
+ let [fieldNo, wireType] = reader.tag();
1757
+ switch (fieldNo) {
1758
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1759
+ message.documentId = reader.uint64().toString();
1760
+ break;
1761
+ default:
1762
+ let u = options.readUnknownField;
1763
+ if (u === "throw")
1764
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1765
+ let d = reader.skip(wireType);
1766
+ if (u !== false)
1767
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1768
+ }
1769
+ }
1770
+ return message;
1771
+ }
1772
+ internalBinaryWrite(message: GetDocumentRelationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1773
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
1774
+ if (message.documentId !== "0")
1775
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
1776
+ let u = options.writeUnknownFields;
1777
+ if (u !== false)
1778
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1779
+ return writer;
1780
+ }
1781
+ }
1782
+ /**
1783
+ * @generated MessageType for protobuf message services.docstore.GetDocumentRelationsRequest
1784
+ */
1785
+ export const GetDocumentRelationsRequest = new GetDocumentRelationsRequest$Type();
1786
+ // @generated message type with reflection information, may provide speed optimized methods
1787
+ class GetDocumentRelationsResponse$Type extends MessageType<GetDocumentRelationsResponse> {
1788
+ constructor() {
1789
+ super("services.docstore.GetDocumentRelationsResponse", [
1790
+ { no: 1, name: "relations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentRelation }
1791
+ ]);
1792
+ }
1793
+ create(value?: PartialMessage<GetDocumentRelationsResponse>): GetDocumentRelationsResponse {
1794
+ const message = globalThis.Object.create((this.messagePrototype!));
1795
+ message.relations = [];
1796
+ if (value !== undefined)
1797
+ reflectionMergePartial<GetDocumentRelationsResponse>(this, message, value);
1798
+ return message;
1799
+ }
1800
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentRelationsResponse): GetDocumentRelationsResponse {
1801
+ let message = target ?? this.create(), end = reader.pos + length;
1802
+ while (reader.pos < end) {
1803
+ let [fieldNo, wireType] = reader.tag();
1804
+ switch (fieldNo) {
1805
+ case /* repeated resources.documents.DocumentRelation relations */ 1:
1806
+ message.relations.push(DocumentRelation.internalBinaryRead(reader, reader.uint32(), options));
1807
+ break;
1808
+ default:
1809
+ let u = options.readUnknownField;
1810
+ if (u === "throw")
1811
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1812
+ let d = reader.skip(wireType);
1813
+ if (u !== false)
1814
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1815
+ }
1816
+ }
1817
+ return message;
1818
+ }
1819
+ internalBinaryWrite(message: GetDocumentRelationsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1820
+ /* repeated resources.documents.DocumentRelation relations = 1; */
1821
+ for (let i = 0; i < message.relations.length; i++)
1822
+ DocumentRelation.internalBinaryWrite(message.relations[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1823
+ let u = options.writeUnknownFields;
1824
+ if (u !== false)
1825
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1826
+ return writer;
1827
+ }
1828
+ }
1829
+ /**
1830
+ * @generated MessageType for protobuf message services.docstore.GetDocumentRelationsResponse
1831
+ */
1832
+ export const GetDocumentRelationsResponse = new GetDocumentRelationsResponse$Type();
1833
+ // @generated message type with reflection information, may provide speed optimized methods
1834
+ class AddDocumentReferenceRequest$Type extends MessageType<AddDocumentReferenceRequest> {
1835
+ constructor() {
1836
+ super("services.docstore.AddDocumentReferenceRequest", [
1837
+ { no: 1, name: "reference", kind: "message", T: () => DocumentReference, options: { "validate.rules": { message: { required: true } } } }
1838
+ ]);
1839
+ }
1840
+ create(value?: PartialMessage<AddDocumentReferenceRequest>): AddDocumentReferenceRequest {
1841
+ const message = globalThis.Object.create((this.messagePrototype!));
1842
+ if (value !== undefined)
1843
+ reflectionMergePartial<AddDocumentReferenceRequest>(this, message, value);
1844
+ return message;
1845
+ }
1846
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddDocumentReferenceRequest): AddDocumentReferenceRequest {
1847
+ let message = target ?? this.create(), end = reader.pos + length;
1848
+ while (reader.pos < end) {
1849
+ let [fieldNo, wireType] = reader.tag();
1850
+ switch (fieldNo) {
1851
+ case /* resources.documents.DocumentReference reference */ 1:
1852
+ message.reference = DocumentReference.internalBinaryRead(reader, reader.uint32(), options, message.reference);
1853
+ break;
1854
+ default:
1855
+ let u = options.readUnknownField;
1856
+ if (u === "throw")
1857
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1858
+ let d = reader.skip(wireType);
1859
+ if (u !== false)
1860
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1861
+ }
1862
+ }
1863
+ return message;
1864
+ }
1865
+ internalBinaryWrite(message: AddDocumentReferenceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1866
+ /* resources.documents.DocumentReference reference = 1; */
1867
+ if (message.reference)
1868
+ DocumentReference.internalBinaryWrite(message.reference, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1869
+ let u = options.writeUnknownFields;
1870
+ if (u !== false)
1871
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1872
+ return writer;
1873
+ }
1874
+ }
1875
+ /**
1876
+ * @generated MessageType for protobuf message services.docstore.AddDocumentReferenceRequest
1877
+ */
1878
+ export const AddDocumentReferenceRequest = new AddDocumentReferenceRequest$Type();
1879
+ // @generated message type with reflection information, may provide speed optimized methods
1880
+ class AddDocumentReferenceResponse$Type extends MessageType<AddDocumentReferenceResponse> {
1881
+ constructor() {
1882
+ super("services.docstore.AddDocumentReferenceResponse", [
1883
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1884
+ ]);
1885
+ }
1886
+ create(value?: PartialMessage<AddDocumentReferenceResponse>): AddDocumentReferenceResponse {
1887
+ const message = globalThis.Object.create((this.messagePrototype!));
1888
+ message.id = "0";
1889
+ if (value !== undefined)
1890
+ reflectionMergePartial<AddDocumentReferenceResponse>(this, message, value);
1891
+ return message;
1892
+ }
1893
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddDocumentReferenceResponse): AddDocumentReferenceResponse {
1894
+ let message = target ?? this.create(), end = reader.pos + length;
1895
+ while (reader.pos < end) {
1896
+ let [fieldNo, wireType] = reader.tag();
1897
+ switch (fieldNo) {
1898
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1899
+ message.id = reader.uint64().toString();
1900
+ break;
1901
+ default:
1902
+ let u = options.readUnknownField;
1903
+ if (u === "throw")
1904
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1905
+ let d = reader.skip(wireType);
1906
+ if (u !== false)
1907
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1908
+ }
1909
+ }
1910
+ return message;
1911
+ }
1912
+ internalBinaryWrite(message: AddDocumentReferenceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1913
+ /* uint64 id = 1 [jstype = JS_STRING]; */
1914
+ if (message.id !== "0")
1915
+ writer.tag(1, WireType.Varint).uint64(message.id);
1916
+ let u = options.writeUnknownFields;
1917
+ if (u !== false)
1918
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1919
+ return writer;
1920
+ }
1921
+ }
1922
+ /**
1923
+ * @generated MessageType for protobuf message services.docstore.AddDocumentReferenceResponse
1924
+ */
1925
+ export const AddDocumentReferenceResponse = new AddDocumentReferenceResponse$Type();
1926
+ // @generated message type with reflection information, may provide speed optimized methods
1927
+ class RemoveDocumentReferenceRequest$Type extends MessageType<RemoveDocumentReferenceRequest> {
1928
+ constructor() {
1929
+ super("services.docstore.RemoveDocumentReferenceRequest", [
1930
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1931
+ ]);
1932
+ }
1933
+ create(value?: PartialMessage<RemoveDocumentReferenceRequest>): RemoveDocumentReferenceRequest {
1934
+ const message = globalThis.Object.create((this.messagePrototype!));
1935
+ message.id = "0";
1936
+ if (value !== undefined)
1937
+ reflectionMergePartial<RemoveDocumentReferenceRequest>(this, message, value);
1938
+ return message;
1939
+ }
1940
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentReferenceRequest): RemoveDocumentReferenceRequest {
1941
+ let message = target ?? this.create(), end = reader.pos + length;
1942
+ while (reader.pos < end) {
1943
+ let [fieldNo, wireType] = reader.tag();
1944
+ switch (fieldNo) {
1945
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1946
+ message.id = reader.uint64().toString();
1947
+ break;
1948
+ default:
1949
+ let u = options.readUnknownField;
1950
+ if (u === "throw")
1951
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1952
+ let d = reader.skip(wireType);
1953
+ if (u !== false)
1954
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1955
+ }
1956
+ }
1957
+ return message;
1958
+ }
1959
+ internalBinaryWrite(message: RemoveDocumentReferenceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1960
+ /* uint64 id = 1 [jstype = JS_STRING]; */
1961
+ if (message.id !== "0")
1962
+ writer.tag(1, WireType.Varint).uint64(message.id);
1963
+ let u = options.writeUnknownFields;
1964
+ if (u !== false)
1965
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1966
+ return writer;
1967
+ }
1968
+ }
1969
+ /**
1970
+ * @generated MessageType for protobuf message services.docstore.RemoveDocumentReferenceRequest
1971
+ */
1972
+ export const RemoveDocumentReferenceRequest = new RemoveDocumentReferenceRequest$Type();
1973
+ // @generated message type with reflection information, may provide speed optimized methods
1974
+ class RemoveDocumentReferenceResponse$Type extends MessageType<RemoveDocumentReferenceResponse> {
1975
+ constructor() {
1976
+ super("services.docstore.RemoveDocumentReferenceResponse", []);
1977
+ }
1978
+ create(value?: PartialMessage<RemoveDocumentReferenceResponse>): RemoveDocumentReferenceResponse {
1979
+ const message = globalThis.Object.create((this.messagePrototype!));
1980
+ if (value !== undefined)
1981
+ reflectionMergePartial<RemoveDocumentReferenceResponse>(this, message, value);
1982
+ return message;
1983
+ }
1984
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentReferenceResponse): RemoveDocumentReferenceResponse {
1985
+ return target ?? this.create();
1986
+ }
1987
+ internalBinaryWrite(message: RemoveDocumentReferenceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1988
+ let u = options.writeUnknownFields;
1989
+ if (u !== false)
1990
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1991
+ return writer;
1992
+ }
1993
+ }
1994
+ /**
1995
+ * @generated MessageType for protobuf message services.docstore.RemoveDocumentReferenceResponse
1996
+ */
1997
+ export const RemoveDocumentReferenceResponse = new RemoveDocumentReferenceResponse$Type();
1998
+ // @generated message type with reflection information, may provide speed optimized methods
1999
+ class AddDocumentRelationRequest$Type extends MessageType<AddDocumentRelationRequest> {
2000
+ constructor() {
2001
+ super("services.docstore.AddDocumentRelationRequest", [
2002
+ { no: 1, name: "relation", kind: "message", T: () => DocumentRelation, options: { "validate.rules": { message: { required: true } } } }
2003
+ ]);
2004
+ }
2005
+ create(value?: PartialMessage<AddDocumentRelationRequest>): AddDocumentRelationRequest {
2006
+ const message = globalThis.Object.create((this.messagePrototype!));
2007
+ if (value !== undefined)
2008
+ reflectionMergePartial<AddDocumentRelationRequest>(this, message, value);
2009
+ return message;
2010
+ }
2011
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddDocumentRelationRequest): AddDocumentRelationRequest {
2012
+ let message = target ?? this.create(), end = reader.pos + length;
2013
+ while (reader.pos < end) {
2014
+ let [fieldNo, wireType] = reader.tag();
2015
+ switch (fieldNo) {
2016
+ case /* resources.documents.DocumentRelation relation */ 1:
2017
+ message.relation = DocumentRelation.internalBinaryRead(reader, reader.uint32(), options, message.relation);
2018
+ break;
2019
+ default:
2020
+ let u = options.readUnknownField;
2021
+ if (u === "throw")
2022
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2023
+ let d = reader.skip(wireType);
2024
+ if (u !== false)
2025
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2026
+ }
2027
+ }
2028
+ return message;
2029
+ }
2030
+ internalBinaryWrite(message: AddDocumentRelationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2031
+ /* resources.documents.DocumentRelation relation = 1; */
2032
+ if (message.relation)
2033
+ DocumentRelation.internalBinaryWrite(message.relation, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2034
+ let u = options.writeUnknownFields;
2035
+ if (u !== false)
2036
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2037
+ return writer;
2038
+ }
2039
+ }
2040
+ /**
2041
+ * @generated MessageType for protobuf message services.docstore.AddDocumentRelationRequest
2042
+ */
2043
+ export const AddDocumentRelationRequest = new AddDocumentRelationRequest$Type();
2044
+ // @generated message type with reflection information, may provide speed optimized methods
2045
+ class AddDocumentRelationResponse$Type extends MessageType<AddDocumentRelationResponse> {
2046
+ constructor() {
2047
+ super("services.docstore.AddDocumentRelationResponse", [
2048
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2049
+ ]);
2050
+ }
2051
+ create(value?: PartialMessage<AddDocumentRelationResponse>): AddDocumentRelationResponse {
2052
+ const message = globalThis.Object.create((this.messagePrototype!));
2053
+ message.id = "0";
2054
+ if (value !== undefined)
2055
+ reflectionMergePartial<AddDocumentRelationResponse>(this, message, value);
2056
+ return message;
2057
+ }
2058
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddDocumentRelationResponse): AddDocumentRelationResponse {
2059
+ let message = target ?? this.create(), end = reader.pos + length;
2060
+ while (reader.pos < end) {
2061
+ let [fieldNo, wireType] = reader.tag();
2062
+ switch (fieldNo) {
2063
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
2064
+ message.id = reader.uint64().toString();
2065
+ break;
2066
+ default:
2067
+ let u = options.readUnknownField;
2068
+ if (u === "throw")
2069
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2070
+ let d = reader.skip(wireType);
2071
+ if (u !== false)
2072
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2073
+ }
2074
+ }
2075
+ return message;
2076
+ }
2077
+ internalBinaryWrite(message: AddDocumentRelationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2078
+ /* uint64 id = 1 [jstype = JS_STRING]; */
2079
+ if (message.id !== "0")
2080
+ writer.tag(1, WireType.Varint).uint64(message.id);
2081
+ let u = options.writeUnknownFields;
2082
+ if (u !== false)
2083
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2084
+ return writer;
2085
+ }
2086
+ }
2087
+ /**
2088
+ * @generated MessageType for protobuf message services.docstore.AddDocumentRelationResponse
2089
+ */
2090
+ export const AddDocumentRelationResponse = new AddDocumentRelationResponse$Type();
2091
+ // @generated message type with reflection information, may provide speed optimized methods
2092
+ class RemoveDocumentRelationRequest$Type extends MessageType<RemoveDocumentRelationRequest> {
2093
+ constructor() {
2094
+ super("services.docstore.RemoveDocumentRelationRequest", [
2095
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2096
+ ]);
2097
+ }
2098
+ create(value?: PartialMessage<RemoveDocumentRelationRequest>): RemoveDocumentRelationRequest {
2099
+ const message = globalThis.Object.create((this.messagePrototype!));
2100
+ message.id = "0";
2101
+ if (value !== undefined)
2102
+ reflectionMergePartial<RemoveDocumentRelationRequest>(this, message, value);
2103
+ return message;
2104
+ }
2105
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentRelationRequest): RemoveDocumentRelationRequest {
2106
+ let message = target ?? this.create(), end = reader.pos + length;
2107
+ while (reader.pos < end) {
2108
+ let [fieldNo, wireType] = reader.tag();
2109
+ switch (fieldNo) {
2110
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
2111
+ message.id = reader.uint64().toString();
2112
+ break;
2113
+ default:
2114
+ let u = options.readUnknownField;
2115
+ if (u === "throw")
2116
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2117
+ let d = reader.skip(wireType);
2118
+ if (u !== false)
2119
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2120
+ }
2121
+ }
2122
+ return message;
2123
+ }
2124
+ internalBinaryWrite(message: RemoveDocumentRelationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2125
+ /* uint64 id = 1 [jstype = JS_STRING]; */
2126
+ if (message.id !== "0")
2127
+ writer.tag(1, WireType.Varint).uint64(message.id);
2128
+ let u = options.writeUnknownFields;
2129
+ if (u !== false)
2130
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2131
+ return writer;
2132
+ }
2133
+ }
2134
+ /**
2135
+ * @generated MessageType for protobuf message services.docstore.RemoveDocumentRelationRequest
2136
+ */
2137
+ export const RemoveDocumentRelationRequest = new RemoveDocumentRelationRequest$Type();
2138
+ // @generated message type with reflection information, may provide speed optimized methods
2139
+ class RemoveDocumentRelationResponse$Type extends MessageType<RemoveDocumentRelationResponse> {
2140
+ constructor() {
2141
+ super("services.docstore.RemoveDocumentRelationResponse", []);
2142
+ }
2143
+ create(value?: PartialMessage<RemoveDocumentRelationResponse>): RemoveDocumentRelationResponse {
2144
+ const message = globalThis.Object.create((this.messagePrototype!));
2145
+ if (value !== undefined)
2146
+ reflectionMergePartial<RemoveDocumentRelationResponse>(this, message, value);
2147
+ return message;
2148
+ }
2149
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentRelationResponse): RemoveDocumentRelationResponse {
2150
+ return target ?? this.create();
2151
+ }
2152
+ internalBinaryWrite(message: RemoveDocumentRelationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2153
+ let u = options.writeUnknownFields;
2154
+ if (u !== false)
2155
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2156
+ return writer;
2157
+ }
2158
+ }
2159
+ /**
2160
+ * @generated MessageType for protobuf message services.docstore.RemoveDocumentRelationResponse
2161
+ */
2162
+ export const RemoveDocumentRelationResponse = new RemoveDocumentRelationResponse$Type();
2163
+ // @generated message type with reflection information, may provide speed optimized methods
2164
+ class GetCommentsRequest$Type extends MessageType<GetCommentsRequest> {
2165
+ constructor() {
2166
+ super("services.docstore.GetCommentsRequest", [
2167
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
2168
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2169
+ ]);
2170
+ }
2171
+ create(value?: PartialMessage<GetCommentsRequest>): GetCommentsRequest {
2172
+ const message = globalThis.Object.create((this.messagePrototype!));
2173
+ message.documentId = "0";
2174
+ if (value !== undefined)
2175
+ reflectionMergePartial<GetCommentsRequest>(this, message, value);
2176
+ return message;
2177
+ }
2178
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetCommentsRequest): GetCommentsRequest {
2179
+ let message = target ?? this.create(), end = reader.pos + length;
2180
+ while (reader.pos < end) {
2181
+ let [fieldNo, wireType] = reader.tag();
2182
+ switch (fieldNo) {
2183
+ case /* resources.common.database.PaginationRequest pagination */ 1:
2184
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
2185
+ break;
2186
+ case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
2187
+ message.documentId = reader.uint64().toString();
2188
+ break;
2189
+ default:
2190
+ let u = options.readUnknownField;
2191
+ if (u === "throw")
2192
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2193
+ let d = reader.skip(wireType);
2194
+ if (u !== false)
2195
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2196
+ }
2197
+ }
2198
+ return message;
2199
+ }
2200
+ internalBinaryWrite(message: GetCommentsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2201
+ /* resources.common.database.PaginationRequest pagination = 1; */
2202
+ if (message.pagination)
2203
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2204
+ /* uint64 document_id = 2 [jstype = JS_STRING]; */
2205
+ if (message.documentId !== "0")
2206
+ writer.tag(2, WireType.Varint).uint64(message.documentId);
2207
+ let u = options.writeUnknownFields;
2208
+ if (u !== false)
2209
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2210
+ return writer;
2211
+ }
2212
+ }
2213
+ /**
2214
+ * @generated MessageType for protobuf message services.docstore.GetCommentsRequest
2215
+ */
2216
+ export const GetCommentsRequest = new GetCommentsRequest$Type();
2217
+ // @generated message type with reflection information, may provide speed optimized methods
2218
+ class GetCommentsResponse$Type extends MessageType<GetCommentsResponse> {
2219
+ constructor() {
2220
+ super("services.docstore.GetCommentsResponse", [
2221
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
2222
+ { no: 2, name: "comments", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Comment }
2223
+ ]);
2224
+ }
2225
+ create(value?: PartialMessage<GetCommentsResponse>): GetCommentsResponse {
2226
+ const message = globalThis.Object.create((this.messagePrototype!));
2227
+ message.comments = [];
2228
+ if (value !== undefined)
2229
+ reflectionMergePartial<GetCommentsResponse>(this, message, value);
2230
+ return message;
2231
+ }
2232
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetCommentsResponse): GetCommentsResponse {
2233
+ let message = target ?? this.create(), end = reader.pos + length;
2234
+ while (reader.pos < end) {
2235
+ let [fieldNo, wireType] = reader.tag();
2236
+ switch (fieldNo) {
2237
+ case /* resources.common.database.PaginationResponse pagination */ 1:
2238
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
2239
+ break;
2240
+ case /* repeated resources.documents.Comment comments */ 2:
2241
+ message.comments.push(Comment.internalBinaryRead(reader, reader.uint32(), options));
2242
+ break;
2243
+ default:
2244
+ let u = options.readUnknownField;
2245
+ if (u === "throw")
2246
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2247
+ let d = reader.skip(wireType);
2248
+ if (u !== false)
2249
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2250
+ }
2251
+ }
2252
+ return message;
2253
+ }
2254
+ internalBinaryWrite(message: GetCommentsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2255
+ /* resources.common.database.PaginationResponse pagination = 1; */
2256
+ if (message.pagination)
2257
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2258
+ /* repeated resources.documents.Comment comments = 2; */
2259
+ for (let i = 0; i < message.comments.length; i++)
2260
+ Comment.internalBinaryWrite(message.comments[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2261
+ let u = options.writeUnknownFields;
2262
+ if (u !== false)
2263
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2264
+ return writer;
2265
+ }
2266
+ }
2267
+ /**
2268
+ * @generated MessageType for protobuf message services.docstore.GetCommentsResponse
2269
+ */
2270
+ export const GetCommentsResponse = new GetCommentsResponse$Type();
2271
+ // @generated message type with reflection information, may provide speed optimized methods
2272
+ class PostCommentRequest$Type extends MessageType<PostCommentRequest> {
2273
+ constructor() {
2274
+ super("services.docstore.PostCommentRequest", [
2275
+ { no: 1, name: "comment", kind: "message", T: () => Comment, options: { "validate.rules": { message: { required: true } } } }
2276
+ ]);
2277
+ }
2278
+ create(value?: PartialMessage<PostCommentRequest>): PostCommentRequest {
2279
+ const message = globalThis.Object.create((this.messagePrototype!));
2280
+ if (value !== undefined)
2281
+ reflectionMergePartial<PostCommentRequest>(this, message, value);
2282
+ return message;
2283
+ }
2284
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PostCommentRequest): PostCommentRequest {
2285
+ let message = target ?? this.create(), end = reader.pos + length;
2286
+ while (reader.pos < end) {
2287
+ let [fieldNo, wireType] = reader.tag();
2288
+ switch (fieldNo) {
2289
+ case /* resources.documents.Comment comment */ 1:
2290
+ message.comment = Comment.internalBinaryRead(reader, reader.uint32(), options, message.comment);
2291
+ break;
2292
+ default:
2293
+ let u = options.readUnknownField;
2294
+ if (u === "throw")
2295
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2296
+ let d = reader.skip(wireType);
2297
+ if (u !== false)
2298
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2299
+ }
2300
+ }
2301
+ return message;
2302
+ }
2303
+ internalBinaryWrite(message: PostCommentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2304
+ /* resources.documents.Comment comment = 1; */
2305
+ if (message.comment)
2306
+ Comment.internalBinaryWrite(message.comment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2307
+ let u = options.writeUnknownFields;
2308
+ if (u !== false)
2309
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2310
+ return writer;
2311
+ }
2312
+ }
2313
+ /**
2314
+ * @generated MessageType for protobuf message services.docstore.PostCommentRequest
2315
+ */
2316
+ export const PostCommentRequest = new PostCommentRequest$Type();
2317
+ // @generated message type with reflection information, may provide speed optimized methods
2318
+ class PostCommentResponse$Type extends MessageType<PostCommentResponse> {
2319
+ constructor() {
2320
+ super("services.docstore.PostCommentResponse", [
2321
+ { no: 1, name: "comment", kind: "message", T: () => Comment }
2322
+ ]);
2323
+ }
2324
+ create(value?: PartialMessage<PostCommentResponse>): PostCommentResponse {
2325
+ const message = globalThis.Object.create((this.messagePrototype!));
2326
+ if (value !== undefined)
2327
+ reflectionMergePartial<PostCommentResponse>(this, message, value);
2328
+ return message;
2329
+ }
2330
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PostCommentResponse): PostCommentResponse {
2331
+ let message = target ?? this.create(), end = reader.pos + length;
2332
+ while (reader.pos < end) {
2333
+ let [fieldNo, wireType] = reader.tag();
2334
+ switch (fieldNo) {
2335
+ case /* resources.documents.Comment comment */ 1:
2336
+ message.comment = Comment.internalBinaryRead(reader, reader.uint32(), options, message.comment);
2337
+ break;
2338
+ default:
2339
+ let u = options.readUnknownField;
2340
+ if (u === "throw")
2341
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2342
+ let d = reader.skip(wireType);
2343
+ if (u !== false)
2344
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2345
+ }
2346
+ }
2347
+ return message;
2348
+ }
2349
+ internalBinaryWrite(message: PostCommentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2350
+ /* resources.documents.Comment comment = 1; */
2351
+ if (message.comment)
2352
+ Comment.internalBinaryWrite(message.comment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2353
+ let u = options.writeUnknownFields;
2354
+ if (u !== false)
2355
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2356
+ return writer;
2357
+ }
2358
+ }
2359
+ /**
2360
+ * @generated MessageType for protobuf message services.docstore.PostCommentResponse
2361
+ */
2362
+ export const PostCommentResponse = new PostCommentResponse$Type();
2363
+ // @generated message type with reflection information, may provide speed optimized methods
2364
+ class EditCommentRequest$Type extends MessageType<EditCommentRequest> {
2365
+ constructor() {
2366
+ super("services.docstore.EditCommentRequest", [
2367
+ { no: 1, name: "comment", kind: "message", T: () => Comment, options: { "validate.rules": { message: { required: true } } } }
2368
+ ]);
2369
+ }
2370
+ create(value?: PartialMessage<EditCommentRequest>): EditCommentRequest {
2371
+ const message = globalThis.Object.create((this.messagePrototype!));
2372
+ if (value !== undefined)
2373
+ reflectionMergePartial<EditCommentRequest>(this, message, value);
2374
+ return message;
2375
+ }
2376
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EditCommentRequest): EditCommentRequest {
2377
+ let message = target ?? this.create(), end = reader.pos + length;
2378
+ while (reader.pos < end) {
2379
+ let [fieldNo, wireType] = reader.tag();
2380
+ switch (fieldNo) {
2381
+ case /* resources.documents.Comment comment */ 1:
2382
+ message.comment = Comment.internalBinaryRead(reader, reader.uint32(), options, message.comment);
2383
+ break;
2384
+ default:
2385
+ let u = options.readUnknownField;
2386
+ if (u === "throw")
2387
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2388
+ let d = reader.skip(wireType);
2389
+ if (u !== false)
2390
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2391
+ }
2392
+ }
2393
+ return message;
2394
+ }
2395
+ internalBinaryWrite(message: EditCommentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2396
+ /* resources.documents.Comment comment = 1; */
2397
+ if (message.comment)
2398
+ Comment.internalBinaryWrite(message.comment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2399
+ let u = options.writeUnknownFields;
2400
+ if (u !== false)
2401
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2402
+ return writer;
2403
+ }
2404
+ }
2405
+ /**
2406
+ * @generated MessageType for protobuf message services.docstore.EditCommentRequest
2407
+ */
2408
+ export const EditCommentRequest = new EditCommentRequest$Type();
2409
+ // @generated message type with reflection information, may provide speed optimized methods
2410
+ class EditCommentResponse$Type extends MessageType<EditCommentResponse> {
2411
+ constructor() {
2412
+ super("services.docstore.EditCommentResponse", [
2413
+ { no: 1, name: "comment", kind: "message", T: () => Comment }
2414
+ ]);
2415
+ }
2416
+ create(value?: PartialMessage<EditCommentResponse>): EditCommentResponse {
2417
+ const message = globalThis.Object.create((this.messagePrototype!));
2418
+ if (value !== undefined)
2419
+ reflectionMergePartial<EditCommentResponse>(this, message, value);
2420
+ return message;
2421
+ }
2422
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EditCommentResponse): EditCommentResponse {
2423
+ let message = target ?? this.create(), end = reader.pos + length;
2424
+ while (reader.pos < end) {
2425
+ let [fieldNo, wireType] = reader.tag();
2426
+ switch (fieldNo) {
2427
+ case /* resources.documents.Comment comment */ 1:
2428
+ message.comment = Comment.internalBinaryRead(reader, reader.uint32(), options, message.comment);
2429
+ break;
2430
+ default:
2431
+ let u = options.readUnknownField;
2432
+ if (u === "throw")
2433
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2434
+ let d = reader.skip(wireType);
2435
+ if (u !== false)
2436
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2437
+ }
2438
+ }
2439
+ return message;
2440
+ }
2441
+ internalBinaryWrite(message: EditCommentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2442
+ /* resources.documents.Comment comment = 1; */
2443
+ if (message.comment)
2444
+ Comment.internalBinaryWrite(message.comment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2445
+ let u = options.writeUnknownFields;
2446
+ if (u !== false)
2447
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2448
+ return writer;
2449
+ }
2450
+ }
2451
+ /**
2452
+ * @generated MessageType for protobuf message services.docstore.EditCommentResponse
2453
+ */
2454
+ export const EditCommentResponse = new EditCommentResponse$Type();
2455
+ // @generated message type with reflection information, may provide speed optimized methods
2456
+ class DeleteCommentRequest$Type extends MessageType<DeleteCommentRequest> {
2457
+ constructor() {
2458
+ super("services.docstore.DeleteCommentRequest", [
2459
+ { no: 1, name: "comment_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2460
+ ]);
2461
+ }
2462
+ create(value?: PartialMessage<DeleteCommentRequest>): DeleteCommentRequest {
2463
+ const message = globalThis.Object.create((this.messagePrototype!));
2464
+ message.commentId = "0";
2465
+ if (value !== undefined)
2466
+ reflectionMergePartial<DeleteCommentRequest>(this, message, value);
2467
+ return message;
2468
+ }
2469
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCommentRequest): DeleteCommentRequest {
2470
+ let message = target ?? this.create(), end = reader.pos + length;
2471
+ while (reader.pos < end) {
2472
+ let [fieldNo, wireType] = reader.tag();
2473
+ switch (fieldNo) {
2474
+ case /* uint64 comment_id = 1 [jstype = JS_STRING];*/ 1:
2475
+ message.commentId = reader.uint64().toString();
2476
+ break;
2477
+ default:
2478
+ let u = options.readUnknownField;
2479
+ if (u === "throw")
2480
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2481
+ let d = reader.skip(wireType);
2482
+ if (u !== false)
2483
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2484
+ }
2485
+ }
2486
+ return message;
2487
+ }
2488
+ internalBinaryWrite(message: DeleteCommentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2489
+ /* uint64 comment_id = 1 [jstype = JS_STRING]; */
2490
+ if (message.commentId !== "0")
2491
+ writer.tag(1, WireType.Varint).uint64(message.commentId);
2492
+ let u = options.writeUnknownFields;
2493
+ if (u !== false)
2494
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2495
+ return writer;
2496
+ }
2497
+ }
2498
+ /**
2499
+ * @generated MessageType for protobuf message services.docstore.DeleteCommentRequest
2500
+ */
2501
+ export const DeleteCommentRequest = new DeleteCommentRequest$Type();
2502
+ // @generated message type with reflection information, may provide speed optimized methods
2503
+ class DeleteCommentResponse$Type extends MessageType<DeleteCommentResponse> {
2504
+ constructor() {
2505
+ super("services.docstore.DeleteCommentResponse", []);
2506
+ }
2507
+ create(value?: PartialMessage<DeleteCommentResponse>): DeleteCommentResponse {
2508
+ const message = globalThis.Object.create((this.messagePrototype!));
2509
+ if (value !== undefined)
2510
+ reflectionMergePartial<DeleteCommentResponse>(this, message, value);
2511
+ return message;
2512
+ }
2513
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCommentResponse): DeleteCommentResponse {
2514
+ return target ?? this.create();
2515
+ }
2516
+ internalBinaryWrite(message: DeleteCommentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2517
+ let u = options.writeUnknownFields;
2518
+ if (u !== false)
2519
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2520
+ return writer;
2521
+ }
2522
+ }
2523
+ /**
2524
+ * @generated MessageType for protobuf message services.docstore.DeleteCommentResponse
2525
+ */
2526
+ export const DeleteCommentResponse = new DeleteCommentResponse$Type();
2527
+ // @generated message type with reflection information, may provide speed optimized methods
2528
+ class UpdateDocumentResponse$Type extends MessageType<UpdateDocumentResponse> {
2529
+ constructor() {
2530
+ super("services.docstore.UpdateDocumentResponse", [
2531
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2532
+ ]);
2533
+ }
2534
+ create(value?: PartialMessage<UpdateDocumentResponse>): UpdateDocumentResponse {
2535
+ const message = globalThis.Object.create((this.messagePrototype!));
2536
+ message.documentId = "0";
2537
+ if (value !== undefined)
2538
+ reflectionMergePartial<UpdateDocumentResponse>(this, message, value);
2539
+ return message;
2540
+ }
2541
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDocumentResponse): UpdateDocumentResponse {
2542
+ let message = target ?? this.create(), end = reader.pos + length;
2543
+ while (reader.pos < end) {
2544
+ let [fieldNo, wireType] = reader.tag();
2545
+ switch (fieldNo) {
2546
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2547
+ message.documentId = reader.uint64().toString();
2548
+ break;
2549
+ default:
2550
+ let u = options.readUnknownField;
2551
+ if (u === "throw")
2552
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2553
+ let d = reader.skip(wireType);
2554
+ if (u !== false)
2555
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2556
+ }
2557
+ }
2558
+ return message;
2559
+ }
2560
+ internalBinaryWrite(message: UpdateDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2561
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
2562
+ if (message.documentId !== "0")
2563
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
2564
+ let u = options.writeUnknownFields;
2565
+ if (u !== false)
2566
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2567
+ return writer;
2568
+ }
2569
+ }
2570
+ /**
2571
+ * @generated MessageType for protobuf message services.docstore.UpdateDocumentResponse
2572
+ */
2573
+ export const UpdateDocumentResponse = new UpdateDocumentResponse$Type();
2574
+ // @generated message type with reflection information, may provide speed optimized methods
2575
+ class DeleteDocumentRequest$Type extends MessageType<DeleteDocumentRequest> {
2576
+ constructor() {
2577
+ super("services.docstore.DeleteDocumentRequest", [
2578
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2579
+ ]);
2580
+ }
2581
+ create(value?: PartialMessage<DeleteDocumentRequest>): DeleteDocumentRequest {
2582
+ const message = globalThis.Object.create((this.messagePrototype!));
2583
+ message.documentId = "0";
2584
+ if (value !== undefined)
2585
+ reflectionMergePartial<DeleteDocumentRequest>(this, message, value);
2586
+ return message;
2587
+ }
2588
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentRequest): DeleteDocumentRequest {
2589
+ let message = target ?? this.create(), end = reader.pos + length;
2590
+ while (reader.pos < end) {
2591
+ let [fieldNo, wireType] = reader.tag();
2592
+ switch (fieldNo) {
2593
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2594
+ message.documentId = reader.uint64().toString();
2595
+ break;
2596
+ default:
2597
+ let u = options.readUnknownField;
2598
+ if (u === "throw")
2599
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2600
+ let d = reader.skip(wireType);
2601
+ if (u !== false)
2602
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2603
+ }
2604
+ }
2605
+ return message;
2606
+ }
2607
+ internalBinaryWrite(message: DeleteDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2608
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
2609
+ if (message.documentId !== "0")
2610
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
2611
+ let u = options.writeUnknownFields;
2612
+ if (u !== false)
2613
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2614
+ return writer;
2615
+ }
2616
+ }
2617
+ /**
2618
+ * @generated MessageType for protobuf message services.docstore.DeleteDocumentRequest
2619
+ */
2620
+ export const DeleteDocumentRequest = new DeleteDocumentRequest$Type();
2621
+ // @generated message type with reflection information, may provide speed optimized methods
2622
+ class DeleteDocumentResponse$Type extends MessageType<DeleteDocumentResponse> {
2623
+ constructor() {
2624
+ super("services.docstore.DeleteDocumentResponse", []);
2625
+ }
2626
+ create(value?: PartialMessage<DeleteDocumentResponse>): DeleteDocumentResponse {
2627
+ const message = globalThis.Object.create((this.messagePrototype!));
2628
+ if (value !== undefined)
2629
+ reflectionMergePartial<DeleteDocumentResponse>(this, message, value);
2630
+ return message;
2631
+ }
2632
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentResponse): DeleteDocumentResponse {
2633
+ return target ?? this.create();
2634
+ }
2635
+ internalBinaryWrite(message: DeleteDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2636
+ let u = options.writeUnknownFields;
2637
+ if (u !== false)
2638
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2639
+ return writer;
2640
+ }
2641
+ }
2642
+ /**
2643
+ * @generated MessageType for protobuf message services.docstore.DeleteDocumentResponse
2644
+ */
2645
+ export const DeleteDocumentResponse = new DeleteDocumentResponse$Type();
2646
+ // @generated message type with reflection information, may provide speed optimized methods
2647
+ class ToggleDocumentRequest$Type extends MessageType<ToggleDocumentRequest> {
2648
+ constructor() {
2649
+ super("services.docstore.ToggleDocumentRequest", [
2650
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
2651
+ { no: 2, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
2652
+ ]);
2653
+ }
2654
+ create(value?: PartialMessage<ToggleDocumentRequest>): ToggleDocumentRequest {
2655
+ const message = globalThis.Object.create((this.messagePrototype!));
2656
+ message.documentId = "0";
2657
+ message.closed = false;
2658
+ if (value !== undefined)
2659
+ reflectionMergePartial<ToggleDocumentRequest>(this, message, value);
2660
+ return message;
2661
+ }
2662
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDocumentRequest): ToggleDocumentRequest {
2663
+ let message = target ?? this.create(), end = reader.pos + length;
2664
+ while (reader.pos < end) {
2665
+ let [fieldNo, wireType] = reader.tag();
2666
+ switch (fieldNo) {
2667
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2668
+ message.documentId = reader.uint64().toString();
2669
+ break;
2670
+ case /* bool closed */ 2:
2671
+ message.closed = reader.bool();
2672
+ break;
2673
+ default:
2674
+ let u = options.readUnknownField;
2675
+ if (u === "throw")
2676
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2677
+ let d = reader.skip(wireType);
2678
+ if (u !== false)
2679
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2680
+ }
2681
+ }
2682
+ return message;
2683
+ }
2684
+ internalBinaryWrite(message: ToggleDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2685
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
2686
+ if (message.documentId !== "0")
2687
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
2688
+ /* bool closed = 2; */
2689
+ if (message.closed !== false)
2690
+ writer.tag(2, WireType.Varint).bool(message.closed);
2691
+ let u = options.writeUnknownFields;
2692
+ if (u !== false)
2693
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2694
+ return writer;
2695
+ }
2696
+ }
2697
+ /**
2698
+ * @generated MessageType for protobuf message services.docstore.ToggleDocumentRequest
2699
+ */
2700
+ export const ToggleDocumentRequest = new ToggleDocumentRequest$Type();
2701
+ // @generated message type with reflection information, may provide speed optimized methods
2702
+ class ToggleDocumentResponse$Type extends MessageType<ToggleDocumentResponse> {
2703
+ constructor() {
2704
+ super("services.docstore.ToggleDocumentResponse", []);
2705
+ }
2706
+ create(value?: PartialMessage<ToggleDocumentResponse>): ToggleDocumentResponse {
2707
+ const message = globalThis.Object.create((this.messagePrototype!));
2708
+ if (value !== undefined)
2709
+ reflectionMergePartial<ToggleDocumentResponse>(this, message, value);
2710
+ return message;
2711
+ }
2712
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDocumentResponse): ToggleDocumentResponse {
2713
+ return target ?? this.create();
2714
+ }
2715
+ internalBinaryWrite(message: ToggleDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2716
+ let u = options.writeUnknownFields;
2717
+ if (u !== false)
2718
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2719
+ return writer;
2720
+ }
2721
+ }
2722
+ /**
2723
+ * @generated MessageType for protobuf message services.docstore.ToggleDocumentResponse
2724
+ */
2725
+ export const ToggleDocumentResponse = new ToggleDocumentResponse$Type();
2726
+ // @generated message type with reflection information, may provide speed optimized methods
2727
+ class ChangeDocumentOwnerRequest$Type extends MessageType<ChangeDocumentOwnerRequest> {
2728
+ constructor() {
2729
+ super("services.docstore.ChangeDocumentOwnerRequest", [
2730
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
2731
+ { no: 2, name: "new_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
2732
+ ]);
2733
+ }
2734
+ create(value?: PartialMessage<ChangeDocumentOwnerRequest>): ChangeDocumentOwnerRequest {
2735
+ const message = globalThis.Object.create((this.messagePrototype!));
2736
+ message.documentId = "0";
2737
+ if (value !== undefined)
2738
+ reflectionMergePartial<ChangeDocumentOwnerRequest>(this, message, value);
2739
+ return message;
2740
+ }
2741
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeDocumentOwnerRequest): ChangeDocumentOwnerRequest {
2742
+ let message = target ?? this.create(), end = reader.pos + length;
2743
+ while (reader.pos < end) {
2744
+ let [fieldNo, wireType] = reader.tag();
2745
+ switch (fieldNo) {
2746
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2747
+ message.documentId = reader.uint64().toString();
2748
+ break;
2749
+ case /* optional int32 new_user_id */ 2:
2750
+ message.newUserId = reader.int32();
2751
+ break;
2752
+ default:
2753
+ let u = options.readUnknownField;
2754
+ if (u === "throw")
2755
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2756
+ let d = reader.skip(wireType);
2757
+ if (u !== false)
2758
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2759
+ }
2760
+ }
2761
+ return message;
2762
+ }
2763
+ internalBinaryWrite(message: ChangeDocumentOwnerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2764
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
2765
+ if (message.documentId !== "0")
2766
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
2767
+ /* optional int32 new_user_id = 2; */
2768
+ if (message.newUserId !== undefined)
2769
+ writer.tag(2, WireType.Varint).int32(message.newUserId);
2770
+ let u = options.writeUnknownFields;
2771
+ if (u !== false)
2772
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2773
+ return writer;
2774
+ }
2775
+ }
2776
+ /**
2777
+ * @generated MessageType for protobuf message services.docstore.ChangeDocumentOwnerRequest
2778
+ */
2779
+ export const ChangeDocumentOwnerRequest = new ChangeDocumentOwnerRequest$Type();
2780
+ // @generated message type with reflection information, may provide speed optimized methods
2781
+ class ChangeDocumentOwnerResponse$Type extends MessageType<ChangeDocumentOwnerResponse> {
2782
+ constructor() {
2783
+ super("services.docstore.ChangeDocumentOwnerResponse", []);
2784
+ }
2785
+ create(value?: PartialMessage<ChangeDocumentOwnerResponse>): ChangeDocumentOwnerResponse {
2786
+ const message = globalThis.Object.create((this.messagePrototype!));
2787
+ if (value !== undefined)
2788
+ reflectionMergePartial<ChangeDocumentOwnerResponse>(this, message, value);
2789
+ return message;
2790
+ }
2791
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeDocumentOwnerResponse): ChangeDocumentOwnerResponse {
2792
+ return target ?? this.create();
2793
+ }
2794
+ internalBinaryWrite(message: ChangeDocumentOwnerResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2795
+ let u = options.writeUnknownFields;
2796
+ if (u !== false)
2797
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2798
+ return writer;
2799
+ }
2800
+ }
2801
+ /**
2802
+ * @generated MessageType for protobuf message services.docstore.ChangeDocumentOwnerResponse
2803
+ */
2804
+ export const ChangeDocumentOwnerResponse = new ChangeDocumentOwnerResponse$Type();
2805
+ // @generated message type with reflection information, may provide speed optimized methods
2806
+ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2807
+ constructor() {
2808
+ super("services.docstore.CreateDocumentRequest", [
2809
+ { no: 1, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
2810
+ { no: 2, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
2811
+ { no: 3, name: "content", kind: "message", T: () => Content },
2812
+ { no: 4, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
2813
+ { no: 5, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "1000000" } } } },
2814
+ { no: 6, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "32" } } } },
2815
+ { no: 7, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2816
+ { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2817
+ { no: 9, name: "access", kind: "message", T: () => DocumentAccess },
2818
+ { no: 10, name: "template_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }
2819
+ ]);
2820
+ }
2821
+ create(value?: PartialMessage<CreateDocumentRequest>): CreateDocumentRequest {
2822
+ const message = globalThis.Object.create((this.messagePrototype!));
2823
+ message.title = "";
2824
+ message.contentType = 0;
2825
+ message.state = "";
2826
+ message.closed = false;
2827
+ message.public = false;
2828
+ if (value !== undefined)
2829
+ reflectionMergePartial<CreateDocumentRequest>(this, message, value);
2830
+ return message;
2831
+ }
2832
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDocumentRequest): CreateDocumentRequest {
2833
+ let message = target ?? this.create(), end = reader.pos + length;
2834
+ while (reader.pos < end) {
2835
+ let [fieldNo, wireType] = reader.tag();
2836
+ switch (fieldNo) {
2837
+ case /* optional uint64 category_id = 1 [jstype = JS_STRING];*/ 1:
2838
+ message.categoryId = reader.uint64().toString();
2839
+ break;
2840
+ case /* string title */ 2:
2841
+ message.title = reader.string();
2842
+ break;
2843
+ case /* resources.common.content.Content content */ 3:
2844
+ message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
2845
+ break;
2846
+ case /* resources.common.content.ContentType content_type */ 4:
2847
+ message.contentType = reader.int32();
2848
+ break;
2849
+ case /* optional string data */ 5:
2850
+ message.data = reader.string();
2851
+ break;
2852
+ case /* string state */ 6:
2853
+ message.state = reader.string();
2854
+ break;
2855
+ case /* bool closed */ 7:
2856
+ message.closed = reader.bool();
2857
+ break;
2858
+ case /* bool public */ 8:
2859
+ message.public = reader.bool();
2860
+ break;
2861
+ case /* optional resources.documents.DocumentAccess access */ 9:
2862
+ message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
2863
+ break;
2864
+ case /* optional uint64 template_id = 10 [jstype = JS_STRING];*/ 10:
2865
+ message.templateId = reader.uint64().toString();
2866
+ break;
2867
+ default:
2868
+ let u = options.readUnknownField;
2869
+ if (u === "throw")
2870
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2871
+ let d = reader.skip(wireType);
2872
+ if (u !== false)
2873
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2874
+ }
2875
+ }
2876
+ return message;
2877
+ }
2878
+ internalBinaryWrite(message: CreateDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2879
+ /* optional uint64 category_id = 1 [jstype = JS_STRING]; */
2880
+ if (message.categoryId !== undefined)
2881
+ writer.tag(1, WireType.Varint).uint64(message.categoryId);
2882
+ /* string title = 2; */
2883
+ if (message.title !== "")
2884
+ writer.tag(2, WireType.LengthDelimited).string(message.title);
2885
+ /* resources.common.content.Content content = 3; */
2886
+ if (message.content)
2887
+ Content.internalBinaryWrite(message.content, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
2888
+ /* resources.common.content.ContentType content_type = 4; */
2889
+ if (message.contentType !== 0)
2890
+ writer.tag(4, WireType.Varint).int32(message.contentType);
2891
+ /* optional string data = 5; */
2892
+ if (message.data !== undefined)
2893
+ writer.tag(5, WireType.LengthDelimited).string(message.data);
2894
+ /* string state = 6; */
2895
+ if (message.state !== "")
2896
+ writer.tag(6, WireType.LengthDelimited).string(message.state);
2897
+ /* bool closed = 7; */
2898
+ if (message.closed !== false)
2899
+ writer.tag(7, WireType.Varint).bool(message.closed);
2900
+ /* bool public = 8; */
2901
+ if (message.public !== false)
2902
+ writer.tag(8, WireType.Varint).bool(message.public);
2903
+ /* optional resources.documents.DocumentAccess access = 9; */
2904
+ if (message.access)
2905
+ DocumentAccess.internalBinaryWrite(message.access, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
2906
+ /* optional uint64 template_id = 10 [jstype = JS_STRING]; */
2907
+ if (message.templateId !== undefined)
2908
+ writer.tag(10, WireType.Varint).uint64(message.templateId);
2909
+ let u = options.writeUnknownFields;
2910
+ if (u !== false)
2911
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2912
+ return writer;
2913
+ }
2914
+ }
2915
+ /**
2916
+ * @generated MessageType for protobuf message services.docstore.CreateDocumentRequest
2917
+ */
2918
+ export const CreateDocumentRequest = new CreateDocumentRequest$Type();
2919
+ // @generated message type with reflection information, may provide speed optimized methods
2920
+ class CreateDocumentResponse$Type extends MessageType<CreateDocumentResponse> {
2921
+ constructor() {
2922
+ super("services.docstore.CreateDocumentResponse", [
2923
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2924
+ ]);
2925
+ }
2926
+ create(value?: PartialMessage<CreateDocumentResponse>): CreateDocumentResponse {
2927
+ const message = globalThis.Object.create((this.messagePrototype!));
2928
+ message.documentId = "0";
2929
+ if (value !== undefined)
2930
+ reflectionMergePartial<CreateDocumentResponse>(this, message, value);
2931
+ return message;
2932
+ }
2933
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDocumentResponse): CreateDocumentResponse {
2934
+ let message = target ?? this.create(), end = reader.pos + length;
2935
+ while (reader.pos < end) {
2936
+ let [fieldNo, wireType] = reader.tag();
2937
+ switch (fieldNo) {
2938
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2939
+ message.documentId = reader.uint64().toString();
2940
+ break;
2941
+ default:
2942
+ let u = options.readUnknownField;
2943
+ if (u === "throw")
2944
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2945
+ let d = reader.skip(wireType);
2946
+ if (u !== false)
2947
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2948
+ }
2949
+ }
2950
+ return message;
2951
+ }
2952
+ internalBinaryWrite(message: CreateDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2953
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
2954
+ if (message.documentId !== "0")
2955
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
2956
+ let u = options.writeUnknownFields;
2957
+ if (u !== false)
2958
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2959
+ return writer;
2960
+ }
2961
+ }
2962
+ /**
2963
+ * @generated MessageType for protobuf message services.docstore.CreateDocumentResponse
2964
+ */
2965
+ export const CreateDocumentResponse = new CreateDocumentResponse$Type();
2966
+ // @generated message type with reflection information, may provide speed optimized methods
2967
+ class UpdateDocumentRequest$Type extends MessageType<UpdateDocumentRequest> {
2968
+ constructor() {
2969
+ super("services.docstore.UpdateDocumentRequest", [
2970
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
2971
+ { no: 2, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
2972
+ { no: 3, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
2973
+ { no: 4, name: "content", kind: "message", T: () => Content },
2974
+ { no: 5, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
2975
+ { no: 6, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "1000000" } } } },
2976
+ { no: 7, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "32" } } } },
2977
+ { no: 8, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2978
+ { no: 9, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2979
+ { no: 10, name: "access", kind: "message", T: () => DocumentAccess }
2980
+ ]);
2981
+ }
2982
+ create(value?: PartialMessage<UpdateDocumentRequest>): UpdateDocumentRequest {
2983
+ const message = globalThis.Object.create((this.messagePrototype!));
2984
+ message.documentId = "0";
2985
+ message.title = "";
2986
+ message.contentType = 0;
2987
+ message.state = "";
2988
+ message.closed = false;
2989
+ message.public = false;
2990
+ if (value !== undefined)
2991
+ reflectionMergePartial<UpdateDocumentRequest>(this, message, value);
2992
+ return message;
2993
+ }
2994
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDocumentRequest): UpdateDocumentRequest {
2995
+ let message = target ?? this.create(), end = reader.pos + length;
2996
+ while (reader.pos < end) {
2997
+ let [fieldNo, wireType] = reader.tag();
2998
+ switch (fieldNo) {
2999
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3000
+ message.documentId = reader.uint64().toString();
3001
+ break;
3002
+ case /* optional uint64 category_id = 2 [jstype = JS_STRING];*/ 2:
3003
+ message.categoryId = reader.uint64().toString();
3004
+ break;
3005
+ case /* string title */ 3:
3006
+ message.title = reader.string();
3007
+ break;
3008
+ case /* resources.common.content.Content content */ 4:
3009
+ message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
3010
+ break;
3011
+ case /* resources.common.content.ContentType content_type */ 5:
3012
+ message.contentType = reader.int32();
3013
+ break;
3014
+ case /* optional string data */ 6:
3015
+ message.data = reader.string();
3016
+ break;
3017
+ case /* string state */ 7:
3018
+ message.state = reader.string();
3019
+ break;
3020
+ case /* bool closed */ 8:
3021
+ message.closed = reader.bool();
3022
+ break;
3023
+ case /* bool public */ 9:
3024
+ message.public = reader.bool();
3025
+ break;
3026
+ case /* optional resources.documents.DocumentAccess access */ 10:
3027
+ message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
3028
+ break;
3029
+ default:
3030
+ let u = options.readUnknownField;
3031
+ if (u === "throw")
3032
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3033
+ let d = reader.skip(wireType);
3034
+ if (u !== false)
3035
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3036
+ }
3037
+ }
3038
+ return message;
3039
+ }
3040
+ internalBinaryWrite(message: UpdateDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3041
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
3042
+ if (message.documentId !== "0")
3043
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
3044
+ /* optional uint64 category_id = 2 [jstype = JS_STRING]; */
3045
+ if (message.categoryId !== undefined)
3046
+ writer.tag(2, WireType.Varint).uint64(message.categoryId);
3047
+ /* string title = 3; */
3048
+ if (message.title !== "")
3049
+ writer.tag(3, WireType.LengthDelimited).string(message.title);
3050
+ /* resources.common.content.Content content = 4; */
3051
+ if (message.content)
3052
+ Content.internalBinaryWrite(message.content, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
3053
+ /* resources.common.content.ContentType content_type = 5; */
3054
+ if (message.contentType !== 0)
3055
+ writer.tag(5, WireType.Varint).int32(message.contentType);
3056
+ /* optional string data = 6; */
3057
+ if (message.data !== undefined)
3058
+ writer.tag(6, WireType.LengthDelimited).string(message.data);
3059
+ /* string state = 7; */
3060
+ if (message.state !== "")
3061
+ writer.tag(7, WireType.LengthDelimited).string(message.state);
3062
+ /* bool closed = 8; */
3063
+ if (message.closed !== false)
3064
+ writer.tag(8, WireType.Varint).bool(message.closed);
3065
+ /* bool public = 9; */
3066
+ if (message.public !== false)
3067
+ writer.tag(9, WireType.Varint).bool(message.public);
3068
+ /* optional resources.documents.DocumentAccess access = 10; */
3069
+ if (message.access)
3070
+ DocumentAccess.internalBinaryWrite(message.access, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
3071
+ let u = options.writeUnknownFields;
3072
+ if (u !== false)
3073
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3074
+ return writer;
3075
+ }
3076
+ }
3077
+ /**
3078
+ * @generated MessageType for protobuf message services.docstore.UpdateDocumentRequest
3079
+ */
3080
+ export const UpdateDocumentRequest = new UpdateDocumentRequest$Type();
3081
+ // @generated message type with reflection information, may provide speed optimized methods
3082
+ class ListDocumentActivityRequest$Type extends MessageType<ListDocumentActivityRequest> {
3083
+ constructor() {
3084
+ super("services.docstore.ListDocumentActivityRequest", [
3085
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
3086
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3087
+ { no: 3, name: "activity_types", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"], options: { "validate.rules": { repeated: { maxItems: "10", items: { enum: { in: [13, 14, 15, 16, 17, 18] } } } } } }
3088
+ ]);
3089
+ }
3090
+ create(value?: PartialMessage<ListDocumentActivityRequest>): ListDocumentActivityRequest {
3091
+ const message = globalThis.Object.create((this.messagePrototype!));
3092
+ message.documentId = "0";
3093
+ message.activityTypes = [];
3094
+ if (value !== undefined)
3095
+ reflectionMergePartial<ListDocumentActivityRequest>(this, message, value);
3096
+ return message;
3097
+ }
3098
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentActivityRequest): ListDocumentActivityRequest {
3099
+ let message = target ?? this.create(), end = reader.pos + length;
3100
+ while (reader.pos < end) {
3101
+ let [fieldNo, wireType] = reader.tag();
3102
+ switch (fieldNo) {
3103
+ case /* resources.common.database.PaginationRequest pagination */ 1:
3104
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3105
+ break;
3106
+ case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
3107
+ message.documentId = reader.uint64().toString();
3108
+ break;
3109
+ case /* repeated resources.documents.DocActivityType activity_types */ 3:
3110
+ if (wireType === WireType.LengthDelimited)
3111
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
3112
+ message.activityTypes.push(reader.int32());
3113
+ else
3114
+ message.activityTypes.push(reader.int32());
3115
+ break;
3116
+ default:
3117
+ let u = options.readUnknownField;
3118
+ if (u === "throw")
3119
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3120
+ let d = reader.skip(wireType);
3121
+ if (u !== false)
3122
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3123
+ }
3124
+ }
3125
+ return message;
3126
+ }
3127
+ internalBinaryWrite(message: ListDocumentActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3128
+ /* resources.common.database.PaginationRequest pagination = 1; */
3129
+ if (message.pagination)
3130
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3131
+ /* uint64 document_id = 2 [jstype = JS_STRING]; */
3132
+ if (message.documentId !== "0")
3133
+ writer.tag(2, WireType.Varint).uint64(message.documentId);
3134
+ /* repeated resources.documents.DocActivityType activity_types = 3; */
3135
+ if (message.activityTypes.length) {
3136
+ writer.tag(3, WireType.LengthDelimited).fork();
3137
+ for (let i = 0; i < message.activityTypes.length; i++)
3138
+ writer.int32(message.activityTypes[i]);
3139
+ writer.join();
3140
+ }
3141
+ let u = options.writeUnknownFields;
3142
+ if (u !== false)
3143
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3144
+ return writer;
3145
+ }
3146
+ }
3147
+ /**
3148
+ * @generated MessageType for protobuf message services.docstore.ListDocumentActivityRequest
3149
+ */
3150
+ export const ListDocumentActivityRequest = new ListDocumentActivityRequest$Type();
3151
+ // @generated message type with reflection information, may provide speed optimized methods
3152
+ class ListDocumentActivityResponse$Type extends MessageType<ListDocumentActivityResponse> {
3153
+ constructor() {
3154
+ super("services.docstore.ListDocumentActivityResponse", [
3155
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
3156
+ { no: 2, name: "activity", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocActivity }
3157
+ ]);
3158
+ }
3159
+ create(value?: PartialMessage<ListDocumentActivityResponse>): ListDocumentActivityResponse {
3160
+ const message = globalThis.Object.create((this.messagePrototype!));
3161
+ message.activity = [];
3162
+ if (value !== undefined)
3163
+ reflectionMergePartial<ListDocumentActivityResponse>(this, message, value);
3164
+ return message;
3165
+ }
3166
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentActivityResponse): ListDocumentActivityResponse {
3167
+ let message = target ?? this.create(), end = reader.pos + length;
3168
+ while (reader.pos < end) {
3169
+ let [fieldNo, wireType] = reader.tag();
3170
+ switch (fieldNo) {
3171
+ case /* resources.common.database.PaginationResponse pagination */ 1:
3172
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3173
+ break;
3174
+ case /* repeated resources.documents.DocActivity activity */ 2:
3175
+ message.activity.push(DocActivity.internalBinaryRead(reader, reader.uint32(), options));
3176
+ break;
3177
+ default:
3178
+ let u = options.readUnknownField;
3179
+ if (u === "throw")
3180
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3181
+ let d = reader.skip(wireType);
3182
+ if (u !== false)
3183
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3184
+ }
3185
+ }
3186
+ return message;
3187
+ }
3188
+ internalBinaryWrite(message: ListDocumentActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3189
+ /* resources.common.database.PaginationResponse pagination = 1; */
3190
+ if (message.pagination)
3191
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3192
+ /* repeated resources.documents.DocActivity activity = 2; */
3193
+ for (let i = 0; i < message.activity.length; i++)
3194
+ DocActivity.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
3195
+ let u = options.writeUnknownFields;
3196
+ if (u !== false)
3197
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3198
+ return writer;
3199
+ }
3200
+ }
3201
+ /**
3202
+ * @generated MessageType for protobuf message services.docstore.ListDocumentActivityResponse
3203
+ */
3204
+ export const ListDocumentActivityResponse = new ListDocumentActivityResponse$Type();
3205
+ // @generated message type with reflection information, may provide speed optimized methods
3206
+ class ListDocumentReqsRequest$Type extends MessageType<ListDocumentReqsRequest> {
3207
+ constructor() {
3208
+ super("services.docstore.ListDocumentReqsRequest", [
3209
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
3210
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3211
+ ]);
3212
+ }
3213
+ create(value?: PartialMessage<ListDocumentReqsRequest>): ListDocumentReqsRequest {
3214
+ const message = globalThis.Object.create((this.messagePrototype!));
3215
+ message.documentId = "0";
3216
+ if (value !== undefined)
3217
+ reflectionMergePartial<ListDocumentReqsRequest>(this, message, value);
3218
+ return message;
3219
+ }
3220
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentReqsRequest): ListDocumentReqsRequest {
3221
+ let message = target ?? this.create(), end = reader.pos + length;
3222
+ while (reader.pos < end) {
3223
+ let [fieldNo, wireType] = reader.tag();
3224
+ switch (fieldNo) {
3225
+ case /* resources.common.database.PaginationRequest pagination */ 1:
3226
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3227
+ break;
3228
+ case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
3229
+ message.documentId = reader.uint64().toString();
3230
+ break;
3231
+ default:
3232
+ let u = options.readUnknownField;
3233
+ if (u === "throw")
3234
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3235
+ let d = reader.skip(wireType);
3236
+ if (u !== false)
3237
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3238
+ }
3239
+ }
3240
+ return message;
3241
+ }
3242
+ internalBinaryWrite(message: ListDocumentReqsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3243
+ /* resources.common.database.PaginationRequest pagination = 1; */
3244
+ if (message.pagination)
3245
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3246
+ /* uint64 document_id = 2 [jstype = JS_STRING]; */
3247
+ if (message.documentId !== "0")
3248
+ writer.tag(2, WireType.Varint).uint64(message.documentId);
3249
+ let u = options.writeUnknownFields;
3250
+ if (u !== false)
3251
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3252
+ return writer;
3253
+ }
3254
+ }
3255
+ /**
3256
+ * @generated MessageType for protobuf message services.docstore.ListDocumentReqsRequest
3257
+ */
3258
+ export const ListDocumentReqsRequest = new ListDocumentReqsRequest$Type();
3259
+ // @generated message type with reflection information, may provide speed optimized methods
3260
+ class ListDocumentReqsResponse$Type extends MessageType<ListDocumentReqsResponse> {
3261
+ constructor() {
3262
+ super("services.docstore.ListDocumentReqsResponse", [
3263
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
3264
+ { no: 2, name: "requests", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocRequest }
3265
+ ]);
3266
+ }
3267
+ create(value?: PartialMessage<ListDocumentReqsResponse>): ListDocumentReqsResponse {
3268
+ const message = globalThis.Object.create((this.messagePrototype!));
3269
+ message.requests = [];
3270
+ if (value !== undefined)
3271
+ reflectionMergePartial<ListDocumentReqsResponse>(this, message, value);
3272
+ return message;
3273
+ }
3274
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentReqsResponse): ListDocumentReqsResponse {
3275
+ let message = target ?? this.create(), end = reader.pos + length;
3276
+ while (reader.pos < end) {
3277
+ let [fieldNo, wireType] = reader.tag();
3278
+ switch (fieldNo) {
3279
+ case /* resources.common.database.PaginationResponse pagination */ 1:
3280
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3281
+ break;
3282
+ case /* repeated resources.documents.DocRequest requests */ 2:
3283
+ message.requests.push(DocRequest.internalBinaryRead(reader, reader.uint32(), options));
3284
+ break;
3285
+ default:
3286
+ let u = options.readUnknownField;
3287
+ if (u === "throw")
3288
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3289
+ let d = reader.skip(wireType);
3290
+ if (u !== false)
3291
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3292
+ }
3293
+ }
3294
+ return message;
3295
+ }
3296
+ internalBinaryWrite(message: ListDocumentReqsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3297
+ /* resources.common.database.PaginationResponse pagination = 1; */
3298
+ if (message.pagination)
3299
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3300
+ /* repeated resources.documents.DocRequest requests = 2; */
3301
+ for (let i = 0; i < message.requests.length; i++)
3302
+ DocRequest.internalBinaryWrite(message.requests[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
3303
+ let u = options.writeUnknownFields;
3304
+ if (u !== false)
3305
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3306
+ return writer;
3307
+ }
3308
+ }
3309
+ /**
3310
+ * @generated MessageType for protobuf message services.docstore.ListDocumentReqsResponse
3311
+ */
3312
+ export const ListDocumentReqsResponse = new ListDocumentReqsResponse$Type();
3313
+ // @generated message type with reflection information, may provide speed optimized methods
3314
+ class CreateDocumentReqRequest$Type extends MessageType<CreateDocumentReqRequest> {
3315
+ constructor() {
3316
+ super("services.docstore.CreateDocumentReqRequest", [
3317
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3318
+ { no: 2, name: "request_type", kind: "enum", T: () => ["resources.documents.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"], options: { "validate.rules": { enum: { in: [13, 14, 15, 16, 17, 18] } } } },
3319
+ { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
3320
+ { no: 4, name: "data", kind: "message", T: () => DocActivityData }
3321
+ ]);
3322
+ }
3323
+ create(value?: PartialMessage<CreateDocumentReqRequest>): CreateDocumentReqRequest {
3324
+ const message = globalThis.Object.create((this.messagePrototype!));
3325
+ message.documentId = "0";
3326
+ message.requestType = 0;
3327
+ if (value !== undefined)
3328
+ reflectionMergePartial<CreateDocumentReqRequest>(this, message, value);
3329
+ return message;
3330
+ }
3331
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDocumentReqRequest): CreateDocumentReqRequest {
3332
+ let message = target ?? this.create(), end = reader.pos + length;
3333
+ while (reader.pos < end) {
3334
+ let [fieldNo, wireType] = reader.tag();
3335
+ switch (fieldNo) {
3336
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3337
+ message.documentId = reader.uint64().toString();
3338
+ break;
3339
+ case /* resources.documents.DocActivityType request_type */ 2:
3340
+ message.requestType = reader.int32();
3341
+ break;
3342
+ case /* optional string reason */ 3:
3343
+ message.reason = reader.string();
3344
+ break;
3345
+ case /* optional resources.documents.DocActivityData data */ 4:
3346
+ message.data = DocActivityData.internalBinaryRead(reader, reader.uint32(), options, message.data);
3347
+ break;
3348
+ default:
3349
+ let u = options.readUnknownField;
3350
+ if (u === "throw")
3351
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3352
+ let d = reader.skip(wireType);
3353
+ if (u !== false)
3354
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3355
+ }
3356
+ }
3357
+ return message;
3358
+ }
3359
+ internalBinaryWrite(message: CreateDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3360
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
3361
+ if (message.documentId !== "0")
3362
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
3363
+ /* resources.documents.DocActivityType request_type = 2; */
3364
+ if (message.requestType !== 0)
3365
+ writer.tag(2, WireType.Varint).int32(message.requestType);
3366
+ /* optional string reason = 3; */
3367
+ if (message.reason !== undefined)
3368
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
3369
+ /* optional resources.documents.DocActivityData data = 4; */
3370
+ if (message.data)
3371
+ DocActivityData.internalBinaryWrite(message.data, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
3372
+ let u = options.writeUnknownFields;
3373
+ if (u !== false)
3374
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3375
+ return writer;
3376
+ }
3377
+ }
3378
+ /**
3379
+ * @generated MessageType for protobuf message services.docstore.CreateDocumentReqRequest
3380
+ */
3381
+ export const CreateDocumentReqRequest = new CreateDocumentReqRequest$Type();
3382
+ // @generated message type with reflection information, may provide speed optimized methods
3383
+ class CreateDocumentReqResponse$Type extends MessageType<CreateDocumentReqResponse> {
3384
+ constructor() {
3385
+ super("services.docstore.CreateDocumentReqResponse", [
3386
+ { no: 1, name: "request", kind: "message", T: () => DocRequest }
3387
+ ]);
3388
+ }
3389
+ create(value?: PartialMessage<CreateDocumentReqResponse>): CreateDocumentReqResponse {
3390
+ const message = globalThis.Object.create((this.messagePrototype!));
3391
+ if (value !== undefined)
3392
+ reflectionMergePartial<CreateDocumentReqResponse>(this, message, value);
3393
+ return message;
3394
+ }
3395
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDocumentReqResponse): CreateDocumentReqResponse {
3396
+ let message = target ?? this.create(), end = reader.pos + length;
3397
+ while (reader.pos < end) {
3398
+ let [fieldNo, wireType] = reader.tag();
3399
+ switch (fieldNo) {
3400
+ case /* resources.documents.DocRequest request */ 1:
3401
+ message.request = DocRequest.internalBinaryRead(reader, reader.uint32(), options, message.request);
3402
+ break;
3403
+ default:
3404
+ let u = options.readUnknownField;
3405
+ if (u === "throw")
3406
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3407
+ let d = reader.skip(wireType);
3408
+ if (u !== false)
3409
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3410
+ }
3411
+ }
3412
+ return message;
3413
+ }
3414
+ internalBinaryWrite(message: CreateDocumentReqResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3415
+ /* resources.documents.DocRequest request = 1; */
3416
+ if (message.request)
3417
+ DocRequest.internalBinaryWrite(message.request, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3418
+ let u = options.writeUnknownFields;
3419
+ if (u !== false)
3420
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3421
+ return writer;
3422
+ }
3423
+ }
3424
+ /**
3425
+ * @generated MessageType for protobuf message services.docstore.CreateDocumentReqResponse
3426
+ */
3427
+ export const CreateDocumentReqResponse = new CreateDocumentReqResponse$Type();
3428
+ // @generated message type with reflection information, may provide speed optimized methods
3429
+ class UpdateDocumentReqRequest$Type extends MessageType<UpdateDocumentReqRequest> {
3430
+ constructor() {
3431
+ super("services.docstore.UpdateDocumentReqRequest", [
3432
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3433
+ { no: 2, name: "request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3434
+ { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
3435
+ { no: 4, name: "data", kind: "message", T: () => DocActivityData },
3436
+ { no: 5, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
3437
+ ]);
3438
+ }
3439
+ create(value?: PartialMessage<UpdateDocumentReqRequest>): UpdateDocumentReqRequest {
3440
+ const message = globalThis.Object.create((this.messagePrototype!));
3441
+ message.documentId = "0";
3442
+ message.requestId = "0";
3443
+ message.accepted = false;
3444
+ if (value !== undefined)
3445
+ reflectionMergePartial<UpdateDocumentReqRequest>(this, message, value);
3446
+ return message;
3447
+ }
3448
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDocumentReqRequest): UpdateDocumentReqRequest {
3449
+ let message = target ?? this.create(), end = reader.pos + length;
3450
+ while (reader.pos < end) {
3451
+ let [fieldNo, wireType] = reader.tag();
3452
+ switch (fieldNo) {
3453
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3454
+ message.documentId = reader.uint64().toString();
3455
+ break;
3456
+ case /* uint64 request_id = 2 [jstype = JS_STRING];*/ 2:
3457
+ message.requestId = reader.uint64().toString();
3458
+ break;
3459
+ case /* optional string reason */ 3:
3460
+ message.reason = reader.string();
3461
+ break;
3462
+ case /* optional resources.documents.DocActivityData data */ 4:
3463
+ message.data = DocActivityData.internalBinaryRead(reader, reader.uint32(), options, message.data);
3464
+ break;
3465
+ case /* bool accepted */ 5:
3466
+ message.accepted = reader.bool();
3467
+ break;
3468
+ default:
3469
+ let u = options.readUnknownField;
3470
+ if (u === "throw")
3471
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3472
+ let d = reader.skip(wireType);
3473
+ if (u !== false)
3474
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3475
+ }
3476
+ }
3477
+ return message;
3478
+ }
3479
+ internalBinaryWrite(message: UpdateDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3480
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
3481
+ if (message.documentId !== "0")
3482
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
3483
+ /* uint64 request_id = 2 [jstype = JS_STRING]; */
3484
+ if (message.requestId !== "0")
3485
+ writer.tag(2, WireType.Varint).uint64(message.requestId);
3486
+ /* optional string reason = 3; */
3487
+ if (message.reason !== undefined)
3488
+ writer.tag(3, WireType.LengthDelimited).string(message.reason);
3489
+ /* optional resources.documents.DocActivityData data = 4; */
3490
+ if (message.data)
3491
+ DocActivityData.internalBinaryWrite(message.data, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
3492
+ /* bool accepted = 5; */
3493
+ if (message.accepted !== false)
3494
+ writer.tag(5, WireType.Varint).bool(message.accepted);
3495
+ let u = options.writeUnknownFields;
3496
+ if (u !== false)
3497
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3498
+ return writer;
3499
+ }
3500
+ }
3501
+ /**
3502
+ * @generated MessageType for protobuf message services.docstore.UpdateDocumentReqRequest
3503
+ */
3504
+ export const UpdateDocumentReqRequest = new UpdateDocumentReqRequest$Type();
3505
+ // @generated message type with reflection information, may provide speed optimized methods
3506
+ class UpdateDocumentReqResponse$Type extends MessageType<UpdateDocumentReqResponse> {
3507
+ constructor() {
3508
+ super("services.docstore.UpdateDocumentReqResponse", [
3509
+ { no: 1, name: "request", kind: "message", T: () => DocRequest }
3510
+ ]);
3511
+ }
3512
+ create(value?: PartialMessage<UpdateDocumentReqResponse>): UpdateDocumentReqResponse {
3513
+ const message = globalThis.Object.create((this.messagePrototype!));
3514
+ if (value !== undefined)
3515
+ reflectionMergePartial<UpdateDocumentReqResponse>(this, message, value);
3516
+ return message;
3517
+ }
3518
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDocumentReqResponse): UpdateDocumentReqResponse {
3519
+ let message = target ?? this.create(), end = reader.pos + length;
3520
+ while (reader.pos < end) {
3521
+ let [fieldNo, wireType] = reader.tag();
3522
+ switch (fieldNo) {
3523
+ case /* resources.documents.DocRequest request */ 1:
3524
+ message.request = DocRequest.internalBinaryRead(reader, reader.uint32(), options, message.request);
3525
+ break;
3526
+ default:
3527
+ let u = options.readUnknownField;
3528
+ if (u === "throw")
3529
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3530
+ let d = reader.skip(wireType);
3531
+ if (u !== false)
3532
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3533
+ }
3534
+ }
3535
+ return message;
3536
+ }
3537
+ internalBinaryWrite(message: UpdateDocumentReqResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3538
+ /* resources.documents.DocRequest request = 1; */
3539
+ if (message.request)
3540
+ DocRequest.internalBinaryWrite(message.request, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3541
+ let u = options.writeUnknownFields;
3542
+ if (u !== false)
3543
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3544
+ return writer;
3545
+ }
3546
+ }
3547
+ /**
3548
+ * @generated MessageType for protobuf message services.docstore.UpdateDocumentReqResponse
3549
+ */
3550
+ export const UpdateDocumentReqResponse = new UpdateDocumentReqResponse$Type();
3551
+ // @generated message type with reflection information, may provide speed optimized methods
3552
+ class DeleteDocumentReqRequest$Type extends MessageType<DeleteDocumentReqRequest> {
3553
+ constructor() {
3554
+ super("services.docstore.DeleteDocumentReqRequest", [
3555
+ { no: 1, name: "request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3556
+ ]);
3557
+ }
3558
+ create(value?: PartialMessage<DeleteDocumentReqRequest>): DeleteDocumentReqRequest {
3559
+ const message = globalThis.Object.create((this.messagePrototype!));
3560
+ message.requestId = "0";
3561
+ if (value !== undefined)
3562
+ reflectionMergePartial<DeleteDocumentReqRequest>(this, message, value);
3563
+ return message;
3564
+ }
3565
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentReqRequest): DeleteDocumentReqRequest {
3566
+ let message = target ?? this.create(), end = reader.pos + length;
3567
+ while (reader.pos < end) {
3568
+ let [fieldNo, wireType] = reader.tag();
3569
+ switch (fieldNo) {
3570
+ case /* uint64 request_id = 1 [jstype = JS_STRING];*/ 1:
3571
+ message.requestId = reader.uint64().toString();
3572
+ break;
3573
+ default:
3574
+ let u = options.readUnknownField;
3575
+ if (u === "throw")
3576
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3577
+ let d = reader.skip(wireType);
3578
+ if (u !== false)
3579
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3580
+ }
3581
+ }
3582
+ return message;
3583
+ }
3584
+ internalBinaryWrite(message: DeleteDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3585
+ /* uint64 request_id = 1 [jstype = JS_STRING]; */
3586
+ if (message.requestId !== "0")
3587
+ writer.tag(1, WireType.Varint).uint64(message.requestId);
3588
+ let u = options.writeUnknownFields;
3589
+ if (u !== false)
3590
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3591
+ return writer;
3592
+ }
3593
+ }
3594
+ /**
3595
+ * @generated MessageType for protobuf message services.docstore.DeleteDocumentReqRequest
3596
+ */
3597
+ export const DeleteDocumentReqRequest = new DeleteDocumentReqRequest$Type();
3598
+ // @generated message type with reflection information, may provide speed optimized methods
3599
+ class DeleteDocumentReqResponse$Type extends MessageType<DeleteDocumentReqResponse> {
3600
+ constructor() {
3601
+ super("services.docstore.DeleteDocumentReqResponse", []);
3602
+ }
3603
+ create(value?: PartialMessage<DeleteDocumentReqResponse>): DeleteDocumentReqResponse {
3604
+ const message = globalThis.Object.create((this.messagePrototype!));
3605
+ if (value !== undefined)
3606
+ reflectionMergePartial<DeleteDocumentReqResponse>(this, message, value);
3607
+ return message;
3608
+ }
3609
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentReqResponse): DeleteDocumentReqResponse {
3610
+ return target ?? this.create();
3611
+ }
3612
+ internalBinaryWrite(message: DeleteDocumentReqResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3613
+ let u = options.writeUnknownFields;
3614
+ if (u !== false)
3615
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3616
+ return writer;
3617
+ }
3618
+ }
3619
+ /**
3620
+ * @generated MessageType for protobuf message services.docstore.DeleteDocumentReqResponse
3621
+ */
3622
+ export const DeleteDocumentReqResponse = new DeleteDocumentReqResponse$Type();
3623
+ // @generated message type with reflection information, may provide speed optimized methods
3624
+ class GetDocumentAccessRequest$Type extends MessageType<GetDocumentAccessRequest> {
3625
+ constructor() {
3626
+ super("services.docstore.GetDocumentAccessRequest", [
3627
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3628
+ ]);
3629
+ }
3630
+ create(value?: PartialMessage<GetDocumentAccessRequest>): GetDocumentAccessRequest {
3631
+ const message = globalThis.Object.create((this.messagePrototype!));
3632
+ message.documentId = "0";
3633
+ if (value !== undefined)
3634
+ reflectionMergePartial<GetDocumentAccessRequest>(this, message, value);
3635
+ return message;
3636
+ }
3637
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentAccessRequest): GetDocumentAccessRequest {
3638
+ let message = target ?? this.create(), end = reader.pos + length;
3639
+ while (reader.pos < end) {
3640
+ let [fieldNo, wireType] = reader.tag();
3641
+ switch (fieldNo) {
3642
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3643
+ message.documentId = reader.uint64().toString();
3644
+ break;
3645
+ default:
3646
+ let u = options.readUnknownField;
3647
+ if (u === "throw")
3648
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3649
+ let d = reader.skip(wireType);
3650
+ if (u !== false)
3651
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3652
+ }
3653
+ }
3654
+ return message;
3655
+ }
3656
+ internalBinaryWrite(message: GetDocumentAccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3657
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
3658
+ if (message.documentId !== "0")
3659
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
3660
+ let u = options.writeUnknownFields;
3661
+ if (u !== false)
3662
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3663
+ return writer;
3664
+ }
3665
+ }
3666
+ /**
3667
+ * @generated MessageType for protobuf message services.docstore.GetDocumentAccessRequest
3668
+ */
3669
+ export const GetDocumentAccessRequest = new GetDocumentAccessRequest$Type();
3670
+ // @generated message type with reflection information, may provide speed optimized methods
3671
+ class GetDocumentAccessResponse$Type extends MessageType<GetDocumentAccessResponse> {
3672
+ constructor() {
3673
+ super("services.docstore.GetDocumentAccessResponse", [
3674
+ { no: 1, name: "access", kind: "message", T: () => DocumentAccess, options: { "validate.rules": { message: { required: true } } } }
3675
+ ]);
3676
+ }
3677
+ create(value?: PartialMessage<GetDocumentAccessResponse>): GetDocumentAccessResponse {
3678
+ const message = globalThis.Object.create((this.messagePrototype!));
3679
+ if (value !== undefined)
3680
+ reflectionMergePartial<GetDocumentAccessResponse>(this, message, value);
3681
+ return message;
3682
+ }
3683
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDocumentAccessResponse): GetDocumentAccessResponse {
3684
+ let message = target ?? this.create(), end = reader.pos + length;
3685
+ while (reader.pos < end) {
3686
+ let [fieldNo, wireType] = reader.tag();
3687
+ switch (fieldNo) {
3688
+ case /* resources.documents.DocumentAccess access */ 1:
3689
+ message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
3690
+ break;
3691
+ default:
3692
+ let u = options.readUnknownField;
3693
+ if (u === "throw")
3694
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3695
+ let d = reader.skip(wireType);
3696
+ if (u !== false)
3697
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3698
+ }
3699
+ }
3700
+ return message;
3701
+ }
3702
+ internalBinaryWrite(message: GetDocumentAccessResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3703
+ /* resources.documents.DocumentAccess access = 1; */
3704
+ if (message.access)
3705
+ DocumentAccess.internalBinaryWrite(message.access, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3706
+ let u = options.writeUnknownFields;
3707
+ if (u !== false)
3708
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3709
+ return writer;
3710
+ }
3711
+ }
3712
+ /**
3713
+ * @generated MessageType for protobuf message services.docstore.GetDocumentAccessResponse
3714
+ */
3715
+ export const GetDocumentAccessResponse = new GetDocumentAccessResponse$Type();
3716
+ // @generated message type with reflection information, may provide speed optimized methods
3717
+ class SetDocumentAccessRequest$Type extends MessageType<SetDocumentAccessRequest> {
3718
+ constructor() {
3719
+ super("services.docstore.SetDocumentAccessRequest", [
3720
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3721
+ { no: 2, name: "access", kind: "message", T: () => DocumentAccess, options: { "validate.rules": { message: { required: true } } } }
3722
+ ]);
3723
+ }
3724
+ create(value?: PartialMessage<SetDocumentAccessRequest>): SetDocumentAccessRequest {
3725
+ const message = globalThis.Object.create((this.messagePrototype!));
3726
+ message.documentId = "0";
3727
+ if (value !== undefined)
3728
+ reflectionMergePartial<SetDocumentAccessRequest>(this, message, value);
3729
+ return message;
3730
+ }
3731
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentAccessRequest): SetDocumentAccessRequest {
3732
+ let message = target ?? this.create(), end = reader.pos + length;
3733
+ while (reader.pos < end) {
3734
+ let [fieldNo, wireType] = reader.tag();
3735
+ switch (fieldNo) {
3736
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3737
+ message.documentId = reader.uint64().toString();
3738
+ break;
3739
+ case /* resources.documents.DocumentAccess access */ 2:
3740
+ message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
3741
+ break;
3742
+ default:
3743
+ let u = options.readUnknownField;
3744
+ if (u === "throw")
3745
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3746
+ let d = reader.skip(wireType);
3747
+ if (u !== false)
3748
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3749
+ }
3750
+ }
3751
+ return message;
3752
+ }
3753
+ internalBinaryWrite(message: SetDocumentAccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3754
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
3755
+ if (message.documentId !== "0")
3756
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
3757
+ /* resources.documents.DocumentAccess access = 2; */
3758
+ if (message.access)
3759
+ DocumentAccess.internalBinaryWrite(message.access, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
3760
+ let u = options.writeUnknownFields;
3761
+ if (u !== false)
3762
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3763
+ return writer;
3764
+ }
3765
+ }
3766
+ /**
3767
+ * @generated MessageType for protobuf message services.docstore.SetDocumentAccessRequest
3768
+ */
3769
+ export const SetDocumentAccessRequest = new SetDocumentAccessRequest$Type();
3770
+ // @generated message type with reflection information, may provide speed optimized methods
3771
+ class SetDocumentAccessResponse$Type extends MessageType<SetDocumentAccessResponse> {
3772
+ constructor() {
3773
+ super("services.docstore.SetDocumentAccessResponse", []);
3774
+ }
3775
+ create(value?: PartialMessage<SetDocumentAccessResponse>): SetDocumentAccessResponse {
3776
+ const message = globalThis.Object.create((this.messagePrototype!));
3777
+ if (value !== undefined)
3778
+ reflectionMergePartial<SetDocumentAccessResponse>(this, message, value);
3779
+ return message;
3780
+ }
3781
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentAccessResponse): SetDocumentAccessResponse {
3782
+ return target ?? this.create();
3783
+ }
3784
+ internalBinaryWrite(message: SetDocumentAccessResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3785
+ let u = options.writeUnknownFields;
3786
+ if (u !== false)
3787
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3788
+ return writer;
3789
+ }
3790
+ }
3791
+ /**
3792
+ * @generated MessageType for protobuf message services.docstore.SetDocumentAccessResponse
3793
+ */
3794
+ export const SetDocumentAccessResponse = new SetDocumentAccessResponse$Type();
3795
+ // @generated message type with reflection information, may provide speed optimized methods
3796
+ class ListUserDocumentsRequest$Type extends MessageType<ListUserDocumentsRequest> {
3797
+ constructor() {
3798
+ super("services.docstore.ListUserDocumentsRequest", [
3799
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
3800
+ { no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
3801
+ { no: 3, name: "relations", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.documents.DocRelation", DocRelation, "DOC_RELATION_"], options: { "validate.rules": { repeated: { maxItems: "3" } } } },
3802
+ { no: 8, name: "closed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
3803
+ ]);
3804
+ }
3805
+ create(value?: PartialMessage<ListUserDocumentsRequest>): ListUserDocumentsRequest {
3806
+ const message = globalThis.Object.create((this.messagePrototype!));
3807
+ message.userId = 0;
3808
+ message.relations = [];
3809
+ if (value !== undefined)
3810
+ reflectionMergePartial<ListUserDocumentsRequest>(this, message, value);
3811
+ return message;
3812
+ }
3813
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserDocumentsRequest): ListUserDocumentsRequest {
3814
+ let message = target ?? this.create(), end = reader.pos + length;
3815
+ while (reader.pos < end) {
3816
+ let [fieldNo, wireType] = reader.tag();
3817
+ switch (fieldNo) {
3818
+ case /* resources.common.database.PaginationRequest pagination */ 1:
3819
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3820
+ break;
3821
+ case /* int32 user_id */ 2:
3822
+ message.userId = reader.int32();
3823
+ break;
3824
+ case /* repeated resources.documents.DocRelation relations */ 3:
3825
+ if (wireType === WireType.LengthDelimited)
3826
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
3827
+ message.relations.push(reader.int32());
3828
+ else
3829
+ message.relations.push(reader.int32());
3830
+ break;
3831
+ case /* optional bool closed */ 8:
3832
+ message.closed = reader.bool();
3833
+ break;
3834
+ default:
3835
+ let u = options.readUnknownField;
3836
+ if (u === "throw")
3837
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3838
+ let d = reader.skip(wireType);
3839
+ if (u !== false)
3840
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3841
+ }
3842
+ }
3843
+ return message;
3844
+ }
3845
+ internalBinaryWrite(message: ListUserDocumentsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3846
+ /* resources.common.database.PaginationRequest pagination = 1; */
3847
+ if (message.pagination)
3848
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3849
+ /* int32 user_id = 2; */
3850
+ if (message.userId !== 0)
3851
+ writer.tag(2, WireType.Varint).int32(message.userId);
3852
+ /* repeated resources.documents.DocRelation relations = 3; */
3853
+ if (message.relations.length) {
3854
+ writer.tag(3, WireType.LengthDelimited).fork();
3855
+ for (let i = 0; i < message.relations.length; i++)
3856
+ writer.int32(message.relations[i]);
3857
+ writer.join();
3858
+ }
3859
+ /* optional bool closed = 8; */
3860
+ if (message.closed !== undefined)
3861
+ writer.tag(8, WireType.Varint).bool(message.closed);
3862
+ let u = options.writeUnknownFields;
3863
+ if (u !== false)
3864
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3865
+ return writer;
3866
+ }
3867
+ }
3868
+ /**
3869
+ * @generated MessageType for protobuf message services.docstore.ListUserDocumentsRequest
3870
+ */
3871
+ export const ListUserDocumentsRequest = new ListUserDocumentsRequest$Type();
3872
+ // @generated message type with reflection information, may provide speed optimized methods
3873
+ class ListUserDocumentsResponse$Type extends MessageType<ListUserDocumentsResponse> {
3874
+ constructor() {
3875
+ super("services.docstore.ListUserDocumentsResponse", [
3876
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
3877
+ { no: 2, name: "relations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentRelation }
3878
+ ]);
3879
+ }
3880
+ create(value?: PartialMessage<ListUserDocumentsResponse>): ListUserDocumentsResponse {
3881
+ const message = globalThis.Object.create((this.messagePrototype!));
3882
+ message.relations = [];
3883
+ if (value !== undefined)
3884
+ reflectionMergePartial<ListUserDocumentsResponse>(this, message, value);
3885
+ return message;
3886
+ }
3887
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserDocumentsResponse): ListUserDocumentsResponse {
3888
+ let message = target ?? this.create(), end = reader.pos + length;
3889
+ while (reader.pos < end) {
3890
+ let [fieldNo, wireType] = reader.tag();
3891
+ switch (fieldNo) {
3892
+ case /* resources.common.database.PaginationResponse pagination */ 1:
3893
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3894
+ break;
3895
+ case /* repeated resources.documents.DocumentRelation relations */ 2:
3896
+ message.relations.push(DocumentRelation.internalBinaryRead(reader, reader.uint32(), options));
3897
+ break;
3898
+ default:
3899
+ let u = options.readUnknownField;
3900
+ if (u === "throw")
3901
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3902
+ let d = reader.skip(wireType);
3903
+ if (u !== false)
3904
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3905
+ }
3906
+ }
3907
+ return message;
3908
+ }
3909
+ internalBinaryWrite(message: ListUserDocumentsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3910
+ /* resources.common.database.PaginationResponse pagination = 1; */
3911
+ if (message.pagination)
3912
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3913
+ /* repeated resources.documents.DocumentRelation relations = 2; */
3914
+ for (let i = 0; i < message.relations.length; i++)
3915
+ DocumentRelation.internalBinaryWrite(message.relations[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
3916
+ let u = options.writeUnknownFields;
3917
+ if (u !== false)
3918
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3919
+ return writer;
3920
+ }
3921
+ }
3922
+ /**
3923
+ * @generated MessageType for protobuf message services.docstore.ListUserDocumentsResponse
3924
+ */
3925
+ export const ListUserDocumentsResponse = new ListUserDocumentsResponse$Type();
3926
+ // @generated message type with reflection information, may provide speed optimized methods
3927
+ class ListCategoriesRequest$Type extends MessageType<ListCategoriesRequest> {
3928
+ constructor() {
3929
+ super("services.docstore.ListCategoriesRequest", []);
3930
+ }
3931
+ create(value?: PartialMessage<ListCategoriesRequest>): ListCategoriesRequest {
3932
+ const message = globalThis.Object.create((this.messagePrototype!));
3933
+ if (value !== undefined)
3934
+ reflectionMergePartial<ListCategoriesRequest>(this, message, value);
3935
+ return message;
3936
+ }
3937
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCategoriesRequest): ListCategoriesRequest {
3938
+ return target ?? this.create();
3939
+ }
3940
+ internalBinaryWrite(message: ListCategoriesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3941
+ let u = options.writeUnknownFields;
3942
+ if (u !== false)
3943
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3944
+ return writer;
3945
+ }
3946
+ }
3947
+ /**
3948
+ * @generated MessageType for protobuf message services.docstore.ListCategoriesRequest
3949
+ */
3950
+ export const ListCategoriesRequest = new ListCategoriesRequest$Type();
3951
+ // @generated message type with reflection information, may provide speed optimized methods
3952
+ class ListCategoriesResponse$Type extends MessageType<ListCategoriesResponse> {
3953
+ constructor() {
3954
+ super("services.docstore.ListCategoriesResponse", [
3955
+ { no: 1, name: "category", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Category }
3956
+ ]);
3957
+ }
3958
+ create(value?: PartialMessage<ListCategoriesResponse>): ListCategoriesResponse {
3959
+ const message = globalThis.Object.create((this.messagePrototype!));
3960
+ message.category = [];
3961
+ if (value !== undefined)
3962
+ reflectionMergePartial<ListCategoriesResponse>(this, message, value);
3963
+ return message;
3964
+ }
3965
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCategoriesResponse): ListCategoriesResponse {
3966
+ let message = target ?? this.create(), end = reader.pos + length;
3967
+ while (reader.pos < end) {
3968
+ let [fieldNo, wireType] = reader.tag();
3969
+ switch (fieldNo) {
3970
+ case /* repeated resources.documents.Category category */ 1:
3971
+ message.category.push(Category.internalBinaryRead(reader, reader.uint32(), options));
3972
+ break;
3973
+ default:
3974
+ let u = options.readUnknownField;
3975
+ if (u === "throw")
3976
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3977
+ let d = reader.skip(wireType);
3978
+ if (u !== false)
3979
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3980
+ }
3981
+ }
3982
+ return message;
3983
+ }
3984
+ internalBinaryWrite(message: ListCategoriesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3985
+ /* repeated resources.documents.Category category = 1; */
3986
+ for (let i = 0; i < message.category.length; i++)
3987
+ Category.internalBinaryWrite(message.category[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3988
+ let u = options.writeUnknownFields;
3989
+ if (u !== false)
3990
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3991
+ return writer;
3992
+ }
3993
+ }
3994
+ /**
3995
+ * @generated MessageType for protobuf message services.docstore.ListCategoriesResponse
3996
+ */
3997
+ export const ListCategoriesResponse = new ListCategoriesResponse$Type();
3998
+ // @generated message type with reflection information, may provide speed optimized methods
3999
+ class CreateCategoryRequest$Type extends MessageType<CreateCategoryRequest> {
4000
+ constructor() {
4001
+ super("services.docstore.CreateCategoryRequest", [
4002
+ { no: 1, name: "category", kind: "message", T: () => Category, options: { "validate.rules": { message: { required: true } } } }
4003
+ ]);
4004
+ }
4005
+ create(value?: PartialMessage<CreateCategoryRequest>): CreateCategoryRequest {
4006
+ const message = globalThis.Object.create((this.messagePrototype!));
4007
+ if (value !== undefined)
4008
+ reflectionMergePartial<CreateCategoryRequest>(this, message, value);
4009
+ return message;
4010
+ }
4011
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCategoryRequest): CreateCategoryRequest {
4012
+ let message = target ?? this.create(), end = reader.pos + length;
4013
+ while (reader.pos < end) {
4014
+ let [fieldNo, wireType] = reader.tag();
4015
+ switch (fieldNo) {
4016
+ case /* resources.documents.Category category */ 1:
4017
+ message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
4018
+ break;
4019
+ default:
4020
+ let u = options.readUnknownField;
4021
+ if (u === "throw")
4022
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4023
+ let d = reader.skip(wireType);
4024
+ if (u !== false)
4025
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4026
+ }
4027
+ }
4028
+ return message;
4029
+ }
4030
+ internalBinaryWrite(message: CreateCategoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4031
+ /* resources.documents.Category category = 1; */
4032
+ if (message.category)
4033
+ Category.internalBinaryWrite(message.category, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
4034
+ let u = options.writeUnknownFields;
4035
+ if (u !== false)
4036
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4037
+ return writer;
4038
+ }
4039
+ }
4040
+ /**
4041
+ * @generated MessageType for protobuf message services.docstore.CreateCategoryRequest
4042
+ */
4043
+ export const CreateCategoryRequest = new CreateCategoryRequest$Type();
4044
+ // @generated message type with reflection information, may provide speed optimized methods
4045
+ class CreateCategoryResponse$Type extends MessageType<CreateCategoryResponse> {
4046
+ constructor() {
4047
+ super("services.docstore.CreateCategoryResponse", [
4048
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
4049
+ ]);
4050
+ }
4051
+ create(value?: PartialMessage<CreateCategoryResponse>): CreateCategoryResponse {
4052
+ const message = globalThis.Object.create((this.messagePrototype!));
4053
+ message.id = "0";
4054
+ if (value !== undefined)
4055
+ reflectionMergePartial<CreateCategoryResponse>(this, message, value);
4056
+ return message;
4057
+ }
4058
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCategoryResponse): CreateCategoryResponse {
4059
+ let message = target ?? this.create(), end = reader.pos + length;
4060
+ while (reader.pos < end) {
4061
+ let [fieldNo, wireType] = reader.tag();
4062
+ switch (fieldNo) {
4063
+ case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
4064
+ message.id = reader.uint64().toString();
4065
+ break;
4066
+ default:
4067
+ let u = options.readUnknownField;
4068
+ if (u === "throw")
4069
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4070
+ let d = reader.skip(wireType);
4071
+ if (u !== false)
4072
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4073
+ }
4074
+ }
4075
+ return message;
4076
+ }
4077
+ internalBinaryWrite(message: CreateCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4078
+ /* uint64 id = 1 [jstype = JS_STRING]; */
4079
+ if (message.id !== "0")
4080
+ writer.tag(1, WireType.Varint).uint64(message.id);
4081
+ let u = options.writeUnknownFields;
4082
+ if (u !== false)
4083
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4084
+ return writer;
4085
+ }
4086
+ }
4087
+ /**
4088
+ * @generated MessageType for protobuf message services.docstore.CreateCategoryResponse
4089
+ */
4090
+ export const CreateCategoryResponse = new CreateCategoryResponse$Type();
4091
+ // @generated message type with reflection information, may provide speed optimized methods
4092
+ class UpdateCategoryRequest$Type extends MessageType<UpdateCategoryRequest> {
4093
+ constructor() {
4094
+ super("services.docstore.UpdateCategoryRequest", [
4095
+ { no: 1, name: "category", kind: "message", T: () => Category, options: { "validate.rules": { message: { required: true } } } }
4096
+ ]);
4097
+ }
4098
+ create(value?: PartialMessage<UpdateCategoryRequest>): UpdateCategoryRequest {
4099
+ const message = globalThis.Object.create((this.messagePrototype!));
4100
+ if (value !== undefined)
4101
+ reflectionMergePartial<UpdateCategoryRequest>(this, message, value);
4102
+ return message;
4103
+ }
4104
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateCategoryRequest): UpdateCategoryRequest {
4105
+ let message = target ?? this.create(), end = reader.pos + length;
4106
+ while (reader.pos < end) {
4107
+ let [fieldNo, wireType] = reader.tag();
4108
+ switch (fieldNo) {
4109
+ case /* resources.documents.Category category */ 1:
4110
+ message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
4111
+ break;
4112
+ default:
4113
+ let u = options.readUnknownField;
4114
+ if (u === "throw")
4115
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4116
+ let d = reader.skip(wireType);
4117
+ if (u !== false)
4118
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4119
+ }
4120
+ }
4121
+ return message;
4122
+ }
4123
+ internalBinaryWrite(message: UpdateCategoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4124
+ /* resources.documents.Category category = 1; */
4125
+ if (message.category)
4126
+ Category.internalBinaryWrite(message.category, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
4127
+ let u = options.writeUnknownFields;
4128
+ if (u !== false)
4129
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4130
+ return writer;
4131
+ }
4132
+ }
4133
+ /**
4134
+ * @generated MessageType for protobuf message services.docstore.UpdateCategoryRequest
4135
+ */
4136
+ export const UpdateCategoryRequest = new UpdateCategoryRequest$Type();
4137
+ // @generated message type with reflection information, may provide speed optimized methods
4138
+ class UpdateCategoryResponse$Type extends MessageType<UpdateCategoryResponse> {
4139
+ constructor() {
4140
+ super("services.docstore.UpdateCategoryResponse", []);
4141
+ }
4142
+ create(value?: PartialMessage<UpdateCategoryResponse>): UpdateCategoryResponse {
4143
+ const message = globalThis.Object.create((this.messagePrototype!));
4144
+ if (value !== undefined)
4145
+ reflectionMergePartial<UpdateCategoryResponse>(this, message, value);
4146
+ return message;
4147
+ }
4148
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateCategoryResponse): UpdateCategoryResponse {
4149
+ return target ?? this.create();
4150
+ }
4151
+ internalBinaryWrite(message: UpdateCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4152
+ let u = options.writeUnknownFields;
4153
+ if (u !== false)
4154
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4155
+ return writer;
4156
+ }
4157
+ }
4158
+ /**
4159
+ * @generated MessageType for protobuf message services.docstore.UpdateCategoryResponse
4160
+ */
4161
+ export const UpdateCategoryResponse = new UpdateCategoryResponse$Type();
4162
+ // @generated message type with reflection information, may provide speed optimized methods
4163
+ class DeleteCategoryRequest$Type extends MessageType<DeleteCategoryRequest> {
4164
+ constructor() {
4165
+ super("services.docstore.DeleteCategoryRequest", [
4166
+ { no: 1, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/ }
4167
+ ]);
4168
+ }
4169
+ create(value?: PartialMessage<DeleteCategoryRequest>): DeleteCategoryRequest {
4170
+ const message = globalThis.Object.create((this.messagePrototype!));
4171
+ message.ids = [];
4172
+ if (value !== undefined)
4173
+ reflectionMergePartial<DeleteCategoryRequest>(this, message, value);
4174
+ return message;
4175
+ }
4176
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCategoryRequest): DeleteCategoryRequest {
4177
+ let message = target ?? this.create(), end = reader.pos + length;
4178
+ while (reader.pos < end) {
4179
+ let [fieldNo, wireType] = reader.tag();
4180
+ switch (fieldNo) {
4181
+ case /* repeated uint64 ids = 1 [jstype = JS_STRING];*/ 1:
4182
+ if (wireType === WireType.LengthDelimited)
4183
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
4184
+ message.ids.push(reader.uint64().toString());
4185
+ else
4186
+ message.ids.push(reader.uint64().toString());
4187
+ break;
4188
+ default:
4189
+ let u = options.readUnknownField;
4190
+ if (u === "throw")
4191
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4192
+ let d = reader.skip(wireType);
4193
+ if (u !== false)
4194
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4195
+ }
4196
+ }
4197
+ return message;
4198
+ }
4199
+ internalBinaryWrite(message: DeleteCategoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4200
+ /* repeated uint64 ids = 1 [jstype = JS_STRING]; */
4201
+ if (message.ids.length) {
4202
+ writer.tag(1, WireType.LengthDelimited).fork();
4203
+ for (let i = 0; i < message.ids.length; i++)
4204
+ writer.uint64(message.ids[i]);
4205
+ writer.join();
4206
+ }
4207
+ let u = options.writeUnknownFields;
4208
+ if (u !== false)
4209
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4210
+ return writer;
4211
+ }
4212
+ }
4213
+ /**
4214
+ * @generated MessageType for protobuf message services.docstore.DeleteCategoryRequest
4215
+ */
4216
+ export const DeleteCategoryRequest = new DeleteCategoryRequest$Type();
4217
+ // @generated message type with reflection information, may provide speed optimized methods
4218
+ class DeleteCategoryResponse$Type extends MessageType<DeleteCategoryResponse> {
4219
+ constructor() {
4220
+ super("services.docstore.DeleteCategoryResponse", []);
4221
+ }
4222
+ create(value?: PartialMessage<DeleteCategoryResponse>): DeleteCategoryResponse {
4223
+ const message = globalThis.Object.create((this.messagePrototype!));
4224
+ if (value !== undefined)
4225
+ reflectionMergePartial<DeleteCategoryResponse>(this, message, value);
4226
+ return message;
4227
+ }
4228
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCategoryResponse): DeleteCategoryResponse {
4229
+ return target ?? this.create();
4230
+ }
4231
+ internalBinaryWrite(message: DeleteCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4232
+ let u = options.writeUnknownFields;
4233
+ if (u !== false)
4234
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4235
+ return writer;
4236
+ }
4237
+ }
4238
+ /**
4239
+ * @generated MessageType for protobuf message services.docstore.DeleteCategoryResponse
4240
+ */
4241
+ export const DeleteCategoryResponse = new DeleteCategoryResponse$Type();
4242
+ // @generated message type with reflection information, may provide speed optimized methods
4243
+ class ListDocumentPinsRequest$Type extends MessageType<ListDocumentPinsRequest> {
4244
+ constructor() {
4245
+ super("services.docstore.ListDocumentPinsRequest", [
4246
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } }
4247
+ ]);
4248
+ }
4249
+ create(value?: PartialMessage<ListDocumentPinsRequest>): ListDocumentPinsRequest {
4250
+ const message = globalThis.Object.create((this.messagePrototype!));
4251
+ if (value !== undefined)
4252
+ reflectionMergePartial<ListDocumentPinsRequest>(this, message, value);
4253
+ return message;
4254
+ }
4255
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentPinsRequest): ListDocumentPinsRequest {
4256
+ let message = target ?? this.create(), end = reader.pos + length;
4257
+ while (reader.pos < end) {
4258
+ let [fieldNo, wireType] = reader.tag();
4259
+ switch (fieldNo) {
4260
+ case /* resources.common.database.PaginationRequest pagination */ 1:
4261
+ message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
4262
+ break;
4263
+ default:
4264
+ let u = options.readUnknownField;
4265
+ if (u === "throw")
4266
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4267
+ let d = reader.skip(wireType);
4268
+ if (u !== false)
4269
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4270
+ }
4271
+ }
4272
+ return message;
4273
+ }
4274
+ internalBinaryWrite(message: ListDocumentPinsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4275
+ /* resources.common.database.PaginationRequest pagination = 1; */
4276
+ if (message.pagination)
4277
+ PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
4278
+ let u = options.writeUnknownFields;
4279
+ if (u !== false)
4280
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4281
+ return writer;
4282
+ }
4283
+ }
4284
+ /**
4285
+ * @generated MessageType for protobuf message services.docstore.ListDocumentPinsRequest
4286
+ */
4287
+ export const ListDocumentPinsRequest = new ListDocumentPinsRequest$Type();
4288
+ // @generated message type with reflection information, may provide speed optimized methods
4289
+ class ListDocumentPinsResponse$Type extends MessageType<ListDocumentPinsResponse> {
4290
+ constructor() {
4291
+ super("services.docstore.ListDocumentPinsResponse", [
4292
+ { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
4293
+ { no: 2, name: "documents", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DocumentShort }
4294
+ ]);
4295
+ }
4296
+ create(value?: PartialMessage<ListDocumentPinsResponse>): ListDocumentPinsResponse {
4297
+ const message = globalThis.Object.create((this.messagePrototype!));
4298
+ message.documents = [];
4299
+ if (value !== undefined)
4300
+ reflectionMergePartial<ListDocumentPinsResponse>(this, message, value);
4301
+ return message;
4302
+ }
4303
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDocumentPinsResponse): ListDocumentPinsResponse {
4304
+ let message = target ?? this.create(), end = reader.pos + length;
4305
+ while (reader.pos < end) {
4306
+ let [fieldNo, wireType] = reader.tag();
4307
+ switch (fieldNo) {
4308
+ case /* resources.common.database.PaginationResponse pagination */ 1:
4309
+ message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
4310
+ break;
4311
+ case /* repeated resources.documents.DocumentShort documents */ 2:
4312
+ message.documents.push(DocumentShort.internalBinaryRead(reader, reader.uint32(), options));
4313
+ break;
4314
+ default:
4315
+ let u = options.readUnknownField;
4316
+ if (u === "throw")
4317
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4318
+ let d = reader.skip(wireType);
4319
+ if (u !== false)
4320
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4321
+ }
4322
+ }
4323
+ return message;
4324
+ }
4325
+ internalBinaryWrite(message: ListDocumentPinsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4326
+ /* resources.common.database.PaginationResponse pagination = 1; */
4327
+ if (message.pagination)
4328
+ PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
4329
+ /* repeated resources.documents.DocumentShort documents = 2; */
4330
+ for (let i = 0; i < message.documents.length; i++)
4331
+ DocumentShort.internalBinaryWrite(message.documents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4332
+ let u = options.writeUnknownFields;
4333
+ if (u !== false)
4334
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4335
+ return writer;
4336
+ }
4337
+ }
4338
+ /**
4339
+ * @generated MessageType for protobuf message services.docstore.ListDocumentPinsResponse
4340
+ */
4341
+ export const ListDocumentPinsResponse = new ListDocumentPinsResponse$Type();
4342
+ // @generated message type with reflection information, may provide speed optimized methods
4343
+ class ToggleDocumentPinRequest$Type extends MessageType<ToggleDocumentPinRequest> {
4344
+ constructor() {
4345
+ super("services.docstore.ToggleDocumentPinRequest", [
4346
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
4347
+ { no: 2, name: "state", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
4348
+ ]);
4349
+ }
4350
+ create(value?: PartialMessage<ToggleDocumentPinRequest>): ToggleDocumentPinRequest {
4351
+ const message = globalThis.Object.create((this.messagePrototype!));
4352
+ message.documentId = "0";
4353
+ message.state = false;
4354
+ if (value !== undefined)
4355
+ reflectionMergePartial<ToggleDocumentPinRequest>(this, message, value);
4356
+ return message;
4357
+ }
4358
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDocumentPinRequest): ToggleDocumentPinRequest {
4359
+ let message = target ?? this.create(), end = reader.pos + length;
4360
+ while (reader.pos < end) {
4361
+ let [fieldNo, wireType] = reader.tag();
4362
+ switch (fieldNo) {
4363
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
4364
+ message.documentId = reader.uint64().toString();
4365
+ break;
4366
+ case /* bool state */ 2:
4367
+ message.state = reader.bool();
4368
+ break;
4369
+ default:
4370
+ let u = options.readUnknownField;
4371
+ if (u === "throw")
4372
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4373
+ let d = reader.skip(wireType);
4374
+ if (u !== false)
4375
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4376
+ }
4377
+ }
4378
+ return message;
4379
+ }
4380
+ internalBinaryWrite(message: ToggleDocumentPinRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4381
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
4382
+ if (message.documentId !== "0")
4383
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
4384
+ /* bool state = 2; */
4385
+ if (message.state !== false)
4386
+ writer.tag(2, WireType.Varint).bool(message.state);
4387
+ let u = options.writeUnknownFields;
4388
+ if (u !== false)
4389
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4390
+ return writer;
4391
+ }
4392
+ }
4393
+ /**
4394
+ * @generated MessageType for protobuf message services.docstore.ToggleDocumentPinRequest
4395
+ */
4396
+ export const ToggleDocumentPinRequest = new ToggleDocumentPinRequest$Type();
4397
+ // @generated message type with reflection information, may provide speed optimized methods
4398
+ class ToggleDocumentPinResponse$Type extends MessageType<ToggleDocumentPinResponse> {
4399
+ constructor() {
4400
+ super("services.docstore.ToggleDocumentPinResponse", [
4401
+ { no: 1, name: "state", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
4402
+ ]);
4403
+ }
4404
+ create(value?: PartialMessage<ToggleDocumentPinResponse>): ToggleDocumentPinResponse {
4405
+ const message = globalThis.Object.create((this.messagePrototype!));
4406
+ message.state = false;
4407
+ if (value !== undefined)
4408
+ reflectionMergePartial<ToggleDocumentPinResponse>(this, message, value);
4409
+ return message;
4410
+ }
4411
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDocumentPinResponse): ToggleDocumentPinResponse {
4412
+ let message = target ?? this.create(), end = reader.pos + length;
4413
+ while (reader.pos < end) {
4414
+ let [fieldNo, wireType] = reader.tag();
4415
+ switch (fieldNo) {
4416
+ case /* bool state */ 1:
4417
+ message.state = reader.bool();
4418
+ break;
4419
+ default:
4420
+ let u = options.readUnknownField;
4421
+ if (u === "throw")
4422
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4423
+ let d = reader.skip(wireType);
4424
+ if (u !== false)
4425
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4426
+ }
4427
+ }
4428
+ return message;
4429
+ }
4430
+ internalBinaryWrite(message: ToggleDocumentPinResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4431
+ /* bool state = 1; */
4432
+ if (message.state !== false)
4433
+ writer.tag(1, WireType.Varint).bool(message.state);
4434
+ let u = options.writeUnknownFields;
4435
+ if (u !== false)
4436
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4437
+ return writer;
4438
+ }
4439
+ }
4440
+ /**
4441
+ * @generated MessageType for protobuf message services.docstore.ToggleDocumentPinResponse
4442
+ */
4443
+ export const ToggleDocumentPinResponse = new ToggleDocumentPinResponse$Type();
4444
+ // @generated message type with reflection information, may provide speed optimized methods
4445
+ class SetDocumentReminderRequest$Type extends MessageType<SetDocumentReminderRequest> {
4446
+ constructor() {
4447
+ super("services.docstore.SetDocumentReminderRequest", [
4448
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
4449
+ { no: 2, name: "reminder_time", kind: "message", T: () => Timestamp },
4450
+ { no: 3, name: "message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "1024" } } } }
4451
+ ]);
4452
+ }
4453
+ create(value?: PartialMessage<SetDocumentReminderRequest>): SetDocumentReminderRequest {
4454
+ const message = globalThis.Object.create((this.messagePrototype!));
4455
+ message.documentId = "0";
4456
+ if (value !== undefined)
4457
+ reflectionMergePartial<SetDocumentReminderRequest>(this, message, value);
4458
+ return message;
4459
+ }
4460
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentReminderRequest): SetDocumentReminderRequest {
4461
+ let message = target ?? this.create(), end = reader.pos + length;
4462
+ while (reader.pos < end) {
4463
+ let [fieldNo, wireType] = reader.tag();
4464
+ switch (fieldNo) {
4465
+ case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
4466
+ message.documentId = reader.uint64().toString();
4467
+ break;
4468
+ case /* optional resources.timestamp.Timestamp reminder_time */ 2:
4469
+ message.reminderTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.reminderTime);
4470
+ break;
4471
+ case /* optional string message */ 3:
4472
+ message.message = reader.string();
4473
+ break;
4474
+ default:
4475
+ let u = options.readUnknownField;
4476
+ if (u === "throw")
4477
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4478
+ let d = reader.skip(wireType);
4479
+ if (u !== false)
4480
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4481
+ }
4482
+ }
4483
+ return message;
4484
+ }
4485
+ internalBinaryWrite(message: SetDocumentReminderRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4486
+ /* uint64 document_id = 1 [jstype = JS_STRING]; */
4487
+ if (message.documentId !== "0")
4488
+ writer.tag(1, WireType.Varint).uint64(message.documentId);
4489
+ /* optional resources.timestamp.Timestamp reminder_time = 2; */
4490
+ if (message.reminderTime)
4491
+ Timestamp.internalBinaryWrite(message.reminderTime, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
4492
+ /* optional string message = 3; */
4493
+ if (message.message !== undefined)
4494
+ writer.tag(3, WireType.LengthDelimited).string(message.message);
4495
+ let u = options.writeUnknownFields;
4496
+ if (u !== false)
4497
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4498
+ return writer;
4499
+ }
4500
+ }
4501
+ /**
4502
+ * @generated MessageType for protobuf message services.docstore.SetDocumentReminderRequest
4503
+ */
4504
+ export const SetDocumentReminderRequest = new SetDocumentReminderRequest$Type();
4505
+ // @generated message type with reflection information, may provide speed optimized methods
4506
+ class SetDocumentReminderResponse$Type extends MessageType<SetDocumentReminderResponse> {
4507
+ constructor() {
4508
+ super("services.docstore.SetDocumentReminderResponse", []);
4509
+ }
4510
+ create(value?: PartialMessage<SetDocumentReminderResponse>): SetDocumentReminderResponse {
4511
+ const message = globalThis.Object.create((this.messagePrototype!));
4512
+ if (value !== undefined)
4513
+ reflectionMergePartial<SetDocumentReminderResponse>(this, message, value);
4514
+ return message;
4515
+ }
4516
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentReminderResponse): SetDocumentReminderResponse {
4517
+ return target ?? this.create();
4518
+ }
4519
+ internalBinaryWrite(message: SetDocumentReminderResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4520
+ let u = options.writeUnknownFields;
4521
+ if (u !== false)
4522
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
4523
+ return writer;
4524
+ }
4525
+ }
4526
+ /**
4527
+ * @generated MessageType for protobuf message services.docstore.SetDocumentReminderResponse
4528
+ */
4529
+ export const SetDocumentReminderResponse = new SetDocumentReminderResponse$Type();
4530
+ /**
4531
+ * @generated ServiceType for protobuf service services.docstore.DocStoreService
4532
+ */
4533
+ export const DocStoreService = new ServiceType("services.docstore.DocStoreService", [
4534
+ { name: "ListTemplates", options: {}, I: ListTemplatesRequest, O: ListTemplatesResponse },
4535
+ { name: "GetTemplate", options: {}, I: GetTemplateRequest, O: GetTemplateResponse },
4536
+ { name: "CreateTemplate", options: {}, I: CreateTemplateRequest, O: CreateTemplateResponse },
4537
+ { name: "UpdateTemplate", options: {}, I: UpdateTemplateRequest, O: UpdateTemplateResponse },
4538
+ { name: "DeleteTemplate", options: {}, I: DeleteTemplateRequest, O: DeleteTemplateResponse },
4539
+ { name: "ListDocuments", options: {}, I: ListDocumentsRequest, O: ListDocumentsResponse },
4540
+ { name: "GetDocument", options: {}, I: GetDocumentRequest, O: GetDocumentResponse },
4541
+ { name: "CreateDocument", options: {}, I: CreateDocumentRequest, O: CreateDocumentResponse },
4542
+ { name: "UpdateDocument", options: {}, I: UpdateDocumentRequest, O: UpdateDocumentResponse },
4543
+ { name: "DeleteDocument", options: {}, I: DeleteDocumentRequest, O: DeleteDocumentResponse },
4544
+ { name: "ToggleDocument", options: {}, I: ToggleDocumentRequest, O: ToggleDocumentResponse },
4545
+ { name: "ChangeDocumentOwner", options: {}, I: ChangeDocumentOwnerRequest, O: ChangeDocumentOwnerResponse },
4546
+ { name: "GetDocumentReferences", options: {}, I: GetDocumentReferencesRequest, O: GetDocumentReferencesResponse },
4547
+ { name: "GetDocumentRelations", options: {}, I: GetDocumentRelationsRequest, O: GetDocumentRelationsResponse },
4548
+ { name: "AddDocumentReference", options: {}, I: AddDocumentReferenceRequest, O: AddDocumentReferenceResponse },
4549
+ { name: "RemoveDocumentReference", options: {}, I: RemoveDocumentReferenceRequest, O: RemoveDocumentReferenceResponse },
4550
+ { name: "AddDocumentRelation", options: {}, I: AddDocumentRelationRequest, O: AddDocumentRelationResponse },
4551
+ { name: "RemoveDocumentRelation", options: {}, I: RemoveDocumentRelationRequest, O: RemoveDocumentRelationResponse },
4552
+ { name: "GetComments", options: {}, I: GetCommentsRequest, O: GetCommentsResponse },
4553
+ { name: "PostComment", options: {}, I: PostCommentRequest, O: PostCommentResponse },
4554
+ { name: "EditComment", options: {}, I: EditCommentRequest, O: EditCommentResponse },
4555
+ { name: "DeleteComment", options: {}, I: DeleteCommentRequest, O: DeleteCommentResponse },
4556
+ { name: "GetDocumentAccess", options: {}, I: GetDocumentAccessRequest, O: GetDocumentAccessResponse },
4557
+ { name: "SetDocumentAccess", options: {}, I: SetDocumentAccessRequest, O: SetDocumentAccessResponse },
4558
+ { name: "ListDocumentActivity", options: {}, I: ListDocumentActivityRequest, O: ListDocumentActivityResponse },
4559
+ { name: "ListDocumentReqs", options: {}, I: ListDocumentReqsRequest, O: ListDocumentReqsResponse },
4560
+ { name: "CreateDocumentReq", options: {}, I: CreateDocumentReqRequest, O: CreateDocumentReqResponse },
4561
+ { name: "UpdateDocumentReq", options: {}, I: UpdateDocumentReqRequest, O: UpdateDocumentReqResponse },
4562
+ { name: "DeleteDocumentReq", options: {}, I: DeleteDocumentReqRequest, O: DeleteDocumentReqResponse },
4563
+ { name: "ListUserDocuments", options: {}, I: ListUserDocumentsRequest, O: ListUserDocumentsResponse },
4564
+ { name: "ListCategories", options: {}, I: ListCategoriesRequest, O: ListCategoriesResponse },
4565
+ { name: "CreateCategory", options: {}, I: CreateCategoryRequest, O: CreateCategoryResponse },
4566
+ { name: "UpdateCategory", options: {}, I: UpdateCategoryRequest, O: UpdateCategoryResponse },
4567
+ { name: "DeleteCategory", options: {}, I: DeleteCategoryRequest, O: DeleteCategoryResponse },
4568
+ { name: "ListDocumentPins", options: {}, I: ListDocumentPinsRequest, O: ListDocumentPinsResponse },
4569
+ { name: "ToggleDocumentPin", options: {}, I: ToggleDocumentPinRequest, O: ToggleDocumentPinResponse },
4570
+ { name: "SetDocumentReminder", options: {}, I: SetDocumentReminderRequest, O: SetDocumentReminderResponse }
4571
+ ]);