@replit/protocol 0.4.20 → 0.4.22

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 (55) hide show
  1. package/README.md +54 -0
  2. package/dist/api/client.d.ts +202 -0
  3. package/dist/api/client.d.ts.map +1 -0
  4. package/dist/api/client.js +394 -0
  5. package/dist/api/features/features.d.ts +112 -0
  6. package/dist/api/features/features.d.ts.map +1 -0
  7. package/dist/api/features/features.js +199 -0
  8. package/dist/api/lore/lore.d.ts +543 -0
  9. package/dist/api/lore/lore.d.ts.map +1 -0
  10. package/dist/api/lore/lore.js +982 -0
  11. package/dist/api/lore/service.client.d.ts +283 -0
  12. package/dist/api/lore/service.client.d.ts.map +1 -0
  13. package/dist/api/lore/service.client.js +172 -0
  14. package/dist/api/lore/service.d.ts +1100 -0
  15. package/dist/api/lore/service.d.ts.map +1 -0
  16. package/dist/api/lore/service.js +2279 -0
  17. package/dist/api/powerup.d.ts +147 -0
  18. package/dist/api/powerup.d.ts.map +1 -0
  19. package/dist/api/powerup.js +286 -0
  20. package/dist/api/repl/repl.d.ts +552 -0
  21. package/dist/api/repl/repl.d.ts.map +1 -0
  22. package/dist/api/repl/repl.js +787 -0
  23. package/dist/api/signing.d.ts +618 -0
  24. package/dist/api/signing.d.ts.map +1 -0
  25. package/dist/api/signing.js +785 -0
  26. package/dist/api/token/token.d.ts +335 -0
  27. package/dist/api/token/token.d.ts.map +1 -0
  28. package/dist/api/token/token.js +463 -0
  29. package/dist/api/types.d.ts +8629 -0
  30. package/dist/api/types.d.ts.map +1 -0
  31. package/dist/api/types.js +17225 -0
  32. package/dist/google/protobuf/empty.d.ts +31 -0
  33. package/dist/google/protobuf/empty.d.ts.map +1 -0
  34. package/dist/google/protobuf/empty.js +41 -0
  35. package/dist/google/protobuf/field_mask.d.ts +239 -0
  36. package/dist/google/protobuf/field_mask.d.ts.map +1 -0
  37. package/dist/google/protobuf/field_mask.js +83 -0
  38. package/dist/google/protobuf/struct.d.ts +186 -0
  39. package/dist/google/protobuf/struct.d.ts.map +1 -0
  40. package/dist/google/protobuf/struct.js +337 -0
  41. package/dist/google/protobuf/timestamp.d.ts +156 -0
  42. package/dist/google/protobuf/timestamp.d.ts.map +1 -0
  43. package/dist/google/protobuf/timestamp.js +132 -0
  44. package/dist/index.d.ts +13 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +16 -0
  47. package/dist/package.json +3 -0
  48. package/iotester/index.d.ts +6 -6
  49. package/iotester/index.js +25 -12
  50. package/main/index.d.ts +6 -6
  51. package/main/index.js +25 -12
  52. package/package.json +43 -4
  53. package/gen.sh +0 -51
  54. package/jsdoc.js +0 -171
  55. package/pnpm-workspace.yaml +0 -6
@@ -0,0 +1,31 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ /**
8
+ * A generic empty message that you can re-use to avoid defining duplicated
9
+ * empty messages in your APIs. A typical example is to use it as the request
10
+ * or the response type of an API method. For instance:
11
+ *
12
+ * service Foo {
13
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
14
+ * }
15
+ *
16
+ *
17
+ * @generated from protobuf message google.protobuf.Empty
18
+ */
19
+ export interface Empty {
20
+ }
21
+ declare class Empty$Type extends MessageType<Empty> {
22
+ constructor();
23
+ create(value?: PartialMessage<Empty>): Empty;
24
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty;
25
+ internalBinaryWrite(message: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
26
+ }
27
+ /**
28
+ * @generated MessageType for protobuf message google.protobuf.Empty
29
+ */
30
+ export declare const Empty: Empty$Type;
31
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["empty.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,KAAK;CACrB;AAED,cAAM,UAAW,SAAQ,WAAW,CAAC,KAAK,CAAC;;IAIvC,MAAM,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;IAM5C,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK;IAgB5G,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAkB,GAAG,aAAa;CAMzG;AACD;;GAEG;AACH,eAAO,MAAM,KAAK,YAAmB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
2
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
3
+ import { MessageType } from "@protobuf-ts/runtime";
4
+ // @generated message type with reflection information, may provide speed optimized methods
5
+ class Empty$Type extends MessageType {
6
+ constructor() {
7
+ super("google.protobuf.Empty", []);
8
+ }
9
+ create(value) {
10
+ const message = globalThis.Object.create((this.messagePrototype));
11
+ if (value !== undefined)
12
+ reflectionMergePartial(this, message, value);
13
+ return message;
14
+ }
15
+ internalBinaryRead(reader, length, options, target) {
16
+ let message = target ?? this.create(), end = reader.pos + length;
17
+ while (reader.pos < end) {
18
+ let [fieldNo, wireType] = reader.tag();
19
+ switch (fieldNo) {
20
+ default:
21
+ let u = options.readUnknownField;
22
+ if (u === "throw")
23
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
24
+ let d = reader.skip(wireType);
25
+ if (u !== false)
26
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
27
+ }
28
+ }
29
+ return message;
30
+ }
31
+ internalBinaryWrite(message, writer, options) {
32
+ let u = options.writeUnknownFields;
33
+ if (u !== false)
34
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
35
+ return writer;
36
+ }
37
+ }
38
+ /**
39
+ * @generated MessageType for protobuf message google.protobuf.Empty
40
+ */
41
+ export const Empty = new Empty$Type();
@@ -0,0 +1,239 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import type { JsonValue } from "@protobuf-ts/runtime";
7
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
8
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
9
+ import { MessageType } from "@protobuf-ts/runtime";
10
+ /**
11
+ * `FieldMask` represents a set of symbolic field paths, for example:
12
+ *
13
+ * paths: "f.a"
14
+ * paths: "f.b.d"
15
+ *
16
+ * Here `f` represents a field in some root message, `a` and `b`
17
+ * fields in the message found in `f`, and `d` a field found in the
18
+ * message in `f.b`.
19
+ *
20
+ * Field masks are used to specify a subset of fields that should be
21
+ * returned by a get operation or modified by an update operation.
22
+ * Field masks also have a custom JSON encoding (see below).
23
+ *
24
+ * # Field Masks in Projections
25
+ *
26
+ * When used in the context of a projection, a response message or
27
+ * sub-message is filtered by the API to only contain those fields as
28
+ * specified in the mask. For example, if the mask in the previous
29
+ * example is applied to a response message as follows:
30
+ *
31
+ * f {
32
+ * a : 22
33
+ * b {
34
+ * d : 1
35
+ * x : 2
36
+ * }
37
+ * y : 13
38
+ * }
39
+ * z: 8
40
+ *
41
+ * The result will not contain specific values for fields x,y and z
42
+ * (their value will be set to the default, and omitted in proto text
43
+ * output):
44
+ *
45
+ *
46
+ * f {
47
+ * a : 22
48
+ * b {
49
+ * d : 1
50
+ * }
51
+ * }
52
+ *
53
+ * A repeated field is not allowed except at the last position of a
54
+ * paths string.
55
+ *
56
+ * If a FieldMask object is not present in a get operation, the
57
+ * operation applies to all fields (as if a FieldMask of all fields
58
+ * had been specified).
59
+ *
60
+ * Note that a field mask does not necessarily apply to the
61
+ * top-level response message. In case of a REST get operation, the
62
+ * field mask applies directly to the response, but in case of a REST
63
+ * list operation, the mask instead applies to each individual message
64
+ * in the returned resource list. In case of a REST custom method,
65
+ * other definitions may be used. Where the mask applies will be
66
+ * clearly documented together with its declaration in the API. In
67
+ * any case, the effect on the returned resource/resources is required
68
+ * behavior for APIs.
69
+ *
70
+ * # Field Masks in Update Operations
71
+ *
72
+ * A field mask in update operations specifies which fields of the
73
+ * targeted resource are going to be updated. The API is required
74
+ * to only change the values of the fields as specified in the mask
75
+ * and leave the others untouched. If a resource is passed in to
76
+ * describe the updated values, the API ignores the values of all
77
+ * fields not covered by the mask.
78
+ *
79
+ * If a repeated field is specified for an update operation, new values will
80
+ * be appended to the existing repeated field in the target resource. Note that
81
+ * a repeated field is only allowed in the last position of a `paths` string.
82
+ *
83
+ * If a sub-message is specified in the last position of the field mask for an
84
+ * update operation, then new value will be merged into the existing sub-message
85
+ * in the target resource.
86
+ *
87
+ * For example, given the target message:
88
+ *
89
+ * f {
90
+ * b {
91
+ * d: 1
92
+ * x: 2
93
+ * }
94
+ * c: [1]
95
+ * }
96
+ *
97
+ * And an update message:
98
+ *
99
+ * f {
100
+ * b {
101
+ * d: 10
102
+ * }
103
+ * c: [2]
104
+ * }
105
+ *
106
+ * then if the field mask is:
107
+ *
108
+ * paths: ["f.b", "f.c"]
109
+ *
110
+ * then the result will be:
111
+ *
112
+ * f {
113
+ * b {
114
+ * d: 10
115
+ * x: 2
116
+ * }
117
+ * c: [1, 2]
118
+ * }
119
+ *
120
+ * An implementation may provide options to override this default behavior for
121
+ * repeated and message fields.
122
+ *
123
+ * In order to reset a field's value to the default, the field must
124
+ * be in the mask and set to the default value in the provided resource.
125
+ * Hence, in order to reset all fields of a resource, provide a default
126
+ * instance of the resource and set all fields in the mask, or do
127
+ * not provide a mask as described below.
128
+ *
129
+ * If a field mask is not present on update, the operation applies to
130
+ * all fields (as if a field mask of all fields has been specified).
131
+ * Note that in the presence of schema evolution, this may mean that
132
+ * fields the client does not know and has therefore not filled into
133
+ * the request will be reset to their default. If this is unwanted
134
+ * behavior, a specific service may require a client to always specify
135
+ * a field mask, producing an error if not.
136
+ *
137
+ * As with get operations, the location of the resource which
138
+ * describes the updated values in the request message depends on the
139
+ * operation kind. In any case, the effect of the field mask is
140
+ * required to be honored by the API.
141
+ *
142
+ * ## Considerations for HTTP REST
143
+ *
144
+ * The HTTP kind of an update operation which uses a field mask must
145
+ * be set to PATCH instead of PUT in order to satisfy HTTP semantics
146
+ * (PUT must only be used for full updates).
147
+ *
148
+ * # JSON Encoding of Field Masks
149
+ *
150
+ * In JSON, a field mask is encoded as a single string where paths are
151
+ * separated by a comma. Fields name in each path are converted
152
+ * to/from lower-camel naming conventions.
153
+ *
154
+ * As an example, consider the following message declarations:
155
+ *
156
+ * message Profile {
157
+ * User user = 1;
158
+ * Photo photo = 2;
159
+ * }
160
+ * message User {
161
+ * string display_name = 1;
162
+ * string address = 2;
163
+ * }
164
+ *
165
+ * In proto a field mask for `Profile` may look as such:
166
+ *
167
+ * mask {
168
+ * paths: "user.display_name"
169
+ * paths: "photo"
170
+ * }
171
+ *
172
+ * In JSON, the same mask is represented as below:
173
+ *
174
+ * {
175
+ * mask: "user.displayName,photo"
176
+ * }
177
+ *
178
+ * # Field Masks and Oneof Fields
179
+ *
180
+ * Field masks treat fields in oneofs just as regular fields. Consider the
181
+ * following message:
182
+ *
183
+ * message SampleMessage {
184
+ * oneof test_oneof {
185
+ * string name = 4;
186
+ * SubMessage sub_message = 9;
187
+ * }
188
+ * }
189
+ *
190
+ * The field mask can be:
191
+ *
192
+ * mask {
193
+ * paths: "name"
194
+ * }
195
+ *
196
+ * Or:
197
+ *
198
+ * mask {
199
+ * paths: "sub_message"
200
+ * }
201
+ *
202
+ * Note that oneof type names ("test_oneof" in this case) cannot be used in
203
+ * paths.
204
+ *
205
+ * ## Field Mask Verification
206
+ *
207
+ * The implementation of any API method which has a FieldMask type field in the
208
+ * request should verify the included field paths, and return an
209
+ * `INVALID_ARGUMENT` error if any path is unmappable.
210
+ *
211
+ * @generated from protobuf message google.protobuf.FieldMask
212
+ */
213
+ export interface FieldMask {
214
+ /**
215
+ * The set of field mask paths.
216
+ *
217
+ * @generated from protobuf field: repeated string paths = 1
218
+ */
219
+ paths: string[];
220
+ }
221
+ declare class FieldMask$Type extends MessageType<FieldMask> {
222
+ constructor();
223
+ /**
224
+ * Encode `FieldMask` to JSON object.
225
+ */
226
+ internalJsonWrite(message: FieldMask, options: JsonWriteOptions): JsonValue;
227
+ /**
228
+ * Decode `FieldMask` from JSON object.
229
+ */
230
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FieldMask): FieldMask;
231
+ create(value?: PartialMessage<FieldMask>): FieldMask;
232
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldMask): FieldMask;
233
+ internalBinaryWrite(message: FieldMask, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
234
+ }
235
+ /**
236
+ * @generated MessageType for protobuf message google.protobuf.FieldMask
237
+ */
238
+ export declare const FieldMask: FieldMask$Type;
239
+ export {};
@@ -0,0 +1 @@
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,SAAS,CAAC,GAAG,SAAS;IAOpD,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS;IAmBpH,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAkB,GAAG,aAAa;CAS7G;AACD;;GAEG;AACH,eAAO,MAAM,SAAS,gBAAuB,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { WireType } from "@protobuf-ts/runtime";
2
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
3
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
4
+ import { typeofJsonValue } from "@protobuf-ts/runtime";
5
+ import { lowerCamelCase } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ // @generated message type with reflection information, may provide speed optimized methods
8
+ class FieldMask$Type extends MessageType {
9
+ constructor() {
10
+ super("google.protobuf.FieldMask", [
11
+ { no: 1, name: "paths", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
12
+ ]);
13
+ }
14
+ /**
15
+ * Encode `FieldMask` to JSON object.
16
+ */
17
+ internalJsonWrite(message, options) {
18
+ const invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;
19
+ return message.paths.map(p => {
20
+ if (invalidFieldMaskJsonRegex.test(p))
21
+ throw new Error("Unable to encode FieldMask to JSON. lowerCamelCase of path name \"" + p + "\" is irreversible.");
22
+ return lowerCamelCase(p);
23
+ }).join(",");
24
+ }
25
+ /**
26
+ * Decode `FieldMask` from JSON object.
27
+ */
28
+ internalJsonRead(json, options, target) {
29
+ if (typeof json !== "string")
30
+ throw new Error("Unable to parse FieldMask from JSON " + typeofJsonValue(json) + ". Expected string.");
31
+ if (!target)
32
+ target = this.create();
33
+ if (json === "")
34
+ return target;
35
+ let camelToSnake = (str) => {
36
+ if (str.includes("_"))
37
+ throw new Error("Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.");
38
+ let sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
39
+ return sc;
40
+ };
41
+ target.paths = json.split(",").map(camelToSnake);
42
+ return target;
43
+ }
44
+ create(value) {
45
+ const message = globalThis.Object.create((this.messagePrototype));
46
+ message.paths = [];
47
+ if (value !== undefined)
48
+ reflectionMergePartial(this, message, value);
49
+ return message;
50
+ }
51
+ internalBinaryRead(reader, length, options, target) {
52
+ let message = target ?? this.create(), end = reader.pos + length;
53
+ while (reader.pos < end) {
54
+ let [fieldNo, wireType] = reader.tag();
55
+ switch (fieldNo) {
56
+ case /* repeated string paths */ 1:
57
+ message.paths.push(reader.string());
58
+ break;
59
+ default:
60
+ let u = options.readUnknownField;
61
+ if (u === "throw")
62
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
63
+ let d = reader.skip(wireType);
64
+ if (u !== false)
65
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
66
+ }
67
+ }
68
+ return message;
69
+ }
70
+ internalBinaryWrite(message, writer, options) {
71
+ /* repeated string paths = 1; */
72
+ for (let i = 0; i < message.paths.length; i++)
73
+ writer.tag(1, WireType.LengthDelimited).string(message.paths[i]);
74
+ let u = options.writeUnknownFields;
75
+ if (u !== false)
76
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
77
+ return writer;
78
+ }
79
+ }
80
+ /**
81
+ * @generated MessageType for protobuf message google.protobuf.FieldMask
82
+ */
83
+ export const FieldMask = new FieldMask$Type();
@@ -0,0 +1,186 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import type { JsonValue } from "@protobuf-ts/runtime";
7
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
8
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
9
+ import { MessageType } from "@protobuf-ts/runtime";
10
+ /**
11
+ * `Struct` represents a structured data value, consisting of fields
12
+ * which map to dynamically typed values. In some languages, `Struct`
13
+ * might be supported by a native representation. For example, in
14
+ * scripting languages like JS a struct is represented as an
15
+ * object. The details of that representation are described together
16
+ * with the proto support for the language.
17
+ *
18
+ * The JSON representation for `Struct` is JSON object.
19
+ *
20
+ * @generated from protobuf message google.protobuf.Struct
21
+ */
22
+ export interface Struct {
23
+ /**
24
+ * Unordered map of dynamically typed values.
25
+ *
26
+ * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1
27
+ */
28
+ fields: {
29
+ [key: string]: Value;
30
+ };
31
+ }
32
+ /**
33
+ * `Value` represents a dynamically typed value which can be either
34
+ * null, a number, a string, a boolean, a recursive struct value, or a
35
+ * list of values. A producer of value is expected to set one of these
36
+ * variants. Absence of any variant indicates an error.
37
+ *
38
+ * The JSON representation for `Value` is JSON value.
39
+ *
40
+ * @generated from protobuf message google.protobuf.Value
41
+ */
42
+ export interface Value {
43
+ /**
44
+ * The kind of value.
45
+ *
46
+ * @generated from protobuf oneof: kind
47
+ */
48
+ kind: {
49
+ oneofKind: "nullValue";
50
+ /**
51
+ * Represents a null value.
52
+ *
53
+ * @generated from protobuf field: google.protobuf.NullValue null_value = 1
54
+ */
55
+ nullValue: NullValue;
56
+ } | {
57
+ oneofKind: "numberValue";
58
+ /**
59
+ * Represents a double value.
60
+ *
61
+ * @generated from protobuf field: double number_value = 2
62
+ */
63
+ numberValue: number;
64
+ } | {
65
+ oneofKind: "stringValue";
66
+ /**
67
+ * Represents a string value.
68
+ *
69
+ * @generated from protobuf field: string string_value = 3
70
+ */
71
+ stringValue: string;
72
+ } | {
73
+ oneofKind: "boolValue";
74
+ /**
75
+ * Represents a boolean value.
76
+ *
77
+ * @generated from protobuf field: bool bool_value = 4
78
+ */
79
+ boolValue: boolean;
80
+ } | {
81
+ oneofKind: "structValue";
82
+ /**
83
+ * Represents a structured value.
84
+ *
85
+ * @generated from protobuf field: google.protobuf.Struct struct_value = 5
86
+ */
87
+ structValue: Struct;
88
+ } | {
89
+ oneofKind: "listValue";
90
+ /**
91
+ * Represents a repeated `Value`.
92
+ *
93
+ * @generated from protobuf field: google.protobuf.ListValue list_value = 6
94
+ */
95
+ listValue: ListValue;
96
+ } | {
97
+ oneofKind: undefined;
98
+ };
99
+ }
100
+ /**
101
+ * `ListValue` is a wrapper around a repeated field of values.
102
+ *
103
+ * The JSON representation for `ListValue` is JSON array.
104
+ *
105
+ * @generated from protobuf message google.protobuf.ListValue
106
+ */
107
+ export interface ListValue {
108
+ /**
109
+ * Repeated field of dynamically typed values.
110
+ *
111
+ * @generated from protobuf field: repeated google.protobuf.Value values = 1
112
+ */
113
+ values: Value[];
114
+ }
115
+ /**
116
+ * `NullValue` is a singleton enumeration to represent the null value for the
117
+ * `Value` type union.
118
+ *
119
+ * The JSON representation for `NullValue` is JSON `null`.
120
+ *
121
+ * @generated from protobuf enum google.protobuf.NullValue
122
+ */
123
+ export declare enum NullValue {
124
+ /**
125
+ * Null value.
126
+ *
127
+ * @generated from protobuf enum value: NULL_VALUE = 0;
128
+ */
129
+ NULL_VALUE = 0
130
+ }
131
+ declare class Struct$Type extends MessageType<Struct> {
132
+ constructor();
133
+ /**
134
+ * Encode `Struct` to JSON object.
135
+ */
136
+ internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue;
137
+ /**
138
+ * Decode `Struct` from JSON object.
139
+ */
140
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct;
141
+ create(value?: PartialMessage<Struct>): Struct;
142
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct;
143
+ private binaryReadMap1;
144
+ internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
145
+ }
146
+ /**
147
+ * @generated MessageType for protobuf message google.protobuf.Struct
148
+ */
149
+ export declare const Struct: Struct$Type;
150
+ declare class Value$Type extends MessageType<Value> {
151
+ constructor();
152
+ /**
153
+ * Encode `Value` to JSON value.
154
+ */
155
+ internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue;
156
+ /**
157
+ * Decode `Value` from JSON value.
158
+ */
159
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value;
160
+ create(value?: PartialMessage<Value>): Value;
161
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value;
162
+ internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
163
+ }
164
+ /**
165
+ * @generated MessageType for protobuf message google.protobuf.Value
166
+ */
167
+ export declare const Value: Value$Type;
168
+ declare class ListValue$Type extends MessageType<ListValue> {
169
+ constructor();
170
+ /**
171
+ * Encode `ListValue` to JSON array.
172
+ */
173
+ internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue;
174
+ /**
175
+ * Decode `ListValue` from JSON array.
176
+ */
177
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue;
178
+ create(value?: PartialMessage<ListValue>): ListValue;
179
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue;
180
+ internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
181
+ }
182
+ /**
183
+ * @generated MessageType for protobuf message google.protobuf.ListValue
184
+ */
185
+ export declare const ListValue: ListValue$Type;
186
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["struct.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAs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