protobufjs 8.6.0 → 8.6.2

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 (108) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +441 -441
  3. package/dist/light/protobuf.js +8473 -8516
  4. package/dist/light/protobuf.js.map +1 -1
  5. package/dist/light/protobuf.min.js +3 -3
  6. package/dist/light/protobuf.min.js.map +1 -1
  7. package/dist/minimal/protobuf.js +3018 -3061
  8. package/dist/minimal/protobuf.js.map +1 -1
  9. package/dist/minimal/protobuf.min.js +3 -3
  10. package/dist/minimal/protobuf.min.js.map +1 -1
  11. package/dist/protobuf.js +10376 -10419
  12. package/dist/protobuf.js.map +1 -1
  13. package/dist/protobuf.min.js +3 -3
  14. package/dist/protobuf.min.js.map +1 -1
  15. package/ext/README.md +70 -70
  16. package/ext/debug/README.md +4 -4
  17. package/ext/debug/index.js +71 -71
  18. package/ext/descriptor/README.md +5 -5
  19. package/ext/descriptor/index.d.ts +2 -2
  20. package/ext/descriptor/index.js +2 -2
  21. package/ext/descriptor.d.ts +87 -86
  22. package/ext/descriptor.generated.d.ts +14 -6
  23. package/ext/descriptor.js +1354 -1303
  24. package/ext/protojson.LICENSE +201 -201
  25. package/ext/protojson.d.ts +20 -20
  26. package/ext/protojson.js +925 -903
  27. package/ext/textformat.d.ts +19 -19
  28. package/ext/textformat.js +1256 -1256
  29. package/google/LICENSE +27 -27
  30. package/google/README.md +1 -1
  31. package/google/api/annotations.json +82 -82
  32. package/google/api/annotations.proto +10 -10
  33. package/google/api/http.json +85 -85
  34. package/google/api/http.proto +30 -30
  35. package/google/protobuf/api.json +117 -117
  36. package/google/protobuf/api.proto +33 -33
  37. package/google/protobuf/compiler/plugin.json +126 -126
  38. package/google/protobuf/compiler/plugin.proto +47 -47
  39. package/google/protobuf/descriptor.json +1381 -1381
  40. package/google/protobuf/descriptor.proto +534 -534
  41. package/google/protobuf/source_context.json +19 -19
  42. package/google/protobuf/source_context.proto +7 -7
  43. package/google/protobuf/type.json +201 -201
  44. package/google/protobuf/type.proto +89 -89
  45. package/index.d.ts +10 -18
  46. package/index.js +4 -4
  47. package/light.d.ts +2 -2
  48. package/light.js +3 -3
  49. package/minimal.d.ts +2 -2
  50. package/minimal.js +4 -4
  51. package/package.json +93 -93
  52. package/src/common.js +399 -399
  53. package/src/converter.js +344 -344
  54. package/src/decoder.js +208 -208
  55. package/src/encoder.js +111 -111
  56. package/src/enum.js +231 -231
  57. package/src/field.js +497 -497
  58. package/src/index-light.js +104 -104
  59. package/src/index-minimal.js +36 -36
  60. package/src/index.js +12 -12
  61. package/src/mapfield.js +136 -136
  62. package/src/message.js +137 -137
  63. package/src/method.js +175 -175
  64. package/src/namespace.js +565 -565
  65. package/src/object.js +382 -382
  66. package/src/oneof.js +225 -225
  67. package/src/parse.js +1068 -1068
  68. package/src/reader.js +543 -543
  69. package/src/reader_buffer.js +72 -72
  70. package/src/root.js +416 -416
  71. package/src/roots.js +18 -18
  72. package/src/rpc/service.js +148 -148
  73. package/src/rpc.js +36 -36
  74. package/src/service.js +198 -198
  75. package/src/tokenize.js +421 -421
  76. package/src/type.js +655 -655
  77. package/src/types.js +196 -196
  78. package/src/typescript.js +25 -25
  79. package/src/util/aspromise.d.ts +13 -13
  80. package/src/util/aspromise.js +52 -52
  81. package/src/util/base64.d.ts +32 -32
  82. package/src/util/base64.js +146 -146
  83. package/src/util/codegen.d.ts +31 -31
  84. package/src/util/codegen.js +113 -113
  85. package/src/util/eventemitter.d.ts +45 -45
  86. package/src/util/eventemitter.js +86 -86
  87. package/src/util/fetch.d.ts +56 -56
  88. package/src/util/fetch.js +112 -112
  89. package/src/util/float.d.ts +83 -83
  90. package/src/util/float.js +335 -335
  91. package/src/util/fs.js +11 -11
  92. package/src/util/longbits.js +200 -200
  93. package/src/util/minimal.js +515 -518
  94. package/src/util/path.d.ts +22 -22
  95. package/src/util/path.js +72 -72
  96. package/src/util/patterns.js +7 -7
  97. package/src/util/pool.d.ts +32 -32
  98. package/src/util/pool.js +48 -48
  99. package/src/util/utf8.d.ts +24 -24
  100. package/src/util/utf8.js +130 -130
  101. package/src/util.js +242 -242
  102. package/src/verifier.js +180 -180
  103. package/src/wrappers.js +106 -106
  104. package/src/writer.js +495 -495
  105. package/src/writer_buffer.js +102 -102
  106. package/tsconfig.json +6 -6
  107. package/src/util/inquire.d.ts +0 -10
  108. package/src/util/inquire.js +0 -38
package/src/common.js CHANGED
@@ -1,399 +1,399 @@
1
- "use strict";
2
- module.exports = common;
3
-
4
- var commonRe = /\/|\./;
5
-
6
- /**
7
- * Provides common type definitions.
8
- * Can also be used to provide additional google types or your own custom types.
9
- * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name
10
- * @param {Object.<string,*>} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition
11
- * @returns {undefined}
12
- * @property {INamespace} google/protobuf/any.proto Any
13
- * @property {INamespace} google/protobuf/duration.proto Duration
14
- * @property {INamespace} google/protobuf/empty.proto Empty
15
- * @property {INamespace} google/protobuf/field_mask.proto FieldMask
16
- * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue
17
- * @property {INamespace} google/protobuf/timestamp.proto Timestamp
18
- * @property {INamespace} google/protobuf/wrappers.proto Wrappers
19
- * @example
20
- * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)
21
- * protobuf.common("descriptor", descriptorJson);
22
- *
23
- * // manually provides a custom definition (uses my.foo namespace)
24
- * protobuf.common("my/foo/bar.proto", myFooBarJson);
25
- */
26
- function common(name, json) {
27
- if (!commonRe.test(name)) {
28
- name = "google/protobuf/" + name + ".proto";
29
- json = { nested: { google: { nested: { protobuf: { nested: json } } } } };
30
- }
31
- common[name] = json;
32
- }
33
-
34
- // Not provided because of limited use (feel free to discuss or to provide yourself):
35
- //
36
- // google/protobuf/descriptor.proto
37
- // google/protobuf/source_context.proto
38
- // google/protobuf/type.proto
39
- //
40
- // Stripped and pre-parsed versions of these non-bundled files are instead available as part of
41
- // the repository or package within the google/protobuf directory.
42
-
43
- common("any", {
44
-
45
- /**
46
- * Properties of a google.protobuf.Any message.
47
- * @interface IAny
48
- * @type {Object}
49
- * @property {string} [typeUrl]
50
- * @property {Uint8Array} [bytes]
51
- * @memberof common
52
- */
53
- Any: {
54
- fields: {
55
- type_url: {
56
- type: "string",
57
- id: 1
58
- },
59
- value: {
60
- type: "bytes",
61
- id: 2
62
- }
63
- }
64
- }
65
- });
66
-
67
- var timeType;
68
-
69
- common("duration", {
70
-
71
- /**
72
- * Properties of a google.protobuf.Duration message.
73
- * @interface IDuration
74
- * @type {Object}
75
- * @property {number|Long} [seconds]
76
- * @property {number} [nanos]
77
- * @memberof common
78
- */
79
- Duration: timeType = {
80
- fields: {
81
- seconds: {
82
- type: "int64",
83
- id: 1
84
- },
85
- nanos: {
86
- type: "int32",
87
- id: 2
88
- }
89
- }
90
- }
91
- });
92
-
93
- common("timestamp", {
94
-
95
- /**
96
- * Properties of a google.protobuf.Timestamp message.
97
- * @interface ITimestamp
98
- * @type {Object}
99
- * @property {number|Long} [seconds]
100
- * @property {number} [nanos]
101
- * @memberof common
102
- */
103
- Timestamp: timeType
104
- });
105
-
106
- common("empty", {
107
-
108
- /**
109
- * Properties of a google.protobuf.Empty message.
110
- * @interface IEmpty
111
- * @memberof common
112
- */
113
- Empty: {
114
- fields: {}
115
- }
116
- });
117
-
118
- common("struct", {
119
-
120
- /**
121
- * Properties of a google.protobuf.Struct message.
122
- * @interface IStruct
123
- * @type {Object}
124
- * @property {Object.<string,IValue>} [fields]
125
- * @memberof common
126
- */
127
- Struct: {
128
- fields: {
129
- fields: {
130
- keyType: "string",
131
- type: "Value",
132
- id: 1
133
- }
134
- }
135
- },
136
-
137
- /**
138
- * Properties of a google.protobuf.Value message.
139
- * @interface IValue
140
- * @type {Object}
141
- * @property {string} [kind]
142
- * @property {0} [nullValue]
143
- * @property {number} [numberValue]
144
- * @property {string} [stringValue]
145
- * @property {boolean} [boolValue]
146
- * @property {IStruct} [structValue]
147
- * @property {IListValue} [listValue]
148
- * @memberof common
149
- */
150
- Value: {
151
- oneofs: {
152
- kind: {
153
- oneof: [
154
- "nullValue",
155
- "numberValue",
156
- "stringValue",
157
- "boolValue",
158
- "structValue",
159
- "listValue"
160
- ]
161
- }
162
- },
163
- fields: {
164
- nullValue: {
165
- type: "NullValue",
166
- id: 1
167
- },
168
- numberValue: {
169
- type: "double",
170
- id: 2
171
- },
172
- stringValue: {
173
- type: "string",
174
- id: 3
175
- },
176
- boolValue: {
177
- type: "bool",
178
- id: 4
179
- },
180
- structValue: {
181
- type: "Struct",
182
- id: 5
183
- },
184
- listValue: {
185
- type: "ListValue",
186
- id: 6
187
- }
188
- }
189
- },
190
-
191
- NullValue: {
192
- values: {
193
- NULL_VALUE: 0
194
- }
195
- },
196
-
197
- /**
198
- * Properties of a google.protobuf.ListValue message.
199
- * @interface IListValue
200
- * @type {Object}
201
- * @property {Array.<IValue>} [values]
202
- * @memberof common
203
- */
204
- ListValue: {
205
- fields: {
206
- values: {
207
- rule: "repeated",
208
- type: "Value",
209
- id: 1
210
- }
211
- }
212
- }
213
- });
214
-
215
- common("wrappers", {
216
-
217
- /**
218
- * Properties of a google.protobuf.DoubleValue message.
219
- * @interface IDoubleValue
220
- * @type {Object}
221
- * @property {number} [value]
222
- * @memberof common
223
- */
224
- DoubleValue: {
225
- fields: {
226
- value: {
227
- type: "double",
228
- id: 1
229
- }
230
- }
231
- },
232
-
233
- /**
234
- * Properties of a google.protobuf.FloatValue message.
235
- * @interface IFloatValue
236
- * @type {Object}
237
- * @property {number} [value]
238
- * @memberof common
239
- */
240
- FloatValue: {
241
- fields: {
242
- value: {
243
- type: "float",
244
- id: 1
245
- }
246
- }
247
- },
248
-
249
- /**
250
- * Properties of a google.protobuf.Int64Value message.
251
- * @interface IInt64Value
252
- * @type {Object}
253
- * @property {number|Long} [value]
254
- * @memberof common
255
- */
256
- Int64Value: {
257
- fields: {
258
- value: {
259
- type: "int64",
260
- id: 1
261
- }
262
- }
263
- },
264
-
265
- /**
266
- * Properties of a google.protobuf.UInt64Value message.
267
- * @interface IUInt64Value
268
- * @type {Object}
269
- * @property {number|Long} [value]
270
- * @memberof common
271
- */
272
- UInt64Value: {
273
- fields: {
274
- value: {
275
- type: "uint64",
276
- id: 1
277
- }
278
- }
279
- },
280
-
281
- /**
282
- * Properties of a google.protobuf.Int32Value message.
283
- * @interface IInt32Value
284
- * @type {Object}
285
- * @property {number} [value]
286
- * @memberof common
287
- */
288
- Int32Value: {
289
- fields: {
290
- value: {
291
- type: "int32",
292
- id: 1
293
- }
294
- }
295
- },
296
-
297
- /**
298
- * Properties of a google.protobuf.UInt32Value message.
299
- * @interface IUInt32Value
300
- * @type {Object}
301
- * @property {number} [value]
302
- * @memberof common
303
- */
304
- UInt32Value: {
305
- fields: {
306
- value: {
307
- type: "uint32",
308
- id: 1
309
- }
310
- }
311
- },
312
-
313
- /**
314
- * Properties of a google.protobuf.BoolValue message.
315
- * @interface IBoolValue
316
- * @type {Object}
317
- * @property {boolean} [value]
318
- * @memberof common
319
- */
320
- BoolValue: {
321
- fields: {
322
- value: {
323
- type: "bool",
324
- id: 1
325
- }
326
- }
327
- },
328
-
329
- /**
330
- * Properties of a google.protobuf.StringValue message.
331
- * @interface IStringValue
332
- * @type {Object}
333
- * @property {string} [value]
334
- * @memberof common
335
- */
336
- StringValue: {
337
- fields: {
338
- value: {
339
- type: "string",
340
- id: 1
341
- }
342
- }
343
- },
344
-
345
- /**
346
- * Properties of a google.protobuf.BytesValue message.
347
- * @interface IBytesValue
348
- * @type {Object}
349
- * @property {Uint8Array} [value]
350
- * @memberof common
351
- */
352
- BytesValue: {
353
- fields: {
354
- value: {
355
- type: "bytes",
356
- id: 1
357
- }
358
- }
359
- }
360
- });
361
-
362
- common("field_mask", {
363
-
364
- /**
365
- * Properties of a google.protobuf.FieldMask message.
366
- * @interface IDoubleValue
367
- * @type {Object}
368
- * @property {number} [value]
369
- * @memberof common
370
- */
371
- FieldMask: {
372
- fields: {
373
- paths: {
374
- rule: "repeated",
375
- type: "string",
376
- id: 1
377
- }
378
- }
379
- }
380
- });
381
-
382
- /**
383
- * Gets the root definition of the specified common proto file.
384
- *
385
- * Bundled definitions are:
386
- * - google/protobuf/any.proto
387
- * - google/protobuf/duration.proto
388
- * - google/protobuf/empty.proto
389
- * - google/protobuf/field_mask.proto
390
- * - google/protobuf/struct.proto
391
- * - google/protobuf/timestamp.proto
392
- * - google/protobuf/wrappers.proto
393
- *
394
- * @param {string} file Proto file name
395
- * @returns {INamespace|null} Root definition or `null` if not defined
396
- */
397
- common.get = function get(file) {
398
- return common[file] || null;
399
- };
1
+ "use strict";
2
+ module.exports = common;
3
+
4
+ var commonRe = /\/|\./;
5
+
6
+ /**
7
+ * Provides common type definitions.
8
+ * Can also be used to provide additional google types or your own custom types.
9
+ * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name
10
+ * @param {Object.<string,*>} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition
11
+ * @returns {undefined}
12
+ * @property {INamespace} google/protobuf/any.proto Any
13
+ * @property {INamespace} google/protobuf/duration.proto Duration
14
+ * @property {INamespace} google/protobuf/empty.proto Empty
15
+ * @property {INamespace} google/protobuf/field_mask.proto FieldMask
16
+ * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue
17
+ * @property {INamespace} google/protobuf/timestamp.proto Timestamp
18
+ * @property {INamespace} google/protobuf/wrappers.proto Wrappers
19
+ * @example
20
+ * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)
21
+ * protobuf.common("descriptor", descriptorJson);
22
+ *
23
+ * // manually provides a custom definition (uses my.foo namespace)
24
+ * protobuf.common("my/foo/bar.proto", myFooBarJson);
25
+ */
26
+ function common(name, json) {
27
+ if (!commonRe.test(name)) {
28
+ name = "google/protobuf/" + name + ".proto";
29
+ json = { nested: { google: { nested: { protobuf: { nested: json } } } } };
30
+ }
31
+ common[name] = json;
32
+ }
33
+
34
+ // Not provided because of limited use (feel free to discuss or to provide yourself):
35
+ //
36
+ // google/protobuf/descriptor.proto
37
+ // google/protobuf/source_context.proto
38
+ // google/protobuf/type.proto
39
+ //
40
+ // Stripped and pre-parsed versions of these non-bundled files are instead available as part of
41
+ // the repository or package within the google/protobuf directory.
42
+
43
+ common("any", {
44
+
45
+ /**
46
+ * Properties of a google.protobuf.Any message.
47
+ * @interface IAny
48
+ * @type {Object}
49
+ * @property {string} [typeUrl]
50
+ * @property {Uint8Array} [bytes]
51
+ * @memberof common
52
+ */
53
+ Any: {
54
+ fields: {
55
+ type_url: {
56
+ type: "string",
57
+ id: 1
58
+ },
59
+ value: {
60
+ type: "bytes",
61
+ id: 2
62
+ }
63
+ }
64
+ }
65
+ });
66
+
67
+ var timeType;
68
+
69
+ common("duration", {
70
+
71
+ /**
72
+ * Properties of a google.protobuf.Duration message.
73
+ * @interface IDuration
74
+ * @type {Object}
75
+ * @property {number|Long} [seconds]
76
+ * @property {number} [nanos]
77
+ * @memberof common
78
+ */
79
+ Duration: timeType = {
80
+ fields: {
81
+ seconds: {
82
+ type: "int64",
83
+ id: 1
84
+ },
85
+ nanos: {
86
+ type: "int32",
87
+ id: 2
88
+ }
89
+ }
90
+ }
91
+ });
92
+
93
+ common("timestamp", {
94
+
95
+ /**
96
+ * Properties of a google.protobuf.Timestamp message.
97
+ * @interface ITimestamp
98
+ * @type {Object}
99
+ * @property {number|Long} [seconds]
100
+ * @property {number} [nanos]
101
+ * @memberof common
102
+ */
103
+ Timestamp: timeType
104
+ });
105
+
106
+ common("empty", {
107
+
108
+ /**
109
+ * Properties of a google.protobuf.Empty message.
110
+ * @interface IEmpty
111
+ * @memberof common
112
+ */
113
+ Empty: {
114
+ fields: {}
115
+ }
116
+ });
117
+
118
+ common("struct", {
119
+
120
+ /**
121
+ * Properties of a google.protobuf.Struct message.
122
+ * @interface IStruct
123
+ * @type {Object}
124
+ * @property {Object.<string,IValue>} [fields]
125
+ * @memberof common
126
+ */
127
+ Struct: {
128
+ fields: {
129
+ fields: {
130
+ keyType: "string",
131
+ type: "Value",
132
+ id: 1
133
+ }
134
+ }
135
+ },
136
+
137
+ /**
138
+ * Properties of a google.protobuf.Value message.
139
+ * @interface IValue
140
+ * @type {Object}
141
+ * @property {string} [kind]
142
+ * @property {0} [nullValue]
143
+ * @property {number} [numberValue]
144
+ * @property {string} [stringValue]
145
+ * @property {boolean} [boolValue]
146
+ * @property {IStruct} [structValue]
147
+ * @property {IListValue} [listValue]
148
+ * @memberof common
149
+ */
150
+ Value: {
151
+ oneofs: {
152
+ kind: {
153
+ oneof: [
154
+ "nullValue",
155
+ "numberValue",
156
+ "stringValue",
157
+ "boolValue",
158
+ "structValue",
159
+ "listValue"
160
+ ]
161
+ }
162
+ },
163
+ fields: {
164
+ nullValue: {
165
+ type: "NullValue",
166
+ id: 1
167
+ },
168
+ numberValue: {
169
+ type: "double",
170
+ id: 2
171
+ },
172
+ stringValue: {
173
+ type: "string",
174
+ id: 3
175
+ },
176
+ boolValue: {
177
+ type: "bool",
178
+ id: 4
179
+ },
180
+ structValue: {
181
+ type: "Struct",
182
+ id: 5
183
+ },
184
+ listValue: {
185
+ type: "ListValue",
186
+ id: 6
187
+ }
188
+ }
189
+ },
190
+
191
+ NullValue: {
192
+ values: {
193
+ NULL_VALUE: 0
194
+ }
195
+ },
196
+
197
+ /**
198
+ * Properties of a google.protobuf.ListValue message.
199
+ * @interface IListValue
200
+ * @type {Object}
201
+ * @property {Array.<IValue>} [values]
202
+ * @memberof common
203
+ */
204
+ ListValue: {
205
+ fields: {
206
+ values: {
207
+ rule: "repeated",
208
+ type: "Value",
209
+ id: 1
210
+ }
211
+ }
212
+ }
213
+ });
214
+
215
+ common("wrappers", {
216
+
217
+ /**
218
+ * Properties of a google.protobuf.DoubleValue message.
219
+ * @interface IDoubleValue
220
+ * @type {Object}
221
+ * @property {number} [value]
222
+ * @memberof common
223
+ */
224
+ DoubleValue: {
225
+ fields: {
226
+ value: {
227
+ type: "double",
228
+ id: 1
229
+ }
230
+ }
231
+ },
232
+
233
+ /**
234
+ * Properties of a google.protobuf.FloatValue message.
235
+ * @interface IFloatValue
236
+ * @type {Object}
237
+ * @property {number} [value]
238
+ * @memberof common
239
+ */
240
+ FloatValue: {
241
+ fields: {
242
+ value: {
243
+ type: "float",
244
+ id: 1
245
+ }
246
+ }
247
+ },
248
+
249
+ /**
250
+ * Properties of a google.protobuf.Int64Value message.
251
+ * @interface IInt64Value
252
+ * @type {Object}
253
+ * @property {number|Long} [value]
254
+ * @memberof common
255
+ */
256
+ Int64Value: {
257
+ fields: {
258
+ value: {
259
+ type: "int64",
260
+ id: 1
261
+ }
262
+ }
263
+ },
264
+
265
+ /**
266
+ * Properties of a google.protobuf.UInt64Value message.
267
+ * @interface IUInt64Value
268
+ * @type {Object}
269
+ * @property {number|Long} [value]
270
+ * @memberof common
271
+ */
272
+ UInt64Value: {
273
+ fields: {
274
+ value: {
275
+ type: "uint64",
276
+ id: 1
277
+ }
278
+ }
279
+ },
280
+
281
+ /**
282
+ * Properties of a google.protobuf.Int32Value message.
283
+ * @interface IInt32Value
284
+ * @type {Object}
285
+ * @property {number} [value]
286
+ * @memberof common
287
+ */
288
+ Int32Value: {
289
+ fields: {
290
+ value: {
291
+ type: "int32",
292
+ id: 1
293
+ }
294
+ }
295
+ },
296
+
297
+ /**
298
+ * Properties of a google.protobuf.UInt32Value message.
299
+ * @interface IUInt32Value
300
+ * @type {Object}
301
+ * @property {number} [value]
302
+ * @memberof common
303
+ */
304
+ UInt32Value: {
305
+ fields: {
306
+ value: {
307
+ type: "uint32",
308
+ id: 1
309
+ }
310
+ }
311
+ },
312
+
313
+ /**
314
+ * Properties of a google.protobuf.BoolValue message.
315
+ * @interface IBoolValue
316
+ * @type {Object}
317
+ * @property {boolean} [value]
318
+ * @memberof common
319
+ */
320
+ BoolValue: {
321
+ fields: {
322
+ value: {
323
+ type: "bool",
324
+ id: 1
325
+ }
326
+ }
327
+ },
328
+
329
+ /**
330
+ * Properties of a google.protobuf.StringValue message.
331
+ * @interface IStringValue
332
+ * @type {Object}
333
+ * @property {string} [value]
334
+ * @memberof common
335
+ */
336
+ StringValue: {
337
+ fields: {
338
+ value: {
339
+ type: "string",
340
+ id: 1
341
+ }
342
+ }
343
+ },
344
+
345
+ /**
346
+ * Properties of a google.protobuf.BytesValue message.
347
+ * @interface IBytesValue
348
+ * @type {Object}
349
+ * @property {Uint8Array} [value]
350
+ * @memberof common
351
+ */
352
+ BytesValue: {
353
+ fields: {
354
+ value: {
355
+ type: "bytes",
356
+ id: 1
357
+ }
358
+ }
359
+ }
360
+ });
361
+
362
+ common("field_mask", {
363
+
364
+ /**
365
+ * Properties of a google.protobuf.FieldMask message.
366
+ * @interface IDoubleValue
367
+ * @type {Object}
368
+ * @property {number} [value]
369
+ * @memberof common
370
+ */
371
+ FieldMask: {
372
+ fields: {
373
+ paths: {
374
+ rule: "repeated",
375
+ type: "string",
376
+ id: 1
377
+ }
378
+ }
379
+ }
380
+ });
381
+
382
+ /**
383
+ * Gets the root definition of the specified common proto file.
384
+ *
385
+ * Bundled definitions are:
386
+ * - google/protobuf/any.proto
387
+ * - google/protobuf/duration.proto
388
+ * - google/protobuf/empty.proto
389
+ * - google/protobuf/field_mask.proto
390
+ * - google/protobuf/struct.proto
391
+ * - google/protobuf/timestamp.proto
392
+ * - google/protobuf/wrappers.proto
393
+ *
394
+ * @param {string} file Proto file name
395
+ * @returns {INamespace|null} Root definition or `null` if not defined
396
+ */
397
+ common.get = function get(file) {
398
+ return common[file] || null;
399
+ };