@univerjs/protocol 0.1.19 → 0.1.21

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,825 +0,0 @@
1
- export declare const protobufPackage = "google.protobuf";
2
- /**
3
- * The protocol compiler can output a FileDescriptorSet containing the .proto
4
- * files it parses.
5
- */
6
- export interface FileDescriptorSet {
7
- file: FileDescriptorProto[];
8
- }
9
- /** Describes a complete .proto file. */
10
- export interface FileDescriptorProto {
11
- /** file name, relative to root of source tree */
12
- name?: string | undefined;
13
- /** e.g. "foo", "foo.bar", etc. */
14
- package?: string | undefined;
15
- /** Names of files imported by this file. */
16
- dependency: string[];
17
- /** Indexes of the public imported files in the dependency list above. */
18
- publicDependency: number[];
19
- /**
20
- * Indexes of the weak imported files in the dependency list.
21
- * For Google-internal migration only. Do not use.
22
- */
23
- weakDependency: number[];
24
- /** All top-level definitions in this file. */
25
- messageType: DescriptorProto[];
26
- enumType: EnumDescriptorProto[];
27
- service: ServiceDescriptorProto[];
28
- extension: FieldDescriptorProto[];
29
- options?: FileOptions | undefined;
30
- /**
31
- * This field contains optional information about the original source code.
32
- * You may safely remove this entire field without harming runtime
33
- * functionality of the descriptors -- the information is needed only by
34
- * development tools.
35
- */
36
- sourceCodeInfo?: SourceCodeInfo | undefined;
37
- /**
38
- * The syntax of the proto file.
39
- * The supported values are "proto2" and "proto3".
40
- */
41
- syntax?: string | undefined;
42
- }
43
- /** Describes a message type. */
44
- export interface DescriptorProto {
45
- name?: string | undefined;
46
- field: FieldDescriptorProto[];
47
- extension: FieldDescriptorProto[];
48
- nestedType: DescriptorProto[];
49
- enumType: EnumDescriptorProto[];
50
- extensionRange: DescriptorProto_ExtensionRange[];
51
- oneofDecl: OneofDescriptorProto[];
52
- options?: MessageOptions | undefined;
53
- reservedRange: DescriptorProto_ReservedRange[];
54
- /**
55
- * Reserved field names, which may not be used by fields in the same message.
56
- * A given name may only be reserved once.
57
- */
58
- reservedName: string[];
59
- }
60
- export interface DescriptorProto_ExtensionRange {
61
- /** Inclusive. */
62
- start?: number | undefined;
63
- /** Exclusive. */
64
- end?: number | undefined;
65
- options?: ExtensionRangeOptions | undefined;
66
- }
67
- /**
68
- * Range of reserved tag numbers. Reserved tag numbers may not be used by
69
- * fields or extension ranges in the same message. Reserved ranges may
70
- * not overlap.
71
- */
72
- export interface DescriptorProto_ReservedRange {
73
- /** Inclusive. */
74
- start?: number | undefined;
75
- /** Exclusive. */
76
- end?: number | undefined;
77
- }
78
- export interface ExtensionRangeOptions {
79
- /** The parser stores options it doesn't recognize here. See above. */
80
- uninterpretedOption: UninterpretedOption[];
81
- }
82
- /** Describes a field within a message. */
83
- export interface FieldDescriptorProto {
84
- name?: string | undefined;
85
- number?: number | undefined;
86
- label?: FieldDescriptorProto_Label | undefined;
87
- /**
88
- * If type_name is set, this need not be set. If both this and type_name
89
- * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
90
- */
91
- type?: FieldDescriptorProto_Type | undefined;
92
- /**
93
- * For message and enum types, this is the name of the type. If the name
94
- * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
95
- * rules are used to find the type (i.e. first the nested types within this
96
- * message are searched, then within the parent, on up to the root
97
- * namespace).
98
- */
99
- typeName?: string | undefined;
100
- /**
101
- * For extensions, this is the name of the type being extended. It is
102
- * resolved in the same manner as type_name.
103
- */
104
- extendee?: string | undefined;
105
- /**
106
- * For numeric types, contains the original text representation of the value.
107
- * For booleans, "true" or "false".
108
- * For strings, contains the default text contents (not escaped in any way).
109
- * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
110
- */
111
- defaultValue?: string | undefined;
112
- /**
113
- * If set, gives the index of a oneof in the containing type's oneof_decl
114
- * list. This field is a member of that oneof.
115
- */
116
- oneofIndex?: number | undefined;
117
- /**
118
- * JSON name of this field. The value is set by protocol compiler. If the
119
- * user has set a "json_name" option on this field, that option's value
120
- * will be used. Otherwise, it's deduced from the field's name by converting
121
- * it to camelCase.
122
- */
123
- jsonName?: string | undefined;
124
- options?: FieldOptions | undefined;
125
- /**
126
- * If true, this is a proto3 "optional". When a proto3 field is optional, it
127
- * tracks presence regardless of field type.
128
- *
129
- * When proto3_optional is true, this field must be belong to a oneof to
130
- * signal to old proto3 clients that presence is tracked for this field. This
131
- * oneof is known as a "synthetic" oneof, and this field must be its sole
132
- * member (each proto3 optional field gets its own synthetic oneof). Synthetic
133
- * oneofs exist in the descriptor only, and do not generate any API. Synthetic
134
- * oneofs must be ordered after all "real" oneofs.
135
- *
136
- * For message fields, proto3_optional doesn't create any semantic change,
137
- * since non-repeated message fields always track presence. However it still
138
- * indicates the semantic detail of whether the user wrote "optional" or not.
139
- * This can be useful for round-tripping the .proto file. For consistency we
140
- * give message fields a synthetic oneof also, even though it is not required
141
- * to track presence. This is especially important because the parser can't
142
- * tell if a field is a message or an enum, so it must always create a
143
- * synthetic oneof.
144
- *
145
- * Proto2 optional fields do not set this flag, because they already indicate
146
- * optional with `LABEL_OPTIONAL`.
147
- */
148
- proto3Optional?: boolean | undefined;
149
- }
150
- export declare enum FieldDescriptorProto_Type {
151
- /**
152
- * TYPE_DOUBLE - 0 is reserved for errors.
153
- * Order is weird for historical reasons.
154
- */
155
- TYPE_DOUBLE = 1,
156
- TYPE_FLOAT = 2,
157
- /**
158
- * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
159
- * negative values are likely.
160
- */
161
- TYPE_INT64 = 3,
162
- TYPE_UINT64 = 4,
163
- /**
164
- * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
165
- * negative values are likely.
166
- */
167
- TYPE_INT32 = 5,
168
- TYPE_FIXED64 = 6,
169
- TYPE_FIXED32 = 7,
170
- TYPE_BOOL = 8,
171
- TYPE_STRING = 9,
172
- /**
173
- * TYPE_GROUP - Tag-delimited aggregate.
174
- * Group type is deprecated and not supported in proto3. However, Proto3
175
- * implementations should still be able to parse the group wire format and
176
- * treat group fields as unknown fields.
177
- */
178
- TYPE_GROUP = 10,
179
- /** TYPE_MESSAGE - Length-delimited aggregate. */
180
- TYPE_MESSAGE = 11,
181
- /** TYPE_BYTES - New in version 2. */
182
- TYPE_BYTES = 12,
183
- TYPE_UINT32 = 13,
184
- TYPE_ENUM = 14,
185
- TYPE_SFIXED32 = 15,
186
- TYPE_SFIXED64 = 16,
187
- /** TYPE_SINT32 - Uses ZigZag encoding. */
188
- TYPE_SINT32 = 17,
189
- /** TYPE_SINT64 - Uses ZigZag encoding. */
190
- TYPE_SINT64 = 18,
191
- UNRECOGNIZED = -1
192
- }
193
- export declare enum FieldDescriptorProto_Label {
194
- /** LABEL_OPTIONAL - 0 is reserved for errors */
195
- LABEL_OPTIONAL = 1,
196
- LABEL_REQUIRED = 2,
197
- LABEL_REPEATED = 3,
198
- UNRECOGNIZED = -1
199
- }
200
- /** Describes a oneof. */
201
- export interface OneofDescriptorProto {
202
- name?: string | undefined;
203
- options?: OneofOptions | undefined;
204
- }
205
- /** Describes an enum type. */
206
- export interface EnumDescriptorProto {
207
- name?: string | undefined;
208
- value: EnumValueDescriptorProto[];
209
- options?: EnumOptions | undefined;
210
- /**
211
- * Range of reserved numeric values. Reserved numeric values may not be used
212
- * by enum values in the same enum declaration. Reserved ranges may not
213
- * overlap.
214
- */
215
- reservedRange: EnumDescriptorProto_EnumReservedRange[];
216
- /**
217
- * Reserved enum value names, which may not be reused. A given name may only
218
- * be reserved once.
219
- */
220
- reservedName: string[];
221
- }
222
- /**
223
- * Range of reserved numeric values. Reserved values may not be used by
224
- * entries in the same enum. Reserved ranges may not overlap.
225
- *
226
- * Note that this is distinct from DescriptorProto.ReservedRange in that it
227
- * is inclusive such that it can appropriately represent the entire int32
228
- * domain.
229
- */
230
- export interface EnumDescriptorProto_EnumReservedRange {
231
- /** Inclusive. */
232
- start?: number | undefined;
233
- /** Inclusive. */
234
- end?: number | undefined;
235
- }
236
- /** Describes a value within an enum. */
237
- export interface EnumValueDescriptorProto {
238
- name?: string | undefined;
239
- number?: number | undefined;
240
- options?: EnumValueOptions | undefined;
241
- }
242
- /** Describes a service. */
243
- export interface ServiceDescriptorProto {
244
- name?: string | undefined;
245
- method: MethodDescriptorProto[];
246
- options?: ServiceOptions | undefined;
247
- }
248
- /** Describes a method of a service. */
249
- export interface MethodDescriptorProto {
250
- name?: string | undefined;
251
- /**
252
- * Input and output type names. These are resolved in the same way as
253
- * FieldDescriptorProto.type_name, but must refer to a message type.
254
- */
255
- inputType?: string | undefined;
256
- outputType?: string | undefined;
257
- options?: MethodOptions | undefined;
258
- /** Identifies if client streams multiple client messages */
259
- clientStreaming?: boolean | undefined;
260
- /** Identifies if server streams multiple server messages */
261
- serverStreaming?: boolean | undefined;
262
- }
263
- export interface FileOptions {
264
- /**
265
- * Sets the Java package where classes generated from this .proto will be
266
- * placed. By default, the proto package is used, but this is often
267
- * inappropriate because proto packages do not normally start with backwards
268
- * domain names.
269
- */
270
- javaPackage?: string | undefined;
271
- /**
272
- * Controls the name of the wrapper Java class generated for the .proto file.
273
- * That class will always contain the .proto file's getDescriptor() method as
274
- * well as any top-level extensions defined in the .proto file.
275
- * If java_multiple_files is disabled, then all the other classes from the
276
- * .proto file will be nested inside the single wrapper outer class.
277
- */
278
- javaOuterClassname?: string | undefined;
279
- /**
280
- * If enabled, then the Java code generator will generate a separate .java
281
- * file for each top-level message, enum, and service defined in the .proto
282
- * file. Thus, these types will *not* be nested inside the wrapper class
283
- * named by java_outer_classname. However, the wrapper class will still be
284
- * generated to contain the file's getDescriptor() method as well as any
285
- * top-level extensions defined in the file.
286
- */
287
- javaMultipleFiles?: boolean | undefined;
288
- /**
289
- * This option does nothing.
290
- *
291
- * @deprecated
292
- */
293
- javaGenerateEqualsAndHash?: boolean | undefined;
294
- /**
295
- * If set true, then the Java2 code generator will generate code that
296
- * throws an exception whenever an attempt is made to assign a non-UTF-8
297
- * byte sequence to a string field.
298
- * Message reflection will do the same.
299
- * However, an extension field still accepts non-UTF-8 byte sequences.
300
- * This option has no effect on when used with the lite runtime.
301
- */
302
- javaStringCheckUtf8?: boolean | undefined;
303
- optimizeFor?: FileOptions_OptimizeMode | undefined;
304
- /**
305
- * Sets the Go package where structs generated from this .proto will be
306
- * placed. If omitted, the Go package will be derived from the following:
307
- * - The basename of the package import path, if provided.
308
- * - Otherwise, the package statement in the .proto file, if present.
309
- * - Otherwise, the basename of the .proto file, without extension.
310
- */
311
- goPackage?: string | undefined;
312
- /**
313
- * Should generic services be generated in each language? "Generic" services
314
- * are not specific to any particular RPC system. They are generated by the
315
- * main code generators in each language (without additional plugins).
316
- * Generic services were the only kind of service generation supported by
317
- * early versions of google.protobuf.
318
- *
319
- * Generic services are now considered deprecated in favor of using plugins
320
- * that generate code specific to your particular RPC system. Therefore,
321
- * these default to false. Old code which depends on generic services should
322
- * explicitly set them to true.
323
- */
324
- ccGenericServices?: boolean | undefined;
325
- javaGenericServices?: boolean | undefined;
326
- pyGenericServices?: boolean | undefined;
327
- phpGenericServices?: boolean | undefined;
328
- /**
329
- * Is this file deprecated?
330
- * Depending on the target platform, this can emit Deprecated annotations
331
- * for everything in the file, or it will be completely ignored; in the very
332
- * least, this is a formalization for deprecating files.
333
- */
334
- deprecated?: boolean | undefined;
335
- /**
336
- * Enables the use of arenas for the proto messages in this file. This applies
337
- * only to generated classes for C++.
338
- */
339
- ccEnableArenas?: boolean | undefined;
340
- /**
341
- * Sets the objective c class prefix which is prepended to all objective c
342
- * generated classes from this .proto. There is no default.
343
- */
344
- objcClassPrefix?: string | undefined;
345
- /** Namespace for generated classes; defaults to the package. */
346
- csharpNamespace?: string | undefined;
347
- /**
348
- * By default Swift generators will take the proto package and CamelCase it
349
- * replacing '.' with underscore and use that to prefix the types/symbols
350
- * defined. When this options is provided, they will use this value instead
351
- * to prefix the types/symbols defined.
352
- */
353
- swiftPrefix?: string | undefined;
354
- /**
355
- * Sets the php class prefix which is prepended to all php generated classes
356
- * from this .proto. Default is empty.
357
- */
358
- phpClassPrefix?: string | undefined;
359
- /**
360
- * Use this option to change the namespace of php generated classes. Default
361
- * is empty. When this option is empty, the package name will be used for
362
- * determining the namespace.
363
- */
364
- phpNamespace?: string | undefined;
365
- /**
366
- * Use this option to change the namespace of php generated metadata classes.
367
- * Default is empty. When this option is empty, the proto file name will be
368
- * used for determining the namespace.
369
- */
370
- phpMetadataNamespace?: string | undefined;
371
- /**
372
- * Use this option to change the package of ruby generated classes. Default
373
- * is empty. When this option is not set, the package name will be used for
374
- * determining the ruby package.
375
- */
376
- rubyPackage?: string | undefined;
377
- /**
378
- * The parser stores options it doesn't recognize here.
379
- * See the documentation for the "Options" section above.
380
- */
381
- uninterpretedOption: UninterpretedOption[];
382
- }
383
- /** Generated classes can be optimized for speed or code size. */
384
- export declare enum FileOptions_OptimizeMode {
385
- /** SPEED - Generate complete code for parsing, serialization, */
386
- SPEED = 1,
387
- /** CODE_SIZE - etc. */
388
- CODE_SIZE = 2,
389
- /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */
390
- LITE_RUNTIME = 3,
391
- UNRECOGNIZED = -1
392
- }
393
- export interface MessageOptions {
394
- /**
395
- * Set true to use the old proto1 MessageSet wire format for extensions.
396
- * This is provided for backwards-compatibility with the MessageSet wire
397
- * format. You should not use this for any other reason: It's less
398
- * efficient, has fewer features, and is more complicated.
399
- *
400
- * The message must be defined exactly as follows:
401
- * message Foo {
402
- * option message_set_wire_format = true;
403
- * extensions 4 to max;
404
- * }
405
- * Note that the message cannot have any defined fields; MessageSets only
406
- * have extensions.
407
- *
408
- * All extensions of your type must be singular messages; e.g. they cannot
409
- * be int32s, enums, or repeated messages.
410
- *
411
- * Because this is an option, the above two restrictions are not enforced by
412
- * the protocol compiler.
413
- */
414
- messageSetWireFormat?: boolean | undefined;
415
- /**
416
- * Disables the generation of the standard "descriptor()" accessor, which can
417
- * conflict with a field of the same name. This is meant to make migration
418
- * from proto1 easier; new code should avoid fields named "descriptor".
419
- */
420
- noStandardDescriptorAccessor?: boolean | undefined;
421
- /**
422
- * Is this message deprecated?
423
- * Depending on the target platform, this can emit Deprecated annotations
424
- * for the message, or it will be completely ignored; in the very least,
425
- * this is a formalization for deprecating messages.
426
- */
427
- deprecated?: boolean | undefined;
428
- /**
429
- * Whether the message is an automatically generated map entry type for the
430
- * maps field.
431
- *
432
- * For maps fields:
433
- * map<KeyType, ValueType> map_field = 1;
434
- * The parsed descriptor looks like:
435
- * message MapFieldEntry {
436
- * option map_entry = true;
437
- * optional KeyType key = 1;
438
- * optional ValueType value = 2;
439
- * }
440
- * repeated MapFieldEntry map_field = 1;
441
- *
442
- * Implementations may choose not to generate the map_entry=true message, but
443
- * use a native map in the target language to hold the keys and values.
444
- * The reflection APIs in such implementations still need to work as
445
- * if the field is a repeated message field.
446
- *
447
- * NOTE: Do not set the option in .proto files. Always use the maps syntax
448
- * instead. The option should only be implicitly set by the proto compiler
449
- * parser.
450
- */
451
- mapEntry?: boolean | undefined;
452
- /** The parser stores options it doesn't recognize here. See above. */
453
- uninterpretedOption: UninterpretedOption[];
454
- }
455
- export interface FieldOptions {
456
- /**
457
- * The ctype option instructs the C++ code generator to use a different
458
- * representation of the field than it normally would. See the specific
459
- * options below. This option is not yet implemented in the open source
460
- * release -- sorry, we'll try to include it in a future version!
461
- */
462
- ctype?: FieldOptions_CType | undefined;
463
- /**
464
- * The packed option can be enabled for repeated primitive fields to enable
465
- * a more efficient representation on the wire. Rather than repeatedly
466
- * writing the tag and type for each element, the entire array is encoded as
467
- * a single length-delimited blob. In proto3, only explicit setting it to
468
- * false will avoid using packed encoding.
469
- */
470
- packed?: boolean | undefined;
471
- /**
472
- * The jstype option determines the JavaScript type used for values of the
473
- * field. The option is permitted only for 64 bit integral and fixed types
474
- * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
475
- * is represented as JavaScript string, which avoids loss of precision that
476
- * can happen when a large value is converted to a floating point JavaScript.
477
- * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
478
- * use the JavaScript "number" type. The behavior of the default option
479
- * JS_NORMAL is implementation dependent.
480
- *
481
- * This option is an enum to permit additional types to be added, e.g.
482
- * goog.math.Integer.
483
- */
484
- jstype?: FieldOptions_JSType | undefined;
485
- /**
486
- * Should this field be parsed lazily? Lazy applies only to message-type
487
- * fields. It means that when the outer message is initially parsed, the
488
- * inner message's contents will not be parsed but instead stored in encoded
489
- * form. The inner message will actually be parsed when it is first accessed.
490
- *
491
- * This is only a hint. Implementations are free to choose whether to use
492
- * eager or lazy parsing regardless of the value of this option. However,
493
- * setting this option true suggests that the protocol author believes that
494
- * using lazy parsing on this field is worth the additional bookkeeping
495
- * overhead typically needed to implement it.
496
- *
497
- * This option does not affect the public interface of any generated code;
498
- * all method signatures remain the same. Furthermore, thread-safety of the
499
- * interface is not affected by this option; const methods remain safe to
500
- * call from multiple threads concurrently, while non-const methods continue
501
- * to require exclusive access.
502
- *
503
- * Note that implementations may choose not to check required fields within
504
- * a lazy sub-message. That is, calling IsInitialized() on the outer message
505
- * may return true even if the inner message has missing required fields.
506
- * This is necessary because otherwise the inner message would have to be
507
- * parsed in order to perform the check, defeating the purpose of lazy
508
- * parsing. An implementation which chooses not to check required fields
509
- * must be consistent about it. That is, for any particular sub-message, the
510
- * implementation must either *always* check its required fields, or *never*
511
- * check its required fields, regardless of whether or not the message has
512
- * been parsed.
513
- *
514
- * As of 2021, lazy does no correctness checks on the byte stream during
515
- * parsing. This may lead to crashes if and when an invalid byte stream is
516
- * finally parsed upon access.
517
- *
518
- * TODO(b/211906113): Enable validation on lazy fields.
519
- */
520
- lazy?: boolean | undefined;
521
- /**
522
- * unverified_lazy does no correctness checks on the byte stream. This should
523
- * only be used where lazy with verification is prohibitive for performance
524
- * reasons.
525
- */
526
- unverifiedLazy?: boolean | undefined;
527
- /**
528
- * Is this field deprecated?
529
- * Depending on the target platform, this can emit Deprecated annotations
530
- * for accessors, or it will be completely ignored; in the very least, this
531
- * is a formalization for deprecating fields.
532
- */
533
- deprecated?: boolean | undefined;
534
- /** For Google-internal migration only. Do not use. */
535
- weak?: boolean | undefined;
536
- /** The parser stores options it doesn't recognize here. See above. */
537
- uninterpretedOption: UninterpretedOption[];
538
- }
539
- export declare enum FieldOptions_CType {
540
- /** STRING - Default mode. */
541
- STRING = 0,
542
- CORD = 1,
543
- STRING_PIECE = 2,
544
- UNRECOGNIZED = -1
545
- }
546
- export declare enum FieldOptions_JSType {
547
- /** JS_NORMAL - Use the default type. */
548
- JS_NORMAL = 0,
549
- /** JS_STRING - Use JavaScript strings. */
550
- JS_STRING = 1,
551
- /** JS_NUMBER - Use JavaScript numbers. */
552
- JS_NUMBER = 2,
553
- UNRECOGNIZED = -1
554
- }
555
- export interface OneofOptions {
556
- /** The parser stores options it doesn't recognize here. See above. */
557
- uninterpretedOption: UninterpretedOption[];
558
- }
559
- export interface EnumOptions {
560
- /**
561
- * Set this option to true to allow mapping different tag names to the same
562
- * value.
563
- */
564
- allowAlias?: boolean | undefined;
565
- /**
566
- * Is this enum deprecated?
567
- * Depending on the target platform, this can emit Deprecated annotations
568
- * for the enum, or it will be completely ignored; in the very least, this
569
- * is a formalization for deprecating enums.
570
- */
571
- deprecated?: boolean | undefined;
572
- /** The parser stores options it doesn't recognize here. See above. */
573
- uninterpretedOption: UninterpretedOption[];
574
- }
575
- export interface EnumValueOptions {
576
- /**
577
- * Is this enum value deprecated?
578
- * Depending on the target platform, this can emit Deprecated annotations
579
- * for the enum value, or it will be completely ignored; in the very least,
580
- * this is a formalization for deprecating enum values.
581
- */
582
- deprecated?: boolean | undefined;
583
- /** The parser stores options it doesn't recognize here. See above. */
584
- uninterpretedOption: UninterpretedOption[];
585
- }
586
- export interface ServiceOptions {
587
- /**
588
- * Is this service deprecated?
589
- * Depending on the target platform, this can emit Deprecated annotations
590
- * for the service, or it will be completely ignored; in the very least,
591
- * this is a formalization for deprecating services.
592
- */
593
- deprecated?: boolean | undefined;
594
- /** The parser stores options it doesn't recognize here. See above. */
595
- uninterpretedOption: UninterpretedOption[];
596
- }
597
- export interface MethodOptions {
598
- /**
599
- * Is this method deprecated?
600
- * Depending on the target platform, this can emit Deprecated annotations
601
- * for the method, or it will be completely ignored; in the very least,
602
- * this is a formalization for deprecating methods.
603
- */
604
- deprecated?: boolean | undefined;
605
- idempotencyLevel?: MethodOptions_IdempotencyLevel | undefined;
606
- /** The parser stores options it doesn't recognize here. See above. */
607
- uninterpretedOption: UninterpretedOption[];
608
- }
609
- /**
610
- * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
611
- * or neither? HTTP based RPC implementation may choose GET verb for safe
612
- * methods, and PUT verb for idempotent methods instead of the default POST.
613
- */
614
- export declare enum MethodOptions_IdempotencyLevel {
615
- IDEMPOTENCY_UNKNOWN = 0,
616
- /** NO_SIDE_EFFECTS - implies idempotent */
617
- NO_SIDE_EFFECTS = 1,
618
- /** IDEMPOTENT - idempotent, but may have side effects */
619
- IDEMPOTENT = 2,
620
- UNRECOGNIZED = -1
621
- }
622
- /**
623
- * A message representing a option the parser does not recognize. This only
624
- * appears in options protos created by the compiler::Parser class.
625
- * DescriptorPool resolves these when building Descriptor objects. Therefore,
626
- * options protos in descriptor objects (e.g. returned by Descriptor::options(),
627
- * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
628
- * in them.
629
- */
630
- export interface UninterpretedOption {
631
- name: UninterpretedOption_NamePart[];
632
- /**
633
- * The value of the uninterpreted option, in whatever type the tokenizer
634
- * identified it as during parsing. Exactly one of these should be set.
635
- */
636
- identifierValue?: string | undefined;
637
- positiveIntValue?: number | undefined;
638
- negativeIntValue?: number | undefined;
639
- doubleValue?: number | undefined;
640
- stringValue?: Uint8Array | undefined;
641
- aggregateValue?: string | undefined;
642
- }
643
- /**
644
- * The name of the uninterpreted option. Each string represents a segment in
645
- * a dot-separated name. is_extension is true iff a segment represents an
646
- * extension (denoted with parentheses in options specs in .proto files).
647
- * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
648
- * "foo.(bar.baz).qux".
649
- */
650
- export interface UninterpretedOption_NamePart {
651
- namePart: string;
652
- isExtension: boolean;
653
- }
654
- /**
655
- * Encapsulates information about the original source file from which a
656
- * FileDescriptorProto was generated.
657
- */
658
- export interface SourceCodeInfo {
659
- /**
660
- * A Location identifies a piece of source code in a .proto file which
661
- * corresponds to a particular definition. This information is intended
662
- * to be useful to IDEs, code indexers, documentation generators, and similar
663
- * tools.
664
- *
665
- * For example, say we have a file like:
666
- * message Foo {
667
- * optional string foo = 1;
668
- * }
669
- * Let's look at just the field definition:
670
- * optional string foo = 1;
671
- * ^ ^^ ^^ ^ ^^^
672
- * a bc de f ghi
673
- * We have the following locations:
674
- * span path represents
675
- * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
676
- * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
677
- * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
678
- * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
679
- * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
680
- *
681
- * Notes:
682
- * - A location may refer to a repeated field itself (i.e. not to any
683
- * particular index within it). This is used whenever a set of elements are
684
- * logically enclosed in a single code segment. For example, an entire
685
- * extend block (possibly containing multiple extension definitions) will
686
- * have an outer location whose path refers to the "extensions" repeated
687
- * field without an index.
688
- * - Multiple locations may have the same path. This happens when a single
689
- * logical declaration is spread out across multiple places. The most
690
- * obvious example is the "extend" block again -- there may be multiple
691
- * extend blocks in the same scope, each of which will have the same path.
692
- * - A location's span is not always a subset of its parent's span. For
693
- * example, the "extendee" of an extension declaration appears at the
694
- * beginning of the "extend" block and is shared by all extensions within
695
- * the block.
696
- * - Just because a location's span is a subset of some other location's span
697
- * does not mean that it is a descendant. For example, a "group" defines
698
- * both a type and a field in a single declaration. Thus, the locations
699
- * corresponding to the type and field and their components will overlap.
700
- * - Code which tries to interpret locations should probably be designed to
701
- * ignore those that it doesn't understand, as more types of locations could
702
- * be recorded in the future.
703
- */
704
- location: SourceCodeInfo_Location[];
705
- }
706
- export interface SourceCodeInfo_Location {
707
- /**
708
- * Identifies which part of the FileDescriptorProto was defined at this
709
- * location.
710
- *
711
- * Each element is a field number or an index. They form a path from
712
- * the root FileDescriptorProto to the place where the definition occurs.
713
- * For example, this path:
714
- * [ 4, 3, 2, 7, 1 ]
715
- * refers to:
716
- * file.message_type(3) // 4, 3
717
- * .field(7) // 2, 7
718
- * .name() // 1
719
- * This is because FileDescriptorProto.message_type has field number 4:
720
- * repeated DescriptorProto message_type = 4;
721
- * and DescriptorProto.field has field number 2:
722
- * repeated FieldDescriptorProto field = 2;
723
- * and FieldDescriptorProto.name has field number 1:
724
- * optional string name = 1;
725
- *
726
- * Thus, the above path gives the location of a field name. If we removed
727
- * the last element:
728
- * [ 4, 3, 2, 7 ]
729
- * this path refers to the whole field declaration (from the beginning
730
- * of the label to the terminating semicolon).
731
- */
732
- path: number[];
733
- /**
734
- * Always has exactly three or four elements: start line, start column,
735
- * end line (optional, otherwise assumed same as start line), end column.
736
- * These are packed into a single field for efficiency. Note that line
737
- * and column numbers are zero-based -- typically you will want to add
738
- * 1 to each before displaying to a user.
739
- */
740
- span: number[];
741
- /**
742
- * If this SourceCodeInfo represents a complete declaration, these are any
743
- * comments appearing before and after the declaration which appear to be
744
- * attached to the declaration.
745
- *
746
- * A series of line comments appearing on consecutive lines, with no other
747
- * tokens appearing on those lines, will be treated as a single comment.
748
- *
749
- * leading_detached_comments will keep paragraphs of comments that appear
750
- * before (but not connected to) the current element. Each paragraph,
751
- * separated by empty lines, will be one comment element in the repeated
752
- * field.
753
- *
754
- * Only the comment content is provided; comment markers (e.g. //) are
755
- * stripped out. For block comments, leading whitespace and an asterisk
756
- * will be stripped from the beginning of each line other than the first.
757
- * Newlines are included in the output.
758
- *
759
- * Examples:
760
- *
761
- * optional int32 foo = 1; // Comment attached to foo.
762
- * // Comment attached to bar.
763
- * optional int32 bar = 2;
764
- *
765
- * optional string baz = 3;
766
- * // Comment attached to baz.
767
- * // Another line attached to baz.
768
- *
769
- * // Comment attached to qux.
770
- * //
771
- * // Another line attached to qux.
772
- * optional double qux = 4;
773
- *
774
- * // Detached comment for corge. This is not leading or trailing comments
775
- * // to qux or corge because there are blank lines separating it from
776
- * // both.
777
- *
778
- * // Detached comment for corge paragraph 2.
779
- *
780
- * optional string corge = 5;
781
- * /* Block comment attached
782
- * * to corge. Leading asterisks
783
- * * will be removed. * /
784
- * /* Block comment attached to
785
- * * grault. * /
786
- * optional int32 grault = 6;
787
- *
788
- * // ignored detached comments.
789
- */
790
- leadingComments?: string | undefined;
791
- trailingComments?: string | undefined;
792
- leadingDetachedComments: string[];
793
- }
794
- /**
795
- * Describes the relationship between generated code and its original source
796
- * file. A GeneratedCodeInfo message is associated with only one generated
797
- * source file, but may contain references to different source .proto files.
798
- */
799
- export interface GeneratedCodeInfo {
800
- /**
801
- * An Annotation connects some span of text in generated code to an element
802
- * of its generating .proto file.
803
- */
804
- annotation: GeneratedCodeInfo_Annotation[];
805
- }
806
- export interface GeneratedCodeInfo_Annotation {
807
- /**
808
- * Identifies the element in the original source .proto file. This field
809
- * is formatted the same as SourceCodeInfo.Location.path.
810
- */
811
- path: number[];
812
- /** Identifies the filesystem path to the original source .proto. */
813
- sourceFile?: string | undefined;
814
- /**
815
- * Identifies the starting offset in bytes in the generated code
816
- * that relates to the identified object.
817
- */
818
- begin?: number | undefined;
819
- /**
820
- * Identifies the ending offset in bytes in the generated code that
821
- * relates to the identified offset. The end offset should be one past
822
- * the last relevant byte (so the length of the text = end - begin).
823
- */
824
- end?: number | undefined;
825
- }