@bufbuild/protobuf 0.0.1-alpha.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.
Files changed (146) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/binary-encoding.js +434 -0
  3. package/dist/cjs/binary-format.js +2 -0
  4. package/dist/cjs/descriptor-registry.js +518 -0
  5. package/dist/cjs/descriptor-set.js +557 -0
  6. package/dist/cjs/enum.js +2 -0
  7. package/dist/cjs/field-list.js +2 -0
  8. package/dist/cjs/field.js +40 -0
  9. package/dist/cjs/google/protobuf/any_pb.js +280 -0
  10. package/dist/cjs/google/protobuf/api_pb.js +383 -0
  11. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +334 -0
  12. package/dist/cjs/google/protobuf/descriptor_pb.js +2311 -0
  13. package/dist/cjs/google/protobuf/duration_pb.js +201 -0
  14. package/dist/cjs/google/protobuf/empty_pb.js +72 -0
  15. package/dist/cjs/google/protobuf/field_mask_pb.js +347 -0
  16. package/dist/cjs/google/protobuf/source_context_pb.js +74 -0
  17. package/dist/cjs/google/protobuf/struct_pb.js +288 -0
  18. package/dist/cjs/google/protobuf/timestamp_pb.js +271 -0
  19. package/dist/cjs/google/protobuf/type_pb.js +613 -0
  20. package/dist/cjs/google/protobuf/wrappers_pb.js +658 -0
  21. package/dist/cjs/google/varint.js +280 -0
  22. package/dist/cjs/index.js +148 -0
  23. package/dist/cjs/json-format.js +2 -0
  24. package/dist/cjs/message-type.js +2 -0
  25. package/dist/cjs/message.js +98 -0
  26. package/dist/cjs/private/assert.js +52 -0
  27. package/dist/cjs/private/base64.js +118 -0
  28. package/dist/cjs/private/binary-format-common.js +253 -0
  29. package/dist/cjs/private/binary-format-proto2.js +120 -0
  30. package/dist/cjs/private/binary-format-proto3.js +102 -0
  31. package/dist/cjs/private/enum.js +70 -0
  32. package/dist/cjs/private/field-list.js +62 -0
  33. package/dist/cjs/private/field-wrapper.js +25 -0
  34. package/dist/cjs/private/field.js +34 -0
  35. package/dist/cjs/private/json-format-common.js +482 -0
  36. package/dist/cjs/private/json-format-proto2.js +100 -0
  37. package/dist/cjs/private/json-format-proto3.js +103 -0
  38. package/dist/cjs/private/message-type.js +37 -0
  39. package/dist/cjs/private/names.js +101 -0
  40. package/dist/cjs/private/options-map.js +2 -0
  41. package/dist/cjs/private/proto-runtime.js +24 -0
  42. package/dist/cjs/private/scalars.js +138 -0
  43. package/dist/cjs/private/util-common.js +229 -0
  44. package/dist/cjs/private/util.js +2 -0
  45. package/dist/cjs/proto-int64.js +121 -0
  46. package/dist/cjs/proto2.js +86 -0
  47. package/dist/cjs/proto3.js +99 -0
  48. package/dist/cjs/service-type.js +43 -0
  49. package/dist/cjs/type-registry.js +42 -0
  50. package/dist/esm/binary-encoding.js +434 -0
  51. package/dist/esm/binary-format.js +1 -0
  52. package/dist/esm/descriptor-registry.js +521 -0
  53. package/dist/esm/descriptor-set.js +517 -0
  54. package/dist/esm/enum.js +1 -0
  55. package/dist/esm/field-list.js +1 -0
  56. package/dist/esm/field.js +37 -0
  57. package/dist/esm/google/protobuf/any_pb.js +276 -0
  58. package/dist/esm/google/protobuf/api_pb.js +350 -0
  59. package/dist/esm/google/protobuf/compiler/plugin_pb.js +318 -0
  60. package/dist/esm/google/protobuf/descriptor_pb.js +2213 -0
  61. package/dist/esm/google/protobuf/duration_pb.js +197 -0
  62. package/dist/esm/google/protobuf/empty_pb.js +68 -0
  63. package/dist/esm/google/protobuf/field_mask_pb.js +343 -0
  64. package/dist/esm/google/protobuf/source_context_pb.js +70 -0
  65. package/dist/esm/google/protobuf/struct_pb.js +282 -0
  66. package/dist/esm/google/protobuf/timestamp_pb.js +267 -0
  67. package/dist/esm/google/protobuf/type_pb.js +569 -0
  68. package/dist/esm/google/protobuf/wrappers_pb.js +574 -0
  69. package/dist/esm/google/varint.js +265 -0
  70. package/dist/esm/index.js +24 -0
  71. package/dist/esm/json-format.js +1 -0
  72. package/dist/esm/message-type.js +1 -0
  73. package/dist/esm/message.js +94 -0
  74. package/dist/esm/private/assert.js +41 -0
  75. package/dist/esm/private/base64.js +113 -0
  76. package/dist/esm/private/binary-format-common.js +243 -0
  77. package/dist/esm/private/binary-format-proto2.js +87 -0
  78. package/dist/esm/private/binary-format-proto3.js +74 -0
  79. package/dist/esm/private/enum.js +64 -0
  80. package/dist/esm/private/field-list.js +58 -0
  81. package/dist/esm/private/field-wrapper.js +20 -0
  82. package/dist/esm/private/field.js +27 -0
  83. package/dist/esm/private/json-format-common.js +473 -0
  84. package/dist/esm/private/json-format-proto2.js +90 -0
  85. package/dist/esm/private/json-format-proto3.js +89 -0
  86. package/dist/esm/private/message-type.js +33 -0
  87. package/dist/esm/private/names.js +90 -0
  88. package/dist/esm/private/options-map.js +1 -0
  89. package/dist/esm/private/proto-runtime.js +15 -0
  90. package/dist/esm/private/scalars.js +129 -0
  91. package/dist/esm/private/util-common.js +207 -0
  92. package/dist/esm/private/util.js +1 -0
  93. package/dist/esm/proto-int64.js +118 -0
  94. package/dist/esm/proto2.js +77 -0
  95. package/dist/esm/proto3.js +90 -0
  96. package/dist/esm/service-type.js +37 -0
  97. package/dist/esm/type-registry.js +38 -0
  98. package/dist/types/binary-encoding.d.ts +421 -0
  99. package/dist/types/binary-format.d.ts +109 -0
  100. package/dist/types/descriptor-registry.d.ts +42 -0
  101. package/dist/types/descriptor-set.d.ts +171 -0
  102. package/dist/types/enum.d.ts +31 -0
  103. package/dist/types/field-list.d.ts +27 -0
  104. package/dist/types/field.d.ts +295 -0
  105. package/dist/types/google/protobuf/any_pb.d.ts +167 -0
  106. package/dist/types/google/protobuf/api_pb.d.ts +296 -0
  107. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +294 -0
  108. package/dist/types/google/protobuf/descriptor_pb.d.ts +1959 -0
  109. package/dist/types/google/protobuf/duration_pb.d.ts +117 -0
  110. package/dist/types/google/protobuf/empty_pb.d.ts +44 -0
  111. package/dist/types/google/protobuf/field_mask_pb.d.ts +243 -0
  112. package/dist/types/google/protobuf/source_context_pb.d.ts +44 -0
  113. package/dist/types/google/protobuf/struct_pb.d.ts +205 -0
  114. package/dist/types/google/protobuf/timestamp_pb.d.ts +151 -0
  115. package/dist/types/google/protobuf/type_pb.d.ts +482 -0
  116. package/dist/types/google/protobuf/wrappers_pb.d.ts +379 -0
  117. package/dist/types/google/varint.d.ts +65 -0
  118. package/dist/types/index.d.ts +53 -0
  119. package/dist/types/json-format.d.ts +129 -0
  120. package/dist/types/message-type.d.ts +58 -0
  121. package/dist/types/message.d.ts +124 -0
  122. package/dist/types/private/assert.d.ts +19 -0
  123. package/dist/types/private/base64.d.ts +18 -0
  124. package/dist/types/private/binary-format-common.d.ts +38 -0
  125. package/dist/types/private/binary-format-proto2.d.ts +2 -0
  126. package/dist/types/private/binary-format-proto3.d.ts +2 -0
  127. package/dist/types/private/enum.d.ts +29 -0
  128. package/dist/types/private/field-list.d.ts +25 -0
  129. package/dist/types/private/field-wrapper.d.ts +27 -0
  130. package/dist/types/private/field.d.ts +15 -0
  131. package/dist/types/private/json-format-common.d.ts +30 -0
  132. package/dist/types/private/json-format-proto2.d.ts +2 -0
  133. package/dist/types/private/json-format-proto3.d.ts +2 -0
  134. package/dist/types/private/message-type.d.ts +15 -0
  135. package/dist/types/private/names.d.ts +19 -0
  136. package/dist/types/private/options-map.d.ts +7 -0
  137. package/dist/types/private/proto-runtime.d.ts +55 -0
  138. package/dist/types/private/scalars.d.ts +33 -0
  139. package/dist/types/private/util-common.d.ts +5 -0
  140. package/dist/types/private/util.d.ts +55 -0
  141. package/dist/types/proto-int64.d.ts +94 -0
  142. package/dist/types/proto2.d.ts +4 -0
  143. package/dist/types/proto3.d.ts +4 -0
  144. package/dist/types/service-type.d.ts +118 -0
  145. package/dist/types/type-registry.d.ts +37 -0
  146. package/package.json +31 -0
@@ -0,0 +1,117 @@
1
+ import type {
2
+ BinaryReadOptions,
3
+ FieldList,
4
+ JsonReadOptions,
5
+ JsonValue,
6
+ JsonWriteOptions,
7
+ PartialMessage,
8
+ PlainMessage,
9
+ } from "../../index.js";
10
+ import { Message } from "../../index.js";
11
+ /**
12
+ * A Duration represents a signed, fixed-length span of time represented
13
+ * as a count of seconds and fractions of seconds at nanosecond
14
+ * resolution. It is independent of any calendar and concepts like "day"
15
+ * or "month". It is related to Timestamp in that the difference between
16
+ * two Timestamp values is a Duration and it can be added or subtracted
17
+ * from a Timestamp. Range is approximately +-10,000 years.
18
+ *
19
+ * # Examples
20
+ *
21
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
22
+ *
23
+ * Timestamp start = ...;
24
+ * Timestamp end = ...;
25
+ * Duration duration = ...;
26
+ *
27
+ * duration.seconds = end.seconds - start.seconds;
28
+ * duration.nanos = end.nanos - start.nanos;
29
+ *
30
+ * if (duration.seconds < 0 && duration.nanos > 0) {
31
+ * duration.seconds += 1;
32
+ * duration.nanos -= 1000000000;
33
+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
34
+ * duration.seconds -= 1;
35
+ * duration.nanos += 1000000000;
36
+ * }
37
+ *
38
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
39
+ *
40
+ * Timestamp start = ...;
41
+ * Duration duration = ...;
42
+ * Timestamp end = ...;
43
+ *
44
+ * end.seconds = start.seconds + duration.seconds;
45
+ * end.nanos = start.nanos + duration.nanos;
46
+ *
47
+ * if (end.nanos < 0) {
48
+ * end.seconds -= 1;
49
+ * end.nanos += 1000000000;
50
+ * } else if (end.nanos >= 1000000000) {
51
+ * end.seconds += 1;
52
+ * end.nanos -= 1000000000;
53
+ * }
54
+ *
55
+ * Example 3: Compute Duration from datetime.timedelta in Python.
56
+ *
57
+ * td = datetime.timedelta(days=3, minutes=10)
58
+ * duration = Duration()
59
+ * duration.FromTimedelta(td)
60
+ *
61
+ * # JSON Mapping
62
+ *
63
+ * In JSON format, the Duration type is encoded as a string rather than an
64
+ * object, where the string ends in the suffix "s" (indicating seconds) and
65
+ * is preceded by the number of seconds, with nanoseconds expressed as
66
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
67
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
68
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
69
+ * microsecond should be expressed in JSON format as "3.000001s".
70
+ *
71
+ *
72
+ *
73
+ * @generated from message google.protobuf.Duration
74
+ */
75
+ export declare class Duration extends Message<Duration> {
76
+ /**
77
+ * Signed seconds of the span of time. Must be from -315,576,000,000
78
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
79
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
80
+ *
81
+ * @generated from field: int64 seconds = 1;
82
+ */
83
+ seconds: bigint;
84
+ /**
85
+ * Signed fractions of a second at nanosecond resolution of the span
86
+ * of time. Durations less than one second are represented with a 0
87
+ * `seconds` field and a positive or negative `nanos` field. For durations
88
+ * of one second or more, a non-zero value for the `nanos` field must be
89
+ * of the same sign as the `seconds` field. Must be from -999,999,999
90
+ * to +999,999,999 inclusive.
91
+ *
92
+ * @generated from field: int32 nanos = 2;
93
+ */
94
+ nanos: number;
95
+ constructor(data?: PartialMessage<Duration>);
96
+ fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
97
+ toJson(options?: Partial<JsonWriteOptions>): JsonValue;
98
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
99
+ static readonly typeName = "google.protobuf.Duration";
100
+ static readonly fields: FieldList;
101
+ static fromBinary(
102
+ bytes: Uint8Array,
103
+ options?: Partial<BinaryReadOptions>
104
+ ): Duration;
105
+ static fromJson(
106
+ jsonValue: JsonValue,
107
+ options?: Partial<JsonReadOptions>
108
+ ): Duration;
109
+ static fromJsonString(
110
+ jsonString: string,
111
+ options?: Partial<JsonReadOptions>
112
+ ): Duration;
113
+ static equals(
114
+ a: Duration | PlainMessage<Duration> | undefined,
115
+ b: Duration | PlainMessage<Duration> | undefined
116
+ ): boolean;
117
+ }
@@ -0,0 +1,44 @@
1
+ import type {
2
+ BinaryReadOptions,
3
+ FieldList,
4
+ JsonReadOptions,
5
+ JsonValue,
6
+ PartialMessage,
7
+ PlainMessage,
8
+ } from "../../index.js";
9
+ import { Message } from "../../index.js";
10
+ /**
11
+ * A generic empty message that you can re-use to avoid defining duplicated
12
+ * empty messages in your APIs. A typical example is to use it as the request
13
+ * or the response type of an API method. For instance:
14
+ *
15
+ * service Foo {
16
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
17
+ * }
18
+ *
19
+ * The JSON representation for `Empty` is empty JSON object `{}`.
20
+ *
21
+ * @generated from message google.protobuf.Empty
22
+ */
23
+ export declare class Empty extends Message<Empty> {
24
+ constructor(data?: PartialMessage<Empty>);
25
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
26
+ static readonly typeName = "google.protobuf.Empty";
27
+ static readonly fields: FieldList;
28
+ static fromBinary(
29
+ bytes: Uint8Array,
30
+ options?: Partial<BinaryReadOptions>
31
+ ): Empty;
32
+ static fromJson(
33
+ jsonValue: JsonValue,
34
+ options?: Partial<JsonReadOptions>
35
+ ): Empty;
36
+ static fromJsonString(
37
+ jsonString: string,
38
+ options?: Partial<JsonReadOptions>
39
+ ): Empty;
40
+ static equals(
41
+ a: Empty | PlainMessage<Empty> | undefined,
42
+ b: Empty | PlainMessage<Empty> | undefined
43
+ ): boolean;
44
+ }
@@ -0,0 +1,243 @@
1
+ import type {
2
+ BinaryReadOptions,
3
+ FieldList,
4
+ JsonReadOptions,
5
+ JsonValue,
6
+ JsonWriteOptions,
7
+ PartialMessage,
8
+ PlainMessage,
9
+ } from "../../index.js";
10
+ import { Message } from "../../index.js";
11
+ /**
12
+ * `FieldMask` represents a set of symbolic field paths, for example:
13
+ *
14
+ * paths: "f.a"
15
+ * paths: "f.b.d"
16
+ *
17
+ * Here `f` represents a field in some root message, `a` and `b`
18
+ * fields in the message found in `f`, and `d` a field found in the
19
+ * message in `f.b`.
20
+ *
21
+ * Field masks are used to specify a subset of fields that should be
22
+ * returned by a get operation or modified by an update operation.
23
+ * Field masks also have a custom JSON encoding (see below).
24
+ *
25
+ * # Field Masks in Projections
26
+ *
27
+ * When used in the context of a projection, a response message or
28
+ * sub-message is filtered by the API to only contain those fields as
29
+ * specified in the mask. For example, if the mask in the previous
30
+ * example is applied to a response message as follows:
31
+ *
32
+ * f {
33
+ * a : 22
34
+ * b {
35
+ * d : 1
36
+ * x : 2
37
+ * }
38
+ * y : 13
39
+ * }
40
+ * z: 8
41
+ *
42
+ * The result will not contain specific values for fields x,y and z
43
+ * (their value will be set to the default, and omitted in proto text
44
+ * output):
45
+ *
46
+ *
47
+ * f {
48
+ * a : 22
49
+ * b {
50
+ * d : 1
51
+ * }
52
+ * }
53
+ *
54
+ * A repeated field is not allowed except at the last position of a
55
+ * paths string.
56
+ *
57
+ * If a FieldMask object is not present in a get operation, the
58
+ * operation applies to all fields (as if a FieldMask of all fields
59
+ * had been specified).
60
+ *
61
+ * Note that a field mask does not necessarily apply to the
62
+ * top-level response message. In case of a REST get operation, the
63
+ * field mask applies directly to the response, but in case of a REST
64
+ * list operation, the mask instead applies to each individual message
65
+ * in the returned resource list. In case of a REST custom method,
66
+ * other definitions may be used. Where the mask applies will be
67
+ * clearly documented together with its declaration in the API. In
68
+ * any case, the effect on the returned resource/resources is required
69
+ * behavior for APIs.
70
+ *
71
+ * # Field Masks in Update Operations
72
+ *
73
+ * A field mask in update operations specifies which fields of the
74
+ * targeted resource are going to be updated. The API is required
75
+ * to only change the values of the fields as specified in the mask
76
+ * and leave the others untouched. If a resource is passed in to
77
+ * describe the updated values, the API ignores the values of all
78
+ * fields not covered by the mask.
79
+ *
80
+ * If a repeated field is specified for an update operation, new values will
81
+ * be appended to the existing repeated field in the target resource. Note that
82
+ * a repeated field is only allowed in the last position of a `paths` string.
83
+ *
84
+ * If a sub-message is specified in the last position of the field mask for an
85
+ * update operation, then new value will be merged into the existing sub-message
86
+ * in the target resource.
87
+ *
88
+ * For example, given the target message:
89
+ *
90
+ * f {
91
+ * b {
92
+ * d: 1
93
+ * x: 2
94
+ * }
95
+ * c: [1]
96
+ * }
97
+ *
98
+ * And an update message:
99
+ *
100
+ * f {
101
+ * b {
102
+ * d: 10
103
+ * }
104
+ * c: [2]
105
+ * }
106
+ *
107
+ * then if the field mask is:
108
+ *
109
+ * paths: ["f.b", "f.c"]
110
+ *
111
+ * then the result will be:
112
+ *
113
+ * f {
114
+ * b {
115
+ * d: 10
116
+ * x: 2
117
+ * }
118
+ * c: [1, 2]
119
+ * }
120
+ *
121
+ * An implementation may provide options to override this default behavior for
122
+ * repeated and message fields.
123
+ *
124
+ * In order to reset a field's value to the default, the field must
125
+ * be in the mask and set to the default value in the provided resource.
126
+ * Hence, in order to reset all fields of a resource, provide a default
127
+ * instance of the resource and set all fields in the mask, or do
128
+ * not provide a mask as described below.
129
+ *
130
+ * If a field mask is not present on update, the operation applies to
131
+ * all fields (as if a field mask of all fields has been specified).
132
+ * Note that in the presence of schema evolution, this may mean that
133
+ * fields the client does not know and has therefore not filled into
134
+ * the request will be reset to their default. If this is unwanted
135
+ * behavior, a specific service may require a client to always specify
136
+ * a field mask, producing an error if not.
137
+ *
138
+ * As with get operations, the location of the resource which
139
+ * describes the updated values in the request message depends on the
140
+ * operation kind. In any case, the effect of the field mask is
141
+ * required to be honored by the API.
142
+ *
143
+ * ## Considerations for HTTP REST
144
+ *
145
+ * The HTTP kind of an update operation which uses a field mask must
146
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
147
+ * (PUT must only be used for full updates).
148
+ *
149
+ * # JSON Encoding of Field Masks
150
+ *
151
+ * In JSON, a field mask is encoded as a single string where paths are
152
+ * separated by a comma. Fields name in each path are converted
153
+ * to/from lower-camel naming conventions.
154
+ *
155
+ * As an example, consider the following message declarations:
156
+ *
157
+ * message Profile {
158
+ * User user = 1;
159
+ * Photo photo = 2;
160
+ * }
161
+ * message User {
162
+ * string display_name = 1;
163
+ * string address = 2;
164
+ * }
165
+ *
166
+ * In proto a field mask for `Profile` may look as such:
167
+ *
168
+ * mask {
169
+ * paths: "user.display_name"
170
+ * paths: "photo"
171
+ * }
172
+ *
173
+ * In JSON, the same mask is represented as below:
174
+ *
175
+ * {
176
+ * mask: "user.displayName,photo"
177
+ * }
178
+ *
179
+ * # Field Masks and Oneof Fields
180
+ *
181
+ * Field masks treat fields in oneofs just as regular fields. Consider the
182
+ * following message:
183
+ *
184
+ * message SampleMessage {
185
+ * oneof test_oneof {
186
+ * string name = 4;
187
+ * SubMessage sub_message = 9;
188
+ * }
189
+ * }
190
+ *
191
+ * The field mask can be:
192
+ *
193
+ * mask {
194
+ * paths: "name"
195
+ * }
196
+ *
197
+ * Or:
198
+ *
199
+ * mask {
200
+ * paths: "sub_message"
201
+ * }
202
+ *
203
+ * Note that oneof type names ("test_oneof" in this case) cannot be used in
204
+ * paths.
205
+ *
206
+ * ## Field Mask Verification
207
+ *
208
+ * The implementation of any API method which has a FieldMask type field in the
209
+ * request should verify the included field paths, and return an
210
+ * `INVALID_ARGUMENT` error if any path is unmappable.
211
+ *
212
+ * @generated from message google.protobuf.FieldMask
213
+ */
214
+ export declare class FieldMask extends Message<FieldMask> {
215
+ /**
216
+ * The set of field mask paths.
217
+ *
218
+ * @generated from field: repeated string paths = 1;
219
+ */
220
+ paths: string[];
221
+ constructor(data?: PartialMessage<FieldMask>);
222
+ toJson(options?: Partial<JsonWriteOptions>): JsonValue;
223
+ fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
224
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
225
+ static readonly typeName = "google.protobuf.FieldMask";
226
+ static readonly fields: FieldList;
227
+ static fromBinary(
228
+ bytes: Uint8Array,
229
+ options?: Partial<BinaryReadOptions>
230
+ ): FieldMask;
231
+ static fromJson(
232
+ jsonValue: JsonValue,
233
+ options?: Partial<JsonReadOptions>
234
+ ): FieldMask;
235
+ static fromJsonString(
236
+ jsonString: string,
237
+ options?: Partial<JsonReadOptions>
238
+ ): FieldMask;
239
+ static equals(
240
+ a: FieldMask | PlainMessage<FieldMask> | undefined,
241
+ b: FieldMask | PlainMessage<FieldMask> | undefined
242
+ ): boolean;
243
+ }
@@ -0,0 +1,44 @@
1
+ import type {
2
+ BinaryReadOptions,
3
+ FieldList,
4
+ JsonReadOptions,
5
+ JsonValue,
6
+ PartialMessage,
7
+ PlainMessage,
8
+ } from "../../index.js";
9
+ import { Message } from "../../index.js";
10
+ /**
11
+ * `SourceContext` represents information about the source of a
12
+ * protobuf element, like the file in which it is defined.
13
+ *
14
+ * @generated from message google.protobuf.SourceContext
15
+ */
16
+ export declare class SourceContext extends Message<SourceContext> {
17
+ /**
18
+ * The path-qualified name of the .proto file that contained the associated
19
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
20
+ *
21
+ * @generated from field: string file_name = 1;
22
+ */
23
+ fileName: string;
24
+ constructor(data?: PartialMessage<SourceContext>);
25
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
26
+ static readonly typeName = "google.protobuf.SourceContext";
27
+ static readonly fields: FieldList;
28
+ static fromBinary(
29
+ bytes: Uint8Array,
30
+ options?: Partial<BinaryReadOptions>
31
+ ): SourceContext;
32
+ static fromJson(
33
+ jsonValue: JsonValue,
34
+ options?: Partial<JsonReadOptions>
35
+ ): SourceContext;
36
+ static fromJsonString(
37
+ jsonString: string,
38
+ options?: Partial<JsonReadOptions>
39
+ ): SourceContext;
40
+ static equals(
41
+ a: SourceContext | PlainMessage<SourceContext> | undefined,
42
+ b: SourceContext | PlainMessage<SourceContext> | undefined
43
+ ): boolean;
44
+ }
@@ -0,0 +1,205 @@
1
+ import type {
2
+ BinaryReadOptions,
3
+ FieldList,
4
+ JsonReadOptions,
5
+ JsonValue,
6
+ JsonWriteOptions,
7
+ PartialMessage,
8
+ PlainMessage,
9
+ } from "../../index.js";
10
+ import { Message } from "../../index.js";
11
+ /**
12
+ * `NullValue` is a singleton enumeration to represent the null value for the
13
+ * `Value` type union.
14
+ *
15
+ * The JSON representation for `NullValue` is JSON `null`.
16
+ *
17
+ * @generated from enum google.protobuf.NullValue
18
+ */
19
+ export declare enum NullValue {
20
+ /**
21
+ * Null value.
22
+ *
23
+ * @generated from enum value: NULL_VALUE = 0;
24
+ */
25
+ NULL_VALUE = 0,
26
+ }
27
+ /**
28
+ * `Struct` represents a structured data value, consisting of fields
29
+ * which map to dynamically typed values. In some languages, `Struct`
30
+ * might be supported by a native representation. For example, in
31
+ * scripting languages like JS a struct is represented as an
32
+ * object. The details of that representation are described together
33
+ * with the proto support for the language.
34
+ *
35
+ * The JSON representation for `Struct` is JSON object.
36
+ *
37
+ * @generated from message google.protobuf.Struct
38
+ */
39
+ export declare class Struct extends Message<Struct> {
40
+ /**
41
+ * Unordered map of dynamically typed values.
42
+ *
43
+ * @generated from field: map<string, google.protobuf.Value> fields = 1;
44
+ */
45
+ fields: {
46
+ [key: string]: Value;
47
+ };
48
+ constructor(data?: PartialMessage<Struct>);
49
+ toJson(options?: Partial<JsonWriteOptions>): JsonValue;
50
+ fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
51
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
52
+ static readonly typeName = "google.protobuf.Struct";
53
+ static readonly fields: FieldList;
54
+ static fromBinary(
55
+ bytes: Uint8Array,
56
+ options?: Partial<BinaryReadOptions>
57
+ ): Struct;
58
+ static fromJson(
59
+ jsonValue: JsonValue,
60
+ options?: Partial<JsonReadOptions>
61
+ ): Struct;
62
+ static fromJsonString(
63
+ jsonString: string,
64
+ options?: Partial<JsonReadOptions>
65
+ ): Struct;
66
+ static equals(
67
+ a: Struct | PlainMessage<Struct> | undefined,
68
+ b: Struct | PlainMessage<Struct> | undefined
69
+ ): boolean;
70
+ }
71
+ /**
72
+ * `Value` represents a dynamically typed value which can be either
73
+ * null, a number, a string, a boolean, a recursive struct value, or a
74
+ * list of values. A producer of value is expected to set one of these
75
+ * variants. Absence of any variant indicates an error.
76
+ *
77
+ * The JSON representation for `Value` is JSON value.
78
+ *
79
+ * @generated from message google.protobuf.Value
80
+ */
81
+ export declare class Value extends Message<Value> {
82
+ /**
83
+ * The kind of value.
84
+ *
85
+ * @generated from oneof google.protobuf.Value.kind
86
+ */
87
+ kind:
88
+ | {
89
+ /**
90
+ * Represents a null value.
91
+ *
92
+ * @generated from field: google.protobuf.NullValue null_value = 1;
93
+ */
94
+ value: NullValue;
95
+ case: "nullValue";
96
+ }
97
+ | {
98
+ /**
99
+ * Represents a double value.
100
+ *
101
+ * @generated from field: double number_value = 2;
102
+ */
103
+ value: number;
104
+ case: "numberValue";
105
+ }
106
+ | {
107
+ /**
108
+ * Represents a string value.
109
+ *
110
+ * @generated from field: string string_value = 3;
111
+ */
112
+ value: string;
113
+ case: "stringValue";
114
+ }
115
+ | {
116
+ /**
117
+ * Represents a boolean value.
118
+ *
119
+ * @generated from field: bool bool_value = 4;
120
+ */
121
+ value: boolean;
122
+ case: "boolValue";
123
+ }
124
+ | {
125
+ /**
126
+ * Represents a structured value.
127
+ *
128
+ * @generated from field: google.protobuf.Struct struct_value = 5;
129
+ */
130
+ value: Struct;
131
+ case: "structValue";
132
+ }
133
+ | {
134
+ /**
135
+ * Represents a repeated `Value`.
136
+ *
137
+ * @generated from field: google.protobuf.ListValue list_value = 6;
138
+ */
139
+ value: ListValue;
140
+ case: "listValue";
141
+ }
142
+ | {
143
+ case: undefined;
144
+ value?: undefined;
145
+ };
146
+ constructor(data?: PartialMessage<Value>);
147
+ toJson(options?: Partial<JsonWriteOptions>): JsonValue;
148
+ fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
149
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
150
+ static readonly typeName = "google.protobuf.Value";
151
+ static readonly fields: FieldList;
152
+ static fromBinary(
153
+ bytes: Uint8Array,
154
+ options?: Partial<BinaryReadOptions>
155
+ ): Value;
156
+ static fromJson(
157
+ jsonValue: JsonValue,
158
+ options?: Partial<JsonReadOptions>
159
+ ): Value;
160
+ static fromJsonString(
161
+ jsonString: string,
162
+ options?: Partial<JsonReadOptions>
163
+ ): Value;
164
+ static equals(
165
+ a: Value | PlainMessage<Value> | undefined,
166
+ b: Value | PlainMessage<Value> | undefined
167
+ ): boolean;
168
+ }
169
+ /**
170
+ * `ListValue` is a wrapper around a repeated field of values.
171
+ *
172
+ * The JSON representation for `ListValue` is JSON array.
173
+ *
174
+ * @generated from message google.protobuf.ListValue
175
+ */
176
+ export declare class ListValue extends Message<ListValue> {
177
+ /**
178
+ * Repeated field of dynamically typed values.
179
+ *
180
+ * @generated from field: repeated google.protobuf.Value values = 1;
181
+ */
182
+ values: Value[];
183
+ constructor(data?: PartialMessage<ListValue>);
184
+ toJson(options?: Partial<JsonWriteOptions>): JsonValue;
185
+ fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this;
186
+ static readonly runtime: import("../../private/proto-runtime.js").ProtoRuntime;
187
+ static readonly typeName = "google.protobuf.ListValue";
188
+ static readonly fields: FieldList;
189
+ static fromBinary(
190
+ bytes: Uint8Array,
191
+ options?: Partial<BinaryReadOptions>
192
+ ): ListValue;
193
+ static fromJson(
194
+ jsonValue: JsonValue,
195
+ options?: Partial<JsonReadOptions>
196
+ ): ListValue;
197
+ static fromJsonString(
198
+ jsonString: string,
199
+ options?: Partial<JsonReadOptions>
200
+ ): ListValue;
201
+ static equals(
202
+ a: ListValue | PlainMessage<ListValue> | undefined,
203
+ b: ListValue | PlainMessage<ListValue> | undefined
204
+ ): boolean;
205
+ }