@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.1
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/README.md +21 -1
- package/dist/cjs/binary-encoding.js +402 -410
- package/dist/cjs/descriptor-registry.js +407 -449
- package/dist/cjs/descriptor-set.js +416 -513
- package/dist/cjs/field.js +30 -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/index.js +24 -122
- package/dist/cjs/message.js +81 -89
- package/dist/cjs/private/assert.js +20 -26
- package/dist/cjs/private/base64.js +79 -78
- package/dist/cjs/private/binary-format-common.js +195 -208
- package/dist/cjs/private/binary-format-proto2.js +75 -109
- package/dist/cjs/private/binary-format-proto3.js +57 -90
- package/dist/cjs/private/enum.js +38 -43
- package/dist/cjs/private/field-list.js +51 -50
- package/dist/cjs/private/field-wrapper.js +8 -10
- package/dist/cjs/private/field.js +22 -25
- package/dist/cjs/private/goog-varint.js +275 -0
- package/dist/cjs/private/json-format-common.js +414 -440
- package/dist/cjs/private/json-format-proto2.js +78 -89
- package/dist/cjs/private/json-format-proto3.js +69 -93
- package/dist/cjs/private/message-type.js +26 -27
- package/dist/cjs/private/names.js +58 -62
- package/dist/cjs/private/proto-runtime.js +11 -16
- package/dist/cjs/private/scalars.js +100 -103
- package/dist/cjs/private/util-common.js +180 -210
- package/dist/cjs/proto-int64.js +111 -112
- package/dist/cjs/proto2.js +50 -63
- package/dist/cjs/proto3.js +61 -74
- package/dist/cjs/service-type.js +14 -17
- package/dist/cjs/type-registry.js +33 -31
- package/dist/esm/binary-encoding.js +401 -414
- package/dist/esm/descriptor-registry.js +409 -458
- package/dist/esm/descriptor-set.js +417 -478
- package/dist/esm/field.js +29 -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/index.js +1 -1
- package/dist/esm/message.js +81 -89
- package/dist/esm/private/assert.js +19 -21
- package/dist/esm/private/base64.js +79 -78
- package/dist/esm/private/binary-format-common.js +196 -207
- package/dist/esm/private/binary-format-proto2.js +76 -81
- package/dist/esm/private/binary-format-proto3.js +58 -67
- package/dist/esm/private/enum.js +38 -43
- package/dist/esm/private/field-list.js +51 -50
- package/dist/esm/private/field-wrapper.js +8 -10
- package/dist/esm/private/field.js +22 -22
- package/dist/esm/private/goog-varint.js +266 -0
- package/dist/esm/private/json-format-common.js +414 -435
- package/dist/esm/private/json-format-proto2.js +76 -81
- package/dist/esm/private/json-format-proto3.js +66 -80
- package/dist/esm/private/message-type.js +27 -28
- package/dist/esm/private/names.js +57 -57
- package/dist/esm/private/proto-runtime.js +11 -11
- package/dist/esm/private/scalars.js +99 -99
- package/dist/esm/private/util-common.js +180 -192
- package/dist/esm/proto-int64.js +111 -112
- package/dist/esm/proto2.js +50 -57
- package/dist/esm/proto3.js +61 -68
- package/dist/esm/service-type.js +12 -12
- package/dist/esm/type-registry.js +33 -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/index.d.ts +4 -27
- package/dist/types/json-format.d.ts +70 -89
- package/dist/types/message-type.d.ts +38 -46
- package/dist/types/message.d.ts +73 -99
- 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 +4 -11
- package/dist/types/private/field-list.d.ts +14 -21
- package/dist/types/private/field-wrapper.d.ts +5 -11
- package/dist/types/private/field.d.ts +12 -12
- package/dist/types/{google/varint.d.ts → private/goog-varint.d.ts} +6 -13
- package/dist/types/private/json-format-common.d.ts +5 -27
- package/dist/types/private/message-type.d.ts +3 -8
- 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 +29 -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 +37 -57
- package/dist/types/type-registry.d.ts +13 -15
- package/package.json +2 -2
- package/dist/cjs/google/varint.js +0 -280
- package/dist/esm/google/varint.js +0 -265
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BinaryReadOptions,
|
|
3
|
-
FieldList,
|
|
4
|
-
JsonReadOptions,
|
|
5
|
-
JsonValue,
|
|
6
|
-
PartialMessage,
|
|
7
|
-
PlainMessage,
|
|
8
|
-
} from "../../index.js";
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index.js";
|
|
9
2
|
import { Message } from "../../index.js";
|
|
10
3
|
import { Option, Syntax } from "./type_pb.js";
|
|
11
4
|
import { SourceContext } from "./source_context_pb.js";
|
|
@@ -23,90 +16,78 @@ import { SourceContext } from "./source_context_pb.js";
|
|
|
23
16
|
* @generated from message google.protobuf.Api
|
|
24
17
|
*/
|
|
25
18
|
export declare class Api extends Message<Api> {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
options?: Partial<
|
|
97
|
-
|
|
98
|
-
static fromJson(
|
|
99
|
-
jsonValue: JsonValue,
|
|
100
|
-
options?: Partial<JsonReadOptions>
|
|
101
|
-
): Api;
|
|
102
|
-
static fromJsonString(
|
|
103
|
-
jsonString: string,
|
|
104
|
-
options?: Partial<JsonReadOptions>
|
|
105
|
-
): Api;
|
|
106
|
-
static equals(
|
|
107
|
-
a: Api | PlainMessage<Api> | undefined,
|
|
108
|
-
b: Api | PlainMessage<Api> | undefined
|
|
109
|
-
): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The fully qualified name of this interface, including package name
|
|
21
|
+
* followed by the interface's simple name.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string name = 1;
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* The methods of this interface, in unspecified order.
|
|
28
|
+
*
|
|
29
|
+
* @generated from field: repeated google.protobuf.Method methods = 2;
|
|
30
|
+
*/
|
|
31
|
+
methods: Method[];
|
|
32
|
+
/**
|
|
33
|
+
* Any metadata attached to the interface.
|
|
34
|
+
*
|
|
35
|
+
* @generated from field: repeated google.protobuf.Option options = 3;
|
|
36
|
+
*/
|
|
37
|
+
options: Option[];
|
|
38
|
+
/**
|
|
39
|
+
* A version string for this interface. If specified, must have the form
|
|
40
|
+
* `major-version.minor-version`, as in `1.10`. If the minor version is
|
|
41
|
+
* omitted, it defaults to zero. If the entire version field is empty, the
|
|
42
|
+
* major version is derived from the package name, as outlined below. If the
|
|
43
|
+
* field is not empty, the version in the package name will be verified to be
|
|
44
|
+
* consistent with what is provided here.
|
|
45
|
+
*
|
|
46
|
+
* The versioning schema uses [semantic
|
|
47
|
+
* versioning](http://semver.org) where the major version number
|
|
48
|
+
* indicates a breaking change and the minor version an additive,
|
|
49
|
+
* non-breaking change. Both version numbers are signals to users
|
|
50
|
+
* what to expect from different versions, and should be carefully
|
|
51
|
+
* chosen based on the product plan.
|
|
52
|
+
*
|
|
53
|
+
* The major version is also reflected in the package name of the
|
|
54
|
+
* interface, which must end in `v<major-version>`, as in
|
|
55
|
+
* `google.feature.v1`. For major versions 0 and 1, the suffix can
|
|
56
|
+
* be omitted. Zero major versions must only be used for
|
|
57
|
+
* experimental, non-GA interfaces.
|
|
58
|
+
*
|
|
59
|
+
*
|
|
60
|
+
*
|
|
61
|
+
* @generated from field: string version = 4;
|
|
62
|
+
*/
|
|
63
|
+
version: string;
|
|
64
|
+
/**
|
|
65
|
+
* Source context for the protocol buffer service represented by this
|
|
66
|
+
* message.
|
|
67
|
+
*
|
|
68
|
+
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
69
|
+
*/
|
|
70
|
+
sourceContext?: SourceContext;
|
|
71
|
+
/**
|
|
72
|
+
* Included interfaces. See [Mixin][].
|
|
73
|
+
*
|
|
74
|
+
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
|
|
75
|
+
*/
|
|
76
|
+
mixins: Mixin[];
|
|
77
|
+
/**
|
|
78
|
+
* The source syntax of the service.
|
|
79
|
+
*
|
|
80
|
+
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
81
|
+
*/
|
|
82
|
+
syntax: Syntax;
|
|
83
|
+
constructor(data?: PartialMessage<Api>);
|
|
84
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
85
|
+
static readonly typeName = "google.protobuf.Api";
|
|
86
|
+
static readonly fields: FieldList;
|
|
87
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Api;
|
|
88
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Api;
|
|
89
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Api;
|
|
90
|
+
static equals(a: Api | PlainMessage<Api> | undefined, b: Api | PlainMessage<Api> | undefined): boolean;
|
|
110
91
|
}
|
|
111
92
|
/**
|
|
112
93
|
* Method represents a method of an API interface.
|
|
@@ -114,68 +95,56 @@ export declare class Api extends Message<Api> {
|
|
|
114
95
|
* @generated from message google.protobuf.Method
|
|
115
96
|
*/
|
|
116
97
|
export declare class Method extends Message<Method> {
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
options?: Partial<
|
|
166
|
-
|
|
167
|
-
static fromJson(
|
|
168
|
-
jsonValue: JsonValue,
|
|
169
|
-
options?: Partial<JsonReadOptions>
|
|
170
|
-
): Method;
|
|
171
|
-
static fromJsonString(
|
|
172
|
-
jsonString: string,
|
|
173
|
-
options?: Partial<JsonReadOptions>
|
|
174
|
-
): Method;
|
|
175
|
-
static equals(
|
|
176
|
-
a: Method | PlainMessage<Method> | undefined,
|
|
177
|
-
b: Method | PlainMessage<Method> | undefined
|
|
178
|
-
): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The simple name of this method.
|
|
100
|
+
*
|
|
101
|
+
* @generated from field: string name = 1;
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* A URL of the input message type.
|
|
106
|
+
*
|
|
107
|
+
* @generated from field: string request_type_url = 2;
|
|
108
|
+
*/
|
|
109
|
+
requestTypeUrl: string;
|
|
110
|
+
/**
|
|
111
|
+
* If true, the request is streamed.
|
|
112
|
+
*
|
|
113
|
+
* @generated from field: bool request_streaming = 3;
|
|
114
|
+
*/
|
|
115
|
+
requestStreaming: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The URL of the output message type.
|
|
118
|
+
*
|
|
119
|
+
* @generated from field: string response_type_url = 4;
|
|
120
|
+
*/
|
|
121
|
+
responseTypeUrl: string;
|
|
122
|
+
/**
|
|
123
|
+
* If true, the response is streamed.
|
|
124
|
+
*
|
|
125
|
+
* @generated from field: bool response_streaming = 5;
|
|
126
|
+
*/
|
|
127
|
+
responseStreaming: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Any metadata attached to the method.
|
|
130
|
+
*
|
|
131
|
+
* @generated from field: repeated google.protobuf.Option options = 6;
|
|
132
|
+
*/
|
|
133
|
+
options: Option[];
|
|
134
|
+
/**
|
|
135
|
+
* The source syntax of this method.
|
|
136
|
+
*
|
|
137
|
+
* @generated from field: google.protobuf.Syntax syntax = 7;
|
|
138
|
+
*/
|
|
139
|
+
syntax: Syntax;
|
|
140
|
+
constructor(data?: PartialMessage<Method>);
|
|
141
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
142
|
+
static readonly typeName = "google.protobuf.Method";
|
|
143
|
+
static readonly fields: FieldList;
|
|
144
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Method;
|
|
145
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Method;
|
|
146
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Method;
|
|
147
|
+
static equals(a: Method | PlainMessage<Method> | undefined, b: Method | PlainMessage<Method> | undefined): boolean;
|
|
179
148
|
}
|
|
180
149
|
/**
|
|
181
150
|
* Declares an API Interface to be included in this interface. The including
|
|
@@ -260,37 +229,25 @@ export declare class Method extends Message<Method> {
|
|
|
260
229
|
* @generated from message google.protobuf.Mixin
|
|
261
230
|
*/
|
|
262
231
|
export declare class Mixin extends Message<Mixin> {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
options?: Partial<
|
|
283
|
-
|
|
284
|
-
static fromJson(
|
|
285
|
-
jsonValue: JsonValue,
|
|
286
|
-
options?: Partial<JsonReadOptions>
|
|
287
|
-
): Mixin;
|
|
288
|
-
static fromJsonString(
|
|
289
|
-
jsonString: string,
|
|
290
|
-
options?: Partial<JsonReadOptions>
|
|
291
|
-
): Mixin;
|
|
292
|
-
static equals(
|
|
293
|
-
a: Mixin | PlainMessage<Mixin> | undefined,
|
|
294
|
-
b: Mixin | PlainMessage<Mixin> | undefined
|
|
295
|
-
): boolean;
|
|
232
|
+
/**
|
|
233
|
+
* The fully qualified name of the interface which is included.
|
|
234
|
+
*
|
|
235
|
+
* @generated from field: string name = 1;
|
|
236
|
+
*/
|
|
237
|
+
name: string;
|
|
238
|
+
/**
|
|
239
|
+
* If non-empty specifies a path under which inherited HTTP paths
|
|
240
|
+
* are rooted.
|
|
241
|
+
*
|
|
242
|
+
* @generated from field: string root = 2;
|
|
243
|
+
*/
|
|
244
|
+
root: string;
|
|
245
|
+
constructor(data?: PartialMessage<Mixin>);
|
|
246
|
+
static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
|
|
247
|
+
static readonly typeName = "google.protobuf.Mixin";
|
|
248
|
+
static readonly fields: FieldList;
|
|
249
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Mixin;
|
|
250
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Mixin;
|
|
251
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Mixin;
|
|
252
|
+
static equals(a: Mixin | PlainMessage<Mixin> | undefined, b: Mixin | PlainMessage<Mixin> | undefined): boolean;
|
|
296
253
|
}
|