@bufbuild/protobuf 1.3.0 → 1.3.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.
- package/dist/cjs/google/protobuf/struct_pb.js +1 -1
- package/dist/cjs/google/protobuf/type_pb.js +1 -1
- package/dist/cjs/private/json-format-common.js +2 -1
- package/dist/cjs/private/util-common.js +37 -8
- package/dist/esm/binary-encoding.d.ts +421 -0
- package/dist/esm/binary-format.d.ts +87 -0
- package/dist/esm/codegen-info.d.ts +23 -0
- package/dist/esm/create-descriptor-set.d.ts +16 -0
- package/dist/esm/create-registry-from-desc.d.ts +15 -0
- package/dist/esm/create-registry.d.ts +8 -0
- package/dist/esm/descriptor-set.d.ts +606 -0
- package/dist/esm/enum.d.ts +35 -0
- package/dist/esm/field-list.d.ts +27 -0
- package/dist/esm/field.d.ts +255 -0
- package/dist/esm/google/protobuf/any_pb.d.ts +156 -0
- package/dist/esm/google/protobuf/api_pb.d.ts +256 -0
- package/dist/esm/google/protobuf/compiler/plugin_pb.d.ts +236 -0
- package/dist/esm/google/protobuf/descriptor_pb.d.ts +1851 -0
- package/dist/esm/google/protobuf/duration_pb.d.ts +100 -0
- package/dist/esm/google/protobuf/empty_pb.d.ts +28 -0
- package/dist/esm/google/protobuf/field_mask_pb.d.ts +227 -0
- package/dist/esm/google/protobuf/source_context_pb.d.ts +29 -0
- package/dist/esm/google/protobuf/struct_pb.d.ts +158 -0
- package/dist/esm/google/protobuf/struct_pb.js +1 -1
- package/dist/esm/google/protobuf/timestamp_pb.d.ts +132 -0
- package/dist/esm/google/protobuf/type_pb.d.ts +437 -0
- package/dist/esm/google/protobuf/type_pb.js +1 -1
- package/dist/esm/google/protobuf/wrappers_pb.d.ts +267 -0
- package/dist/esm/google/varint.d.ts +70 -0
- package/dist/esm/index.d.ts +38 -0
- package/dist/esm/json-format.d.ts +110 -0
- package/dist/esm/message-type.d.ts +51 -0
- package/dist/esm/message.d.ts +130 -0
- package/dist/esm/private/assert.d.ts +16 -0
- package/dist/esm/private/binary-format-common.d.ts +13 -0
- package/dist/esm/private/binary-format-proto2.d.ts +2 -0
- package/dist/esm/private/binary-format-proto3.d.ts +2 -0
- package/dist/esm/private/enum.d.ts +27 -0
- package/dist/esm/private/field-list.d.ts +18 -0
- package/dist/esm/private/field-wrapper.d.ts +25 -0
- package/dist/esm/private/field.d.ts +15 -0
- package/dist/esm/private/json-format-common.d.ts +9 -0
- package/dist/esm/private/json-format-common.js +2 -1
- package/dist/esm/private/json-format-proto2.d.ts +2 -0
- package/dist/esm/private/json-format-proto3.d.ts +2 -0
- package/dist/esm/private/message-type.d.ts +18 -0
- package/dist/esm/private/names.d.ts +43 -0
- package/dist/esm/private/options-map.d.ts +7 -0
- package/dist/esm/private/proto-runtime.d.ts +47 -0
- package/dist/esm/private/reify-wkt.d.ts +100 -0
- package/dist/esm/private/scalars.d.ts +27 -0
- package/dist/esm/private/util-common.d.ts +2 -0
- package/dist/esm/private/util-common.js +37 -8
- package/dist/esm/private/util.d.ts +38 -0
- package/dist/esm/proto-base64.d.ts +18 -0
- package/dist/esm/proto-delimited.d.ts +54 -0
- package/dist/esm/proto-double.d.ts +5 -0
- package/dist/esm/proto-int64.d.ts +95 -0
- package/dist/esm/proto2.d.ts +4 -0
- package/dist/esm/proto3.d.ts +4 -0
- package/dist/esm/service-type.d.ts +96 -0
- package/dist/esm/to-plain-message.d.ts +9 -0
- package/dist/esm/type-registry.d.ts +30 -0
- package/package.json +14 -9
- /package/dist/{types → cjs}/binary-encoding.d.ts +0 -0
- /package/dist/{types → cjs}/binary-format.d.ts +0 -0
- /package/dist/{types → cjs}/codegen-info.d.ts +0 -0
- /package/dist/{types → cjs}/create-descriptor-set.d.ts +0 -0
- /package/dist/{types → cjs}/create-registry-from-desc.d.ts +0 -0
- /package/dist/{types → cjs}/create-registry.d.ts +0 -0
- /package/dist/{types → cjs}/descriptor-set.d.ts +0 -0
- /package/dist/{types → cjs}/enum.d.ts +0 -0
- /package/dist/{types → cjs}/field-list.d.ts +0 -0
- /package/dist/{types → cjs}/field.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/any_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/api_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/compiler/plugin_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/descriptor_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/duration_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/empty_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/field_mask_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/source_context_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/struct_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/timestamp_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/type_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/protobuf/wrappers_pb.d.ts +0 -0
- /package/dist/{types → cjs}/google/varint.d.ts +0 -0
- /package/dist/{types → cjs}/index.d.ts +0 -0
- /package/dist/{types → cjs}/json-format.d.ts +0 -0
- /package/dist/{types → cjs}/message-type.d.ts +0 -0
- /package/dist/{types → cjs}/message.d.ts +0 -0
- /package/dist/{types → cjs}/private/assert.d.ts +0 -0
- /package/dist/{types → cjs}/private/binary-format-common.d.ts +0 -0
- /package/dist/{types → cjs}/private/binary-format-proto2.d.ts +0 -0
- /package/dist/{types → cjs}/private/binary-format-proto3.d.ts +0 -0
- /package/dist/{types → cjs}/private/enum.d.ts +0 -0
- /package/dist/{types → cjs}/private/field-list.d.ts +0 -0
- /package/dist/{types → cjs}/private/field-wrapper.d.ts +0 -0
- /package/dist/{types → cjs}/private/field.d.ts +0 -0
- /package/dist/{types → cjs}/private/json-format-common.d.ts +0 -0
- /package/dist/{types → cjs}/private/json-format-proto2.d.ts +0 -0
- /package/dist/{types → cjs}/private/json-format-proto3.d.ts +0 -0
- /package/dist/{types → cjs}/private/message-type.d.ts +0 -0
- /package/dist/{types → cjs}/private/names.d.ts +0 -0
- /package/dist/{types → cjs}/private/options-map.d.ts +0 -0
- /package/dist/{types → cjs}/private/proto-runtime.d.ts +0 -0
- /package/dist/{types → cjs}/private/reify-wkt.d.ts +0 -0
- /package/dist/{types → cjs}/private/scalars.d.ts +0 -0
- /package/dist/{types → cjs}/private/util-common.d.ts +0 -0
- /package/dist/{types → cjs}/private/util.d.ts +0 -0
- /package/dist/{types → cjs}/proto-base64.d.ts +0 -0
- /package/dist/{types → cjs}/proto-delimited.d.ts +0 -0
- /package/dist/{types → cjs}/proto-double.d.ts +0 -0
- /package/dist/{types → cjs}/proto-int64.d.ts +0 -0
- /package/dist/{types → cjs}/proto2.d.ts +0 -0
- /package/dist/{types → cjs}/proto3.d.ts +0 -0
- /package/dist/{types → cjs}/service-type.d.ts +0 -0
- /package/dist/{types → cjs}/to-plain-message.d.ts +0 -0
- /package/dist/{types → cjs}/type-registry.d.ts +0 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { PartialMessage, PlainMessage } from "../../../message.js";
|
|
2
|
+
import { Message } from "../../../message.js";
|
|
3
|
+
import { proto2 } from "../../../proto2.js";
|
|
4
|
+
import type { FieldList } from "../../../field-list.js";
|
|
5
|
+
import type { BinaryReadOptions } from "../../../binary-format.js";
|
|
6
|
+
import type { JsonReadOptions, JsonValue } from "../../../json-format.js";
|
|
7
|
+
import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pb.js";
|
|
8
|
+
/**
|
|
9
|
+
* The version number of protocol compiler.
|
|
10
|
+
*
|
|
11
|
+
* @generated from message google.protobuf.compiler.Version
|
|
12
|
+
*/
|
|
13
|
+
export declare class Version extends Message<Version> {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from field: optional int32 major = 1;
|
|
16
|
+
*/
|
|
17
|
+
major?: number;
|
|
18
|
+
/**
|
|
19
|
+
* @generated from field: optional int32 minor = 2;
|
|
20
|
+
*/
|
|
21
|
+
minor?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @generated from field: optional int32 patch = 3;
|
|
24
|
+
*/
|
|
25
|
+
patch?: number;
|
|
26
|
+
/**
|
|
27
|
+
* A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
|
|
28
|
+
* be empty for mainline stable releases.
|
|
29
|
+
*
|
|
30
|
+
* @generated from field: optional string suffix = 4;
|
|
31
|
+
*/
|
|
32
|
+
suffix?: string;
|
|
33
|
+
constructor(data?: PartialMessage<Version>);
|
|
34
|
+
static readonly runtime: typeof proto2;
|
|
35
|
+
static readonly typeName = "google.protobuf.compiler.Version";
|
|
36
|
+
static readonly fields: FieldList;
|
|
37
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Version;
|
|
38
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Version;
|
|
39
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Version;
|
|
40
|
+
static equals(a: Version | PlainMessage<Version> | undefined, b: Version | PlainMessage<Version> | undefined): boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
|
44
|
+
*
|
|
45
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
|
|
46
|
+
*/
|
|
47
|
+
export declare class CodeGeneratorRequest extends Message<CodeGeneratorRequest> {
|
|
48
|
+
/**
|
|
49
|
+
* The .proto files that were explicitly listed on the command-line. The
|
|
50
|
+
* code generator should generate code only for these files. Each file's
|
|
51
|
+
* descriptor will be included in proto_file, below.
|
|
52
|
+
*
|
|
53
|
+
* @generated from field: repeated string file_to_generate = 1;
|
|
54
|
+
*/
|
|
55
|
+
fileToGenerate: string[];
|
|
56
|
+
/**
|
|
57
|
+
* The generator parameter passed on the command-line.
|
|
58
|
+
*
|
|
59
|
+
* @generated from field: optional string parameter = 2;
|
|
60
|
+
*/
|
|
61
|
+
parameter?: string;
|
|
62
|
+
/**
|
|
63
|
+
* FileDescriptorProtos for all files in files_to_generate and everything
|
|
64
|
+
* they import. The files will appear in topological order, so each file
|
|
65
|
+
* appears before any file that imports it.
|
|
66
|
+
*
|
|
67
|
+
* protoc guarantees that all proto_files will be written after
|
|
68
|
+
* the fields above, even though this is not technically guaranteed by the
|
|
69
|
+
* protobuf wire format. This theoretically could allow a plugin to stream
|
|
70
|
+
* in the FileDescriptorProtos and handle them one by one rather than read
|
|
71
|
+
* the entire set into memory at once. However, as of this writing, this
|
|
72
|
+
* is not similarly optimized on protoc's end -- it will store all fields in
|
|
73
|
+
* memory at once before sending them to the plugin.
|
|
74
|
+
*
|
|
75
|
+
* Type names of fields and extensions in the FileDescriptorProto are always
|
|
76
|
+
* fully qualified.
|
|
77
|
+
*
|
|
78
|
+
* @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
|
|
79
|
+
*/
|
|
80
|
+
protoFile: FileDescriptorProto[];
|
|
81
|
+
/**
|
|
82
|
+
* The version number of protocol compiler.
|
|
83
|
+
*
|
|
84
|
+
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
|
|
85
|
+
*/
|
|
86
|
+
compilerVersion?: Version;
|
|
87
|
+
constructor(data?: PartialMessage<CodeGeneratorRequest>);
|
|
88
|
+
static readonly runtime: typeof proto2;
|
|
89
|
+
static readonly typeName = "google.protobuf.compiler.CodeGeneratorRequest";
|
|
90
|
+
static readonly fields: FieldList;
|
|
91
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorRequest;
|
|
92
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorRequest;
|
|
93
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorRequest;
|
|
94
|
+
static equals(a: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined, b: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined): boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The plugin writes an encoded CodeGeneratorResponse to stdout.
|
|
98
|
+
*
|
|
99
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
|
|
100
|
+
*/
|
|
101
|
+
export declare class CodeGeneratorResponse extends Message<CodeGeneratorResponse> {
|
|
102
|
+
/**
|
|
103
|
+
* Error message. If non-empty, code generation failed. The plugin process
|
|
104
|
+
* should exit with status code zero even if it reports an error in this way.
|
|
105
|
+
*
|
|
106
|
+
* This should be used to indicate errors in .proto files which prevent the
|
|
107
|
+
* code generator from generating correct code. Errors which indicate a
|
|
108
|
+
* problem in protoc itself -- such as the input CodeGeneratorRequest being
|
|
109
|
+
* unparseable -- should be reported by writing a message to stderr and
|
|
110
|
+
* exiting with a non-zero status code.
|
|
111
|
+
*
|
|
112
|
+
* @generated from field: optional string error = 1;
|
|
113
|
+
*/
|
|
114
|
+
error?: string;
|
|
115
|
+
/**
|
|
116
|
+
* A bitmask of supported features that the code generator supports.
|
|
117
|
+
* This is a bitwise "or" of values from the Feature enum.
|
|
118
|
+
*
|
|
119
|
+
* @generated from field: optional uint64 supported_features = 2;
|
|
120
|
+
*/
|
|
121
|
+
supportedFeatures?: bigint;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
|
|
124
|
+
*/
|
|
125
|
+
file: CodeGeneratorResponse_File[];
|
|
126
|
+
constructor(data?: PartialMessage<CodeGeneratorResponse>);
|
|
127
|
+
static readonly runtime: typeof proto2;
|
|
128
|
+
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse";
|
|
129
|
+
static readonly fields: FieldList;
|
|
130
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse;
|
|
131
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse;
|
|
132
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse;
|
|
133
|
+
static equals(a: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined, b: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined): boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Sync with code_generator.h.
|
|
137
|
+
*
|
|
138
|
+
* @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
|
|
139
|
+
*/
|
|
140
|
+
export declare enum CodeGeneratorResponse_Feature {
|
|
141
|
+
/**
|
|
142
|
+
* @generated from enum value: FEATURE_NONE = 0;
|
|
143
|
+
*/
|
|
144
|
+
NONE = 0,
|
|
145
|
+
/**
|
|
146
|
+
* @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
|
|
147
|
+
*/
|
|
148
|
+
PROTO3_OPTIONAL = 1
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Represents a single generated file.
|
|
152
|
+
*
|
|
153
|
+
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
|
|
154
|
+
*/
|
|
155
|
+
export declare class CodeGeneratorResponse_File extends Message<CodeGeneratorResponse_File> {
|
|
156
|
+
/**
|
|
157
|
+
* The file name, relative to the output directory. The name must not
|
|
158
|
+
* contain "." or ".." components and must be relative, not be absolute (so,
|
|
159
|
+
* the file cannot lie outside the output directory). "/" must be used as
|
|
160
|
+
* the path separator, not "\".
|
|
161
|
+
*
|
|
162
|
+
* If the name is omitted, the content will be appended to the previous
|
|
163
|
+
* file. This allows the generator to break large files into small chunks,
|
|
164
|
+
* and allows the generated text to be streamed back to protoc so that large
|
|
165
|
+
* files need not reside completely in memory at one time. Note that as of
|
|
166
|
+
* this writing protoc does not optimize for this -- it will read the entire
|
|
167
|
+
* CodeGeneratorResponse before writing files to disk.
|
|
168
|
+
*
|
|
169
|
+
* @generated from field: optional string name = 1;
|
|
170
|
+
*/
|
|
171
|
+
name?: string;
|
|
172
|
+
/**
|
|
173
|
+
* If non-empty, indicates that the named file should already exist, and the
|
|
174
|
+
* content here is to be inserted into that file at a defined insertion
|
|
175
|
+
* point. This feature allows a code generator to extend the output
|
|
176
|
+
* produced by another code generator. The original generator may provide
|
|
177
|
+
* insertion points by placing special annotations in the file that look
|
|
178
|
+
* like:
|
|
179
|
+
* @@protoc_insertion_point(NAME)
|
|
180
|
+
* The annotation can have arbitrary text before and after it on the line,
|
|
181
|
+
* which allows it to be placed in a comment. NAME should be replaced with
|
|
182
|
+
* an identifier naming the point -- this is what other generators will use
|
|
183
|
+
* as the insertion_point. Code inserted at this point will be placed
|
|
184
|
+
* immediately above the line containing the insertion point (thus multiple
|
|
185
|
+
* insertions to the same point will come out in the order they were added).
|
|
186
|
+
* The double-@ is intended to make it unlikely that the generated code
|
|
187
|
+
* could contain things that look like insertion points by accident.
|
|
188
|
+
*
|
|
189
|
+
* For example, the C++ code generator places the following line in the
|
|
190
|
+
* .pb.h files that it generates:
|
|
191
|
+
* // @@protoc_insertion_point(namespace_scope)
|
|
192
|
+
* This line appears within the scope of the file's package namespace, but
|
|
193
|
+
* outside of any particular class. Another plugin can then specify the
|
|
194
|
+
* insertion_point "namespace_scope" to generate additional classes or
|
|
195
|
+
* other declarations that should be placed in this scope.
|
|
196
|
+
*
|
|
197
|
+
* Note that if the line containing the insertion point begins with
|
|
198
|
+
* whitespace, the same whitespace will be added to every line of the
|
|
199
|
+
* inserted text. This is useful for languages like Python, where
|
|
200
|
+
* indentation matters. In these languages, the insertion point comment
|
|
201
|
+
* should be indented the same amount as any inserted code will need to be
|
|
202
|
+
* in order to work correctly in that context.
|
|
203
|
+
*
|
|
204
|
+
* The code generator that generates the initial file and the one which
|
|
205
|
+
* inserts into it must both run as part of a single invocation of protoc.
|
|
206
|
+
* Code generators are executed in the order in which they appear on the
|
|
207
|
+
* command line.
|
|
208
|
+
*
|
|
209
|
+
* If |insertion_point| is present, |name| must also be present.
|
|
210
|
+
*
|
|
211
|
+
* @generated from field: optional string insertion_point = 2;
|
|
212
|
+
*/
|
|
213
|
+
insertionPoint?: string;
|
|
214
|
+
/**
|
|
215
|
+
* The file contents.
|
|
216
|
+
*
|
|
217
|
+
* @generated from field: optional string content = 15;
|
|
218
|
+
*/
|
|
219
|
+
content?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Information describing the file content being inserted. If an insertion
|
|
222
|
+
* point is used, this information will be appropriately offset and inserted
|
|
223
|
+
* into the code generation metadata for the generated files.
|
|
224
|
+
*
|
|
225
|
+
* @generated from field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16;
|
|
226
|
+
*/
|
|
227
|
+
generatedCodeInfo?: GeneratedCodeInfo;
|
|
228
|
+
constructor(data?: PartialMessage<CodeGeneratorResponse_File>);
|
|
229
|
+
static readonly runtime: typeof proto2;
|
|
230
|
+
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse.File";
|
|
231
|
+
static readonly fields: FieldList;
|
|
232
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse_File;
|
|
233
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File;
|
|
234
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File;
|
|
235
|
+
static equals(a: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined, b: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined): boolean;
|
|
236
|
+
}
|