protobufjs 8.2.0 → 8.3.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.
@@ -1 +1,2 @@
1
- export * from "../descriptor";
1
+ import * as $protobuf from "../..";
2
+ import Long = require("long");
@@ -1,4 +1,15 @@
1
1
  import * as $protobuf from "..";
2
+ import {
3
+ IDescriptorProto,
4
+ IEnumDescriptorProto,
5
+ IFieldDescriptorProto,
6
+ IFileDescriptorSet,
7
+ IMethodDescriptorProto,
8
+ IOneofDescriptorProto,
9
+ IServiceDescriptorProto
10
+ } from "./descriptor.generated";
11
+
12
+ export * from "./descriptor.generated";
2
13
 
3
14
  type DescriptorInput<T> = T | $protobuf.Reader | Uint8Array;
4
15
 
@@ -73,237 +84,3 @@ declare module ".." {
73
84
  toDescriptor(): $protobuf.Message<IMethodDescriptorProto> & IMethodDescriptorProto;
74
85
  }
75
86
  }
76
-
77
- export const FileDescriptorSet: $protobuf.Type;
78
-
79
- export const FileDescriptorProto: $protobuf.Type;
80
-
81
- export const DescriptorProto: $protobuf.Type & {
82
- ExtensionRange: $protobuf.Type,
83
- ReservedRange: $protobuf.Type
84
- };
85
-
86
- export const FieldDescriptorProto: $protobuf.Type & {
87
- Label: $protobuf.Enum,
88
- Type: $protobuf.Enum
89
- };
90
-
91
- export const OneofDescriptorProto: $protobuf.Type;
92
-
93
- export const EnumDescriptorProto: $protobuf.Type;
94
-
95
- export const ServiceDescriptorProto: $protobuf.Type;
96
-
97
- export const EnumValueDescriptorProto: $protobuf.Type;
98
-
99
- export const MethodDescriptorProto: $protobuf.Type;
100
-
101
- export const FileOptions: $protobuf.Type & {
102
- OptimizeMode: $protobuf.Enum
103
- };
104
-
105
- export const MessageOptions: $protobuf.Type;
106
-
107
- export const FieldOptions: $protobuf.Type & {
108
- CType: $protobuf.Enum,
109
- JSType: $protobuf.Enum
110
- };
111
-
112
- export const OneofOptions: $protobuf.Type;
113
-
114
- export const EnumOptions: $protobuf.Type;
115
-
116
- export const EnumValueOptions: $protobuf.Type;
117
-
118
- export const ServiceOptions: $protobuf.Type;
119
-
120
- export const MethodOptions: $protobuf.Type;
121
-
122
- export const FeatureSet: $protobuf.Type & {
123
- FieldPresence: $protobuf.Enum,
124
- EnumType: $protobuf.Enum,
125
- RepeatedFieldEncoding: $protobuf.Enum,
126
- Utf8Validation: $protobuf.Enum,
127
- MessageEncoding: $protobuf.Enum,
128
- JsonFormat: $protobuf.Enum,
129
- EnforceNamingStyle: $protobuf.Enum,
130
- VisibilityFeature: $protobuf.Type
131
- };
132
-
133
- export const FeatureSetDefaults: $protobuf.Type & {
134
- FeatureSetEditionDefault: $protobuf.Type
135
- };
136
-
137
- export const UninterpretedOption: $protobuf.Type & {
138
- NamePart: $protobuf.Type
139
- };
140
-
141
- export const SourceCodeInfo: $protobuf.Type & {
142
- Location: $protobuf.Type
143
- };
144
-
145
- export const GeneratedCodeInfo: $protobuf.Type & {
146
- Annotation: $protobuf.Type
147
- };
148
-
149
- export interface IFileDescriptorSet {
150
- file: IFileDescriptorProto[];
151
- }
152
-
153
- export interface IFileDescriptorProto {
154
- name?: string;
155
- package?: string;
156
- dependency?: any;
157
- publicDependency?: any;
158
- weakDependency?: any;
159
- messageType?: IDescriptorProto[];
160
- enumType?: IEnumDescriptorProto[];
161
- service?: IServiceDescriptorProto[];
162
- extension?: IFieldDescriptorProto[];
163
- options?: IFileOptions;
164
- sourceCodeInfo?: any;
165
- syntax?: string;
166
- edition?: IEdition;
167
- }
168
-
169
- type IEdition = number;
170
-
171
- export interface IFileOptions {
172
- javaPackage?: string;
173
- javaOuterClassname?: string;
174
- javaMultipleFiles?: boolean;
175
- javaGenerateEqualsAndHash?: boolean;
176
- javaStringCheckUtf8?: boolean;
177
- optimizeFor?: IFileOptionsOptimizeMode;
178
- goPackage?: string;
179
- ccGenericServices?: boolean;
180
- javaGenericServices?: boolean;
181
- pyGenericServices?: boolean;
182
- deprecated?: boolean;
183
- ccEnableArenas?: boolean;
184
- objcClassPrefix?: string;
185
- csharpNamespace?: string;
186
- }
187
-
188
- type IFileOptionsOptimizeMode = number;
189
-
190
- export interface IDescriptorProto {
191
- name?: string;
192
- field?: IFieldDescriptorProto[];
193
- extension?: IFieldDescriptorProto[];
194
- nestedType?: IDescriptorProto[];
195
- enumType?: IEnumDescriptorProto[];
196
- extensionRange?: IDescriptorProtoExtensionRange[];
197
- oneofDecl?: IOneofDescriptorProto[];
198
- options?: IMessageOptions;
199
- reservedRange?: IDescriptorProtoReservedRange[];
200
- reservedName?: string[];
201
- }
202
-
203
- export interface IMessageOptions {
204
- mapEntry?: boolean;
205
- }
206
-
207
- export interface IDescriptorProtoExtensionRange {
208
- start?: number;
209
- end?: number;
210
- }
211
-
212
- export interface IDescriptorProtoReservedRange {
213
- start?: number;
214
- end?: number;
215
- }
216
-
217
- export interface IFieldDescriptorProto {
218
- name?: string;
219
- number?: number;
220
- label?: IFieldDescriptorProtoLabel;
221
- type?: IFieldDescriptorProtoType;
222
- typeName?: string;
223
- extendee?: string;
224
- defaultValue?: string;
225
- oneofIndex?: number;
226
- jsonName?: any;
227
- options?: IFieldOptions;
228
- proto3Optional?: boolean;
229
- }
230
-
231
- type IFieldDescriptorProtoLabel = number;
232
-
233
- type IFieldDescriptorProtoType = number;
234
-
235
- export interface IFieldOptions {
236
- packed?: boolean;
237
- jstype?: IFieldOptionsJSType;
238
- }
239
-
240
- type IFieldOptionsJSType = number;
241
-
242
- export interface IEnumDescriptorProto {
243
- name?: string;
244
- value?: IEnumValueDescriptorProto[];
245
- options?: IEnumOptions;
246
- }
247
-
248
- export interface IEnumValueDescriptorProto {
249
- name?: string;
250
- number?: number;
251
- options?: IEnumValueOptions;
252
- }
253
-
254
- export interface IEnumOptions {
255
- allowAlias?: boolean;
256
- deprecated?: boolean;
257
- }
258
-
259
- export interface IOneofDescriptorProto {
260
- name?: string;
261
- options?: IOneofOptions;
262
- }
263
-
264
- export interface IOneofOptions {
265
- features?: IFeatureSet;
266
- uninterpretedOption?: any[];
267
- }
268
-
269
- export interface IEnumValueOptions {
270
- deprecated?: boolean;
271
- features?: IFeatureSet;
272
- debugRedact?: boolean;
273
- featureSupport?: any;
274
- uninterpretedOption?: any[];
275
- }
276
-
277
- export interface IFeatureSet {
278
- fieldPresence?: number;
279
- enumType?: number;
280
- repeatedFieldEncoding?: number;
281
- utf8Validation?: number;
282
- messageEncoding?: number;
283
- jsonFormat?: number;
284
- enforceNamingStyle?: number;
285
- defaultSymbolVisibility?: number;
286
- }
287
-
288
- export interface IServiceDescriptorProto {
289
- name?: string;
290
- method?: IMethodDescriptorProto[];
291
- options?: IServiceOptions;
292
- }
293
-
294
- export interface IServiceOptions {
295
- deprecated?: boolean;
296
- }
297
-
298
- export interface IMethodDescriptorProto {
299
- name?: string;
300
- inputType?: string;
301
- outputType?: string;
302
- options?: IMethodOptions;
303
- clientStreaming?: boolean;
304
- serverStreaming?: boolean;
305
- }
306
-
307
- export interface IMethodOptions {
308
- deprecated?: boolean;
309
- }
@@ -0,0 +1,409 @@
1
+ // DO NOT EDIT! This is a generated file. Edit the source file instead and regenerate.
2
+
3
+ import * as $protobuf from "..";
4
+
5
+ /** Reflected file descriptor set. */
6
+ export const FileDescriptorSet: $protobuf.Type;
7
+
8
+ /** Reflected file descriptor proto. */
9
+ export const FileDescriptorProto: $protobuf.Type;
10
+
11
+ /** Reflected descriptor proto. */
12
+ export const DescriptorProto: $protobuf.Type & {
13
+ ExtensionRange: $protobuf.Type,
14
+ ReservedRange: $protobuf.Type
15
+ };
16
+
17
+ /** Reflected field descriptor proto. */
18
+ export const FieldDescriptorProto: $protobuf.Type & {
19
+ Label: $protobuf.Enum,
20
+ Type: $protobuf.Enum
21
+ };
22
+
23
+ /** Reflected oneof descriptor proto. */
24
+ export const OneofDescriptorProto: $protobuf.Type;
25
+
26
+ /** Reflected enum descriptor proto. */
27
+ export const EnumDescriptorProto: $protobuf.Type;
28
+
29
+ /** Reflected service descriptor proto. */
30
+ export const ServiceDescriptorProto: $protobuf.Type;
31
+
32
+ /** Reflected enum value descriptor proto. */
33
+ export const EnumValueDescriptorProto: $protobuf.Type;
34
+
35
+ /** Reflected method descriptor proto. */
36
+ export const MethodDescriptorProto: $protobuf.Type;
37
+
38
+ /** Reflected file options. */
39
+ export const FileOptions: $protobuf.Type & {
40
+ OptimizeMode: $protobuf.Enum
41
+ };
42
+
43
+ /** Reflected message options. */
44
+ export const MessageOptions: $protobuf.Type;
45
+
46
+ /** Reflected field options. */
47
+ export const FieldOptions: $protobuf.Type & {
48
+ CType: $protobuf.Enum,
49
+ JSType: $protobuf.Enum
50
+ };
51
+
52
+ /** Reflected oneof options. */
53
+ export const OneofOptions: $protobuf.Type;
54
+
55
+ /** Reflected enum options. */
56
+ export const EnumOptions: $protobuf.Type;
57
+
58
+ /** Reflected enum value options. */
59
+ export const EnumValueOptions: $protobuf.Type;
60
+
61
+ /** Reflected service options. */
62
+ export const ServiceOptions: $protobuf.Type;
63
+
64
+ /** Reflected method options. */
65
+ export const MethodOptions: $protobuf.Type;
66
+
67
+ /** Reflected feature set. */
68
+ export const FeatureSet: $protobuf.Type & {
69
+ FieldPresence: $protobuf.Enum,
70
+ EnumType: $protobuf.Enum,
71
+ RepeatedFieldEncoding: $protobuf.Enum,
72
+ Utf8Validation: $protobuf.Enum,
73
+ MessageEncoding: $protobuf.Enum,
74
+ JsonFormat: $protobuf.Enum,
75
+ EnforceNamingStyle: $protobuf.Enum,
76
+ VisibilityFeature: $protobuf.Type
77
+ };
78
+
79
+ /** Reflected feature set defaults. */
80
+ export const FeatureSetDefaults: $protobuf.Type & {
81
+ FeatureSetEditionDefault: $protobuf.Type
82
+ };
83
+
84
+ /** Reflected uninterpretet option. */
85
+ export const UninterpretedOption: $protobuf.Type & {
86
+ NamePart: $protobuf.Type
87
+ };
88
+
89
+ /** Reflected source code info. */
90
+ export const SourceCodeInfo: $protobuf.Type & {
91
+ Location: $protobuf.Type
92
+ };
93
+
94
+ /** Reflected generated code info. */
95
+ export const GeneratedCodeInfo: $protobuf.Type & {
96
+ Annotation: $protobuf.Type
97
+ };
98
+
99
+ /** Properties of a FileDescriptorSet message. */
100
+ export interface IFileDescriptorSet {
101
+
102
+ /** Files */
103
+ file: IFileDescriptorProto[];
104
+ }
105
+
106
+ /** Properties of a FileDescriptorProto message. */
107
+ export interface IFileDescriptorProto {
108
+
109
+ /** File name */
110
+ name?: string;
111
+
112
+ /** Package */
113
+ package?: string;
114
+
115
+ /** Not supported */
116
+ dependency?: any;
117
+
118
+ /** Not supported */
119
+ publicDependency?: any;
120
+
121
+ /** Not supported */
122
+ weakDependency?: any;
123
+
124
+ /** Nested message types */
125
+ messageType?: IDescriptorProto[];
126
+
127
+ /** Nested enums */
128
+ enumType?: IEnumDescriptorProto[];
129
+
130
+ /** Nested services */
131
+ service?: IServiceDescriptorProto[];
132
+
133
+ /** Nested extension fields */
134
+ extension?: IFieldDescriptorProto[];
135
+
136
+ /** Options */
137
+ options?: IFileOptions;
138
+
139
+ /** Not supported */
140
+ sourceCodeInfo?: any;
141
+
142
+ /** Syntax */
143
+ syntax?: string;
144
+
145
+ /** Edition */
146
+ edition?: IEdition;
147
+ }
148
+
149
+ /** Values of the Edition enum. */
150
+ export type IEdition = number;
151
+
152
+ /** Properties of a FileOptions message. */
153
+ export interface IFileOptions {
154
+ javaPackage?: string;
155
+ javaOuterClassname?: string;
156
+ javaMultipleFiles?: boolean;
157
+ javaGenerateEqualsAndHash?: boolean;
158
+ javaStringCheckUtf8?: boolean;
159
+ optimizeFor?: IFileOptionsOptimizeMode;
160
+ goPackage?: string;
161
+ ccGenericServices?: boolean;
162
+ javaGenericServices?: boolean;
163
+ pyGenericServices?: boolean;
164
+ deprecated?: boolean;
165
+ ccEnableArenas?: boolean;
166
+ objcClassPrefix?: string;
167
+ csharpNamespace?: string;
168
+ }
169
+
170
+ /** Values of he FileOptions.OptimizeMode enum. */
171
+ export type IFileOptionsOptimizeMode = number;
172
+
173
+ /** Properties of a DescriptorProto message. */
174
+ export interface IDescriptorProto {
175
+
176
+ /** Message type name */
177
+ name?: string;
178
+
179
+ /** Fields */
180
+ field?: IFieldDescriptorProto[];
181
+
182
+ /** Extension fields */
183
+ extension?: IFieldDescriptorProto[];
184
+
185
+ /** Nested message types */
186
+ nestedType?: IDescriptorProto[];
187
+
188
+ /** Nested enums */
189
+ enumType?: IEnumDescriptorProto[];
190
+
191
+ /** Extension ranges */
192
+ extensionRange?: IDescriptorProtoExtensionRange[];
193
+
194
+ /** Oneofs */
195
+ oneofDecl?: IOneofDescriptorProto[];
196
+
197
+ /** Not supported */
198
+ options?: IMessageOptions;
199
+
200
+ /** Reserved ranges */
201
+ reservedRange?: IDescriptorProtoReservedRange[];
202
+
203
+ /** Reserved names */
204
+ reservedName?: string[];
205
+ }
206
+
207
+ /** Properties of a MessageOptions message. */
208
+ export interface IMessageOptions {
209
+
210
+ /** Whether this message is a map entry */
211
+ mapEntry?: boolean;
212
+ }
213
+
214
+ /** Properties of an ExtensionRange message. */
215
+ export interface IDescriptorProtoExtensionRange {
216
+
217
+ /** Start field id */
218
+ start?: number;
219
+
220
+ /** End field id */
221
+ end?: number;
222
+ }
223
+
224
+ /** Properties of a ReservedRange message. */
225
+ export interface IDescriptorProtoReservedRange {
226
+
227
+ /** Start field id */
228
+ start?: number;
229
+
230
+ /** End field id */
231
+ end?: number;
232
+ }
233
+
234
+ /** Properties of a FieldDescriptorProto message. */
235
+ export interface IFieldDescriptorProto {
236
+
237
+ /** Field name */
238
+ name?: string;
239
+
240
+ /** Field id */
241
+ number?: number;
242
+
243
+ /** Field rule */
244
+ label?: IFieldDescriptorProtoLabel;
245
+
246
+ /** Field basic type */
247
+ type?: IFieldDescriptorProtoType;
248
+
249
+ /** Field type name */
250
+ typeName?: string;
251
+
252
+ /** Extended type name */
253
+ extendee?: string;
254
+
255
+ /** Literal default value */
256
+ defaultValue?: string;
257
+
258
+ /** Oneof index if part of a oneof */
259
+ oneofIndex?: number;
260
+
261
+ /** Not supported */
262
+ jsonName?: any;
263
+
264
+ /** Field options */
265
+ options?: IFieldOptions;
266
+
267
+ /** Whether this is a proto3 optional field */
268
+ proto3Optional?: boolean;
269
+ }
270
+
271
+ /** Values of the FieldDescriptorProto.Label enum. */
272
+ export type IFieldDescriptorProtoLabel = number;
273
+
274
+ /** Values of the FieldDescriptorProto.Type enum. */
275
+ export type IFieldDescriptorProtoType = number;
276
+
277
+ /** Properties of a FieldOptions message. */
278
+ export interface IFieldOptions {
279
+
280
+ /** Whether packed or not (defaults to `false` for proto2 and `true` for proto3) */
281
+ packed?: boolean;
282
+
283
+ /** JavaScript value type (not used by protobuf.js) */
284
+ jstype?: IFieldOptionsJSType;
285
+ }
286
+
287
+ /** Values of the FieldOptions.JSType enum. */
288
+ export type IFieldOptionsJSType = number;
289
+
290
+ /** Properties of an EnumDescriptorProto message. */
291
+ export interface IEnumDescriptorProto {
292
+
293
+ /** Enum name */
294
+ name?: string;
295
+
296
+ /** Enum values */
297
+ value?: IEnumValueDescriptorProto[];
298
+
299
+ /** Enum options */
300
+ options?: IEnumOptions;
301
+ }
302
+
303
+ /** Properties of an EnumValueDescriptorProto message. */
304
+ export interface IEnumValueDescriptorProto {
305
+
306
+ /** Name */
307
+ name?: string;
308
+
309
+ /** Value */
310
+ number?: number;
311
+
312
+ /** Enum value options */
313
+ options?: IEnumValueOptions;
314
+ }
315
+
316
+ /** Properties of an EnumValueOptions message. */
317
+ export interface IEnumValueOptions {
318
+ deprecated?: boolean;
319
+ features?: IFeatureSet;
320
+ debugRedact?: boolean;
321
+ featureSupport?: any;
322
+ uninterpretedOption?: any[];
323
+ }
324
+
325
+ /** Properties of an EnumOptions message. */
326
+ export interface IEnumOptions {
327
+
328
+ /** Whether aliases are allowed */
329
+ allowAlias?: boolean;
330
+ deprecated?: boolean;
331
+ }
332
+
333
+ /** Properties of a FeatureSet message. */
334
+ export interface IFeatureSet {
335
+ fieldPresence?: number;
336
+ enumType?: number;
337
+ repeatedFieldEncoding?: number;
338
+ utf8Validation?: number;
339
+ messageEncoding?: number;
340
+ jsonFormat?: number;
341
+ enforceNamingStyle?: number;
342
+ defaultSymbolVisibility?: number;
343
+ }
344
+
345
+ /** Properties of a OneofDescriptorProto message. */
346
+ export interface IOneofDescriptorProto {
347
+
348
+ /** Oneof name */
349
+ name?: string;
350
+
351
+ /** Oneof options */
352
+ options?: IOneofOptions;
353
+ }
354
+
355
+ /** Properties of a OneofOptions message. */
356
+ export interface IOneofOptions {
357
+ features?: IFeatureSet;
358
+ uninterpretedOption?: any[];
359
+ }
360
+
361
+ /** Properties of a ServiceDescriptorProto message. */
362
+ export interface IServiceDescriptorProto {
363
+
364
+ /** Service name */
365
+ name?: string;
366
+
367
+ /** Methods */
368
+ method?: IMethodDescriptorProto[];
369
+
370
+ /** Options */
371
+ options?: IServiceOptions;
372
+ }
373
+
374
+ /** Properties of a ServiceOptions message. */
375
+ export interface IServiceOptions {
376
+ deprecated?: boolean;
377
+ }
378
+
379
+ /** Properties of a MethodDescriptorProto message. */
380
+ export interface IMethodDescriptorProto {
381
+
382
+ /** Method name */
383
+ name?: string;
384
+
385
+ /** Request type name */
386
+ inputType?: string;
387
+
388
+ /** Response type name */
389
+ outputType?: string;
390
+
391
+ /** Not supported */
392
+ options?: IMethodOptions;
393
+
394
+ /** Whether requests are streamed */
395
+ clientStreaming?: boolean;
396
+
397
+ /** Whether responses are streamed */
398
+ serverStreaming?: boolean;
399
+ }
400
+
401
+ /**
402
+ * Properties of a MethodOptions message.
403
+ *
404
+ * Warning: this is not safe to use with editions protos, since it discards relevant file context.
405
+ *
406
+ */
407
+ export interface IMethodOptions {
408
+ deprecated?: boolean;
409
+ }