@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.2-alpha.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/binary-encoding.js +414 -409
- package/dist/cjs/binary-format.js +13 -0
- package/dist/cjs/descriptor-registry.js +420 -449
- package/dist/cjs/descriptor-set.js +429 -513
- package/dist/cjs/enum.js +13 -0
- package/dist/cjs/field-list.js +13 -0
- package/dist/cjs/field.js +43 -30
- package/dist/cjs/google/protobuf/any_pb.js +122 -140
- package/dist/cjs/google/protobuf/api_pb.js +177 -224
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
- package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
- package/dist/cjs/google/protobuf/duration_pb.js +72 -88
- package/dist/cjs/google/protobuf/empty_pb.js +17 -17
- package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
- package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
- package/dist/cjs/google/protobuf/struct_pb.js +144 -181
- package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
- package/dist/cjs/google/protobuf/type_pb.js +406 -462
- package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
- package/dist/cjs/google/varint.js +166 -171
- package/dist/cjs/index.js +41 -122
- package/dist/cjs/json-format.js +13 -0
- package/dist/cjs/message-type.js +13 -0
- package/dist/cjs/message.js +89 -85
- package/dist/cjs/private/assert.js +33 -26
- package/dist/cjs/private/base64.js +93 -79
- package/dist/cjs/private/binary-format-common.js +208 -208
- package/dist/cjs/private/binary-format-proto2.js +88 -109
- package/dist/cjs/private/binary-format-proto3.js +70 -90
- package/dist/cjs/private/enum.js +77 -44
- package/dist/cjs/private/field-list.js +64 -50
- package/dist/cjs/private/field-wrapper.js +21 -10
- package/dist/cjs/private/field.js +35 -25
- package/dist/cjs/private/json-format-common.js +427 -440
- package/dist/cjs/private/json-format-proto2.js +91 -89
- package/dist/cjs/private/json-format-proto3.js +82 -93
- package/dist/cjs/private/message-type.js +39 -27
- package/dist/cjs/private/names.js +71 -62
- package/dist/cjs/private/options-map.js +13 -0
- package/dist/cjs/private/proto-runtime.js +25 -16
- package/dist/cjs/private/scalars.js +113 -103
- package/dist/cjs/private/util-common.js +193 -210
- package/dist/cjs/private/util.js +13 -0
- package/dist/cjs/proto-int64.js +123 -111
- package/dist/cjs/proto2.js +63 -63
- package/dist/cjs/proto3.js +74 -74
- package/dist/cjs/service-type.js +27 -17
- package/dist/cjs/type-registry.js +46 -31
- package/dist/esm/binary-encoding.js +414 -414
- package/dist/esm/binary-format.js +13 -0
- package/dist/esm/descriptor-registry.js +422 -458
- package/dist/esm/descriptor-set.js +430 -478
- package/dist/esm/enum.js +13 -0
- package/dist/esm/field-list.js +13 -0
- package/dist/esm/field.js +42 -29
- package/dist/esm/google/protobuf/any_pb.js +122 -140
- package/dist/esm/google/protobuf/api_pb.js +177 -197
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
- package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
- package/dist/esm/google/protobuf/duration_pb.js +72 -88
- package/dist/esm/google/protobuf/empty_pb.js +17 -17
- package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
- package/dist/esm/google/protobuf/source_context_pb.js +25 -25
- package/dist/esm/google/protobuf/struct_pb.js +143 -180
- package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
- package/dist/esm/google/protobuf/type_pb.js +401 -421
- package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
- package/dist/esm/google/varint.js +165 -164
- package/dist/esm/index.js +14 -1
- package/dist/esm/json-format.js +13 -0
- package/dist/esm/message-type.js +13 -0
- package/dist/esm/message.js +89 -85
- package/dist/esm/private/assert.js +32 -21
- package/dist/esm/private/base64.js +92 -78
- package/dist/esm/private/binary-format-common.js +209 -207
- package/dist/esm/private/binary-format-proto2.js +89 -81
- package/dist/esm/private/binary-format-proto3.js +71 -67
- package/dist/esm/private/enum.js +75 -43
- package/dist/esm/private/field-list.js +64 -50
- package/dist/esm/private/field-wrapper.js +21 -10
- package/dist/esm/private/field.js +35 -22
- package/dist/esm/private/json-format-common.js +427 -435
- package/dist/esm/private/json-format-proto2.js +89 -81
- package/dist/esm/private/json-format-proto3.js +79 -80
- package/dist/esm/private/message-type.js +40 -28
- package/dist/esm/private/names.js +70 -57
- package/dist/esm/private/options-map.js +13 -0
- package/dist/esm/private/proto-runtime.js +26 -12
- package/dist/esm/private/scalars.js +112 -99
- package/dist/esm/private/util-common.js +193 -192
- package/dist/esm/private/util.js +13 -0
- package/dist/esm/proto-int64.js +123 -111
- package/dist/esm/proto2.js +63 -57
- package/dist/esm/proto3.js +74 -68
- package/dist/esm/service-type.js +25 -12
- package/dist/esm/type-registry.js +46 -31
- package/dist/types/binary-encoding.d.ts +398 -398
- package/dist/types/binary-format.d.ts +69 -91
- package/dist/types/descriptor-registry.d.ts +23 -29
- package/dist/types/descriptor-set.d.ts +107 -128
- package/dist/types/enum.d.ts +21 -21
- package/dist/types/field-list.d.ts +21 -21
- package/dist/types/field.d.ts +191 -231
- package/dist/types/google/protobuf/any_pb.d.ts +56 -77
- package/dist/types/google/protobuf/api_pb.d.ts +144 -187
- package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
- package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
- package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
- package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
- package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
- package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
- package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
- package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
- package/dist/types/google/protobuf/type_pb.d.ts +355 -422
- package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
- package/dist/types/google/varint.d.ts +6 -13
- package/dist/types/index.d.ts +4 -27
- package/dist/types/json-format.d.ts +70 -89
- package/dist/types/message-type.d.ts +37 -45
- package/dist/types/message.d.ts +62 -87
- package/dist/types/private/assert.d.ts +1 -4
- package/dist/types/private/binary-format-common.d.ts +6 -32
- package/dist/types/private/enum.d.ts +13 -11
- package/dist/types/private/field-list.d.ts +14 -21
- package/dist/types/private/field-wrapper.d.ts +4 -10
- package/dist/types/private/field.d.ts +12 -12
- package/dist/types/private/json-format-common.d.ts +5 -27
- package/dist/types/private/message-type.d.ts +12 -7
- package/dist/types/private/names.d.ts +1 -4
- package/dist/types/private/options-map.d.ts +1 -1
- package/dist/types/private/proto-runtime.d.ts +34 -42
- package/dist/types/private/scalars.d.ts +5 -12
- package/dist/types/private/util-common.d.ts +1 -4
- package/dist/types/private/util.d.ts +29 -41
- package/dist/types/proto-int64.d.ts +42 -42
- package/dist/types/service-type.d.ts +36 -56
- package/dist/types/type-registry.d.ts +13 -15
- package/package.json +2 -3
package/dist/types/field.d.ts
CHANGED
|
@@ -24,11 +24,7 @@ import type { MessageType } from "./message-type.js";
|
|
|
24
24
|
* - "oneof": If the field is member of a oneof group.
|
|
25
25
|
* - "default": Only proto2: An explicit default value.
|
|
26
26
|
*/
|
|
27
|
-
export declare type FieldInfo =
|
|
28
|
-
| fiRules<fiScalar>
|
|
29
|
-
| fiRules<fiEnum>
|
|
30
|
-
| fiRules<fiMessage>
|
|
31
|
-
| fiRules<fiMap>;
|
|
27
|
+
export declare type FieldInfo = fiRules<fiScalar> | fiRules<fiEnum> | fiRules<fiMessage> | fiRules<fiMap>;
|
|
32
28
|
/**
|
|
33
29
|
* Version of `FieldInfo` that allows the following properties
|
|
34
30
|
* to be omitted:
|
|
@@ -38,258 +34,222 @@ export declare type FieldInfo =
|
|
|
38
34
|
* - "repeated": Can be omitted if false.
|
|
39
35
|
* - "packed": Can be omitted if equal to the standard packing of the field.
|
|
40
36
|
*/
|
|
41
|
-
export declare type PartialFieldInfo =
|
|
42
|
-
| fiPartialRules<fiScalar>
|
|
43
|
-
| fiPartialRules<fiEnum>
|
|
44
|
-
| fiPartialRules<fiMessage>
|
|
45
|
-
| fiPartialRules<fiMap>;
|
|
37
|
+
export declare type PartialFieldInfo = fiPartialRules<fiScalar> | fiPartialRules<fiEnum> | fiPartialRules<fiMessage> | fiPartialRules<fiMap>;
|
|
46
38
|
/**
|
|
47
39
|
* Provides convenient access to field information of a oneof.
|
|
48
40
|
*/
|
|
49
41
|
export interface OneofInfo {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
readonly kind: "oneof";
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly localName: string;
|
|
45
|
+
readonly repeated: false;
|
|
46
|
+
readonly packed: false;
|
|
47
|
+
readonly opt: false;
|
|
48
|
+
readonly default: undefined;
|
|
49
|
+
readonly fields: readonly FieldInfo[];
|
|
50
|
+
/**
|
|
51
|
+
* Return field information by local name.
|
|
52
|
+
*/
|
|
53
|
+
findField(localName: string): FieldInfo | undefined;
|
|
62
54
|
}
|
|
63
55
|
interface fiShared {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The field number of the .proto field.
|
|
58
|
+
*/
|
|
59
|
+
readonly no: number;
|
|
60
|
+
/**
|
|
61
|
+
* The original name of the .proto field.
|
|
62
|
+
*/
|
|
63
|
+
readonly name: string;
|
|
64
|
+
/**
|
|
65
|
+
* The name of the field as used in generated code.
|
|
66
|
+
*/
|
|
67
|
+
readonly localName: string;
|
|
68
|
+
/**
|
|
69
|
+
* The name for JSON serialization / deserialization.
|
|
70
|
+
*/
|
|
71
|
+
readonly jsonName: string;
|
|
72
|
+
/**
|
|
73
|
+
* The `oneof` group, if this field belongs to one.
|
|
74
|
+
*/
|
|
75
|
+
readonly oneof?: OneofInfo | undefined;
|
|
84
76
|
}
|
|
85
77
|
interface fiScalar extends fiShared {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
78
|
+
readonly kind: "scalar";
|
|
79
|
+
/**
|
|
80
|
+
* Scalar type of the field.
|
|
81
|
+
*/
|
|
82
|
+
readonly T: ScalarType;
|
|
83
|
+
/**
|
|
84
|
+
* Is the field repeated?
|
|
85
|
+
*/
|
|
86
|
+
readonly repeated: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Is this repeated field packed?
|
|
89
|
+
* BYTES and STRING can never be packed, since they are length-delimited.
|
|
90
|
+
* Other types can be packed with the field option "packed".
|
|
91
|
+
* For proto3, fields are packed by default.
|
|
92
|
+
*/
|
|
93
|
+
readonly packed: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Is the field optional?
|
|
96
|
+
*/
|
|
97
|
+
readonly opt: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Only proto2: An explicit default value.
|
|
100
|
+
*/
|
|
101
|
+
readonly default: number | boolean | string | bigint | Uint8Array | undefined;
|
|
110
102
|
}
|
|
111
103
|
interface fiMessage extends fiShared {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
104
|
+
readonly kind: "message";
|
|
105
|
+
/**
|
|
106
|
+
* Message handler for the field.
|
|
107
|
+
*/
|
|
108
|
+
readonly T: MessageType;
|
|
109
|
+
/**
|
|
110
|
+
* Is the field repeated?
|
|
111
|
+
*/
|
|
112
|
+
readonly repeated: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Is this repeated field packed? Never true for messages.
|
|
115
|
+
*/
|
|
116
|
+
readonly packed: false;
|
|
117
|
+
/**
|
|
118
|
+
* An explicit default value (only proto2). Never set for messages.
|
|
119
|
+
*/
|
|
120
|
+
readonly default: undefined;
|
|
129
121
|
}
|
|
130
122
|
interface fiEnum extends fiShared {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
123
|
+
readonly kind: "enum";
|
|
124
|
+
/**
|
|
125
|
+
* Enum type information for the field.
|
|
126
|
+
*/
|
|
127
|
+
readonly T: EnumType;
|
|
128
|
+
/**
|
|
129
|
+
* Is the field repeated?
|
|
130
|
+
*/
|
|
131
|
+
readonly repeated: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Is this repeated field packed?
|
|
134
|
+
* Repeated enums can be packed with the field option "packed".
|
|
135
|
+
* For proto3, they are packed by default.
|
|
136
|
+
*/
|
|
137
|
+
readonly packed: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Is the field optional?
|
|
140
|
+
*/
|
|
141
|
+
readonly opt: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Only proto2: An explicit default value.
|
|
144
|
+
*/
|
|
145
|
+
readonly default: number | undefined;
|
|
154
146
|
}
|
|
155
147
|
interface fiMap extends fiShared {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* Map value type. Can be scalar, enum, or message.
|
|
170
|
-
*/
|
|
171
|
-
readonly V:
|
|
172
|
-
| {
|
|
148
|
+
readonly kind: "map";
|
|
149
|
+
/**
|
|
150
|
+
* Map key type.
|
|
151
|
+
*
|
|
152
|
+
* The key_type can be any integral or string type
|
|
153
|
+
* (so, any scalar type except for floating point
|
|
154
|
+
* types and bytes)
|
|
155
|
+
*/
|
|
156
|
+
readonly K: Exclude<ScalarType, ScalarType.FLOAT | ScalarType.DOUBLE | ScalarType.BYTES>;
|
|
157
|
+
/**
|
|
158
|
+
* Map value type. Can be scalar, enum, or message.
|
|
159
|
+
*/
|
|
160
|
+
readonly V: {
|
|
173
161
|
readonly kind: "scalar";
|
|
174
162
|
readonly T: ScalarType;
|
|
175
|
-
|
|
176
|
-
| {
|
|
163
|
+
} | {
|
|
177
164
|
readonly kind: "enum";
|
|
178
165
|
readonly T: EnumType;
|
|
179
|
-
|
|
180
|
-
| {
|
|
166
|
+
} | {
|
|
181
167
|
readonly kind: "message";
|
|
182
168
|
readonly T: MessageType;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Is the field repeated? Never true for maps.
|
|
172
|
+
*/
|
|
173
|
+
readonly repeated: false;
|
|
174
|
+
/**
|
|
175
|
+
* Is this repeated field packed? Never true for maps.
|
|
176
|
+
*/
|
|
177
|
+
readonly packed: false;
|
|
178
|
+
/**
|
|
179
|
+
* An explicit default value (only proto2). Never set for maps.
|
|
180
|
+
*/
|
|
181
|
+
readonly default: undefined;
|
|
196
182
|
}
|
|
197
|
-
declare type fiRules<T> = Omit<
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
| {
|
|
249
|
-
readonly jsonName?: string;
|
|
250
|
-
readonly repeated?: false;
|
|
251
|
-
readonly packed?: false;
|
|
252
|
-
readonly opt: true;
|
|
253
|
-
readonly oneof?: undefined;
|
|
254
|
-
default?: T["default"];
|
|
255
|
-
}
|
|
256
|
-
| {
|
|
257
|
-
readonly jsonName?: string;
|
|
258
|
-
readonly repeated?: boolean;
|
|
259
|
-
readonly packed?: boolean;
|
|
260
|
-
readonly opt?: false;
|
|
261
|
-
readonly oneof?: undefined;
|
|
262
|
-
default?: T["default"];
|
|
263
|
-
}
|
|
264
|
-
| {
|
|
265
|
-
readonly jsonName?: string;
|
|
266
|
-
readonly repeated?: false;
|
|
267
|
-
readonly packed?: false;
|
|
268
|
-
readonly opt?: false;
|
|
269
|
-
readonly oneof: string;
|
|
270
|
-
default?: T["default"];
|
|
271
|
-
}
|
|
272
|
-
);
|
|
183
|
+
declare type fiRules<T> = Omit<T, "oneof" | "repeat" | "repeated" | "packed" | "opt"> & ({
|
|
184
|
+
readonly repeated: false;
|
|
185
|
+
readonly packed: false;
|
|
186
|
+
readonly opt: false;
|
|
187
|
+
readonly oneof: undefined;
|
|
188
|
+
} | {
|
|
189
|
+
readonly repeated: false;
|
|
190
|
+
readonly packed: false;
|
|
191
|
+
readonly opt: true;
|
|
192
|
+
readonly oneof: undefined;
|
|
193
|
+
} | {
|
|
194
|
+
readonly repeated: boolean;
|
|
195
|
+
readonly packed: boolean;
|
|
196
|
+
readonly opt: false;
|
|
197
|
+
readonly oneof: undefined;
|
|
198
|
+
} | {
|
|
199
|
+
readonly repeated: false;
|
|
200
|
+
readonly packed: false;
|
|
201
|
+
readonly opt: false;
|
|
202
|
+
readonly oneof: OneofInfo;
|
|
203
|
+
});
|
|
204
|
+
declare type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "jsonName" | "localName" | "oneof" | "repeat" | "repeated" | "packed" | "opt" | "default"> & ({
|
|
205
|
+
readonly jsonName?: string;
|
|
206
|
+
readonly repeated?: false;
|
|
207
|
+
readonly packed?: false;
|
|
208
|
+
readonly opt?: false;
|
|
209
|
+
readonly oneof?: undefined;
|
|
210
|
+
default?: T["default"];
|
|
211
|
+
} | {
|
|
212
|
+
readonly jsonName?: string;
|
|
213
|
+
readonly repeated?: false;
|
|
214
|
+
readonly packed?: false;
|
|
215
|
+
readonly opt: true;
|
|
216
|
+
readonly oneof?: undefined;
|
|
217
|
+
default?: T["default"];
|
|
218
|
+
} | {
|
|
219
|
+
readonly jsonName?: string;
|
|
220
|
+
readonly repeated?: boolean;
|
|
221
|
+
readonly packed?: boolean;
|
|
222
|
+
readonly opt?: false;
|
|
223
|
+
readonly oneof?: undefined;
|
|
224
|
+
default?: T["default"];
|
|
225
|
+
} | {
|
|
226
|
+
readonly jsonName?: string;
|
|
227
|
+
readonly repeated?: false;
|
|
228
|
+
readonly packed?: false;
|
|
229
|
+
readonly opt?: false;
|
|
230
|
+
readonly oneof: string;
|
|
231
|
+
default?: T["default"];
|
|
232
|
+
});
|
|
273
233
|
/**
|
|
274
234
|
* Scalar value types. This is a subset of field types declared by protobuf
|
|
275
235
|
* enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
|
|
276
236
|
* are omitted, but the numerical values are identical.
|
|
277
237
|
*/
|
|
278
238
|
export declare enum ScalarType {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
239
|
+
DOUBLE = 1,
|
|
240
|
+
FLOAT = 2,
|
|
241
|
+
INT64 = 3,
|
|
242
|
+
UINT64 = 4,
|
|
243
|
+
INT32 = 5,
|
|
244
|
+
FIXED64 = 6,
|
|
245
|
+
FIXED32 = 7,
|
|
246
|
+
BOOL = 8,
|
|
247
|
+
STRING = 9,
|
|
248
|
+
BYTES = 12,
|
|
249
|
+
UINT32 = 13,
|
|
250
|
+
SFIXED32 = 15,
|
|
251
|
+
SFIXED64 = 16,
|
|
252
|
+
SINT32 = 17,
|
|
253
|
+
SINT64 = 18
|
|
294
254
|
}
|
|
295
255
|
export {};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BinaryReadOptions,
|
|
3
|
-
FieldList,
|
|
4
|
-
JsonReadOptions,
|
|
5
|
-
JsonValue,
|
|
6
|
-
JsonWriteOptions,
|
|
7
|
-
MessageType,
|
|
8
|
-
PartialMessage,
|
|
9
|
-
PlainMessage,
|
|
10
|
-
} from "../../index.js";
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "../../index.js";
|
|
11
2
|
import { Message } from "../../index.js";
|
|
12
3
|
/**
|
|
13
4
|
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
@@ -97,71 +88,59 @@ import { Message } from "../../index.js";
|
|
|
97
88
|
* @generated from message google.protobuf.Any
|
|
98
89
|
*/
|
|
99
90
|
export declare class Any extends Message<Any> {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
options?: Partial<
|
|
154
|
-
|
|
155
|
-
static fromJson(
|
|
156
|
-
jsonValue: JsonValue,
|
|
157
|
-
options?: Partial<JsonReadOptions>
|
|
158
|
-
): Any;
|
|
159
|
-
static fromJsonString(
|
|
160
|
-
jsonString: string,
|
|
161
|
-
options?: Partial<JsonReadOptions>
|
|
162
|
-
): Any;
|
|
163
|
-
static equals(
|
|
164
|
-
a: Any | PlainMessage<Any> | undefined,
|
|
165
|
-
b: Any | PlainMessage<Any> | undefined
|
|
166
|
-
): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* A URL/resource name that uniquely identifies the type of the serialized
|
|
93
|
+
* protocol buffer message. This string must contain at least
|
|
94
|
+
* one "/" character. The last segment of the URL's path must represent
|
|
95
|
+
* the fully qualified name of the type (as in
|
|
96
|
+
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
97
|
+
* (e.g., leading "." is not accepted).
|
|
98
|
+
*
|
|
99
|
+
* In practice, teams usually precompile into the binary all types that they
|
|
100
|
+
* expect it to use in the context of Any. However, for URLs which use the
|
|
101
|
+
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
102
|
+
* server that maps type URLs to message definitions as follows:
|
|
103
|
+
*
|
|
104
|
+
* * If no scheme is provided, `https` is assumed.
|
|
105
|
+
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
106
|
+
* value in binary format, or produce an error.
|
|
107
|
+
* * Applications are allowed to cache lookup results based on the
|
|
108
|
+
* URL, or have them precompiled into a binary to avoid any
|
|
109
|
+
* lookup. Therefore, binary compatibility needs to be preserved
|
|
110
|
+
* on changes to types. (Use versioned type names to manage
|
|
111
|
+
* breaking changes.)
|
|
112
|
+
*
|
|
113
|
+
* Note: this functionality is not currently available in the official
|
|
114
|
+
* protobuf release, and it is not used for type URLs beginning with
|
|
115
|
+
* type.googleapis.com.
|
|
116
|
+
*
|
|
117
|
+
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
118
|
+
* used with implementation specific semantics.
|
|
119
|
+
*
|
|
120
|
+
*
|
|
121
|
+
* @generated from field: string type_url = 1;
|
|
122
|
+
*/
|
|
123
|
+
typeUrl: string;
|
|
124
|
+
/**
|
|
125
|
+
* Must be a valid serialized protocol buffer of the above specified type.
|
|
126
|
+
*
|
|
127
|
+
* @generated from field: bytes value = 2;
|
|
128
|
+
*/
|
|
129
|
+
value: Uint8Array;
|
|
130
|
+
constructor(data?: PartialMessage<Any>);
|
|
131
|
+
toJson(options?: Partial<JsonWriteOptions>): JsonValue;
|
|
132
|
+
fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
|
|
133
|
+
packFrom(message: Message): void;
|
|
134
|
+
unpackTo(target: Message): boolean;
|
|
135
|
+
is(type: MessageType): boolean;
|
|
136
|
+
private typeNameToUrl;
|
|
137
|
+
private typeUrlToName;
|
|
138
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
139
|
+
static readonly typeName = "google.protobuf.Any";
|
|
140
|
+
static readonly fields: FieldList;
|
|
141
|
+
static pack(message: Message): Any;
|
|
142
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Any;
|
|
143
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Any;
|
|
144
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Any;
|
|
145
|
+
static equals(a: Any | PlainMessage<Any> | undefined, b: Any | PlainMessage<Any> | undefined): boolean;
|
|
167
146
|
}
|