@fivenet-app/gen 0.9.3 → 0.9.5-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/clients.ts +150 -0
  2. package/google/protobuf/any.ts +10 -6
  3. package/google/protobuf/descriptor.ts +1255 -76
  4. package/google/protobuf/duration.ts +1 -2
  5. package/google/protobuf/timestamp.ts +3 -6
  6. package/package.json +5 -1
  7. package/perms.ts +9 -1
  8. package/resources/accounts/accounts.ts +9 -9
  9. package/resources/accounts/oauth2.ts +17 -17
  10. package/resources/calendar/access.ts +33 -33
  11. package/resources/calendar/calendar.ts +51 -49
  12. package/resources/centrum/access.ts +57 -42
  13. package/resources/centrum/attributes.ts +182 -0
  14. package/resources/centrum/dispatches.ts +73 -71
  15. package/resources/centrum/disponents.ts +81 -0
  16. package/resources/centrum/settings.ts +5 -1
  17. package/resources/centrum/units.ts +49 -49
  18. package/resources/centrum/user_unit.ts +104 -0
  19. package/resources/common/content/content.ts +47 -26
  20. package/resources/common/cron/cron.ts +37 -1
  21. package/resources/common/database/database.ts +37 -19
  22. package/resources/common/error.ts +1 -1
  23. package/resources/common/grpcws/grpcws.ts +59 -33
  24. package/resources/common/i18n.ts +4 -1
  25. package/resources/common/tests/objects.ts +82 -0
  26. package/resources/common/uuid.ts +1 -1
  27. package/resources/documents/access.ts +37 -35
  28. package/resources/documents/activity.ts +19 -17
  29. package/resources/documents/category.ts +9 -9
  30. package/resources/documents/comment.ts +17 -17
  31. package/resources/documents/documents.ts +89 -89
  32. package/resources/documents/requests.ts +17 -17
  33. package/resources/documents/templates.ts +50 -35
  34. package/resources/documents/workflow.ts +3 -1
  35. package/resources/filestore/file.ts +1 -1
  36. package/resources/internet/access.ts +358 -0
  37. package/resources/internet/ads.ts +9 -9
  38. package/resources/internet/domain.ts +216 -24
  39. package/resources/internet/page.ts +215 -23
  40. package/resources/internet/search.ts +42 -18
  41. package/resources/jobs/activity.ts +11 -9
  42. package/resources/jobs/colleagues.ts +1 -1
  43. package/resources/jobs/conduct.ts +9 -9
  44. package/resources/jobs/labels.ts +9 -9
  45. package/resources/jobs/timeclock.ts +7 -3
  46. package/resources/laws/laws.ts +25 -25
  47. package/resources/livemap/livemap.ts +314 -295
  48. package/resources/livemap/tracker.ts +1 -1
  49. package/resources/mailer/access.ts +57 -57
  50. package/resources/mailer/email.ts +9 -9
  51. package/resources/mailer/events.ts +19 -19
  52. package/resources/mailer/message.ts +151 -45
  53. package/resources/mailer/settings.ts +9 -9
  54. package/resources/mailer/template.ts +17 -17
  55. package/resources/mailer/thread.ts +57 -57
  56. package/resources/notifications/events.ts +112 -3
  57. package/resources/notifications/notifications.ts +23 -21
  58. package/resources/permissions/permissions.ts +67 -65
  59. package/resources/qualifications/access.ts +33 -24
  60. package/resources/qualifications/exam.ts +226 -44
  61. package/resources/qualifications/qualifications.ts +99 -71
  62. package/resources/rector/audit.ts +17 -17
  63. package/resources/rector/banner.ts +133 -0
  64. package/resources/rector/config.ts +84 -17
  65. package/resources/stats/stats.ts +1 -1
  66. package/resources/sync/activity.ts +93 -15
  67. package/resources/sync/data.ts +143 -11
  68. package/resources/timestamp/timestamp.ts +1 -1
  69. package/resources/users/activity.ts +995 -37
  70. package/resources/users/job_props.ts +6 -709
  71. package/resources/users/job_settings.ts +765 -0
  72. package/resources/users/jobs.ts +1 -1
  73. package/resources/users/labels.ts +11 -9
  74. package/resources/users/licenses.ts +148 -0
  75. package/resources/users/props.ts +1 -1
  76. package/resources/users/users.ts +2 -137
  77. package/resources/vehicles/vehicles.ts +38 -5
  78. package/resources/wiki/access.ts +34 -38
  79. package/resources/wiki/activity.ts +19 -17
  80. package/resources/wiki/page.ts +29 -29
  81. package/services/auth/auth.client.ts +7 -1
  82. package/services/auth/auth.ts +110 -33
  83. package/services/calendar/calendar.client.ts +1 -1
  84. package/services/calendar/calendar.ts +98 -59
  85. package/services/centrum/centrum.client.ts +1 -1
  86. package/services/centrum/centrum.ts +268 -125
  87. package/services/citizenstore/citizenstore.client.ts +1 -1
  88. package/services/citizenstore/citizenstore.ts +25 -2
  89. package/services/completor/completor.client.ts +1 -1
  90. package/services/completor/completor.ts +15 -2
  91. package/services/dmv/vehicles.client.ts +1 -1
  92. package/services/dmv/vehicles.ts +13 -2
  93. package/services/docstore/docstore.client.ts +1 -1
  94. package/services/docstore/docstore.ts +491 -296
  95. package/services/internet/ads.client.ts +1 -1
  96. package/services/internet/ads.ts +1 -1
  97. package/services/internet/domain.client.ts +109 -0
  98. package/services/internet/domain.ts +658 -0
  99. package/services/internet/internet.client.ts +1 -1
  100. package/services/internet/internet.ts +15 -4
  101. package/services/jobs/conduct.client.ts +1 -1
  102. package/services/jobs/conduct.ts +30 -17
  103. package/services/jobs/jobs.client.ts +1 -1
  104. package/services/jobs/jobs.ts +43 -17
  105. package/services/jobs/timeclock.client.ts +1 -1
  106. package/services/jobs/timeclock.ts +20 -20
  107. package/services/livemapper/livemap.client.ts +1 -1
  108. package/services/livemapper/livemap.ts +137 -35
  109. package/services/mailer/mailer.client.ts +1 -1
  110. package/services/mailer/mailer.ts +216 -164
  111. package/services/notificator/notificator.client.ts +1 -1
  112. package/services/notificator/notificator.ts +30 -17
  113. package/services/qualifications/qualifications.client.ts +3 -3
  114. package/services/qualifications/qualifications.ts +190 -115
  115. package/services/rector/config.client.ts +1 -1
  116. package/services/rector/config.ts +16 -3
  117. package/services/rector/filestore.client.ts +1 -1
  118. package/services/rector/filestore.ts +15 -2
  119. package/services/rector/laws.client.ts +1 -1
  120. package/services/rector/laws.ts +45 -19
  121. package/services/rector/rector.client.ts +1 -1
  122. package/services/rector/rector.ts +135 -70
  123. package/services/stats/stats.client.ts +1 -1
  124. package/services/stats/stats.ts +16 -3
  125. package/services/sync/sync.client.ts +43 -3
  126. package/services/sync/sync.ts +301 -34
  127. package/services/wiki/wiki.client.ts +1 -1
  128. package/services/wiki/wiki.ts +39 -26
  129. package/svcs.ts +17 -1
  130. package/resources/centrum/general.ts +0 -231
  131. package/resources/common/access/dummy.ts +0 -309
  132. package/resources/internet/internet.ts +0 -344
  133. package/resources/mailer/user.ts +0 -93
@@ -1,13 +1,13 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
2
2
  // @generated from protobuf file "services/docstore/docstore.proto" (package "services.docstore", syntax proto3)
3
3
  // @ts-nocheck
4
4
  import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
5
  import { WireType } from "@protobuf-ts/runtime";
6
6
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
7
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
9
8
  import type { BinaryReadOptions } from "@protobuf-ts/runtime";
10
9
  import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
@@ -53,9 +53,9 @@ export interface ListTemplatesResponse {
53
53
  */
54
54
  export interface GetTemplateRequest {
55
55
  /**
56
- * @generated from protobuf field: uint64 template_id = 1 [jstype = JS_STRING];
56
+ * @generated from protobuf field: uint64 template_id = 1;
57
57
  */
58
- templateId: string;
58
+ templateId: number;
59
59
  /**
60
60
  * @generated from protobuf field: optional resources.documents.TemplateData data = 2;
61
61
  */
@@ -92,9 +92,9 @@ export interface CreateTemplateRequest {
92
92
  */
93
93
  export interface CreateTemplateResponse {
94
94
  /**
95
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
95
+ * @generated from protobuf field: uint64 id = 1;
96
96
  */
97
- id: string;
97
+ id: number;
98
98
  }
99
99
  /**
100
100
  * @generated from protobuf message services.docstore.UpdateTemplateRequest
@@ -119,9 +119,9 @@ export interface UpdateTemplateResponse {
119
119
  */
120
120
  export interface DeleteTemplateRequest {
121
121
  /**
122
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
122
+ * @generated from protobuf field: uint64 id = 1;
123
123
  */
124
- id: string;
124
+ id: number;
125
125
  }
126
126
  /**
127
127
  * @generated from protobuf message services.docstore.DeleteTemplateResponse
@@ -149,9 +149,9 @@ export interface ListDocumentsRequest {
149
149
  */
150
150
  search?: string;
151
151
  /**
152
- * @generated from protobuf field: repeated uint64 category_ids = 4 [jstype = JS_STRING];
152
+ * @generated from protobuf field: repeated uint64 category_ids = 4;
153
153
  */
154
- categoryIds: string[];
154
+ categoryIds: number[];
155
155
  /**
156
156
  * @generated from protobuf field: repeated int32 creator_ids = 5;
157
157
  */
@@ -169,9 +169,9 @@ export interface ListDocumentsRequest {
169
169
  */
170
170
  closed?: boolean;
171
171
  /**
172
- * @generated from protobuf field: repeated uint64 document_ids = 9 [jstype = JS_STRING];
172
+ * @generated from protobuf field: repeated uint64 document_ids = 9;
173
173
  */
174
- documentIds: string[];
174
+ documentIds: number[];
175
175
  }
176
176
  /**
177
177
  * @generated from protobuf message services.docstore.ListDocumentsResponse
@@ -191,9 +191,9 @@ export interface ListDocumentsResponse {
191
191
  */
192
192
  export interface GetDocumentRequest {
193
193
  /**
194
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
194
+ * @generated from protobuf field: uint64 document_id = 1;
195
195
  */
196
- documentId: string;
196
+ documentId: number;
197
197
  /**
198
198
  * @generated from protobuf field: optional bool info_only = 2;
199
199
  */
@@ -217,9 +217,9 @@ export interface GetDocumentResponse {
217
217
  */
218
218
  export interface GetDocumentReferencesRequest {
219
219
  /**
220
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
220
+ * @generated from protobuf field: uint64 document_id = 1;
221
221
  */
222
- documentId: string;
222
+ documentId: number;
223
223
  }
224
224
  /**
225
225
  * @generated from protobuf message services.docstore.GetDocumentReferencesResponse
@@ -235,9 +235,9 @@ export interface GetDocumentReferencesResponse {
235
235
  */
236
236
  export interface GetDocumentRelationsRequest {
237
237
  /**
238
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
238
+ * @generated from protobuf field: uint64 document_id = 1;
239
239
  */
240
- documentId: string;
240
+ documentId: number;
241
241
  }
242
242
  /**
243
243
  * @generated from protobuf message services.docstore.GetDocumentRelationsResponse
@@ -262,18 +262,18 @@ export interface AddDocumentReferenceRequest {
262
262
  */
263
263
  export interface AddDocumentReferenceResponse {
264
264
  /**
265
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
265
+ * @generated from protobuf field: uint64 id = 1;
266
266
  */
267
- id: string;
267
+ id: number;
268
268
  }
269
269
  /**
270
270
  * @generated from protobuf message services.docstore.RemoveDocumentReferenceRequest
271
271
  */
272
272
  export interface RemoveDocumentReferenceRequest {
273
273
  /**
274
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
274
+ * @generated from protobuf field: uint64 id = 1;
275
275
  */
276
- id: string;
276
+ id: number;
277
277
  }
278
278
  /**
279
279
  * @generated from protobuf message services.docstore.RemoveDocumentReferenceResponse
@@ -294,18 +294,18 @@ export interface AddDocumentRelationRequest {
294
294
  */
295
295
  export interface AddDocumentRelationResponse {
296
296
  /**
297
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
297
+ * @generated from protobuf field: uint64 id = 1;
298
298
  */
299
- id: string;
299
+ id: number;
300
300
  }
301
301
  /**
302
302
  * @generated from protobuf message services.docstore.RemoveDocumentRelationRequest
303
303
  */
304
304
  export interface RemoveDocumentRelationRequest {
305
305
  /**
306
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
306
+ * @generated from protobuf field: uint64 id = 1;
307
307
  */
308
- id: string;
308
+ id: number;
309
309
  }
310
310
  /**
311
311
  * @generated from protobuf message services.docstore.RemoveDocumentRelationResponse
@@ -323,9 +323,9 @@ export interface GetCommentsRequest {
323
323
  */
324
324
  pagination?: PaginationRequest;
325
325
  /**
326
- * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
326
+ * @generated from protobuf field: uint64 document_id = 2;
327
327
  */
328
- documentId: string;
328
+ documentId: number;
329
329
  }
330
330
  /**
331
331
  * @generated from protobuf message services.docstore.GetCommentsResponse
@@ -381,9 +381,9 @@ export interface EditCommentResponse {
381
381
  */
382
382
  export interface DeleteCommentRequest {
383
383
  /**
384
- * @generated from protobuf field: uint64 comment_id = 1 [jstype = JS_STRING];
384
+ * @generated from protobuf field: uint64 comment_id = 1;
385
385
  */
386
- commentId: string;
386
+ commentId: number;
387
387
  }
388
388
  /**
389
389
  * @generated from protobuf message services.docstore.DeleteCommentResponse
@@ -395,18 +395,24 @@ export interface DeleteCommentResponse {
395
395
  */
396
396
  export interface UpdateDocumentResponse {
397
397
  /**
398
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
398
+ * @generated from protobuf field: uint64 document_id = 1;
399
399
  */
400
- documentId: string; // @gotags: alias:"id"
400
+ documentId: number; // @gotags: alias:"id"
401
401
  }
402
402
  /**
403
403
  * @generated from protobuf message services.docstore.DeleteDocumentRequest
404
404
  */
405
405
  export interface DeleteDocumentRequest {
406
406
  /**
407
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
407
+ * @generated from protobuf field: uint64 document_id = 1;
408
408
  */
409
- documentId: string; // @gotags: alias:"id"
409
+ documentId: number; // @gotags: alias:"id"
410
+ /**
411
+ * @sanitize: method=StripTags
412
+ *
413
+ * @generated from protobuf field: optional string reason = 2;
414
+ */
415
+ reason?: string;
410
416
  }
411
417
  /**
412
418
  * @generated from protobuf message services.docstore.DeleteDocumentResponse
@@ -418,9 +424,9 @@ export interface DeleteDocumentResponse {
418
424
  */
419
425
  export interface ToggleDocumentRequest {
420
426
  /**
421
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
427
+ * @generated from protobuf field: uint64 document_id = 1;
422
428
  */
423
- documentId: string;
429
+ documentId: number;
424
430
  /**
425
431
  * @generated from protobuf field: bool closed = 2;
426
432
  */
@@ -436,9 +442,9 @@ export interface ToggleDocumentResponse {
436
442
  */
437
443
  export interface ChangeDocumentOwnerRequest {
438
444
  /**
439
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
445
+ * @generated from protobuf field: uint64 document_id = 1;
440
446
  */
441
- documentId: string;
447
+ documentId: number;
442
448
  /**
443
449
  * @generated from protobuf field: optional int32 new_user_id = 2;
444
450
  */
@@ -454,9 +460,9 @@ export interface ChangeDocumentOwnerResponse {
454
460
  */
455
461
  export interface CreateDocumentRequest {
456
462
  /**
457
- * @generated from protobuf field: optional uint64 category_id = 1 [jstype = JS_STRING];
463
+ * @generated from protobuf field: optional uint64 category_id = 1;
458
464
  */
459
- categoryId?: string; // @gotags: alias:"category_id"
465
+ categoryId?: number; // @gotags: alias:"category_id"
460
466
  /**
461
467
  * @sanitize: method=StripTags
462
468
  *
@@ -496,31 +502,31 @@ export interface CreateDocumentRequest {
496
502
  */
497
503
  access?: DocumentAccess;
498
504
  /**
499
- * @generated from protobuf field: optional uint64 template_id = 10 [jstype = JS_STRING];
505
+ * @generated from protobuf field: optional uint64 template_id = 10;
500
506
  */
501
- templateId?: string;
507
+ templateId?: number;
502
508
  }
503
509
  /**
504
510
  * @generated from protobuf message services.docstore.CreateDocumentResponse
505
511
  */
506
512
  export interface CreateDocumentResponse {
507
513
  /**
508
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
514
+ * @generated from protobuf field: uint64 document_id = 1;
509
515
  */
510
- documentId: string; // @gotags: alias:"id"
516
+ documentId: number; // @gotags: alias:"id"
511
517
  }
512
518
  /**
513
519
  * @generated from protobuf message services.docstore.UpdateDocumentRequest
514
520
  */
515
521
  export interface UpdateDocumentRequest {
516
522
  /**
517
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
523
+ * @generated from protobuf field: uint64 document_id = 1;
518
524
  */
519
- documentId: string; // @gotags: alias:"id"
525
+ documentId: number; // @gotags: alias:"id"
520
526
  /**
521
- * @generated from protobuf field: optional uint64 category_id = 2 [jstype = JS_STRING];
527
+ * @generated from protobuf field: optional uint64 category_id = 2;
522
528
  */
523
- categoryId?: string; // @gotags: alias:"category_id"
529
+ categoryId?: number; // @gotags: alias:"category_id"
524
530
  /**
525
531
  * @sanitize: method=StripTags
526
532
  *
@@ -571,9 +577,9 @@ export interface ListDocumentActivityRequest {
571
577
  */
572
578
  pagination?: PaginationRequest;
573
579
  /**
574
- * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
580
+ * @generated from protobuf field: uint64 document_id = 2;
575
581
  */
576
- documentId: string;
582
+ documentId: number;
577
583
  /**
578
584
  * Search params
579
585
  *
@@ -603,9 +609,9 @@ export interface ListDocumentReqsRequest {
603
609
  */
604
610
  pagination?: PaginationRequest;
605
611
  /**
606
- * @generated from protobuf field: uint64 document_id = 2 [jstype = JS_STRING];
612
+ * @generated from protobuf field: uint64 document_id = 2;
607
613
  */
608
- documentId: string;
614
+ documentId: number;
609
615
  }
610
616
  /**
611
617
  * @generated from protobuf message services.docstore.ListDocumentReqsResponse
@@ -625,9 +631,9 @@ export interface ListDocumentReqsResponse {
625
631
  */
626
632
  export interface CreateDocumentReqRequest {
627
633
  /**
628
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
634
+ * @generated from protobuf field: uint64 document_id = 1;
629
635
  */
630
- documentId: string;
636
+ documentId: number;
631
637
  /**
632
638
  * @generated from protobuf field: resources.documents.DocActivityType request_type = 2;
633
639
  */
@@ -657,13 +663,13 @@ export interface CreateDocumentReqResponse {
657
663
  */
658
664
  export interface UpdateDocumentReqRequest {
659
665
  /**
660
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
666
+ * @generated from protobuf field: uint64 document_id = 1;
661
667
  */
662
- documentId: string;
668
+ documentId: number;
663
669
  /**
664
- * @generated from protobuf field: uint64 request_id = 2 [jstype = JS_STRING];
670
+ * @generated from protobuf field: uint64 request_id = 2;
665
671
  */
666
- requestId: string;
672
+ requestId: number;
667
673
  /**
668
674
  * @sanitize
669
675
  *
@@ -693,9 +699,9 @@ export interface UpdateDocumentReqResponse {
693
699
  */
694
700
  export interface DeleteDocumentReqRequest {
695
701
  /**
696
- * @generated from protobuf field: uint64 request_id = 1 [jstype = JS_STRING];
702
+ * @generated from protobuf field: uint64 request_id = 1;
697
703
  */
698
- requestId: string;
704
+ requestId: number;
699
705
  }
700
706
  /**
701
707
  * @generated from protobuf message services.docstore.DeleteDocumentReqResponse
@@ -709,9 +715,9 @@ export interface DeleteDocumentReqResponse {
709
715
  */
710
716
  export interface GetDocumentAccessRequest {
711
717
  /**
712
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
718
+ * @generated from protobuf field: uint64 document_id = 1;
713
719
  */
714
- documentId: string;
720
+ documentId: number;
715
721
  }
716
722
  /**
717
723
  * @generated from protobuf message services.docstore.GetDocumentAccessResponse
@@ -727,9 +733,9 @@ export interface GetDocumentAccessResponse {
727
733
  */
728
734
  export interface SetDocumentAccessRequest {
729
735
  /**
730
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
736
+ * @generated from protobuf field: uint64 document_id = 1;
731
737
  */
732
- documentId: string;
738
+ documentId: number;
733
739
  /**
734
740
  * @generated from protobuf field: resources.documents.DocumentAccess access = 2;
735
741
  */
@@ -786,9 +792,9 @@ export interface ListCategoriesRequest {
786
792
  */
787
793
  export interface ListCategoriesResponse {
788
794
  /**
789
- * @generated from protobuf field: repeated resources.documents.Category category = 1;
795
+ * @generated from protobuf field: repeated resources.documents.Category categories = 1;
790
796
  */
791
- category: Category[];
797
+ categories: Category[];
792
798
  }
793
799
  /**
794
800
  * @generated from protobuf message services.docstore.CreateCategoryRequest
@@ -804,9 +810,9 @@ export interface CreateCategoryRequest {
804
810
  */
805
811
  export interface CreateCategoryResponse {
806
812
  /**
807
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
813
+ * @generated from protobuf field: uint64 id = 1;
808
814
  */
809
- id: string;
815
+ id: number;
810
816
  }
811
817
  /**
812
818
  * @generated from protobuf message services.docstore.UpdateCategoryRequest
@@ -827,9 +833,9 @@ export interface UpdateCategoryResponse {
827
833
  */
828
834
  export interface DeleteCategoryRequest {
829
835
  /**
830
- * @generated from protobuf field: repeated uint64 ids = 1 [jstype = JS_STRING];
836
+ * @generated from protobuf field: repeated uint64 ids = 1;
831
837
  */
832
- ids: string[];
838
+ ids: number[];
833
839
  }
834
840
  /**
835
841
  * @generated from protobuf message services.docstore.DeleteCategoryResponse
@@ -865,9 +871,9 @@ export interface ListDocumentPinsResponse {
865
871
  */
866
872
  export interface ToggleDocumentPinRequest {
867
873
  /**
868
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
874
+ * @generated from protobuf field: uint64 document_id = 1;
869
875
  */
870
- documentId: string;
876
+ documentId: number;
871
877
  /**
872
878
  * @generated from protobuf field: bool state = 2;
873
879
  */
@@ -889,9 +895,9 @@ export interface ToggleDocumentPinResponse {
889
895
  */
890
896
  export interface SetDocumentReminderRequest {
891
897
  /**
892
- * @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
898
+ * @generated from protobuf field: uint64 document_id = 1;
893
899
  */
894
- documentId: string;
900
+ documentId: number;
895
901
  /**
896
902
  * @generated from protobuf field: optional resources.timestamp.Timestamp reminder_time = 2;
897
903
  */
@@ -920,7 +926,20 @@ class ListTemplatesRequest$Type extends MessageType<ListTemplatesRequest> {
920
926
  return message;
921
927
  }
922
928
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTemplatesRequest): ListTemplatesRequest {
923
- return target ?? this.create();
929
+ let message = target ?? this.create(), end = reader.pos + length;
930
+ while (reader.pos < end) {
931
+ let [fieldNo, wireType] = reader.tag();
932
+ switch (fieldNo) {
933
+ default:
934
+ let u = options.readUnknownField;
935
+ if (u === "throw")
936
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
937
+ let d = reader.skip(wireType);
938
+ if (u !== false)
939
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
940
+ }
941
+ }
942
+ return message;
924
943
  }
925
944
  internalBinaryWrite(message: ListTemplatesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
926
945
  let u = options.writeUnknownFields;
@@ -984,14 +1003,14 @@ export const ListTemplatesResponse = new ListTemplatesResponse$Type();
984
1003
  class GetTemplateRequest$Type extends MessageType<GetTemplateRequest> {
985
1004
  constructor() {
986
1005
  super("services.docstore.GetTemplateRequest", [
987
- { no: 1, name: "template_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
1006
+ { no: 1, name: "template_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
988
1007
  { no: 2, name: "data", kind: "message", T: () => TemplateData },
989
1008
  { no: 3, name: "render", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
990
1009
  ]);
991
1010
  }
992
1011
  create(value?: PartialMessage<GetTemplateRequest>): GetTemplateRequest {
993
1012
  const message = globalThis.Object.create((this.messagePrototype!));
994
- message.templateId = "0";
1013
+ message.templateId = 0;
995
1014
  if (value !== undefined)
996
1015
  reflectionMergePartial<GetTemplateRequest>(this, message, value);
997
1016
  return message;
@@ -1001,8 +1020,8 @@ class GetTemplateRequest$Type extends MessageType<GetTemplateRequest> {
1001
1020
  while (reader.pos < end) {
1002
1021
  let [fieldNo, wireType] = reader.tag();
1003
1022
  switch (fieldNo) {
1004
- case /* uint64 template_id = 1 [jstype = JS_STRING];*/ 1:
1005
- message.templateId = reader.uint64().toString();
1023
+ case /* uint64 template_id */ 1:
1024
+ message.templateId = reader.uint64().toNumber();
1006
1025
  break;
1007
1026
  case /* optional resources.documents.TemplateData data */ 2:
1008
1027
  message.data = TemplateData.internalBinaryRead(reader, reader.uint32(), options, message.data);
@@ -1022,8 +1041,8 @@ class GetTemplateRequest$Type extends MessageType<GetTemplateRequest> {
1022
1041
  return message;
1023
1042
  }
1024
1043
  internalBinaryWrite(message: GetTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1025
- /* uint64 template_id = 1 [jstype = JS_STRING]; */
1026
- if (message.templateId !== "0")
1044
+ /* uint64 template_id = 1; */
1045
+ if (message.templateId !== 0)
1027
1046
  writer.tag(1, WireType.Varint).uint64(message.templateId);
1028
1047
  /* optional resources.documents.TemplateData data = 2; */
1029
1048
  if (message.data)
@@ -1145,12 +1164,12 @@ export const CreateTemplateRequest = new CreateTemplateRequest$Type();
1145
1164
  class CreateTemplateResponse$Type extends MessageType<CreateTemplateResponse> {
1146
1165
  constructor() {
1147
1166
  super("services.docstore.CreateTemplateResponse", [
1148
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1167
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1149
1168
  ]);
1150
1169
  }
1151
1170
  create(value?: PartialMessage<CreateTemplateResponse>): CreateTemplateResponse {
1152
1171
  const message = globalThis.Object.create((this.messagePrototype!));
1153
- message.id = "0";
1172
+ message.id = 0;
1154
1173
  if (value !== undefined)
1155
1174
  reflectionMergePartial<CreateTemplateResponse>(this, message, value);
1156
1175
  return message;
@@ -1160,8 +1179,8 @@ class CreateTemplateResponse$Type extends MessageType<CreateTemplateResponse> {
1160
1179
  while (reader.pos < end) {
1161
1180
  let [fieldNo, wireType] = reader.tag();
1162
1181
  switch (fieldNo) {
1163
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1164
- message.id = reader.uint64().toString();
1182
+ case /* uint64 id */ 1:
1183
+ message.id = reader.uint64().toNumber();
1165
1184
  break;
1166
1185
  default:
1167
1186
  let u = options.readUnknownField;
@@ -1175,8 +1194,8 @@ class CreateTemplateResponse$Type extends MessageType<CreateTemplateResponse> {
1175
1194
  return message;
1176
1195
  }
1177
1196
  internalBinaryWrite(message: CreateTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1178
- /* uint64 id = 1 [jstype = JS_STRING]; */
1179
- if (message.id !== "0")
1197
+ /* uint64 id = 1; */
1198
+ if (message.id !== 0)
1180
1199
  writer.tag(1, WireType.Varint).uint64(message.id);
1181
1200
  let u = options.writeUnknownFields;
1182
1201
  if (u !== false)
@@ -1284,12 +1303,12 @@ export const UpdateTemplateResponse = new UpdateTemplateResponse$Type();
1284
1303
  class DeleteTemplateRequest$Type extends MessageType<DeleteTemplateRequest> {
1285
1304
  constructor() {
1286
1305
  super("services.docstore.DeleteTemplateRequest", [
1287
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1306
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1288
1307
  ]);
1289
1308
  }
1290
1309
  create(value?: PartialMessage<DeleteTemplateRequest>): DeleteTemplateRequest {
1291
1310
  const message = globalThis.Object.create((this.messagePrototype!));
1292
- message.id = "0";
1311
+ message.id = 0;
1293
1312
  if (value !== undefined)
1294
1313
  reflectionMergePartial<DeleteTemplateRequest>(this, message, value);
1295
1314
  return message;
@@ -1299,8 +1318,8 @@ class DeleteTemplateRequest$Type extends MessageType<DeleteTemplateRequest> {
1299
1318
  while (reader.pos < end) {
1300
1319
  let [fieldNo, wireType] = reader.tag();
1301
1320
  switch (fieldNo) {
1302
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1303
- message.id = reader.uint64().toString();
1321
+ case /* uint64 id */ 1:
1322
+ message.id = reader.uint64().toNumber();
1304
1323
  break;
1305
1324
  default:
1306
1325
  let u = options.readUnknownField;
@@ -1314,8 +1333,8 @@ class DeleteTemplateRequest$Type extends MessageType<DeleteTemplateRequest> {
1314
1333
  return message;
1315
1334
  }
1316
1335
  internalBinaryWrite(message: DeleteTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1317
- /* uint64 id = 1 [jstype = JS_STRING]; */
1318
- if (message.id !== "0")
1336
+ /* uint64 id = 1; */
1337
+ if (message.id !== 0)
1319
1338
  writer.tag(1, WireType.Varint).uint64(message.id);
1320
1339
  let u = options.writeUnknownFields;
1321
1340
  if (u !== false)
@@ -1339,7 +1358,20 @@ class DeleteTemplateResponse$Type extends MessageType<DeleteTemplateResponse> {
1339
1358
  return message;
1340
1359
  }
1341
1360
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteTemplateResponse): DeleteTemplateResponse {
1342
- return target ?? this.create();
1361
+ let message = target ?? this.create(), end = reader.pos + length;
1362
+ while (reader.pos < end) {
1363
+ let [fieldNo, wireType] = reader.tag();
1364
+ switch (fieldNo) {
1365
+ default:
1366
+ let u = options.readUnknownField;
1367
+ if (u === "throw")
1368
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1369
+ let d = reader.skip(wireType);
1370
+ if (u !== false)
1371
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1372
+ }
1373
+ }
1374
+ return message;
1343
1375
  }
1344
1376
  internalBinaryWrite(message: DeleteTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1345
1377
  let u = options.writeUnknownFields;
@@ -1359,12 +1391,12 @@ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1359
1391
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
1360
1392
  { no: 2, name: "sort", kind: "message", T: () => Sort },
1361
1393
  { 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" } } } },
1394
+ { no: 4, name: "category_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "validate.rules": { repeated: { maxItems: "5" } } } },
1363
1395
  { no: 5, name: "creator_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { repeated: { maxItems: "5" } } } },
1364
1396
  { no: 6, name: "from", kind: "message", T: () => Timestamp },
1365
1397
  { no: 7, name: "to", kind: "message", T: () => Timestamp },
1366
1398
  { 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*/ }
1399
+ { no: 9, name: "document_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "validate.rules": { repeated: { maxItems: "5" } } } }
1368
1400
  ]);
1369
1401
  }
1370
1402
  create(value?: PartialMessage<ListDocumentsRequest>): ListDocumentsRequest {
@@ -1390,12 +1422,12 @@ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1390
1422
  case /* optional string search */ 3:
1391
1423
  message.search = reader.string();
1392
1424
  break;
1393
- case /* repeated uint64 category_ids = 4 [jstype = JS_STRING];*/ 4:
1425
+ case /* repeated uint64 category_ids */ 4:
1394
1426
  if (wireType === WireType.LengthDelimited)
1395
1427
  for (let e = reader.int32() + reader.pos; reader.pos < e;)
1396
- message.categoryIds.push(reader.uint64().toString());
1428
+ message.categoryIds.push(reader.uint64().toNumber());
1397
1429
  else
1398
- message.categoryIds.push(reader.uint64().toString());
1430
+ message.categoryIds.push(reader.uint64().toNumber());
1399
1431
  break;
1400
1432
  case /* repeated int32 creator_ids */ 5:
1401
1433
  if (wireType === WireType.LengthDelimited)
@@ -1413,12 +1445,12 @@ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1413
1445
  case /* optional bool closed */ 8:
1414
1446
  message.closed = reader.bool();
1415
1447
  break;
1416
- case /* repeated uint64 document_ids = 9 [jstype = JS_STRING];*/ 9:
1448
+ case /* repeated uint64 document_ids */ 9:
1417
1449
  if (wireType === WireType.LengthDelimited)
1418
1450
  for (let e = reader.int32() + reader.pos; reader.pos < e;)
1419
- message.documentIds.push(reader.uint64().toString());
1451
+ message.documentIds.push(reader.uint64().toNumber());
1420
1452
  else
1421
- message.documentIds.push(reader.uint64().toString());
1453
+ message.documentIds.push(reader.uint64().toNumber());
1422
1454
  break;
1423
1455
  default:
1424
1456
  let u = options.readUnknownField;
@@ -1441,7 +1473,7 @@ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1441
1473
  /* optional string search = 3; */
1442
1474
  if (message.search !== undefined)
1443
1475
  writer.tag(3, WireType.LengthDelimited).string(message.search);
1444
- /* repeated uint64 category_ids = 4 [jstype = JS_STRING]; */
1476
+ /* repeated uint64 category_ids = 4; */
1445
1477
  if (message.categoryIds.length) {
1446
1478
  writer.tag(4, WireType.LengthDelimited).fork();
1447
1479
  for (let i = 0; i < message.categoryIds.length; i++)
@@ -1464,7 +1496,7 @@ class ListDocumentsRequest$Type extends MessageType<ListDocumentsRequest> {
1464
1496
  /* optional bool closed = 8; */
1465
1497
  if (message.closed !== undefined)
1466
1498
  writer.tag(8, WireType.Varint).bool(message.closed);
1467
- /* repeated uint64 document_ids = 9 [jstype = JS_STRING]; */
1499
+ /* repeated uint64 document_ids = 9; */
1468
1500
  if (message.documentIds.length) {
1469
1501
  writer.tag(9, WireType.LengthDelimited).fork();
1470
1502
  for (let i = 0; i < message.documentIds.length; i++)
@@ -1539,13 +1571,13 @@ export const ListDocumentsResponse = new ListDocumentsResponse$Type();
1539
1571
  class GetDocumentRequest$Type extends MessageType<GetDocumentRequest> {
1540
1572
  constructor() {
1541
1573
  super("services.docstore.GetDocumentRequest", [
1542
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
1574
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
1543
1575
  { no: 2, name: "info_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
1544
1576
  ]);
1545
1577
  }
1546
1578
  create(value?: PartialMessage<GetDocumentRequest>): GetDocumentRequest {
1547
1579
  const message = globalThis.Object.create((this.messagePrototype!));
1548
- message.documentId = "0";
1580
+ message.documentId = 0;
1549
1581
  if (value !== undefined)
1550
1582
  reflectionMergePartial<GetDocumentRequest>(this, message, value);
1551
1583
  return message;
@@ -1555,8 +1587,8 @@ class GetDocumentRequest$Type extends MessageType<GetDocumentRequest> {
1555
1587
  while (reader.pos < end) {
1556
1588
  let [fieldNo, wireType] = reader.tag();
1557
1589
  switch (fieldNo) {
1558
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1559
- message.documentId = reader.uint64().toString();
1590
+ case /* uint64 document_id */ 1:
1591
+ message.documentId = reader.uint64().toNumber();
1560
1592
  break;
1561
1593
  case /* optional bool info_only */ 2:
1562
1594
  message.infoOnly = reader.bool();
@@ -1573,8 +1605,8 @@ class GetDocumentRequest$Type extends MessageType<GetDocumentRequest> {
1573
1605
  return message;
1574
1606
  }
1575
1607
  internalBinaryWrite(message: GetDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1576
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
1577
- if (message.documentId !== "0")
1608
+ /* uint64 document_id = 1; */
1609
+ if (message.documentId !== 0)
1578
1610
  writer.tag(1, WireType.Varint).uint64(message.documentId);
1579
1611
  /* optional bool info_only = 2; */
1580
1612
  if (message.infoOnly !== undefined)
@@ -1646,12 +1678,12 @@ export const GetDocumentResponse = new GetDocumentResponse$Type();
1646
1678
  class GetDocumentReferencesRequest$Type extends MessageType<GetDocumentReferencesRequest> {
1647
1679
  constructor() {
1648
1680
  super("services.docstore.GetDocumentReferencesRequest", [
1649
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1681
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1650
1682
  ]);
1651
1683
  }
1652
1684
  create(value?: PartialMessage<GetDocumentReferencesRequest>): GetDocumentReferencesRequest {
1653
1685
  const message = globalThis.Object.create((this.messagePrototype!));
1654
- message.documentId = "0";
1686
+ message.documentId = 0;
1655
1687
  if (value !== undefined)
1656
1688
  reflectionMergePartial<GetDocumentReferencesRequest>(this, message, value);
1657
1689
  return message;
@@ -1661,8 +1693,8 @@ class GetDocumentReferencesRequest$Type extends MessageType<GetDocumentReference
1661
1693
  while (reader.pos < end) {
1662
1694
  let [fieldNo, wireType] = reader.tag();
1663
1695
  switch (fieldNo) {
1664
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1665
- message.documentId = reader.uint64().toString();
1696
+ case /* uint64 document_id */ 1:
1697
+ message.documentId = reader.uint64().toNumber();
1666
1698
  break;
1667
1699
  default:
1668
1700
  let u = options.readUnknownField;
@@ -1676,8 +1708,8 @@ class GetDocumentReferencesRequest$Type extends MessageType<GetDocumentReference
1676
1708
  return message;
1677
1709
  }
1678
1710
  internalBinaryWrite(message: GetDocumentReferencesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1679
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
1680
- if (message.documentId !== "0")
1711
+ /* uint64 document_id = 1; */
1712
+ if (message.documentId !== 0)
1681
1713
  writer.tag(1, WireType.Varint).uint64(message.documentId);
1682
1714
  let u = options.writeUnknownFields;
1683
1715
  if (u !== false)
@@ -1740,12 +1772,12 @@ export const GetDocumentReferencesResponse = new GetDocumentReferencesResponse$T
1740
1772
  class GetDocumentRelationsRequest$Type extends MessageType<GetDocumentRelationsRequest> {
1741
1773
  constructor() {
1742
1774
  super("services.docstore.GetDocumentRelationsRequest", [
1743
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1775
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1744
1776
  ]);
1745
1777
  }
1746
1778
  create(value?: PartialMessage<GetDocumentRelationsRequest>): GetDocumentRelationsRequest {
1747
1779
  const message = globalThis.Object.create((this.messagePrototype!));
1748
- message.documentId = "0";
1780
+ message.documentId = 0;
1749
1781
  if (value !== undefined)
1750
1782
  reflectionMergePartial<GetDocumentRelationsRequest>(this, message, value);
1751
1783
  return message;
@@ -1755,8 +1787,8 @@ class GetDocumentRelationsRequest$Type extends MessageType<GetDocumentRelationsR
1755
1787
  while (reader.pos < end) {
1756
1788
  let [fieldNo, wireType] = reader.tag();
1757
1789
  switch (fieldNo) {
1758
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
1759
- message.documentId = reader.uint64().toString();
1790
+ case /* uint64 document_id */ 1:
1791
+ message.documentId = reader.uint64().toNumber();
1760
1792
  break;
1761
1793
  default:
1762
1794
  let u = options.readUnknownField;
@@ -1770,8 +1802,8 @@ class GetDocumentRelationsRequest$Type extends MessageType<GetDocumentRelationsR
1770
1802
  return message;
1771
1803
  }
1772
1804
  internalBinaryWrite(message: GetDocumentRelationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1773
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
1774
- if (message.documentId !== "0")
1805
+ /* uint64 document_id = 1; */
1806
+ if (message.documentId !== 0)
1775
1807
  writer.tag(1, WireType.Varint).uint64(message.documentId);
1776
1808
  let u = options.writeUnknownFields;
1777
1809
  if (u !== false)
@@ -1880,12 +1912,12 @@ export const AddDocumentReferenceRequest = new AddDocumentReferenceRequest$Type(
1880
1912
  class AddDocumentReferenceResponse$Type extends MessageType<AddDocumentReferenceResponse> {
1881
1913
  constructor() {
1882
1914
  super("services.docstore.AddDocumentReferenceResponse", [
1883
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1915
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1884
1916
  ]);
1885
1917
  }
1886
1918
  create(value?: PartialMessage<AddDocumentReferenceResponse>): AddDocumentReferenceResponse {
1887
1919
  const message = globalThis.Object.create((this.messagePrototype!));
1888
- message.id = "0";
1920
+ message.id = 0;
1889
1921
  if (value !== undefined)
1890
1922
  reflectionMergePartial<AddDocumentReferenceResponse>(this, message, value);
1891
1923
  return message;
@@ -1895,8 +1927,8 @@ class AddDocumentReferenceResponse$Type extends MessageType<AddDocumentReference
1895
1927
  while (reader.pos < end) {
1896
1928
  let [fieldNo, wireType] = reader.tag();
1897
1929
  switch (fieldNo) {
1898
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1899
- message.id = reader.uint64().toString();
1930
+ case /* uint64 id */ 1:
1931
+ message.id = reader.uint64().toNumber();
1900
1932
  break;
1901
1933
  default:
1902
1934
  let u = options.readUnknownField;
@@ -1910,8 +1942,8 @@ class AddDocumentReferenceResponse$Type extends MessageType<AddDocumentReference
1910
1942
  return message;
1911
1943
  }
1912
1944
  internalBinaryWrite(message: AddDocumentReferenceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1913
- /* uint64 id = 1 [jstype = JS_STRING]; */
1914
- if (message.id !== "0")
1945
+ /* uint64 id = 1; */
1946
+ if (message.id !== 0)
1915
1947
  writer.tag(1, WireType.Varint).uint64(message.id);
1916
1948
  let u = options.writeUnknownFields;
1917
1949
  if (u !== false)
@@ -1927,12 +1959,12 @@ export const AddDocumentReferenceResponse = new AddDocumentReferenceResponse$Typ
1927
1959
  class RemoveDocumentReferenceRequest$Type extends MessageType<RemoveDocumentReferenceRequest> {
1928
1960
  constructor() {
1929
1961
  super("services.docstore.RemoveDocumentReferenceRequest", [
1930
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
1962
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
1931
1963
  ]);
1932
1964
  }
1933
1965
  create(value?: PartialMessage<RemoveDocumentReferenceRequest>): RemoveDocumentReferenceRequest {
1934
1966
  const message = globalThis.Object.create((this.messagePrototype!));
1935
- message.id = "0";
1967
+ message.id = 0;
1936
1968
  if (value !== undefined)
1937
1969
  reflectionMergePartial<RemoveDocumentReferenceRequest>(this, message, value);
1938
1970
  return message;
@@ -1942,8 +1974,8 @@ class RemoveDocumentReferenceRequest$Type extends MessageType<RemoveDocumentRefe
1942
1974
  while (reader.pos < end) {
1943
1975
  let [fieldNo, wireType] = reader.tag();
1944
1976
  switch (fieldNo) {
1945
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
1946
- message.id = reader.uint64().toString();
1977
+ case /* uint64 id */ 1:
1978
+ message.id = reader.uint64().toNumber();
1947
1979
  break;
1948
1980
  default:
1949
1981
  let u = options.readUnknownField;
@@ -1957,8 +1989,8 @@ class RemoveDocumentReferenceRequest$Type extends MessageType<RemoveDocumentRefe
1957
1989
  return message;
1958
1990
  }
1959
1991
  internalBinaryWrite(message: RemoveDocumentReferenceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1960
- /* uint64 id = 1 [jstype = JS_STRING]; */
1961
- if (message.id !== "0")
1992
+ /* uint64 id = 1; */
1993
+ if (message.id !== 0)
1962
1994
  writer.tag(1, WireType.Varint).uint64(message.id);
1963
1995
  let u = options.writeUnknownFields;
1964
1996
  if (u !== false)
@@ -1982,7 +2014,20 @@ class RemoveDocumentReferenceResponse$Type extends MessageType<RemoveDocumentRef
1982
2014
  return message;
1983
2015
  }
1984
2016
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentReferenceResponse): RemoveDocumentReferenceResponse {
1985
- return target ?? this.create();
2017
+ let message = target ?? this.create(), end = reader.pos + length;
2018
+ while (reader.pos < end) {
2019
+ let [fieldNo, wireType] = reader.tag();
2020
+ switch (fieldNo) {
2021
+ default:
2022
+ let u = options.readUnknownField;
2023
+ if (u === "throw")
2024
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2025
+ let d = reader.skip(wireType);
2026
+ if (u !== false)
2027
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2028
+ }
2029
+ }
2030
+ return message;
1986
2031
  }
1987
2032
  internalBinaryWrite(message: RemoveDocumentReferenceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1988
2033
  let u = options.writeUnknownFields;
@@ -2045,12 +2090,12 @@ export const AddDocumentRelationRequest = new AddDocumentRelationRequest$Type();
2045
2090
  class AddDocumentRelationResponse$Type extends MessageType<AddDocumentRelationResponse> {
2046
2091
  constructor() {
2047
2092
  super("services.docstore.AddDocumentRelationResponse", [
2048
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2093
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2049
2094
  ]);
2050
2095
  }
2051
2096
  create(value?: PartialMessage<AddDocumentRelationResponse>): AddDocumentRelationResponse {
2052
2097
  const message = globalThis.Object.create((this.messagePrototype!));
2053
- message.id = "0";
2098
+ message.id = 0;
2054
2099
  if (value !== undefined)
2055
2100
  reflectionMergePartial<AddDocumentRelationResponse>(this, message, value);
2056
2101
  return message;
@@ -2060,8 +2105,8 @@ class AddDocumentRelationResponse$Type extends MessageType<AddDocumentRelationRe
2060
2105
  while (reader.pos < end) {
2061
2106
  let [fieldNo, wireType] = reader.tag();
2062
2107
  switch (fieldNo) {
2063
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
2064
- message.id = reader.uint64().toString();
2108
+ case /* uint64 id */ 1:
2109
+ message.id = reader.uint64().toNumber();
2065
2110
  break;
2066
2111
  default:
2067
2112
  let u = options.readUnknownField;
@@ -2075,8 +2120,8 @@ class AddDocumentRelationResponse$Type extends MessageType<AddDocumentRelationRe
2075
2120
  return message;
2076
2121
  }
2077
2122
  internalBinaryWrite(message: AddDocumentRelationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2078
- /* uint64 id = 1 [jstype = JS_STRING]; */
2079
- if (message.id !== "0")
2123
+ /* uint64 id = 1; */
2124
+ if (message.id !== 0)
2080
2125
  writer.tag(1, WireType.Varint).uint64(message.id);
2081
2126
  let u = options.writeUnknownFields;
2082
2127
  if (u !== false)
@@ -2092,12 +2137,12 @@ export const AddDocumentRelationResponse = new AddDocumentRelationResponse$Type(
2092
2137
  class RemoveDocumentRelationRequest$Type extends MessageType<RemoveDocumentRelationRequest> {
2093
2138
  constructor() {
2094
2139
  super("services.docstore.RemoveDocumentRelationRequest", [
2095
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2140
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2096
2141
  ]);
2097
2142
  }
2098
2143
  create(value?: PartialMessage<RemoveDocumentRelationRequest>): RemoveDocumentRelationRequest {
2099
2144
  const message = globalThis.Object.create((this.messagePrototype!));
2100
- message.id = "0";
2145
+ message.id = 0;
2101
2146
  if (value !== undefined)
2102
2147
  reflectionMergePartial<RemoveDocumentRelationRequest>(this, message, value);
2103
2148
  return message;
@@ -2107,8 +2152,8 @@ class RemoveDocumentRelationRequest$Type extends MessageType<RemoveDocumentRelat
2107
2152
  while (reader.pos < end) {
2108
2153
  let [fieldNo, wireType] = reader.tag();
2109
2154
  switch (fieldNo) {
2110
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
2111
- message.id = reader.uint64().toString();
2155
+ case /* uint64 id */ 1:
2156
+ message.id = reader.uint64().toNumber();
2112
2157
  break;
2113
2158
  default:
2114
2159
  let u = options.readUnknownField;
@@ -2122,8 +2167,8 @@ class RemoveDocumentRelationRequest$Type extends MessageType<RemoveDocumentRelat
2122
2167
  return message;
2123
2168
  }
2124
2169
  internalBinaryWrite(message: RemoveDocumentRelationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2125
- /* uint64 id = 1 [jstype = JS_STRING]; */
2126
- if (message.id !== "0")
2170
+ /* uint64 id = 1; */
2171
+ if (message.id !== 0)
2127
2172
  writer.tag(1, WireType.Varint).uint64(message.id);
2128
2173
  let u = options.writeUnknownFields;
2129
2174
  if (u !== false)
@@ -2147,7 +2192,20 @@ class RemoveDocumentRelationResponse$Type extends MessageType<RemoveDocumentRela
2147
2192
  return message;
2148
2193
  }
2149
2194
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RemoveDocumentRelationResponse): RemoveDocumentRelationResponse {
2150
- return target ?? this.create();
2195
+ let message = target ?? this.create(), end = reader.pos + length;
2196
+ while (reader.pos < end) {
2197
+ let [fieldNo, wireType] = reader.tag();
2198
+ switch (fieldNo) {
2199
+ default:
2200
+ let u = options.readUnknownField;
2201
+ if (u === "throw")
2202
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2203
+ let d = reader.skip(wireType);
2204
+ if (u !== false)
2205
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2206
+ }
2207
+ }
2208
+ return message;
2151
2209
  }
2152
2210
  internalBinaryWrite(message: RemoveDocumentRelationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2153
2211
  let u = options.writeUnknownFields;
@@ -2165,12 +2223,12 @@ class GetCommentsRequest$Type extends MessageType<GetCommentsRequest> {
2165
2223
  constructor() {
2166
2224
  super("services.docstore.GetCommentsRequest", [
2167
2225
  { 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*/ }
2226
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2169
2227
  ]);
2170
2228
  }
2171
2229
  create(value?: PartialMessage<GetCommentsRequest>): GetCommentsRequest {
2172
2230
  const message = globalThis.Object.create((this.messagePrototype!));
2173
- message.documentId = "0";
2231
+ message.documentId = 0;
2174
2232
  if (value !== undefined)
2175
2233
  reflectionMergePartial<GetCommentsRequest>(this, message, value);
2176
2234
  return message;
@@ -2183,8 +2241,8 @@ class GetCommentsRequest$Type extends MessageType<GetCommentsRequest> {
2183
2241
  case /* resources.common.database.PaginationRequest pagination */ 1:
2184
2242
  message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
2185
2243
  break;
2186
- case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
2187
- message.documentId = reader.uint64().toString();
2244
+ case /* uint64 document_id */ 2:
2245
+ message.documentId = reader.uint64().toNumber();
2188
2246
  break;
2189
2247
  default:
2190
2248
  let u = options.readUnknownField;
@@ -2201,8 +2259,8 @@ class GetCommentsRequest$Type extends MessageType<GetCommentsRequest> {
2201
2259
  /* resources.common.database.PaginationRequest pagination = 1; */
2202
2260
  if (message.pagination)
2203
2261
  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")
2262
+ /* uint64 document_id = 2; */
2263
+ if (message.documentId !== 0)
2206
2264
  writer.tag(2, WireType.Varint).uint64(message.documentId);
2207
2265
  let u = options.writeUnknownFields;
2208
2266
  if (u !== false)
@@ -2456,12 +2514,12 @@ export const EditCommentResponse = new EditCommentResponse$Type();
2456
2514
  class DeleteCommentRequest$Type extends MessageType<DeleteCommentRequest> {
2457
2515
  constructor() {
2458
2516
  super("services.docstore.DeleteCommentRequest", [
2459
- { no: 1, name: "comment_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2517
+ { no: 1, name: "comment_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2460
2518
  ]);
2461
2519
  }
2462
2520
  create(value?: PartialMessage<DeleteCommentRequest>): DeleteCommentRequest {
2463
2521
  const message = globalThis.Object.create((this.messagePrototype!));
2464
- message.commentId = "0";
2522
+ message.commentId = 0;
2465
2523
  if (value !== undefined)
2466
2524
  reflectionMergePartial<DeleteCommentRequest>(this, message, value);
2467
2525
  return message;
@@ -2471,8 +2529,8 @@ class DeleteCommentRequest$Type extends MessageType<DeleteCommentRequest> {
2471
2529
  while (reader.pos < end) {
2472
2530
  let [fieldNo, wireType] = reader.tag();
2473
2531
  switch (fieldNo) {
2474
- case /* uint64 comment_id = 1 [jstype = JS_STRING];*/ 1:
2475
- message.commentId = reader.uint64().toString();
2532
+ case /* uint64 comment_id */ 1:
2533
+ message.commentId = reader.uint64().toNumber();
2476
2534
  break;
2477
2535
  default:
2478
2536
  let u = options.readUnknownField;
@@ -2486,8 +2544,8 @@ class DeleteCommentRequest$Type extends MessageType<DeleteCommentRequest> {
2486
2544
  return message;
2487
2545
  }
2488
2546
  internalBinaryWrite(message: DeleteCommentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2489
- /* uint64 comment_id = 1 [jstype = JS_STRING]; */
2490
- if (message.commentId !== "0")
2547
+ /* uint64 comment_id = 1; */
2548
+ if (message.commentId !== 0)
2491
2549
  writer.tag(1, WireType.Varint).uint64(message.commentId);
2492
2550
  let u = options.writeUnknownFields;
2493
2551
  if (u !== false)
@@ -2511,7 +2569,20 @@ class DeleteCommentResponse$Type extends MessageType<DeleteCommentResponse> {
2511
2569
  return message;
2512
2570
  }
2513
2571
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCommentResponse): DeleteCommentResponse {
2514
- return target ?? this.create();
2572
+ let message = target ?? this.create(), end = reader.pos + length;
2573
+ while (reader.pos < end) {
2574
+ let [fieldNo, wireType] = reader.tag();
2575
+ switch (fieldNo) {
2576
+ default:
2577
+ let u = options.readUnknownField;
2578
+ if (u === "throw")
2579
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2580
+ let d = reader.skip(wireType);
2581
+ if (u !== false)
2582
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2583
+ }
2584
+ }
2585
+ return message;
2515
2586
  }
2516
2587
  internalBinaryWrite(message: DeleteCommentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2517
2588
  let u = options.writeUnknownFields;
@@ -2528,12 +2599,12 @@ export const DeleteCommentResponse = new DeleteCommentResponse$Type();
2528
2599
  class UpdateDocumentResponse$Type extends MessageType<UpdateDocumentResponse> {
2529
2600
  constructor() {
2530
2601
  super("services.docstore.UpdateDocumentResponse", [
2531
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2602
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2532
2603
  ]);
2533
2604
  }
2534
2605
  create(value?: PartialMessage<UpdateDocumentResponse>): UpdateDocumentResponse {
2535
2606
  const message = globalThis.Object.create((this.messagePrototype!));
2536
- message.documentId = "0";
2607
+ message.documentId = 0;
2537
2608
  if (value !== undefined)
2538
2609
  reflectionMergePartial<UpdateDocumentResponse>(this, message, value);
2539
2610
  return message;
@@ -2543,8 +2614,8 @@ class UpdateDocumentResponse$Type extends MessageType<UpdateDocumentResponse> {
2543
2614
  while (reader.pos < end) {
2544
2615
  let [fieldNo, wireType] = reader.tag();
2545
2616
  switch (fieldNo) {
2546
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2547
- message.documentId = reader.uint64().toString();
2617
+ case /* uint64 document_id */ 1:
2618
+ message.documentId = reader.uint64().toNumber();
2548
2619
  break;
2549
2620
  default:
2550
2621
  let u = options.readUnknownField;
@@ -2558,8 +2629,8 @@ class UpdateDocumentResponse$Type extends MessageType<UpdateDocumentResponse> {
2558
2629
  return message;
2559
2630
  }
2560
2631
  internalBinaryWrite(message: UpdateDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2561
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
2562
- if (message.documentId !== "0")
2632
+ /* uint64 document_id = 1; */
2633
+ if (message.documentId !== 0)
2563
2634
  writer.tag(1, WireType.Varint).uint64(message.documentId);
2564
2635
  let u = options.writeUnknownFields;
2565
2636
  if (u !== false)
@@ -2575,12 +2646,13 @@ export const UpdateDocumentResponse = new UpdateDocumentResponse$Type();
2575
2646
  class DeleteDocumentRequest$Type extends MessageType<DeleteDocumentRequest> {
2576
2647
  constructor() {
2577
2648
  super("services.docstore.DeleteDocumentRequest", [
2578
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
2649
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
2650
+ { no: 2, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } }
2579
2651
  ]);
2580
2652
  }
2581
2653
  create(value?: PartialMessage<DeleteDocumentRequest>): DeleteDocumentRequest {
2582
2654
  const message = globalThis.Object.create((this.messagePrototype!));
2583
- message.documentId = "0";
2655
+ message.documentId = 0;
2584
2656
  if (value !== undefined)
2585
2657
  reflectionMergePartial<DeleteDocumentRequest>(this, message, value);
2586
2658
  return message;
@@ -2590,8 +2662,11 @@ class DeleteDocumentRequest$Type extends MessageType<DeleteDocumentRequest> {
2590
2662
  while (reader.pos < end) {
2591
2663
  let [fieldNo, wireType] = reader.tag();
2592
2664
  switch (fieldNo) {
2593
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2594
- message.documentId = reader.uint64().toString();
2665
+ case /* uint64 document_id */ 1:
2666
+ message.documentId = reader.uint64().toNumber();
2667
+ break;
2668
+ case /* optional string reason */ 2:
2669
+ message.reason = reader.string();
2595
2670
  break;
2596
2671
  default:
2597
2672
  let u = options.readUnknownField;
@@ -2605,9 +2680,12 @@ class DeleteDocumentRequest$Type extends MessageType<DeleteDocumentRequest> {
2605
2680
  return message;
2606
2681
  }
2607
2682
  internalBinaryWrite(message: DeleteDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2608
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
2609
- if (message.documentId !== "0")
2683
+ /* uint64 document_id = 1; */
2684
+ if (message.documentId !== 0)
2610
2685
  writer.tag(1, WireType.Varint).uint64(message.documentId);
2686
+ /* optional string reason = 2; */
2687
+ if (message.reason !== undefined)
2688
+ writer.tag(2, WireType.LengthDelimited).string(message.reason);
2611
2689
  let u = options.writeUnknownFields;
2612
2690
  if (u !== false)
2613
2691
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2630,7 +2708,20 @@ class DeleteDocumentResponse$Type extends MessageType<DeleteDocumentResponse> {
2630
2708
  return message;
2631
2709
  }
2632
2710
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentResponse): DeleteDocumentResponse {
2633
- return target ?? this.create();
2711
+ let message = target ?? this.create(), end = reader.pos + length;
2712
+ while (reader.pos < end) {
2713
+ let [fieldNo, wireType] = reader.tag();
2714
+ switch (fieldNo) {
2715
+ default:
2716
+ let u = options.readUnknownField;
2717
+ if (u === "throw")
2718
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2719
+ let d = reader.skip(wireType);
2720
+ if (u !== false)
2721
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2722
+ }
2723
+ }
2724
+ return message;
2634
2725
  }
2635
2726
  internalBinaryWrite(message: DeleteDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2636
2727
  let u = options.writeUnknownFields;
@@ -2647,13 +2738,13 @@ export const DeleteDocumentResponse = new DeleteDocumentResponse$Type();
2647
2738
  class ToggleDocumentRequest$Type extends MessageType<ToggleDocumentRequest> {
2648
2739
  constructor() {
2649
2740
  super("services.docstore.ToggleDocumentRequest", [
2650
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
2741
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
2651
2742
  { no: 2, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
2652
2743
  ]);
2653
2744
  }
2654
2745
  create(value?: PartialMessage<ToggleDocumentRequest>): ToggleDocumentRequest {
2655
2746
  const message = globalThis.Object.create((this.messagePrototype!));
2656
- message.documentId = "0";
2747
+ message.documentId = 0;
2657
2748
  message.closed = false;
2658
2749
  if (value !== undefined)
2659
2750
  reflectionMergePartial<ToggleDocumentRequest>(this, message, value);
@@ -2664,8 +2755,8 @@ class ToggleDocumentRequest$Type extends MessageType<ToggleDocumentRequest> {
2664
2755
  while (reader.pos < end) {
2665
2756
  let [fieldNo, wireType] = reader.tag();
2666
2757
  switch (fieldNo) {
2667
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2668
- message.documentId = reader.uint64().toString();
2758
+ case /* uint64 document_id */ 1:
2759
+ message.documentId = reader.uint64().toNumber();
2669
2760
  break;
2670
2761
  case /* bool closed */ 2:
2671
2762
  message.closed = reader.bool();
@@ -2682,8 +2773,8 @@ class ToggleDocumentRequest$Type extends MessageType<ToggleDocumentRequest> {
2682
2773
  return message;
2683
2774
  }
2684
2775
  internalBinaryWrite(message: ToggleDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2685
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
2686
- if (message.documentId !== "0")
2776
+ /* uint64 document_id = 1; */
2777
+ if (message.documentId !== 0)
2687
2778
  writer.tag(1, WireType.Varint).uint64(message.documentId);
2688
2779
  /* bool closed = 2; */
2689
2780
  if (message.closed !== false)
@@ -2710,7 +2801,20 @@ class ToggleDocumentResponse$Type extends MessageType<ToggleDocumentResponse> {
2710
2801
  return message;
2711
2802
  }
2712
2803
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ToggleDocumentResponse): ToggleDocumentResponse {
2713
- return target ?? this.create();
2804
+ let message = target ?? this.create(), end = reader.pos + length;
2805
+ while (reader.pos < end) {
2806
+ let [fieldNo, wireType] = reader.tag();
2807
+ switch (fieldNo) {
2808
+ default:
2809
+ let u = options.readUnknownField;
2810
+ if (u === "throw")
2811
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2812
+ let d = reader.skip(wireType);
2813
+ if (u !== false)
2814
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2815
+ }
2816
+ }
2817
+ return message;
2714
2818
  }
2715
2819
  internalBinaryWrite(message: ToggleDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2716
2820
  let u = options.writeUnknownFields;
@@ -2727,13 +2831,13 @@ export const ToggleDocumentResponse = new ToggleDocumentResponse$Type();
2727
2831
  class ChangeDocumentOwnerRequest$Type extends MessageType<ChangeDocumentOwnerRequest> {
2728
2832
  constructor() {
2729
2833
  super("services.docstore.ChangeDocumentOwnerRequest", [
2730
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
2834
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
2731
2835
  { no: 2, name: "new_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
2732
2836
  ]);
2733
2837
  }
2734
2838
  create(value?: PartialMessage<ChangeDocumentOwnerRequest>): ChangeDocumentOwnerRequest {
2735
2839
  const message = globalThis.Object.create((this.messagePrototype!));
2736
- message.documentId = "0";
2840
+ message.documentId = 0;
2737
2841
  if (value !== undefined)
2738
2842
  reflectionMergePartial<ChangeDocumentOwnerRequest>(this, message, value);
2739
2843
  return message;
@@ -2743,8 +2847,8 @@ class ChangeDocumentOwnerRequest$Type extends MessageType<ChangeDocumentOwnerReq
2743
2847
  while (reader.pos < end) {
2744
2848
  let [fieldNo, wireType] = reader.tag();
2745
2849
  switch (fieldNo) {
2746
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2747
- message.documentId = reader.uint64().toString();
2850
+ case /* uint64 document_id */ 1:
2851
+ message.documentId = reader.uint64().toNumber();
2748
2852
  break;
2749
2853
  case /* optional int32 new_user_id */ 2:
2750
2854
  message.newUserId = reader.int32();
@@ -2761,8 +2865,8 @@ class ChangeDocumentOwnerRequest$Type extends MessageType<ChangeDocumentOwnerReq
2761
2865
  return message;
2762
2866
  }
2763
2867
  internalBinaryWrite(message: ChangeDocumentOwnerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2764
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
2765
- if (message.documentId !== "0")
2868
+ /* uint64 document_id = 1; */
2869
+ if (message.documentId !== 0)
2766
2870
  writer.tag(1, WireType.Varint).uint64(message.documentId);
2767
2871
  /* optional int32 new_user_id = 2; */
2768
2872
  if (message.newUserId !== undefined)
@@ -2789,7 +2893,20 @@ class ChangeDocumentOwnerResponse$Type extends MessageType<ChangeDocumentOwnerRe
2789
2893
  return message;
2790
2894
  }
2791
2895
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeDocumentOwnerResponse): ChangeDocumentOwnerResponse {
2792
- return target ?? this.create();
2896
+ let message = target ?? this.create(), end = reader.pos + length;
2897
+ while (reader.pos < end) {
2898
+ let [fieldNo, wireType] = reader.tag();
2899
+ switch (fieldNo) {
2900
+ default:
2901
+ let u = options.readUnknownField;
2902
+ if (u === "throw")
2903
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2904
+ let d = reader.skip(wireType);
2905
+ if (u !== false)
2906
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2907
+ }
2908
+ }
2909
+ return message;
2793
2910
  }
2794
2911
  internalBinaryWrite(message: ChangeDocumentOwnerResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2795
2912
  let u = options.writeUnknownFields;
@@ -2806,7 +2923,7 @@ export const ChangeDocumentOwnerResponse = new ChangeDocumentOwnerResponse$Type(
2806
2923
  class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2807
2924
  constructor() {
2808
2925
  super("services.docstore.CreateDocumentRequest", [
2809
- { no: 1, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
2926
+ { no: 1, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
2810
2927
  { no: 2, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
2811
2928
  { no: 3, name: "content", kind: "message", T: () => Content },
2812
2929
  { no: 4, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
@@ -2815,7 +2932,7 @@ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2815
2932
  { no: 7, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2816
2933
  { no: 8, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2817
2934
  { no: 9, name: "access", kind: "message", T: () => DocumentAccess },
2818
- { no: 10, name: "template_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }
2935
+ { no: 10, name: "template_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2819
2936
  ]);
2820
2937
  }
2821
2938
  create(value?: PartialMessage<CreateDocumentRequest>): CreateDocumentRequest {
@@ -2834,8 +2951,8 @@ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2834
2951
  while (reader.pos < end) {
2835
2952
  let [fieldNo, wireType] = reader.tag();
2836
2953
  switch (fieldNo) {
2837
- case /* optional uint64 category_id = 1 [jstype = JS_STRING];*/ 1:
2838
- message.categoryId = reader.uint64().toString();
2954
+ case /* optional uint64 category_id */ 1:
2955
+ message.categoryId = reader.uint64().toNumber();
2839
2956
  break;
2840
2957
  case /* string title */ 2:
2841
2958
  message.title = reader.string();
@@ -2861,8 +2978,8 @@ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2861
2978
  case /* optional resources.documents.DocumentAccess access */ 9:
2862
2979
  message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
2863
2980
  break;
2864
- case /* optional uint64 template_id = 10 [jstype = JS_STRING];*/ 10:
2865
- message.templateId = reader.uint64().toString();
2981
+ case /* optional uint64 template_id */ 10:
2982
+ message.templateId = reader.uint64().toNumber();
2866
2983
  break;
2867
2984
  default:
2868
2985
  let u = options.readUnknownField;
@@ -2876,7 +2993,7 @@ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2876
2993
  return message;
2877
2994
  }
2878
2995
  internalBinaryWrite(message: CreateDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2879
- /* optional uint64 category_id = 1 [jstype = JS_STRING]; */
2996
+ /* optional uint64 category_id = 1; */
2880
2997
  if (message.categoryId !== undefined)
2881
2998
  writer.tag(1, WireType.Varint).uint64(message.categoryId);
2882
2999
  /* string title = 2; */
@@ -2903,7 +3020,7 @@ class CreateDocumentRequest$Type extends MessageType<CreateDocumentRequest> {
2903
3020
  /* optional resources.documents.DocumentAccess access = 9; */
2904
3021
  if (message.access)
2905
3022
  DocumentAccess.internalBinaryWrite(message.access, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
2906
- /* optional uint64 template_id = 10 [jstype = JS_STRING]; */
3023
+ /* optional uint64 template_id = 10; */
2907
3024
  if (message.templateId !== undefined)
2908
3025
  writer.tag(10, WireType.Varint).uint64(message.templateId);
2909
3026
  let u = options.writeUnknownFields;
@@ -2920,12 +3037,12 @@ export const CreateDocumentRequest = new CreateDocumentRequest$Type();
2920
3037
  class CreateDocumentResponse$Type extends MessageType<CreateDocumentResponse> {
2921
3038
  constructor() {
2922
3039
  super("services.docstore.CreateDocumentResponse", [
2923
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3040
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
2924
3041
  ]);
2925
3042
  }
2926
3043
  create(value?: PartialMessage<CreateDocumentResponse>): CreateDocumentResponse {
2927
3044
  const message = globalThis.Object.create((this.messagePrototype!));
2928
- message.documentId = "0";
3045
+ message.documentId = 0;
2929
3046
  if (value !== undefined)
2930
3047
  reflectionMergePartial<CreateDocumentResponse>(this, message, value);
2931
3048
  return message;
@@ -2935,8 +3052,8 @@ class CreateDocumentResponse$Type extends MessageType<CreateDocumentResponse> {
2935
3052
  while (reader.pos < end) {
2936
3053
  let [fieldNo, wireType] = reader.tag();
2937
3054
  switch (fieldNo) {
2938
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
2939
- message.documentId = reader.uint64().toString();
3055
+ case /* uint64 document_id */ 1:
3056
+ message.documentId = reader.uint64().toNumber();
2940
3057
  break;
2941
3058
  default:
2942
3059
  let u = options.readUnknownField;
@@ -2950,8 +3067,8 @@ class CreateDocumentResponse$Type extends MessageType<CreateDocumentResponse> {
2950
3067
  return message;
2951
3068
  }
2952
3069
  internalBinaryWrite(message: CreateDocumentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2953
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
2954
- if (message.documentId !== "0")
3070
+ /* uint64 document_id = 1; */
3071
+ if (message.documentId !== 0)
2955
3072
  writer.tag(1, WireType.Varint).uint64(message.documentId);
2956
3073
  let u = options.writeUnknownFields;
2957
3074
  if (u !== false)
@@ -2967,8 +3084,8 @@ export const CreateDocumentResponse = new CreateDocumentResponse$Type();
2967
3084
  class UpdateDocumentRequest$Type extends MessageType<UpdateDocumentRequest> {
2968
3085
  constructor() {
2969
3086
  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*/ },
3087
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3088
+ { no: 2, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
2972
3089
  { no: 3, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
2973
3090
  { no: 4, name: "content", kind: "message", T: () => Content },
2974
3091
  { no: 5, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
@@ -2981,7 +3098,7 @@ class UpdateDocumentRequest$Type extends MessageType<UpdateDocumentRequest> {
2981
3098
  }
2982
3099
  create(value?: PartialMessage<UpdateDocumentRequest>): UpdateDocumentRequest {
2983
3100
  const message = globalThis.Object.create((this.messagePrototype!));
2984
- message.documentId = "0";
3101
+ message.documentId = 0;
2985
3102
  message.title = "";
2986
3103
  message.contentType = 0;
2987
3104
  message.state = "";
@@ -2996,11 +3113,11 @@ class UpdateDocumentRequest$Type extends MessageType<UpdateDocumentRequest> {
2996
3113
  while (reader.pos < end) {
2997
3114
  let [fieldNo, wireType] = reader.tag();
2998
3115
  switch (fieldNo) {
2999
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3000
- message.documentId = reader.uint64().toString();
3116
+ case /* uint64 document_id */ 1:
3117
+ message.documentId = reader.uint64().toNumber();
3001
3118
  break;
3002
- case /* optional uint64 category_id = 2 [jstype = JS_STRING];*/ 2:
3003
- message.categoryId = reader.uint64().toString();
3119
+ case /* optional uint64 category_id */ 2:
3120
+ message.categoryId = reader.uint64().toNumber();
3004
3121
  break;
3005
3122
  case /* string title */ 3:
3006
3123
  message.title = reader.string();
@@ -3038,10 +3155,10 @@ class UpdateDocumentRequest$Type extends MessageType<UpdateDocumentRequest> {
3038
3155
  return message;
3039
3156
  }
3040
3157
  internalBinaryWrite(message: UpdateDocumentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3041
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
3042
- if (message.documentId !== "0")
3158
+ /* uint64 document_id = 1; */
3159
+ if (message.documentId !== 0)
3043
3160
  writer.tag(1, WireType.Varint).uint64(message.documentId);
3044
- /* optional uint64 category_id = 2 [jstype = JS_STRING]; */
3161
+ /* optional uint64 category_id = 2; */
3045
3162
  if (message.categoryId !== undefined)
3046
3163
  writer.tag(2, WireType.Varint).uint64(message.categoryId);
3047
3164
  /* string title = 3; */
@@ -3083,13 +3200,13 @@ class ListDocumentActivityRequest$Type extends MessageType<ListDocumentActivityR
3083
3200
  constructor() {
3084
3201
  super("services.docstore.ListDocumentActivityRequest", [
3085
3202
  { 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*/ },
3203
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3087
3204
  { 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
3205
  ]);
3089
3206
  }
3090
3207
  create(value?: PartialMessage<ListDocumentActivityRequest>): ListDocumentActivityRequest {
3091
3208
  const message = globalThis.Object.create((this.messagePrototype!));
3092
- message.documentId = "0";
3209
+ message.documentId = 0;
3093
3210
  message.activityTypes = [];
3094
3211
  if (value !== undefined)
3095
3212
  reflectionMergePartial<ListDocumentActivityRequest>(this, message, value);
@@ -3103,8 +3220,8 @@ class ListDocumentActivityRequest$Type extends MessageType<ListDocumentActivityR
3103
3220
  case /* resources.common.database.PaginationRequest pagination */ 1:
3104
3221
  message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3105
3222
  break;
3106
- case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
3107
- message.documentId = reader.uint64().toString();
3223
+ case /* uint64 document_id */ 2:
3224
+ message.documentId = reader.uint64().toNumber();
3108
3225
  break;
3109
3226
  case /* repeated resources.documents.DocActivityType activity_types */ 3:
3110
3227
  if (wireType === WireType.LengthDelimited)
@@ -3128,8 +3245,8 @@ class ListDocumentActivityRequest$Type extends MessageType<ListDocumentActivityR
3128
3245
  /* resources.common.database.PaginationRequest pagination = 1; */
3129
3246
  if (message.pagination)
3130
3247
  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")
3248
+ /* uint64 document_id = 2; */
3249
+ if (message.documentId !== 0)
3133
3250
  writer.tag(2, WireType.Varint).uint64(message.documentId);
3134
3251
  /* repeated resources.documents.DocActivityType activity_types = 3; */
3135
3252
  if (message.activityTypes.length) {
@@ -3207,12 +3324,12 @@ class ListDocumentReqsRequest$Type extends MessageType<ListDocumentReqsRequest>
3207
3324
  constructor() {
3208
3325
  super("services.docstore.ListDocumentReqsRequest", [
3209
3326
  { 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*/ }
3327
+ { no: 2, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
3211
3328
  ]);
3212
3329
  }
3213
3330
  create(value?: PartialMessage<ListDocumentReqsRequest>): ListDocumentReqsRequest {
3214
3331
  const message = globalThis.Object.create((this.messagePrototype!));
3215
- message.documentId = "0";
3332
+ message.documentId = 0;
3216
3333
  if (value !== undefined)
3217
3334
  reflectionMergePartial<ListDocumentReqsRequest>(this, message, value);
3218
3335
  return message;
@@ -3225,8 +3342,8 @@ class ListDocumentReqsRequest$Type extends MessageType<ListDocumentReqsRequest>
3225
3342
  case /* resources.common.database.PaginationRequest pagination */ 1:
3226
3343
  message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
3227
3344
  break;
3228
- case /* uint64 document_id = 2 [jstype = JS_STRING];*/ 2:
3229
- message.documentId = reader.uint64().toString();
3345
+ case /* uint64 document_id */ 2:
3346
+ message.documentId = reader.uint64().toNumber();
3230
3347
  break;
3231
3348
  default:
3232
3349
  let u = options.readUnknownField;
@@ -3243,8 +3360,8 @@ class ListDocumentReqsRequest$Type extends MessageType<ListDocumentReqsRequest>
3243
3360
  /* resources.common.database.PaginationRequest pagination = 1; */
3244
3361
  if (message.pagination)
3245
3362
  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")
3363
+ /* uint64 document_id = 2; */
3364
+ if (message.documentId !== 0)
3248
3365
  writer.tag(2, WireType.Varint).uint64(message.documentId);
3249
3366
  let u = options.writeUnknownFields;
3250
3367
  if (u !== false)
@@ -3314,7 +3431,7 @@ export const ListDocumentReqsResponse = new ListDocumentReqsResponse$Type();
3314
3431
  class CreateDocumentReqRequest$Type extends MessageType<CreateDocumentReqRequest> {
3315
3432
  constructor() {
3316
3433
  super("services.docstore.CreateDocumentReqRequest", [
3317
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3434
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3318
3435
  { 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
3436
  { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
3320
3437
  { no: 4, name: "data", kind: "message", T: () => DocActivityData }
@@ -3322,7 +3439,7 @@ class CreateDocumentReqRequest$Type extends MessageType<CreateDocumentReqRequest
3322
3439
  }
3323
3440
  create(value?: PartialMessage<CreateDocumentReqRequest>): CreateDocumentReqRequest {
3324
3441
  const message = globalThis.Object.create((this.messagePrototype!));
3325
- message.documentId = "0";
3442
+ message.documentId = 0;
3326
3443
  message.requestType = 0;
3327
3444
  if (value !== undefined)
3328
3445
  reflectionMergePartial<CreateDocumentReqRequest>(this, message, value);
@@ -3333,8 +3450,8 @@ class CreateDocumentReqRequest$Type extends MessageType<CreateDocumentReqRequest
3333
3450
  while (reader.pos < end) {
3334
3451
  let [fieldNo, wireType] = reader.tag();
3335
3452
  switch (fieldNo) {
3336
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3337
- message.documentId = reader.uint64().toString();
3453
+ case /* uint64 document_id */ 1:
3454
+ message.documentId = reader.uint64().toNumber();
3338
3455
  break;
3339
3456
  case /* resources.documents.DocActivityType request_type */ 2:
3340
3457
  message.requestType = reader.int32();
@@ -3357,8 +3474,8 @@ class CreateDocumentReqRequest$Type extends MessageType<CreateDocumentReqRequest
3357
3474
  return message;
3358
3475
  }
3359
3476
  internalBinaryWrite(message: CreateDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3360
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
3361
- if (message.documentId !== "0")
3477
+ /* uint64 document_id = 1; */
3478
+ if (message.documentId !== 0)
3362
3479
  writer.tag(1, WireType.Varint).uint64(message.documentId);
3363
3480
  /* resources.documents.DocActivityType request_type = 2; */
3364
3481
  if (message.requestType !== 0)
@@ -3429,8 +3546,8 @@ export const CreateDocumentReqResponse = new CreateDocumentReqResponse$Type();
3429
3546
  class UpdateDocumentReqRequest$Type extends MessageType<UpdateDocumentReqRequest> {
3430
3547
  constructor() {
3431
3548
  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*/ },
3549
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3550
+ { no: 2, name: "request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3434
3551
  { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
3435
3552
  { no: 4, name: "data", kind: "message", T: () => DocActivityData },
3436
3553
  { no: 5, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
@@ -3438,8 +3555,8 @@ class UpdateDocumentReqRequest$Type extends MessageType<UpdateDocumentReqRequest
3438
3555
  }
3439
3556
  create(value?: PartialMessage<UpdateDocumentReqRequest>): UpdateDocumentReqRequest {
3440
3557
  const message = globalThis.Object.create((this.messagePrototype!));
3441
- message.documentId = "0";
3442
- message.requestId = "0";
3558
+ message.documentId = 0;
3559
+ message.requestId = 0;
3443
3560
  message.accepted = false;
3444
3561
  if (value !== undefined)
3445
3562
  reflectionMergePartial<UpdateDocumentReqRequest>(this, message, value);
@@ -3450,11 +3567,11 @@ class UpdateDocumentReqRequest$Type extends MessageType<UpdateDocumentReqRequest
3450
3567
  while (reader.pos < end) {
3451
3568
  let [fieldNo, wireType] = reader.tag();
3452
3569
  switch (fieldNo) {
3453
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3454
- message.documentId = reader.uint64().toString();
3570
+ case /* uint64 document_id */ 1:
3571
+ message.documentId = reader.uint64().toNumber();
3455
3572
  break;
3456
- case /* uint64 request_id = 2 [jstype = JS_STRING];*/ 2:
3457
- message.requestId = reader.uint64().toString();
3573
+ case /* uint64 request_id */ 2:
3574
+ message.requestId = reader.uint64().toNumber();
3458
3575
  break;
3459
3576
  case /* optional string reason */ 3:
3460
3577
  message.reason = reader.string();
@@ -3477,11 +3594,11 @@ class UpdateDocumentReqRequest$Type extends MessageType<UpdateDocumentReqRequest
3477
3594
  return message;
3478
3595
  }
3479
3596
  internalBinaryWrite(message: UpdateDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3480
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
3481
- if (message.documentId !== "0")
3597
+ /* uint64 document_id = 1; */
3598
+ if (message.documentId !== 0)
3482
3599
  writer.tag(1, WireType.Varint).uint64(message.documentId);
3483
- /* uint64 request_id = 2 [jstype = JS_STRING]; */
3484
- if (message.requestId !== "0")
3600
+ /* uint64 request_id = 2; */
3601
+ if (message.requestId !== 0)
3485
3602
  writer.tag(2, WireType.Varint).uint64(message.requestId);
3486
3603
  /* optional string reason = 3; */
3487
3604
  if (message.reason !== undefined)
@@ -3552,12 +3669,12 @@ export const UpdateDocumentReqResponse = new UpdateDocumentReqResponse$Type();
3552
3669
  class DeleteDocumentReqRequest$Type extends MessageType<DeleteDocumentReqRequest> {
3553
3670
  constructor() {
3554
3671
  super("services.docstore.DeleteDocumentReqRequest", [
3555
- { no: 1, name: "request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3672
+ { no: 1, name: "request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
3556
3673
  ]);
3557
3674
  }
3558
3675
  create(value?: PartialMessage<DeleteDocumentReqRequest>): DeleteDocumentReqRequest {
3559
3676
  const message = globalThis.Object.create((this.messagePrototype!));
3560
- message.requestId = "0";
3677
+ message.requestId = 0;
3561
3678
  if (value !== undefined)
3562
3679
  reflectionMergePartial<DeleteDocumentReqRequest>(this, message, value);
3563
3680
  return message;
@@ -3567,8 +3684,8 @@ class DeleteDocumentReqRequest$Type extends MessageType<DeleteDocumentReqRequest
3567
3684
  while (reader.pos < end) {
3568
3685
  let [fieldNo, wireType] = reader.tag();
3569
3686
  switch (fieldNo) {
3570
- case /* uint64 request_id = 1 [jstype = JS_STRING];*/ 1:
3571
- message.requestId = reader.uint64().toString();
3687
+ case /* uint64 request_id */ 1:
3688
+ message.requestId = reader.uint64().toNumber();
3572
3689
  break;
3573
3690
  default:
3574
3691
  let u = options.readUnknownField;
@@ -3582,8 +3699,8 @@ class DeleteDocumentReqRequest$Type extends MessageType<DeleteDocumentReqRequest
3582
3699
  return message;
3583
3700
  }
3584
3701
  internalBinaryWrite(message: DeleteDocumentReqRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3585
- /* uint64 request_id = 1 [jstype = JS_STRING]; */
3586
- if (message.requestId !== "0")
3702
+ /* uint64 request_id = 1; */
3703
+ if (message.requestId !== 0)
3587
3704
  writer.tag(1, WireType.Varint).uint64(message.requestId);
3588
3705
  let u = options.writeUnknownFields;
3589
3706
  if (u !== false)
@@ -3607,7 +3724,20 @@ class DeleteDocumentReqResponse$Type extends MessageType<DeleteDocumentReqRespon
3607
3724
  return message;
3608
3725
  }
3609
3726
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDocumentReqResponse): DeleteDocumentReqResponse {
3610
- return target ?? this.create();
3727
+ let message = target ?? this.create(), end = reader.pos + length;
3728
+ while (reader.pos < end) {
3729
+ let [fieldNo, wireType] = reader.tag();
3730
+ switch (fieldNo) {
3731
+ default:
3732
+ let u = options.readUnknownField;
3733
+ if (u === "throw")
3734
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3735
+ let d = reader.skip(wireType);
3736
+ if (u !== false)
3737
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3738
+ }
3739
+ }
3740
+ return message;
3611
3741
  }
3612
3742
  internalBinaryWrite(message: DeleteDocumentReqResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3613
3743
  let u = options.writeUnknownFields;
@@ -3624,12 +3754,12 @@ export const DeleteDocumentReqResponse = new DeleteDocumentReqResponse$Type();
3624
3754
  class GetDocumentAccessRequest$Type extends MessageType<GetDocumentAccessRequest> {
3625
3755
  constructor() {
3626
3756
  super("services.docstore.GetDocumentAccessRequest", [
3627
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
3757
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
3628
3758
  ]);
3629
3759
  }
3630
3760
  create(value?: PartialMessage<GetDocumentAccessRequest>): GetDocumentAccessRequest {
3631
3761
  const message = globalThis.Object.create((this.messagePrototype!));
3632
- message.documentId = "0";
3762
+ message.documentId = 0;
3633
3763
  if (value !== undefined)
3634
3764
  reflectionMergePartial<GetDocumentAccessRequest>(this, message, value);
3635
3765
  return message;
@@ -3639,8 +3769,8 @@ class GetDocumentAccessRequest$Type extends MessageType<GetDocumentAccessRequest
3639
3769
  while (reader.pos < end) {
3640
3770
  let [fieldNo, wireType] = reader.tag();
3641
3771
  switch (fieldNo) {
3642
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3643
- message.documentId = reader.uint64().toString();
3772
+ case /* uint64 document_id */ 1:
3773
+ message.documentId = reader.uint64().toNumber();
3644
3774
  break;
3645
3775
  default:
3646
3776
  let u = options.readUnknownField;
@@ -3654,8 +3784,8 @@ class GetDocumentAccessRequest$Type extends MessageType<GetDocumentAccessRequest
3654
3784
  return message;
3655
3785
  }
3656
3786
  internalBinaryWrite(message: GetDocumentAccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3657
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
3658
- if (message.documentId !== "0")
3787
+ /* uint64 document_id = 1; */
3788
+ if (message.documentId !== 0)
3659
3789
  writer.tag(1, WireType.Varint).uint64(message.documentId);
3660
3790
  let u = options.writeUnknownFields;
3661
3791
  if (u !== false)
@@ -3717,13 +3847,13 @@ export const GetDocumentAccessResponse = new GetDocumentAccessResponse$Type();
3717
3847
  class SetDocumentAccessRequest$Type extends MessageType<SetDocumentAccessRequest> {
3718
3848
  constructor() {
3719
3849
  super("services.docstore.SetDocumentAccessRequest", [
3720
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
3850
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
3721
3851
  { no: 2, name: "access", kind: "message", T: () => DocumentAccess, options: { "validate.rules": { message: { required: true } } } }
3722
3852
  ]);
3723
3853
  }
3724
3854
  create(value?: PartialMessage<SetDocumentAccessRequest>): SetDocumentAccessRequest {
3725
3855
  const message = globalThis.Object.create((this.messagePrototype!));
3726
- message.documentId = "0";
3856
+ message.documentId = 0;
3727
3857
  if (value !== undefined)
3728
3858
  reflectionMergePartial<SetDocumentAccessRequest>(this, message, value);
3729
3859
  return message;
@@ -3733,8 +3863,8 @@ class SetDocumentAccessRequest$Type extends MessageType<SetDocumentAccessRequest
3733
3863
  while (reader.pos < end) {
3734
3864
  let [fieldNo, wireType] = reader.tag();
3735
3865
  switch (fieldNo) {
3736
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
3737
- message.documentId = reader.uint64().toString();
3866
+ case /* uint64 document_id */ 1:
3867
+ message.documentId = reader.uint64().toNumber();
3738
3868
  break;
3739
3869
  case /* resources.documents.DocumentAccess access */ 2:
3740
3870
  message.access = DocumentAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
@@ -3751,8 +3881,8 @@ class SetDocumentAccessRequest$Type extends MessageType<SetDocumentAccessRequest
3751
3881
  return message;
3752
3882
  }
3753
3883
  internalBinaryWrite(message: SetDocumentAccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3754
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
3755
- if (message.documentId !== "0")
3884
+ /* uint64 document_id = 1; */
3885
+ if (message.documentId !== 0)
3756
3886
  writer.tag(1, WireType.Varint).uint64(message.documentId);
3757
3887
  /* resources.documents.DocumentAccess access = 2; */
3758
3888
  if (message.access)
@@ -3779,7 +3909,20 @@ class SetDocumentAccessResponse$Type extends MessageType<SetDocumentAccessRespon
3779
3909
  return message;
3780
3910
  }
3781
3911
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentAccessResponse): SetDocumentAccessResponse {
3782
- return target ?? this.create();
3912
+ let message = target ?? this.create(), end = reader.pos + length;
3913
+ while (reader.pos < end) {
3914
+ let [fieldNo, wireType] = reader.tag();
3915
+ switch (fieldNo) {
3916
+ default:
3917
+ let u = options.readUnknownField;
3918
+ if (u === "throw")
3919
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3920
+ let d = reader.skip(wireType);
3921
+ if (u !== false)
3922
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3923
+ }
3924
+ }
3925
+ return message;
3783
3926
  }
3784
3927
  internalBinaryWrite(message: SetDocumentAccessResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3785
3928
  let u = options.writeUnknownFields;
@@ -3935,7 +4078,20 @@ class ListCategoriesRequest$Type extends MessageType<ListCategoriesRequest> {
3935
4078
  return message;
3936
4079
  }
3937
4080
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCategoriesRequest): ListCategoriesRequest {
3938
- return target ?? this.create();
4081
+ let message = target ?? this.create(), end = reader.pos + length;
4082
+ while (reader.pos < end) {
4083
+ let [fieldNo, wireType] = reader.tag();
4084
+ switch (fieldNo) {
4085
+ default:
4086
+ let u = options.readUnknownField;
4087
+ if (u === "throw")
4088
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4089
+ let d = reader.skip(wireType);
4090
+ if (u !== false)
4091
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4092
+ }
4093
+ }
4094
+ return message;
3939
4095
  }
3940
4096
  internalBinaryWrite(message: ListCategoriesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3941
4097
  let u = options.writeUnknownFields;
@@ -3952,12 +4108,12 @@ export const ListCategoriesRequest = new ListCategoriesRequest$Type();
3952
4108
  class ListCategoriesResponse$Type extends MessageType<ListCategoriesResponse> {
3953
4109
  constructor() {
3954
4110
  super("services.docstore.ListCategoriesResponse", [
3955
- { no: 1, name: "category", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Category }
4111
+ { no: 1, name: "categories", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Category }
3956
4112
  ]);
3957
4113
  }
3958
4114
  create(value?: PartialMessage<ListCategoriesResponse>): ListCategoriesResponse {
3959
4115
  const message = globalThis.Object.create((this.messagePrototype!));
3960
- message.category = [];
4116
+ message.categories = [];
3961
4117
  if (value !== undefined)
3962
4118
  reflectionMergePartial<ListCategoriesResponse>(this, message, value);
3963
4119
  return message;
@@ -3967,8 +4123,8 @@ class ListCategoriesResponse$Type extends MessageType<ListCategoriesResponse> {
3967
4123
  while (reader.pos < end) {
3968
4124
  let [fieldNo, wireType] = reader.tag();
3969
4125
  switch (fieldNo) {
3970
- case /* repeated resources.documents.Category category */ 1:
3971
- message.category.push(Category.internalBinaryRead(reader, reader.uint32(), options));
4126
+ case /* repeated resources.documents.Category categories */ 1:
4127
+ message.categories.push(Category.internalBinaryRead(reader, reader.uint32(), options));
3972
4128
  break;
3973
4129
  default:
3974
4130
  let u = options.readUnknownField;
@@ -3982,9 +4138,9 @@ class ListCategoriesResponse$Type extends MessageType<ListCategoriesResponse> {
3982
4138
  return message;
3983
4139
  }
3984
4140
  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();
4141
+ /* repeated resources.documents.Category categories = 1; */
4142
+ for (let i = 0; i < message.categories.length; i++)
4143
+ Category.internalBinaryWrite(message.categories[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3988
4144
  let u = options.writeUnknownFields;
3989
4145
  if (u !== false)
3990
4146
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4045,12 +4201,12 @@ export const CreateCategoryRequest = new CreateCategoryRequest$Type();
4045
4201
  class CreateCategoryResponse$Type extends MessageType<CreateCategoryResponse> {
4046
4202
  constructor() {
4047
4203
  super("services.docstore.CreateCategoryResponse", [
4048
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
4204
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
4049
4205
  ]);
4050
4206
  }
4051
4207
  create(value?: PartialMessage<CreateCategoryResponse>): CreateCategoryResponse {
4052
4208
  const message = globalThis.Object.create((this.messagePrototype!));
4053
- message.id = "0";
4209
+ message.id = 0;
4054
4210
  if (value !== undefined)
4055
4211
  reflectionMergePartial<CreateCategoryResponse>(this, message, value);
4056
4212
  return message;
@@ -4060,8 +4216,8 @@ class CreateCategoryResponse$Type extends MessageType<CreateCategoryResponse> {
4060
4216
  while (reader.pos < end) {
4061
4217
  let [fieldNo, wireType] = reader.tag();
4062
4218
  switch (fieldNo) {
4063
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
4064
- message.id = reader.uint64().toString();
4219
+ case /* uint64 id */ 1:
4220
+ message.id = reader.uint64().toNumber();
4065
4221
  break;
4066
4222
  default:
4067
4223
  let u = options.readUnknownField;
@@ -4075,8 +4231,8 @@ class CreateCategoryResponse$Type extends MessageType<CreateCategoryResponse> {
4075
4231
  return message;
4076
4232
  }
4077
4233
  internalBinaryWrite(message: CreateCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4078
- /* uint64 id = 1 [jstype = JS_STRING]; */
4079
- if (message.id !== "0")
4234
+ /* uint64 id = 1; */
4235
+ if (message.id !== 0)
4080
4236
  writer.tag(1, WireType.Varint).uint64(message.id);
4081
4237
  let u = options.writeUnknownFields;
4082
4238
  if (u !== false)
@@ -4146,7 +4302,20 @@ class UpdateCategoryResponse$Type extends MessageType<UpdateCategoryResponse> {
4146
4302
  return message;
4147
4303
  }
4148
4304
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateCategoryResponse): UpdateCategoryResponse {
4149
- return target ?? this.create();
4305
+ let message = target ?? this.create(), end = reader.pos + length;
4306
+ while (reader.pos < end) {
4307
+ let [fieldNo, wireType] = reader.tag();
4308
+ switch (fieldNo) {
4309
+ default:
4310
+ let u = options.readUnknownField;
4311
+ if (u === "throw")
4312
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4313
+ let d = reader.skip(wireType);
4314
+ if (u !== false)
4315
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4316
+ }
4317
+ }
4318
+ return message;
4150
4319
  }
4151
4320
  internalBinaryWrite(message: UpdateCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4152
4321
  let u = options.writeUnknownFields;
@@ -4163,7 +4332,7 @@ export const UpdateCategoryResponse = new UpdateCategoryResponse$Type();
4163
4332
  class DeleteCategoryRequest$Type extends MessageType<DeleteCategoryRequest> {
4164
4333
  constructor() {
4165
4334
  super("services.docstore.DeleteCategoryRequest", [
4166
- { no: 1, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/ }
4335
+ { no: 1, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
4167
4336
  ]);
4168
4337
  }
4169
4338
  create(value?: PartialMessage<DeleteCategoryRequest>): DeleteCategoryRequest {
@@ -4178,12 +4347,12 @@ class DeleteCategoryRequest$Type extends MessageType<DeleteCategoryRequest> {
4178
4347
  while (reader.pos < end) {
4179
4348
  let [fieldNo, wireType] = reader.tag();
4180
4349
  switch (fieldNo) {
4181
- case /* repeated uint64 ids = 1 [jstype = JS_STRING];*/ 1:
4350
+ case /* repeated uint64 ids */ 1:
4182
4351
  if (wireType === WireType.LengthDelimited)
4183
4352
  for (let e = reader.int32() + reader.pos; reader.pos < e;)
4184
- message.ids.push(reader.uint64().toString());
4353
+ message.ids.push(reader.uint64().toNumber());
4185
4354
  else
4186
- message.ids.push(reader.uint64().toString());
4355
+ message.ids.push(reader.uint64().toNumber());
4187
4356
  break;
4188
4357
  default:
4189
4358
  let u = options.readUnknownField;
@@ -4197,7 +4366,7 @@ class DeleteCategoryRequest$Type extends MessageType<DeleteCategoryRequest> {
4197
4366
  return message;
4198
4367
  }
4199
4368
  internalBinaryWrite(message: DeleteCategoryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4200
- /* repeated uint64 ids = 1 [jstype = JS_STRING]; */
4369
+ /* repeated uint64 ids = 1; */
4201
4370
  if (message.ids.length) {
4202
4371
  writer.tag(1, WireType.LengthDelimited).fork();
4203
4372
  for (let i = 0; i < message.ids.length; i++)
@@ -4226,7 +4395,20 @@ class DeleteCategoryResponse$Type extends MessageType<DeleteCategoryResponse> {
4226
4395
  return message;
4227
4396
  }
4228
4397
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCategoryResponse): DeleteCategoryResponse {
4229
- return target ?? this.create();
4398
+ let message = target ?? this.create(), end = reader.pos + length;
4399
+ while (reader.pos < end) {
4400
+ let [fieldNo, wireType] = reader.tag();
4401
+ switch (fieldNo) {
4402
+ default:
4403
+ let u = options.readUnknownField;
4404
+ if (u === "throw")
4405
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4406
+ let d = reader.skip(wireType);
4407
+ if (u !== false)
4408
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4409
+ }
4410
+ }
4411
+ return message;
4230
4412
  }
4231
4413
  internalBinaryWrite(message: DeleteCategoryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4232
4414
  let u = options.writeUnknownFields;
@@ -4343,13 +4525,13 @@ export const ListDocumentPinsResponse = new ListDocumentPinsResponse$Type();
4343
4525
  class ToggleDocumentPinRequest$Type extends MessageType<ToggleDocumentPinRequest> {
4344
4526
  constructor() {
4345
4527
  super("services.docstore.ToggleDocumentPinRequest", [
4346
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
4528
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
4347
4529
  { no: 2, name: "state", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
4348
4530
  ]);
4349
4531
  }
4350
4532
  create(value?: PartialMessage<ToggleDocumentPinRequest>): ToggleDocumentPinRequest {
4351
4533
  const message = globalThis.Object.create((this.messagePrototype!));
4352
- message.documentId = "0";
4534
+ message.documentId = 0;
4353
4535
  message.state = false;
4354
4536
  if (value !== undefined)
4355
4537
  reflectionMergePartial<ToggleDocumentPinRequest>(this, message, value);
@@ -4360,8 +4542,8 @@ class ToggleDocumentPinRequest$Type extends MessageType<ToggleDocumentPinRequest
4360
4542
  while (reader.pos < end) {
4361
4543
  let [fieldNo, wireType] = reader.tag();
4362
4544
  switch (fieldNo) {
4363
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
4364
- message.documentId = reader.uint64().toString();
4545
+ case /* uint64 document_id */ 1:
4546
+ message.documentId = reader.uint64().toNumber();
4365
4547
  break;
4366
4548
  case /* bool state */ 2:
4367
4549
  message.state = reader.bool();
@@ -4378,8 +4560,8 @@ class ToggleDocumentPinRequest$Type extends MessageType<ToggleDocumentPinRequest
4378
4560
  return message;
4379
4561
  }
4380
4562
  internalBinaryWrite(message: ToggleDocumentPinRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4381
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
4382
- if (message.documentId !== "0")
4563
+ /* uint64 document_id = 1; */
4564
+ if (message.documentId !== 0)
4383
4565
  writer.tag(1, WireType.Varint).uint64(message.documentId);
4384
4566
  /* bool state = 2; */
4385
4567
  if (message.state !== false)
@@ -4445,14 +4627,14 @@ export const ToggleDocumentPinResponse = new ToggleDocumentPinResponse$Type();
4445
4627
  class SetDocumentReminderRequest$Type extends MessageType<SetDocumentReminderRequest> {
4446
4628
  constructor() {
4447
4629
  super("services.docstore.SetDocumentReminderRequest", [
4448
- { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
4630
+ { no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
4449
4631
  { no: 2, name: "reminder_time", kind: "message", T: () => Timestamp },
4450
4632
  { no: 3, name: "message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "1024" } } } }
4451
4633
  ]);
4452
4634
  }
4453
4635
  create(value?: PartialMessage<SetDocumentReminderRequest>): SetDocumentReminderRequest {
4454
4636
  const message = globalThis.Object.create((this.messagePrototype!));
4455
- message.documentId = "0";
4637
+ message.documentId = 0;
4456
4638
  if (value !== undefined)
4457
4639
  reflectionMergePartial<SetDocumentReminderRequest>(this, message, value);
4458
4640
  return message;
@@ -4462,8 +4644,8 @@ class SetDocumentReminderRequest$Type extends MessageType<SetDocumentReminderReq
4462
4644
  while (reader.pos < end) {
4463
4645
  let [fieldNo, wireType] = reader.tag();
4464
4646
  switch (fieldNo) {
4465
- case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
4466
- message.documentId = reader.uint64().toString();
4647
+ case /* uint64 document_id */ 1:
4648
+ message.documentId = reader.uint64().toNumber();
4467
4649
  break;
4468
4650
  case /* optional resources.timestamp.Timestamp reminder_time */ 2:
4469
4651
  message.reminderTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.reminderTime);
@@ -4483,8 +4665,8 @@ class SetDocumentReminderRequest$Type extends MessageType<SetDocumentReminderReq
4483
4665
  return message;
4484
4666
  }
4485
4667
  internalBinaryWrite(message: SetDocumentReminderRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4486
- /* uint64 document_id = 1 [jstype = JS_STRING]; */
4487
- if (message.documentId !== "0")
4668
+ /* uint64 document_id = 1; */
4669
+ if (message.documentId !== 0)
4488
4670
  writer.tag(1, WireType.Varint).uint64(message.documentId);
4489
4671
  /* optional resources.timestamp.Timestamp reminder_time = 2; */
4490
4672
  if (message.reminderTime)
@@ -4514,7 +4696,20 @@ class SetDocumentReminderResponse$Type extends MessageType<SetDocumentReminderRe
4514
4696
  return message;
4515
4697
  }
4516
4698
  internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetDocumentReminderResponse): SetDocumentReminderResponse {
4517
- return target ?? this.create();
4699
+ let message = target ?? this.create(), end = reader.pos + length;
4700
+ while (reader.pos < end) {
4701
+ let [fieldNo, wireType] = reader.tag();
4702
+ switch (fieldNo) {
4703
+ default:
4704
+ let u = options.readUnknownField;
4705
+ if (u === "throw")
4706
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
4707
+ let d = reader.skip(wireType);
4708
+ if (u !== false)
4709
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
4710
+ }
4711
+ }
4712
+ return message;
4518
4713
  }
4519
4714
  internalBinaryWrite(message: SetDocumentReminderResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
4520
4715
  let u = options.writeUnknownFields;