@bufbuild/protobuf 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/cjs/codegen-info.js +2 -0
  2. package/dist/cjs/google/protobuf/any_pb.js +4 -4
  3. package/dist/cjs/google/protobuf/api_pb.js +4 -4
  4. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +4 -4
  5. package/dist/cjs/google/protobuf/descriptor_pb.js +106 -28
  6. package/dist/cjs/google/protobuf/duration_pb.js +1 -1
  7. package/dist/cjs/google/protobuf/empty_pb.js +1 -1
  8. package/dist/cjs/google/protobuf/field_mask_pb.js +2 -2
  9. package/dist/cjs/google/protobuf/source_context_pb.js +1 -1
  10. package/dist/cjs/google/protobuf/struct_pb.js +5 -5
  11. package/dist/cjs/google/protobuf/timestamp_pb.js +2 -2
  12. package/dist/cjs/google/protobuf/type_pb.js +27 -6
  13. package/dist/cjs/google/protobuf/wrappers_pb.js +9 -9
  14. package/dist/cjs/index.js +0 -3
  15. package/dist/cjs/private/binary-format-common.js +44 -6
  16. package/dist/cjs/private/names.js +128 -97
  17. package/dist/cjs/proto-base64.js +2 -10
  18. package/dist/esm/codegen-info.js +3 -1
  19. package/dist/esm/create-descriptor-set.js +1 -1
  20. package/dist/esm/google/protobuf/any_pb.js +5 -4
  21. package/dist/esm/google/protobuf/api_pb.js +7 -4
  22. package/dist/esm/google/protobuf/compiler/plugin_pb.js +8 -4
  23. package/dist/esm/google/protobuf/descriptor_pb.js +132 -27
  24. package/dist/esm/google/protobuf/duration_pb.js +2 -1
  25. package/dist/esm/google/protobuf/empty_pb.js +2 -1
  26. package/dist/esm/google/protobuf/field_mask_pb.js +3 -2
  27. package/dist/esm/google/protobuf/source_context_pb.js +2 -1
  28. package/dist/esm/google/protobuf/struct_pb.js +8 -5
  29. package/dist/esm/google/protobuf/timestamp_pb.js +3 -2
  30. package/dist/esm/google/protobuf/type_pb.js +32 -6
  31. package/dist/esm/google/protobuf/wrappers_pb.js +18 -9
  32. package/dist/esm/index.js +1 -4
  33. package/dist/esm/private/binary-format-common.js +45 -7
  34. package/dist/esm/private/message-type.js +1 -1
  35. package/dist/esm/private/names.js +125 -96
  36. package/dist/esm/private/util-common.js +1 -1
  37. package/dist/esm/proto-base64.js +2 -10
  38. package/dist/types/codegen-info.d.ts +3 -1
  39. package/dist/types/google/protobuf/any_pb.d.ts +3 -3
  40. package/dist/types/google/protobuf/api_pb.d.ts +1 -1
  41. package/dist/types/google/protobuf/descriptor_pb.d.ts +107 -3
  42. package/dist/types/google/protobuf/struct_pb.d.ts +1 -1
  43. package/dist/types/google/protobuf/timestamp_pb.d.ts +1 -1
  44. package/dist/types/google/protobuf/type_pb.d.ts +19 -1
  45. package/dist/types/index.d.ts +5 -4
  46. package/dist/types/private/binary-format-common.d.ts +3 -2
  47. package/dist/types/private/json-format-common.d.ts +2 -1
  48. package/dist/types/private/message-type.d.ts +2 -1
  49. package/dist/types/private/names.d.ts +9 -0
  50. package/dist/types/private/scalars.d.ts +2 -1
  51. package/dist/types/proto-base64.d.ts +1 -9
  52. package/package.json +2 -2
@@ -19,7 +19,7 @@ import { proto2 } from "../../proto2.js";
19
19
  *
20
20
  * @generated from message google.protobuf.FileDescriptorSet
21
21
  */
22
- export class FileDescriptorSet extends Message {
22
+ class FileDescriptorSet extends Message {
23
23
  constructor(data) {
24
24
  super();
25
25
  /**
@@ -46,12 +46,13 @@ FileDescriptorSet.typeName = "google.protobuf.FileDescriptorSet";
46
46
  FileDescriptorSet.fields = proto2.util.newFieldList(() => [
47
47
  { no: 1, name: "file", kind: "message", T: FileDescriptorProto, repeated: true },
48
48
  ]);
49
+ export { FileDescriptorSet };
49
50
  /**
50
51
  * Describes a complete .proto file.
51
52
  *
52
53
  * @generated from message google.protobuf.FileDescriptorProto
53
54
  */
54
- export class FileDescriptorProto extends Message {
55
+ class FileDescriptorProto extends Message {
55
56
  constructor(data) {
56
57
  super();
57
58
  /**
@@ -123,12 +124,13 @@ FileDescriptorProto.fields = proto2.util.newFieldList(() => [
123
124
  { no: 12, name: "syntax", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
124
125
  { no: 13, name: "edition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
125
126
  ]);
127
+ export { FileDescriptorProto };
126
128
  /**
127
129
  * Describes a message type.
128
130
  *
129
131
  * @generated from message google.protobuf.DescriptorProto
130
132
  */
131
- export class DescriptorProto extends Message {
133
+ class DescriptorProto extends Message {
132
134
  constructor(data) {
133
135
  super();
134
136
  /**
@@ -195,10 +197,11 @@ DescriptorProto.fields = proto2.util.newFieldList(() => [
195
197
  { no: 9, name: "reserved_range", kind: "message", T: DescriptorProto_ReservedRange, repeated: true },
196
198
  { no: 10, name: "reserved_name", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
197
199
  ]);
200
+ export { DescriptorProto };
198
201
  /**
199
202
  * @generated from message google.protobuf.DescriptorProto.ExtensionRange
200
203
  */
201
- export class DescriptorProto_ExtensionRange extends Message {
204
+ class DescriptorProto_ExtensionRange extends Message {
202
205
  constructor(data) {
203
206
  super();
204
207
  proto2.util.initPartial(data, this);
@@ -223,6 +226,7 @@ DescriptorProto_ExtensionRange.fields = proto2.util.newFieldList(() => [
223
226
  { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
224
227
  { no: 3, name: "options", kind: "message", T: ExtensionRangeOptions, opt: true },
225
228
  ]);
229
+ export { DescriptorProto_ExtensionRange };
226
230
  /**
227
231
  * Range of reserved tag numbers. Reserved tag numbers may not be used by
228
232
  * fields or extension ranges in the same message. Reserved ranges may
@@ -230,7 +234,7 @@ DescriptorProto_ExtensionRange.fields = proto2.util.newFieldList(() => [
230
234
  *
231
235
  * @generated from message google.protobuf.DescriptorProto.ReservedRange
232
236
  */
233
- export class DescriptorProto_ReservedRange extends Message {
237
+ class DescriptorProto_ReservedRange extends Message {
234
238
  constructor(data) {
235
239
  super();
236
240
  proto2.util.initPartial(data, this);
@@ -254,10 +258,11 @@ DescriptorProto_ReservedRange.fields = proto2.util.newFieldList(() => [
254
258
  { no: 1, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
255
259
  { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
256
260
  ]);
261
+ export { DescriptorProto_ReservedRange };
257
262
  /**
258
263
  * @generated from message google.protobuf.ExtensionRangeOptions
259
264
  */
260
- export class ExtensionRangeOptions extends Message {
265
+ class ExtensionRangeOptions extends Message {
261
266
  constructor(data) {
262
267
  super();
263
268
  /**
@@ -266,6 +271,15 @@ export class ExtensionRangeOptions extends Message {
266
271
  * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
267
272
  */
268
273
  this.uninterpretedOption = [];
274
+ /**
275
+ * go/protobuf-stripping-extension-declarations
276
+ * Like Metadata, but we use a repeated field to hold all extension
277
+ * declarations. This should avoid the size increases of transforming a large
278
+ * extension range into small ranges in generated binaries.
279
+ *
280
+ * @generated from field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2;
281
+ */
282
+ this.declaration = [];
269
283
  proto2.util.initPartial(data, this);
270
284
  }
271
285
  static fromBinary(bytes, options) {
@@ -285,13 +299,71 @@ ExtensionRangeOptions.runtime = proto2;
285
299
  ExtensionRangeOptions.typeName = "google.protobuf.ExtensionRangeOptions";
286
300
  ExtensionRangeOptions.fields = proto2.util.newFieldList(() => [
287
301
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
302
+ { no: 2, name: "declaration", kind: "message", T: ExtensionRangeOptions_Declaration, repeated: true },
303
+ { no: 3, name: "verification", kind: "enum", T: proto2.getEnumType(ExtensionRangeOptions_VerificationState), opt: true, default: ExtensionRangeOptions_VerificationState.UNVERIFIED },
304
+ ]);
305
+ export { ExtensionRangeOptions };
306
+ /**
307
+ * The verification state of the extension range.
308
+ *
309
+ * @generated from enum google.protobuf.ExtensionRangeOptions.VerificationState
310
+ */
311
+ export var ExtensionRangeOptions_VerificationState;
312
+ (function (ExtensionRangeOptions_VerificationState) {
313
+ /**
314
+ * All the extensions of the range must be declared.
315
+ *
316
+ * @generated from enum value: DECLARATION = 0;
317
+ */
318
+ ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["DECLARATION"] = 0] = "DECLARATION";
319
+ /**
320
+ * @generated from enum value: UNVERIFIED = 1;
321
+ */
322
+ ExtensionRangeOptions_VerificationState[ExtensionRangeOptions_VerificationState["UNVERIFIED"] = 1] = "UNVERIFIED";
323
+ })(ExtensionRangeOptions_VerificationState || (ExtensionRangeOptions_VerificationState = {}));
324
+ // Retrieve enum metadata with: proto2.getEnumType(ExtensionRangeOptions_VerificationState)
325
+ proto2.util.setEnumType(ExtensionRangeOptions_VerificationState, "google.protobuf.ExtensionRangeOptions.VerificationState", [
326
+ { no: 0, name: "DECLARATION" },
327
+ { no: 1, name: "UNVERIFIED" },
288
328
  ]);
329
+ /**
330
+ * @generated from message google.protobuf.ExtensionRangeOptions.Declaration
331
+ */
332
+ class ExtensionRangeOptions_Declaration extends Message {
333
+ constructor(data) {
334
+ super();
335
+ proto2.util.initPartial(data, this);
336
+ }
337
+ static fromBinary(bytes, options) {
338
+ return new ExtensionRangeOptions_Declaration().fromBinary(bytes, options);
339
+ }
340
+ static fromJson(jsonValue, options) {
341
+ return new ExtensionRangeOptions_Declaration().fromJson(jsonValue, options);
342
+ }
343
+ static fromJsonString(jsonString, options) {
344
+ return new ExtensionRangeOptions_Declaration().fromJsonString(jsonString, options);
345
+ }
346
+ static equals(a, b) {
347
+ return proto2.util.equals(ExtensionRangeOptions_Declaration, a, b);
348
+ }
349
+ }
350
+ ExtensionRangeOptions_Declaration.runtime = proto2;
351
+ ExtensionRangeOptions_Declaration.typeName = "google.protobuf.ExtensionRangeOptions.Declaration";
352
+ ExtensionRangeOptions_Declaration.fields = proto2.util.newFieldList(() => [
353
+ { no: 1, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
354
+ { no: 2, name: "full_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
355
+ { no: 3, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
356
+ { no: 4, name: "is_repeated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
357
+ { no: 5, name: "reserved", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
358
+ { no: 6, name: "repeated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
359
+ ]);
360
+ export { ExtensionRangeOptions_Declaration };
289
361
  /**
290
362
  * Describes a field within a message.
291
363
  *
292
364
  * @generated from message google.protobuf.FieldDescriptorProto
293
365
  */
294
- export class FieldDescriptorProto extends Message {
366
+ class FieldDescriptorProto extends Message {
295
367
  constructor(data) {
296
368
  super();
297
369
  proto2.util.initPartial(data, this);
@@ -324,6 +396,7 @@ FieldDescriptorProto.fields = proto2.util.newFieldList(() => [
324
396
  { no: 8, name: "options", kind: "message", T: FieldOptions, opt: true },
325
397
  { no: 17, name: "proto3_optional", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
326
398
  ]);
399
+ export { FieldDescriptorProto };
327
400
  /**
328
401
  * @generated from enum google.protobuf.FieldDescriptorProto.Type
329
402
  */
@@ -476,7 +549,7 @@ proto2.util.setEnumType(FieldDescriptorProto_Label, "google.protobuf.FieldDescri
476
549
  *
477
550
  * @generated from message google.protobuf.OneofDescriptorProto
478
551
  */
479
- export class OneofDescriptorProto extends Message {
552
+ class OneofDescriptorProto extends Message {
480
553
  constructor(data) {
481
554
  super();
482
555
  proto2.util.initPartial(data, this);
@@ -500,12 +573,13 @@ OneofDescriptorProto.fields = proto2.util.newFieldList(() => [
500
573
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
501
574
  { no: 2, name: "options", kind: "message", T: OneofOptions, opt: true },
502
575
  ]);
576
+ export { OneofDescriptorProto };
503
577
  /**
504
578
  * Describes an enum type.
505
579
  *
506
580
  * @generated from message google.protobuf.EnumDescriptorProto
507
581
  */
508
- export class EnumDescriptorProto extends Message {
582
+ class EnumDescriptorProto extends Message {
509
583
  constructor(data) {
510
584
  super();
511
585
  /**
@@ -551,6 +625,7 @@ EnumDescriptorProto.fields = proto2.util.newFieldList(() => [
551
625
  { no: 4, name: "reserved_range", kind: "message", T: EnumDescriptorProto_EnumReservedRange, repeated: true },
552
626
  { no: 5, name: "reserved_name", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
553
627
  ]);
628
+ export { EnumDescriptorProto };
554
629
  /**
555
630
  * Range of reserved numeric values. Reserved values may not be used by
556
631
  * entries in the same enum. Reserved ranges may not overlap.
@@ -561,7 +636,7 @@ EnumDescriptorProto.fields = proto2.util.newFieldList(() => [
561
636
  *
562
637
  * @generated from message google.protobuf.EnumDescriptorProto.EnumReservedRange
563
638
  */
564
- export class EnumDescriptorProto_EnumReservedRange extends Message {
639
+ class EnumDescriptorProto_EnumReservedRange extends Message {
565
640
  constructor(data) {
566
641
  super();
567
642
  proto2.util.initPartial(data, this);
@@ -585,12 +660,13 @@ EnumDescriptorProto_EnumReservedRange.fields = proto2.util.newFieldList(() => [
585
660
  { no: 1, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
586
661
  { no: 2, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
587
662
  ]);
663
+ export { EnumDescriptorProto_EnumReservedRange };
588
664
  /**
589
665
  * Describes a value within an enum.
590
666
  *
591
667
  * @generated from message google.protobuf.EnumValueDescriptorProto
592
668
  */
593
- export class EnumValueDescriptorProto extends Message {
669
+ class EnumValueDescriptorProto extends Message {
594
670
  constructor(data) {
595
671
  super();
596
672
  proto2.util.initPartial(data, this);
@@ -615,12 +691,13 @@ EnumValueDescriptorProto.fields = proto2.util.newFieldList(() => [
615
691
  { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
616
692
  { no: 3, name: "options", kind: "message", T: EnumValueOptions, opt: true },
617
693
  ]);
694
+ export { EnumValueDescriptorProto };
618
695
  /**
619
696
  * Describes a service.
620
697
  *
621
698
  * @generated from message google.protobuf.ServiceDescriptorProto
622
699
  */
623
- export class ServiceDescriptorProto extends Message {
700
+ class ServiceDescriptorProto extends Message {
624
701
  constructor(data) {
625
702
  super();
626
703
  /**
@@ -649,12 +726,13 @@ ServiceDescriptorProto.fields = proto2.util.newFieldList(() => [
649
726
  { no: 2, name: "method", kind: "message", T: MethodDescriptorProto, repeated: true },
650
727
  { no: 3, name: "options", kind: "message", T: ServiceOptions, opt: true },
651
728
  ]);
729
+ export { ServiceDescriptorProto };
652
730
  /**
653
731
  * Describes a method of a service.
654
732
  *
655
733
  * @generated from message google.protobuf.MethodDescriptorProto
656
734
  */
657
- export class MethodDescriptorProto extends Message {
735
+ class MethodDescriptorProto extends Message {
658
736
  constructor(data) {
659
737
  super();
660
738
  proto2.util.initPartial(data, this);
@@ -682,10 +760,11 @@ MethodDescriptorProto.fields = proto2.util.newFieldList(() => [
682
760
  { no: 5, name: "client_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
683
761
  { no: 6, name: "server_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
684
762
  ]);
763
+ export { MethodDescriptorProto };
685
764
  /**
686
765
  * @generated from message google.protobuf.FileOptions
687
766
  */
688
- export class FileOptions extends Message {
767
+ class FileOptions extends Message {
689
768
  constructor(data) {
690
769
  super();
691
770
  /**
@@ -735,6 +814,7 @@ FileOptions.fields = proto2.util.newFieldList(() => [
735
814
  { no: 45, name: "ruby_package", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
736
815
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
737
816
  ]);
817
+ export { FileOptions };
738
818
  /**
739
819
  * Generated classes can be optimized for speed or code size.
740
820
  *
@@ -772,7 +852,7 @@ proto2.util.setEnumType(FileOptions_OptimizeMode, "google.protobuf.FileOptions.O
772
852
  /**
773
853
  * @generated from message google.protobuf.MessageOptions
774
854
  */
775
- export class MessageOptions extends Message {
855
+ class MessageOptions extends Message {
776
856
  constructor(data) {
777
857
  super();
778
858
  /**
@@ -806,12 +886,17 @@ MessageOptions.fields = proto2.util.newFieldList(() => [
806
886
  { no: 11, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
807
887
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
808
888
  ]);
889
+ export { MessageOptions };
809
890
  /**
810
891
  * @generated from message google.protobuf.FieldOptions
811
892
  */
812
- export class FieldOptions extends Message {
893
+ class FieldOptions extends Message {
813
894
  constructor(data) {
814
895
  super();
896
+ /**
897
+ * @generated from field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19;
898
+ */
899
+ this.targets = [];
815
900
  /**
816
901
  * The parser stores options it doesn't recognize here. See above.
817
902
  *
@@ -846,8 +931,10 @@ FieldOptions.fields = proto2.util.newFieldList(() => [
846
931
  { no: 16, name: "debug_redact", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
847
932
  { no: 17, name: "retention", kind: "enum", T: proto2.getEnumType(FieldOptions_OptionRetention), opt: true },
848
933
  { no: 18, name: "target", kind: "enum", T: proto2.getEnumType(FieldOptions_OptionTargetType), opt: true },
934
+ { no: 19, name: "targets", kind: "enum", T: proto2.getEnumType(FieldOptions_OptionTargetType), repeated: true },
849
935
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
850
936
  ]);
937
+ export { FieldOptions };
851
938
  /**
852
939
  * @generated from enum google.protobuf.FieldOptions.CType
853
940
  */
@@ -860,6 +947,13 @@ export var FieldOptions_CType;
860
947
  */
861
948
  FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING";
862
949
  /**
950
+ * The option [ctype=CORD] may be applied to a non-repeated field of type
951
+ * "bytes". It indicates that in C++, the data should be stored in a Cord
952
+ * instead of a string. For very large strings, this may reduce memory
953
+ * fragmentation. It may also allow better performance when parsing from a
954
+ * Cord, or when parsing with aliasing enabled, as the parsed Cord may then
955
+ * alias the original buffer.
956
+ *
863
957
  * @generated from enum value: CORD = 1;
864
958
  */
865
959
  FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD";
@@ -999,7 +1093,7 @@ proto2.util.setEnumType(FieldOptions_OptionTargetType, "google.protobuf.FieldOpt
999
1093
  /**
1000
1094
  * @generated from message google.protobuf.OneofOptions
1001
1095
  */
1002
- export class OneofOptions extends Message {
1096
+ class OneofOptions extends Message {
1003
1097
  constructor(data) {
1004
1098
  super();
1005
1099
  /**
@@ -1028,10 +1122,11 @@ OneofOptions.typeName = "google.protobuf.OneofOptions";
1028
1122
  OneofOptions.fields = proto2.util.newFieldList(() => [
1029
1123
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1030
1124
  ]);
1125
+ export { OneofOptions };
1031
1126
  /**
1032
1127
  * @generated from message google.protobuf.EnumOptions
1033
1128
  */
1034
- export class EnumOptions extends Message {
1129
+ class EnumOptions extends Message {
1035
1130
  constructor(data) {
1036
1131
  super();
1037
1132
  /**
@@ -1063,10 +1158,11 @@ EnumOptions.fields = proto2.util.newFieldList(() => [
1063
1158
  { no: 6, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
1064
1159
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1065
1160
  ]);
1161
+ export { EnumOptions };
1066
1162
  /**
1067
1163
  * @generated from message google.protobuf.EnumValueOptions
1068
1164
  */
1069
- export class EnumValueOptions extends Message {
1165
+ class EnumValueOptions extends Message {
1070
1166
  constructor(data) {
1071
1167
  super();
1072
1168
  /**
@@ -1096,10 +1192,11 @@ EnumValueOptions.fields = proto2.util.newFieldList(() => [
1096
1192
  { no: 1, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1097
1193
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1098
1194
  ]);
1195
+ export { EnumValueOptions };
1099
1196
  /**
1100
1197
  * @generated from message google.protobuf.ServiceOptions
1101
1198
  */
1102
- export class ServiceOptions extends Message {
1199
+ class ServiceOptions extends Message {
1103
1200
  constructor(data) {
1104
1201
  super();
1105
1202
  /**
@@ -1129,10 +1226,11 @@ ServiceOptions.fields = proto2.util.newFieldList(() => [
1129
1226
  { no: 33, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
1130
1227
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1131
1228
  ]);
1229
+ export { ServiceOptions };
1132
1230
  /**
1133
1231
  * @generated from message google.protobuf.MethodOptions
1134
1232
  */
1135
- export class MethodOptions extends Message {
1233
+ class MethodOptions extends Message {
1136
1234
  constructor(data) {
1137
1235
  super();
1138
1236
  /**
@@ -1163,6 +1261,7 @@ MethodOptions.fields = proto2.util.newFieldList(() => [
1163
1261
  { no: 34, name: "idempotency_level", kind: "enum", T: proto2.getEnumType(MethodOptions_IdempotencyLevel), opt: true, default: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN },
1164
1262
  { no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
1165
1263
  ]);
1264
+ export { MethodOptions };
1166
1265
  /**
1167
1266
  * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1168
1267
  * or neither? HTTP based RPC implementation may choose GET verb for safe
@@ -1205,7 +1304,7 @@ proto2.util.setEnumType(MethodOptions_IdempotencyLevel, "google.protobuf.MethodO
1205
1304
  *
1206
1305
  * @generated from message google.protobuf.UninterpretedOption
1207
1306
  */
1208
- export class UninterpretedOption extends Message {
1307
+ class UninterpretedOption extends Message {
1209
1308
  constructor(data) {
1210
1309
  super();
1211
1310
  /**
@@ -1238,6 +1337,7 @@ UninterpretedOption.fields = proto2.util.newFieldList(() => [
1238
1337
  { no: 7, name: "string_value", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
1239
1338
  { no: 8, name: "aggregate_value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1240
1339
  ]);
1340
+ export { UninterpretedOption };
1241
1341
  /**
1242
1342
  * The name of the uninterpreted option. Each string represents a segment in
1243
1343
  * a dot-separated name. is_extension is true iff a segment represents an
@@ -1247,7 +1347,7 @@ UninterpretedOption.fields = proto2.util.newFieldList(() => [
1247
1347
  *
1248
1348
  * @generated from message google.protobuf.UninterpretedOption.NamePart
1249
1349
  */
1250
- export class UninterpretedOption_NamePart extends Message {
1350
+ class UninterpretedOption_NamePart extends Message {
1251
1351
  constructor(data) {
1252
1352
  super();
1253
1353
  proto2.util.initPartial(data, this);
@@ -1271,13 +1371,14 @@ UninterpretedOption_NamePart.fields = proto2.util.newFieldList(() => [
1271
1371
  { no: 1, name: "name_part", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1272
1372
  { no: 2, name: "is_extension", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1273
1373
  ]);
1374
+ export { UninterpretedOption_NamePart };
1274
1375
  /**
1275
1376
  * Encapsulates information about the original source file from which a
1276
1377
  * FileDescriptorProto was generated.
1277
1378
  *
1278
1379
  * @generated from message google.protobuf.SourceCodeInfo
1279
1380
  */
1280
- export class SourceCodeInfo extends Message {
1381
+ class SourceCodeInfo extends Message {
1281
1382
  constructor(data) {
1282
1383
  super();
1283
1384
  /**
@@ -1348,10 +1449,11 @@ SourceCodeInfo.typeName = "google.protobuf.SourceCodeInfo";
1348
1449
  SourceCodeInfo.fields = proto2.util.newFieldList(() => [
1349
1450
  { no: 1, name: "location", kind: "message", T: SourceCodeInfo_Location, repeated: true },
1350
1451
  ]);
1452
+ export { SourceCodeInfo };
1351
1453
  /**
1352
1454
  * @generated from message google.protobuf.SourceCodeInfo.Location
1353
1455
  */
1354
- export class SourceCodeInfo_Location extends Message {
1456
+ class SourceCodeInfo_Location extends Message {
1355
1457
  constructor(data) {
1356
1458
  super();
1357
1459
  /**
@@ -1420,6 +1522,7 @@ SourceCodeInfo_Location.fields = proto2.util.newFieldList(() => [
1420
1522
  { no: 4, name: "trailing_comments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1421
1523
  { no: 6, name: "leading_detached_comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1422
1524
  ]);
1525
+ export { SourceCodeInfo_Location };
1423
1526
  /**
1424
1527
  * Describes the relationship between generated code and its original source
1425
1528
  * file. A GeneratedCodeInfo message is associated with only one generated
@@ -1427,7 +1530,7 @@ SourceCodeInfo_Location.fields = proto2.util.newFieldList(() => [
1427
1530
  *
1428
1531
  * @generated from message google.protobuf.GeneratedCodeInfo
1429
1532
  */
1430
- export class GeneratedCodeInfo extends Message {
1533
+ class GeneratedCodeInfo extends Message {
1431
1534
  constructor(data) {
1432
1535
  super();
1433
1536
  /**
@@ -1457,10 +1560,11 @@ GeneratedCodeInfo.typeName = "google.protobuf.GeneratedCodeInfo";
1457
1560
  GeneratedCodeInfo.fields = proto2.util.newFieldList(() => [
1458
1561
  { no: 1, name: "annotation", kind: "message", T: GeneratedCodeInfo_Annotation, repeated: true },
1459
1562
  ]);
1563
+ export { GeneratedCodeInfo };
1460
1564
  /**
1461
1565
  * @generated from message google.protobuf.GeneratedCodeInfo.Annotation
1462
1566
  */
1463
- export class GeneratedCodeInfo_Annotation extends Message {
1567
+ class GeneratedCodeInfo_Annotation extends Message {
1464
1568
  constructor(data) {
1465
1569
  super();
1466
1570
  /**
@@ -1494,6 +1598,7 @@ GeneratedCodeInfo_Annotation.fields = proto2.util.newFieldList(() => [
1494
1598
  { no: 4, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
1495
1599
  { no: 5, name: "semantic", kind: "enum", T: proto2.getEnumType(GeneratedCodeInfo_Annotation_Semantic), opt: true },
1496
1600
  ]);
1601
+ export { GeneratedCodeInfo_Annotation };
1497
1602
  /**
1498
1603
  * Represents the identified object's effect on the element in the original
1499
1604
  * .proto file.
@@ -77,7 +77,7 @@ import { proto3 } from "../../proto3.js";
77
77
  *
78
78
  * @generated from message google.protobuf.Duration
79
79
  */
80
- export class Duration extends Message {
80
+ class Duration extends Message {
81
81
  constructor(data) {
82
82
  super();
83
83
  /**
@@ -163,3 +163,4 @@ Duration.fields = proto3.util.newFieldList(() => [
163
163
  { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
164
164
  { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
165
165
  ]);
166
+ export { Duration };
@@ -25,7 +25,7 @@ import { proto3 } from "../../proto3.js";
25
25
  *
26
26
  * @generated from message google.protobuf.Empty
27
27
  */
28
- export class Empty extends Message {
28
+ class Empty extends Message {
29
29
  constructor(data) {
30
30
  super();
31
31
  proto3.util.initPartial(data, this);
@@ -46,3 +46,4 @@ export class Empty extends Message {
46
46
  Empty.runtime = proto3;
47
47
  Empty.typeName = "google.protobuf.Empty";
48
48
  Empty.fields = proto3.util.newFieldList(() => []);
49
+ export { Empty };
@@ -216,7 +216,7 @@ import { proto3 } from "../../proto3.js";
216
216
  *
217
217
  * @generated from message google.protobuf.FieldMask
218
218
  */
219
- export class FieldMask extends Message {
219
+ class FieldMask extends Message {
220
220
  constructor(data) {
221
221
  super();
222
222
  /**
@@ -265,7 +265,7 @@ export class FieldMask extends Message {
265
265
  }
266
266
  return this.paths.map(p => {
267
267
  if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
268
- throw new Error("cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
268
+ throw new Error("cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
269
269
  }
270
270
  return protoCamelCase(p);
271
271
  }).join(",");
@@ -305,3 +305,4 @@ FieldMask.typeName = "google.protobuf.FieldMask";
305
305
  FieldMask.fields = proto3.util.newFieldList(() => [
306
306
  { no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
307
307
  ]);
308
+ export { FieldMask };
@@ -19,7 +19,7 @@ import { proto3 } from "../../proto3.js";
19
19
  *
20
20
  * @generated from message google.protobuf.SourceContext
21
21
  */
22
- export class SourceContext extends Message {
22
+ class SourceContext extends Message {
23
23
  constructor(data) {
24
24
  super();
25
25
  /**
@@ -49,3 +49,4 @@ SourceContext.typeName = "google.protobuf.SourceContext";
49
49
  SourceContext.fields = proto3.util.newFieldList(() => [
50
50
  { no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
51
51
  ]);
52
+ export { SourceContext };
@@ -11,7 +11,7 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- // @generated by protoc-gen-es v1.1.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
14
+ // @generated by protoc-gen-es v1.2.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
15
15
  // @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3)
16
16
  /* eslint-disable */
17
17
  import { proto3 } from "../../proto3.js";
@@ -20,7 +20,7 @@ import { Message } from "../../message.js";
20
20
  * `NullValue` is a singleton enumeration to represent the null value for the
21
21
  * `Value` type union.
22
22
  *
23
- * The JSON representation for `NullValue` is JSON `null`.
23
+ * The JSON representation for `NullValue` is JSON `null`.
24
24
  *
25
25
  * @generated from enum google.protobuf.NullValue
26
26
  */
@@ -49,7 +49,7 @@ proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [
49
49
  *
50
50
  * @generated from message google.protobuf.Struct
51
51
  */
52
- export class Struct extends Message {
52
+ class Struct extends Message {
53
53
  constructor(data) {
54
54
  super();
55
55
  /**
@@ -94,6 +94,7 @@ Struct.typeName = "google.protobuf.Struct";
94
94
  Struct.fields = proto3.util.newFieldList(() => [
95
95
  { no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: Value } },
96
96
  ]);
97
+ export { Struct };
97
98
  /**
98
99
  * `Value` represents a dynamically typed value which can be either
99
100
  * null, a number, a string, a boolean, a recursive struct value, or a
@@ -104,7 +105,7 @@ Struct.fields = proto3.util.newFieldList(() => [
104
105
  *
105
106
  * @generated from message google.protobuf.Value
106
107
  */
107
- export class Value extends Message {
108
+ class Value extends Message {
108
109
  constructor(data) {
109
110
  super();
110
111
  /**
@@ -184,6 +185,7 @@ Value.fields = proto3.util.newFieldList(() => [
184
185
  { no: 5, name: "struct_value", kind: "message", T: Struct, oneof: "kind" },
185
186
  { no: 6, name: "list_value", kind: "message", T: ListValue, oneof: "kind" },
186
187
  ]);
188
+ export { Value };
187
189
  /**
188
190
  * `ListValue` is a wrapper around a repeated field of values.
189
191
  *
@@ -191,7 +193,7 @@ Value.fields = proto3.util.newFieldList(() => [
191
193
  *
192
194
  * @generated from message google.protobuf.ListValue
193
195
  */
194
- export class ListValue extends Message {
196
+ class ListValue extends Message {
195
197
  constructor(data) {
196
198
  super();
197
199
  /**
@@ -232,3 +234,4 @@ ListValue.typeName = "google.protobuf.ListValue";
232
234
  ListValue.fields = proto3.util.newFieldList(() => [
233
235
  { no: 1, name: "values", kind: "message", T: Value, repeated: true },
234
236
  ]);
237
+ export { ListValue };
@@ -102,13 +102,13 @@ import { proto3 } from "../../proto3.js";
102
102
  * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
103
103
  * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
104
104
  * the Joda Time's [`ISODateTimeFormat.dateTime()`](
105
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
105
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
106
106
  * ) to obtain a formatter capable of generating timestamps in this format.
107
107
  *
108
108
  *
109
109
  * @generated from message google.protobuf.Timestamp
110
110
  */
111
- export class Timestamp extends Message {
111
+ class Timestamp extends Message {
112
112
  constructor(data) {
113
113
  super();
114
114
  /**
@@ -207,3 +207,4 @@ Timestamp.fields = proto3.util.newFieldList(() => [
207
207
  { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
208
208
  { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
209
209
  ]);
210
+ export { Timestamp };