@milaboratories/pl-client 2.7.13 → 2.7.14
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/core/auth.d.ts.map +1 -1
- package/dist/core/cache.d.ts.map +1 -1
- package/dist/core/client.d.ts +1 -1
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/default_client.d.ts.map +1 -1
- package/dist/core/driver.d.ts.map +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/final.d.ts.map +1 -1
- package/dist/core/ll_client.d.ts.map +1 -1
- package/dist/core/ll_transaction.d.ts.map +1 -1
- package/dist/core/transaction.d.ts +1 -1
- package/dist/core/transaction.d.ts.map +1 -1
- package/dist/core/type_conversion.d.ts.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/unauth_client.d.ts.map +1 -1
- package/dist/helpers/pl.d.ts.map +1 -1
- package/dist/helpers/poll.d.ts.map +1 -1
- package/dist/helpers/state_helpers.d.ts.map +1 -1
- package/dist/helpers/tx_helpers.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4069 -4075
- package/dist/index.mjs.map +1 -1
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +15 -15
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +4 -4
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +16 -16
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +4 -4
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +59 -59
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +8 -8
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +22 -22
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +72 -72
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +152 -152
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +156 -156
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +773 -773
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +163 -163
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +22 -22
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +32 -32
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +78 -78
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -1
- package/dist/proto/google/api/http.d.ts +89 -89
- package/dist/proto/google/api/http.d.ts.map +1 -1
- package/dist/proto/google/protobuf/any.d.ts +52 -52
- package/dist/proto/google/protobuf/any.d.ts.map +1 -1
- package/dist/proto/google/protobuf/descriptor.d.ts +1151 -1151
- package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/proto/google/protobuf/duration.d.ts +19 -19
- package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts.map +1 -1
- package/dist/proto/google/protobuf/struct.d.ts +56 -56
- package/dist/proto/google/protobuf/struct.d.ts.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +25 -25
- package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/proto/google/protobuf/wrappers.d.ts +72 -72
- package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -1
- package/dist/test/test_config.d.ts.map +1 -1
- package/dist/util/util.d.ts.map +1 -1
- package/package.json +7 -3
- package/src/core/auth.ts +3 -3
- package/src/core/cache.ts +1 -1
- package/src/core/client.ts +39 -31
- package/src/core/config.ts +21 -21
- package/src/core/default_client.ts +15 -14
- package/src/core/driver.ts +4 -4
- package/src/core/errors.ts +3 -3
- package/src/core/final.ts +7 -4
- package/src/core/ll_client.ts +31 -27
- package/src/core/ll_transaction.ts +17 -17
- package/src/core/stat.ts +2 -2
- package/src/core/transaction.ts +93 -95
- package/src/core/type_conversion.ts +11 -8
- package/src/core/types.ts +25 -26
- package/src/core/unauth_client.ts +6 -6
- package/src/helpers/pl.ts +8 -7
- package/src/helpers/poll.ts +25 -21
- package/src/helpers/state_helpers.ts +2 -1
- package/src/helpers/tx_helpers.ts +4 -3
- package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +74 -71
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +21 -20
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +240 -225
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +21 -20
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +290 -275
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +32 -30
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +388 -364
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +58 -53
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +490 -469
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +262 -237
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +11751 -11032
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1155 -1114
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +131 -125
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +203 -200
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +559 -540
- package/src/proto/google/api/http.ts +280 -271
- package/src/proto/google/protobuf/any.ts +149 -139
- package/src/proto/google/protobuf/descriptor.ts +2952 -2853
- package/src/proto/google/protobuf/duration.ts +107 -102
- package/src/proto/google/protobuf/empty.ts +41 -38
- package/src/proto/google/protobuf/struct.ts +336 -322
- package/src/proto/google/protobuf/timestamp.ts +131 -123
- package/src/proto/google/protobuf/wrappers.ts +536 -491
- package/src/test/test_config.ts +21 -19
- package/src/util/util.ts +1 -0
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
33
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
34
|
//
|
|
35
|
-
import type { BinaryWriteOptions } from
|
|
36
|
-
import type { IBinaryWriter } from
|
|
37
|
-
import { WireType } from
|
|
38
|
-
import type { BinaryReadOptions } from
|
|
39
|
-
import type { IBinaryReader } from
|
|
40
|
-
import { UnknownFieldHandler } from
|
|
41
|
-
import type { PartialMessage } from
|
|
42
|
-
import { reflectionMergePartial } from
|
|
43
|
-
import { isJsonObject } from
|
|
44
|
-
import { typeofJsonValue } from
|
|
45
|
-
import type { JsonValue } from
|
|
46
|
-
import type { JsonReadOptions } from
|
|
47
|
-
import type { JsonWriteOptions } from
|
|
48
|
-
import type { JsonObject } from
|
|
49
|
-
import { MessageType } from
|
|
35
|
+
import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
|
|
36
|
+
import type { IBinaryWriter } from '@protobuf-ts/runtime';
|
|
37
|
+
import { WireType } from '@protobuf-ts/runtime';
|
|
38
|
+
import type { BinaryReadOptions } from '@protobuf-ts/runtime';
|
|
39
|
+
import type { IBinaryReader } from '@protobuf-ts/runtime';
|
|
40
|
+
import { UnknownFieldHandler } from '@protobuf-ts/runtime';
|
|
41
|
+
import type { PartialMessage } from '@protobuf-ts/runtime';
|
|
42
|
+
import { reflectionMergePartial } from '@protobuf-ts/runtime';
|
|
43
|
+
import { isJsonObject } from '@protobuf-ts/runtime';
|
|
44
|
+
import { typeofJsonValue } from '@protobuf-ts/runtime';
|
|
45
|
+
import type { JsonValue } from '@protobuf-ts/runtime';
|
|
46
|
+
import type { JsonReadOptions } from '@protobuf-ts/runtime';
|
|
47
|
+
import type { JsonWriteOptions } from '@protobuf-ts/runtime';
|
|
48
|
+
import type { JsonObject } from '@protobuf-ts/runtime';
|
|
49
|
+
import { MessageType } from '@protobuf-ts/runtime';
|
|
50
50
|
/**
|
|
51
51
|
* `Struct` represents a structured data value, consisting of fields
|
|
52
52
|
* which map to dynamically typed values. In some languages, `Struct`
|
|
@@ -60,14 +60,14 @@ import { MessageType } from "@protobuf-ts/runtime";
|
|
|
60
60
|
* @generated from protobuf message google.protobuf.Struct
|
|
61
61
|
*/
|
|
62
62
|
export interface Struct {
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
64
|
* Unordered map of dynamically typed values.
|
|
65
65
|
*
|
|
66
66
|
* @generated from protobuf field: map<string, google.protobuf.Value> fields = 1;
|
|
67
67
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
fields: {
|
|
69
|
+
[key: string]: Value;
|
|
70
|
+
};
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* `Value` represents a dynamically typed value which can be either
|
|
@@ -80,60 +80,60 @@ export interface Struct {
|
|
|
80
80
|
* @generated from protobuf message google.protobuf.Value
|
|
81
81
|
*/
|
|
82
82
|
export interface Value {
|
|
83
|
-
|
|
83
|
+
/**
|
|
84
84
|
* @generated from protobuf oneof: kind
|
|
85
85
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
kind: {
|
|
87
|
+
oneofKind: 'nullValue';
|
|
88
|
+
/**
|
|
89
89
|
* Represents a null value.
|
|
90
90
|
*
|
|
91
91
|
* @generated from protobuf field: google.protobuf.NullValue null_value = 1;
|
|
92
92
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
nullValue: NullValue;
|
|
94
|
+
} | {
|
|
95
|
+
oneofKind: 'numberValue';
|
|
96
|
+
/**
|
|
97
97
|
* Represents a double value.
|
|
98
98
|
*
|
|
99
99
|
* @generated from protobuf field: double number_value = 2;
|
|
100
100
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
numberValue: number;
|
|
102
|
+
} | {
|
|
103
|
+
oneofKind: 'stringValue';
|
|
104
|
+
/**
|
|
105
105
|
* Represents a string value.
|
|
106
106
|
*
|
|
107
107
|
* @generated from protobuf field: string string_value = 3;
|
|
108
108
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
stringValue: string;
|
|
110
|
+
} | {
|
|
111
|
+
oneofKind: 'boolValue';
|
|
112
|
+
/**
|
|
113
113
|
* Represents a boolean value.
|
|
114
114
|
*
|
|
115
115
|
* @generated from protobuf field: bool bool_value = 4;
|
|
116
116
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
boolValue: boolean;
|
|
118
|
+
} | {
|
|
119
|
+
oneofKind: 'structValue';
|
|
120
|
+
/**
|
|
121
121
|
* Represents a structured value.
|
|
122
122
|
*
|
|
123
123
|
* @generated from protobuf field: google.protobuf.Struct struct_value = 5;
|
|
124
124
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
structValue: Struct;
|
|
126
|
+
} | {
|
|
127
|
+
oneofKind: 'listValue';
|
|
128
|
+
/**
|
|
129
129
|
* Represents a repeated `Value`.
|
|
130
130
|
*
|
|
131
131
|
* @generated from protobuf field: google.protobuf.ListValue list_value = 6;
|
|
132
132
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
listValue: ListValue;
|
|
134
|
+
} | {
|
|
135
|
+
oneofKind: undefined;
|
|
136
|
+
};
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* `ListValue` is a wrapper around a repeated field of values.
|
|
@@ -143,12 +143,12 @@ export interface Value {
|
|
|
143
143
|
* @generated from protobuf message google.protobuf.ListValue
|
|
144
144
|
*/
|
|
145
145
|
export interface ListValue {
|
|
146
|
-
|
|
146
|
+
/**
|
|
147
147
|
* Repeated field of dynamically typed values.
|
|
148
148
|
*
|
|
149
149
|
* @generated from protobuf field: repeated google.protobuf.Value values = 1;
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
values: Value[];
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
@@ -159,98 +159,104 @@ export interface ListValue {
|
|
|
159
159
|
* @generated from protobuf enum google.protobuf.NullValue
|
|
160
160
|
*/
|
|
161
161
|
export enum NullValue {
|
|
162
|
-
|
|
162
|
+
/**
|
|
163
163
|
* Null value.
|
|
164
164
|
*
|
|
165
165
|
* @generated from protobuf enum value: NULL_VALUE = 0;
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
NULL_VALUE = 0,
|
|
168
168
|
}
|
|
169
169
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
170
170
|
class Struct$Type extends MessageType<Struct> {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
constructor() {
|
|
172
|
+
super('google.protobuf.Struct', [
|
|
173
|
+
{ no: 1, name: 'fields', kind: 'map', K: 9 /* ScalarType.STRING */, V: { kind: 'message', T: () => Value } },
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
177
178
|
* Encode `Struct` to JSON object.
|
|
178
179
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
return json;
|
|
180
|
+
internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
|
|
181
|
+
const json: JsonObject = {};
|
|
182
|
+
for (const [k, v] of Object.entries(message.fields)) {
|
|
183
|
+
json[k] = Value.toJson(v);
|
|
185
184
|
}
|
|
186
|
-
|
|
185
|
+
return json;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
187
189
|
* Decode `Struct` from JSON object.
|
|
188
190
|
*/
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
return target;
|
|
191
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
|
|
192
|
+
if (!isJsonObject(json))
|
|
193
|
+
throw new globalThis.Error('Unable to parse message ' + this.typeName + ' from JSON ' + typeofJsonValue(json) + '.');
|
|
194
|
+
if (!target)
|
|
195
|
+
target = this.create();
|
|
196
|
+
for (const [k, v] of globalThis.Object.entries(json)) {
|
|
197
|
+
target.fields[k] = Value.fromJson(v);
|
|
198
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
|
-
|
|
199
|
+
return target;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
create(value?: PartialMessage<Struct>): Struct {
|
|
203
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
204
|
+
message.fields = {};
|
|
205
|
+
if (value !== undefined)
|
|
206
|
+
reflectionMergePartial<Struct>(this, message, value);
|
|
207
|
+
return message;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
|
|
211
|
+
const message = target ?? this.create(), end = reader.pos + length;
|
|
212
|
+
while (reader.pos < end) {
|
|
213
|
+
const [fieldNo, wireType] = reader.tag();
|
|
214
|
+
switch (fieldNo) {
|
|
215
|
+
case /* map<string, google.protobuf.Value> fields */ 1:
|
|
216
|
+
this.binaryReadMap1(message.fields, reader, options);
|
|
217
|
+
break;
|
|
218
|
+
default:
|
|
219
|
+
const u = options.readUnknownField;
|
|
220
|
+
if (u === 'throw')
|
|
221
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
222
|
+
const d = reader.skip(wireType);
|
|
223
|
+
if (u !== false)
|
|
224
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
225
|
+
}
|
|
224
226
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
map
|
|
227
|
+
return message;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
private binaryReadMap1(map: Struct['fields'], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
231
|
+
let len = reader.uint32(), end = reader.pos + len, key: keyof Struct['fields'] | undefined, val: Struct['fields'][any] | undefined;
|
|
232
|
+
while (reader.pos < end) {
|
|
233
|
+
const [fieldNo, wireType] = reader.tag();
|
|
234
|
+
switch (fieldNo) {
|
|
235
|
+
case 1:
|
|
236
|
+
key = reader.string();
|
|
237
|
+
break;
|
|
238
|
+
case 2:
|
|
239
|
+
val = Value.internalBinaryRead(reader, reader.uint32(), options);
|
|
240
|
+
break;
|
|
241
|
+
default: throw new globalThis.Error('unknown map entry field for field google.protobuf.Struct.fields');
|
|
242
|
+
}
|
|
240
243
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
252
|
-
return writer;
|
|
244
|
+
map[key ?? ''] = val ?? Value.create();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
248
|
+
/* map<string, google.protobuf.Value> fields = 1; */
|
|
249
|
+
for (const k of globalThis.Object.keys(message.fields)) {
|
|
250
|
+
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
|
|
251
|
+
writer.tag(2, WireType.LengthDelimited).fork();
|
|
252
|
+
Value.internalBinaryWrite(message.fields[k], writer, options);
|
|
253
|
+
writer.join().join();
|
|
253
254
|
}
|
|
255
|
+
const u = options.writeUnknownFields;
|
|
256
|
+
if (u !== false)
|
|
257
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
258
|
+
return writer;
|
|
259
|
+
}
|
|
254
260
|
}
|
|
255
261
|
/**
|
|
256
262
|
* @generated MessageType for protobuf message google.protobuf.Struct
|
|
@@ -258,158 +264,161 @@ class Struct$Type extends MessageType<Struct> {
|
|
|
258
264
|
export const Struct = new Struct$Type();
|
|
259
265
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
260
266
|
class Value$Type extends MessageType<Value> {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
constructor() {
|
|
268
|
+
super('google.protobuf.Value', [
|
|
269
|
+
{ no: 1, name: 'null_value', kind: 'enum', oneof: 'kind', T: () => ['google.protobuf.NullValue', NullValue] },
|
|
270
|
+
{ no: 2, name: 'number_value', kind: 'scalar', oneof: 'kind', T: 1 /* ScalarType.DOUBLE */ },
|
|
271
|
+
{ no: 3, name: 'string_value', kind: 'scalar', oneof: 'kind', T: 9 /* ScalarType.STRING */ },
|
|
272
|
+
{ no: 4, name: 'bool_value', kind: 'scalar', oneof: 'kind', T: 8 /* ScalarType.BOOL */ },
|
|
273
|
+
{ no: 5, name: 'struct_value', kind: 'message', oneof: 'kind', T: () => Struct },
|
|
274
|
+
{ no: 6, name: 'list_value', kind: 'message', oneof: 'kind', T: () => ListValue },
|
|
275
|
+
]);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
272
279
|
* Encode `Value` to JSON value.
|
|
273
280
|
*/
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
281
|
+
internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
|
|
282
|
+
if (message.kind.oneofKind === undefined)
|
|
283
|
+
throw new globalThis.Error();
|
|
284
|
+
switch (message.kind.oneofKind) {
|
|
285
|
+
case undefined: throw new globalThis.Error();
|
|
286
|
+
case 'boolValue': return message.kind.boolValue;
|
|
287
|
+
case 'nullValue': return null;
|
|
288
|
+
case 'numberValue':
|
|
289
|
+
const numberValue = message.kind.numberValue;
|
|
290
|
+
if (typeof numberValue == 'number' && !Number.isFinite(numberValue))
|
|
291
|
+
throw new globalThis.Error();
|
|
292
|
+
return numberValue;
|
|
293
|
+
case 'stringValue': return message.kind.stringValue;
|
|
294
|
+
case 'listValue':
|
|
295
|
+
const listValueField = this.fields.find((f) => f.no === 6);
|
|
296
|
+
if (listValueField?.kind !== 'message')
|
|
297
|
+
throw new globalThis.Error();
|
|
298
|
+
return listValueField.T().toJson(message.kind.listValue);
|
|
299
|
+
case 'structValue':
|
|
300
|
+
const structValueField = this.fields.find((f) => f.no === 5);
|
|
301
|
+
if (structValueField?.kind !== 'message')
|
|
302
|
+
throw new globalThis.Error();
|
|
303
|
+
return structValueField.T().toJson(message.kind.structValue);
|
|
298
304
|
}
|
|
299
|
-
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
300
308
|
* Decode `Value` from JSON value.
|
|
301
309
|
*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
else {
|
|
323
|
-
target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
|
|
324
|
-
}
|
|
325
|
-
break;
|
|
326
|
-
default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
|
|
327
|
-
}
|
|
328
|
-
return target;
|
|
329
|
-
}
|
|
330
|
-
create(value?: PartialMessage<Value>): Value {
|
|
331
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
332
|
-
message.kind = { oneofKind: undefined };
|
|
333
|
-
if (value !== undefined)
|
|
334
|
-
reflectionMergePartial<Value>(this, message, value);
|
|
335
|
-
return message;
|
|
336
|
-
}
|
|
337
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
|
|
338
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
339
|
-
while (reader.pos < end) {
|
|
340
|
-
let [fieldNo, wireType] = reader.tag();
|
|
341
|
-
switch (fieldNo) {
|
|
342
|
-
case /* google.protobuf.NullValue null_value */ 1:
|
|
343
|
-
message.kind = {
|
|
344
|
-
oneofKind: "nullValue",
|
|
345
|
-
nullValue: reader.int32()
|
|
346
|
-
};
|
|
347
|
-
break;
|
|
348
|
-
case /* double number_value */ 2:
|
|
349
|
-
message.kind = {
|
|
350
|
-
oneofKind: "numberValue",
|
|
351
|
-
numberValue: reader.double()
|
|
352
|
-
};
|
|
353
|
-
break;
|
|
354
|
-
case /* string string_value */ 3:
|
|
355
|
-
message.kind = {
|
|
356
|
-
oneofKind: "stringValue",
|
|
357
|
-
stringValue: reader.string()
|
|
358
|
-
};
|
|
359
|
-
break;
|
|
360
|
-
case /* bool bool_value */ 4:
|
|
361
|
-
message.kind = {
|
|
362
|
-
oneofKind: "boolValue",
|
|
363
|
-
boolValue: reader.bool()
|
|
364
|
-
};
|
|
365
|
-
break;
|
|
366
|
-
case /* google.protobuf.Struct struct_value */ 5:
|
|
367
|
-
message.kind = {
|
|
368
|
-
oneofKind: "structValue",
|
|
369
|
-
structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
|
|
370
|
-
};
|
|
371
|
-
break;
|
|
372
|
-
case /* google.protobuf.ListValue list_value */ 6:
|
|
373
|
-
message.kind = {
|
|
374
|
-
oneofKind: "listValue",
|
|
375
|
-
listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
|
|
376
|
-
};
|
|
377
|
-
break;
|
|
378
|
-
default:
|
|
379
|
-
let u = options.readUnknownField;
|
|
380
|
-
if (u === "throw")
|
|
381
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
382
|
-
let d = reader.skip(wireType);
|
|
383
|
-
if (u !== false)
|
|
384
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
385
|
-
}
|
|
310
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
|
|
311
|
+
if (!target)
|
|
312
|
+
target = this.create();
|
|
313
|
+
switch (typeof json) {
|
|
314
|
+
case 'number':
|
|
315
|
+
target.kind = { oneofKind: 'numberValue', numberValue: json };
|
|
316
|
+
break;
|
|
317
|
+
case 'string':
|
|
318
|
+
target.kind = { oneofKind: 'stringValue', stringValue: json };
|
|
319
|
+
break;
|
|
320
|
+
case 'boolean':
|
|
321
|
+
target.kind = { oneofKind: 'boolValue', boolValue: json };
|
|
322
|
+
break;
|
|
323
|
+
case 'object':
|
|
324
|
+
if (json === null) {
|
|
325
|
+
target.kind = { oneofKind: 'nullValue', nullValue: NullValue.NULL_VALUE };
|
|
326
|
+
} else if (globalThis.Array.isArray(json)) {
|
|
327
|
+
target.kind = { oneofKind: 'listValue', listValue: ListValue.fromJson(json) };
|
|
328
|
+
} else {
|
|
329
|
+
target.kind = { oneofKind: 'structValue', structValue: Struct.fromJson(json) };
|
|
386
330
|
}
|
|
387
|
-
|
|
331
|
+
break;
|
|
332
|
+
default: throw new globalThis.Error('Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json));
|
|
388
333
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
/* google.protobuf.
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
334
|
+
return target;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
create(value?: PartialMessage<Value>): Value {
|
|
338
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
339
|
+
message.kind = { oneofKind: undefined };
|
|
340
|
+
if (value !== undefined)
|
|
341
|
+
reflectionMergePartial<Value>(this, message, value);
|
|
342
|
+
return message;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
|
|
346
|
+
const message = target ?? this.create(), end = reader.pos + length;
|
|
347
|
+
while (reader.pos < end) {
|
|
348
|
+
const [fieldNo, wireType] = reader.tag();
|
|
349
|
+
switch (fieldNo) {
|
|
350
|
+
case /* google.protobuf.NullValue null_value */ 1:
|
|
351
|
+
message.kind = {
|
|
352
|
+
oneofKind: 'nullValue',
|
|
353
|
+
nullValue: reader.int32(),
|
|
354
|
+
};
|
|
355
|
+
break;
|
|
356
|
+
case /* double number_value */ 2:
|
|
357
|
+
message.kind = {
|
|
358
|
+
oneofKind: 'numberValue',
|
|
359
|
+
numberValue: reader.double(),
|
|
360
|
+
};
|
|
361
|
+
break;
|
|
362
|
+
case /* string string_value */ 3:
|
|
363
|
+
message.kind = {
|
|
364
|
+
oneofKind: 'stringValue',
|
|
365
|
+
stringValue: reader.string(),
|
|
366
|
+
};
|
|
367
|
+
break;
|
|
368
|
+
case /* bool bool_value */ 4:
|
|
369
|
+
message.kind = {
|
|
370
|
+
oneofKind: 'boolValue',
|
|
371
|
+
boolValue: reader.bool(),
|
|
372
|
+
};
|
|
373
|
+
break;
|
|
374
|
+
case /* google.protobuf.Struct struct_value */ 5:
|
|
375
|
+
message.kind = {
|
|
376
|
+
oneofKind: 'structValue',
|
|
377
|
+
structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue),
|
|
378
|
+
};
|
|
379
|
+
break;
|
|
380
|
+
case /* google.protobuf.ListValue list_value */ 6:
|
|
381
|
+
message.kind = {
|
|
382
|
+
oneofKind: 'listValue',
|
|
383
|
+
listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue),
|
|
384
|
+
};
|
|
385
|
+
break;
|
|
386
|
+
default:
|
|
387
|
+
const u = options.readUnknownField;
|
|
388
|
+
if (u === 'throw')
|
|
389
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
390
|
+
const d = reader.skip(wireType);
|
|
391
|
+
if (u !== false)
|
|
392
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
393
|
+
}
|
|
412
394
|
}
|
|
395
|
+
return message;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
399
|
+
/* google.protobuf.NullValue null_value = 1; */
|
|
400
|
+
if (message.kind.oneofKind === 'nullValue')
|
|
401
|
+
writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
|
|
402
|
+
/* double number_value = 2; */
|
|
403
|
+
if (message.kind.oneofKind === 'numberValue')
|
|
404
|
+
writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
|
|
405
|
+
/* string string_value = 3; */
|
|
406
|
+
if (message.kind.oneofKind === 'stringValue')
|
|
407
|
+
writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
|
|
408
|
+
/* bool bool_value = 4; */
|
|
409
|
+
if (message.kind.oneofKind === 'boolValue')
|
|
410
|
+
writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
|
|
411
|
+
/* google.protobuf.Struct struct_value = 5; */
|
|
412
|
+
if (message.kind.oneofKind === 'structValue')
|
|
413
|
+
Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
414
|
+
/* google.protobuf.ListValue list_value = 6; */
|
|
415
|
+
if (message.kind.oneofKind === 'listValue')
|
|
416
|
+
ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
417
|
+
const u = options.writeUnknownFields;
|
|
418
|
+
if (u !== false)
|
|
419
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
420
|
+
return writer;
|
|
421
|
+
}
|
|
413
422
|
}
|
|
414
423
|
/**
|
|
415
424
|
* @generated MessageType for protobuf message google.protobuf.Value
|
|
@@ -417,64 +426,69 @@ class Value$Type extends MessageType<Value> {
|
|
|
417
426
|
export const Value = new Value$Type();
|
|
418
427
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
419
428
|
class ListValue$Type extends MessageType<ListValue> {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
429
|
+
constructor() {
|
|
430
|
+
super('google.protobuf.ListValue', [
|
|
431
|
+
{ no: 1, name: 'values', kind: 'message', repeat: 1 /* RepeatType.PACKED */, T: () => Value },
|
|
432
|
+
]);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
426
436
|
* Encode `ListValue` to JSON array.
|
|
427
437
|
*/
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
438
|
+
internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
|
|
439
|
+
return message.values.map((v) => Value.toJson(v));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
432
443
|
* Decode `ListValue` from JSON array.
|
|
433
444
|
*/
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
470
|
-
/* repeated google.protobuf.Value values = 1; */
|
|
471
|
-
for (let i = 0; i < message.values.length; i++)
|
|
472
|
-
Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
473
|
-
let u = options.writeUnknownFields;
|
|
474
|
-
if (u !== false)
|
|
475
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
476
|
-
return writer;
|
|
445
|
+
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
|
|
446
|
+
if (!globalThis.Array.isArray(json))
|
|
447
|
+
throw new globalThis.Error('Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json));
|
|
448
|
+
if (!target)
|
|
449
|
+
target = this.create();
|
|
450
|
+
const values = json.map((v) => Value.fromJson(v));
|
|
451
|
+
target.values.push(...values);
|
|
452
|
+
return target;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
create(value?: PartialMessage<ListValue>): ListValue {
|
|
456
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
457
|
+
message.values = [];
|
|
458
|
+
if (value !== undefined)
|
|
459
|
+
reflectionMergePartial<ListValue>(this, message, value);
|
|
460
|
+
return message;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
|
|
464
|
+
const message = target ?? this.create(), end = reader.pos + length;
|
|
465
|
+
while (reader.pos < end) {
|
|
466
|
+
const [fieldNo, wireType] = reader.tag();
|
|
467
|
+
switch (fieldNo) {
|
|
468
|
+
case /* repeated google.protobuf.Value values */ 1:
|
|
469
|
+
message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
|
|
470
|
+
break;
|
|
471
|
+
default:
|
|
472
|
+
const u = options.readUnknownField;
|
|
473
|
+
if (u === 'throw')
|
|
474
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
475
|
+
const d = reader.skip(wireType);
|
|
476
|
+
if (u !== false)
|
|
477
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
478
|
+
}
|
|
477
479
|
}
|
|
480
|
+
return message;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
484
|
+
/* repeated google.protobuf.Value values = 1; */
|
|
485
|
+
for (let i = 0; i < message.values.length; i++)
|
|
486
|
+
Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
487
|
+
const u = options.writeUnknownFields;
|
|
488
|
+
if (u !== false)
|
|
489
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
490
|
+
return writer;
|
|
491
|
+
}
|
|
478
492
|
}
|
|
479
493
|
/**
|
|
480
494
|
* @generated MessageType for protobuf message google.protobuf.ListValue
|