mezon-js 2.8.61 → 2.8.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +1 -1
- package/dist/mezon-js.esm.mjs +1 -1
- package/dist/socket.d.ts +1 -0
- package/package.json +1 -1
- package/socket.ts +4 -2
- package/api/api.ts +0 -20099
- package/google/protobuf/struct.ts +0 -485
- package/google/protobuf/timestamp.ts +0 -220
- package/google/protobuf/wrappers.ts +0 -626
- package/rtapi/realtime.ts +0 -7751
@@ -1,626 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
import Long from "long";
|
3
|
-
import _m0 from "protobufjs/minimal";
|
4
|
-
|
5
|
-
export const protobufPackage = "google.protobuf";
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Wrapper message for `double`.
|
9
|
-
*
|
10
|
-
* The JSON representation for `DoubleValue` is JSON number.
|
11
|
-
*/
|
12
|
-
export interface DoubleValue {
|
13
|
-
/** The double value. */
|
14
|
-
value: number;
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Wrapper message for `float`.
|
19
|
-
*
|
20
|
-
* The JSON representation for `FloatValue` is JSON number.
|
21
|
-
*/
|
22
|
-
export interface FloatValue {
|
23
|
-
/** The float value. */
|
24
|
-
value: number;
|
25
|
-
}
|
26
|
-
|
27
|
-
/**
|
28
|
-
* Wrapper message for `int64`.
|
29
|
-
*
|
30
|
-
* The JSON representation for `Int64Value` is JSON string.
|
31
|
-
*/
|
32
|
-
export interface Int64Value {
|
33
|
-
/** The int64 value. */
|
34
|
-
value: number;
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Wrapper message for `uint64`.
|
39
|
-
*
|
40
|
-
* The JSON representation for `UInt64Value` is JSON string.
|
41
|
-
*/
|
42
|
-
export interface UInt64Value {
|
43
|
-
/** The uint64 value. */
|
44
|
-
value: number;
|
45
|
-
}
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Wrapper message for `int32`.
|
49
|
-
*
|
50
|
-
* The JSON representation for `Int32Value` is JSON number.
|
51
|
-
*/
|
52
|
-
export interface Int32Value {
|
53
|
-
/** The int32 value. */
|
54
|
-
value: number;
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* Wrapper message for `uint32`.
|
59
|
-
*
|
60
|
-
* The JSON representation for `UInt32Value` is JSON number.
|
61
|
-
*/
|
62
|
-
export interface UInt32Value {
|
63
|
-
/** The uint32 value. */
|
64
|
-
value: number;
|
65
|
-
}
|
66
|
-
|
67
|
-
/**
|
68
|
-
* Wrapper message for `bool`.
|
69
|
-
*
|
70
|
-
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
71
|
-
*/
|
72
|
-
export interface BoolValue {
|
73
|
-
/** The bool value. */
|
74
|
-
value: boolean;
|
75
|
-
}
|
76
|
-
|
77
|
-
/**
|
78
|
-
* Wrapper message for `string`.
|
79
|
-
*
|
80
|
-
* The JSON representation for `StringValue` is JSON string.
|
81
|
-
*/
|
82
|
-
export interface StringValue {
|
83
|
-
/** The string value. */
|
84
|
-
value: string;
|
85
|
-
}
|
86
|
-
|
87
|
-
/**
|
88
|
-
* Wrapper message for `bytes`.
|
89
|
-
*
|
90
|
-
* The JSON representation for `BytesValue` is JSON string.
|
91
|
-
*/
|
92
|
-
export interface BytesValue {
|
93
|
-
/** The bytes value. */
|
94
|
-
value: Uint8Array;
|
95
|
-
}
|
96
|
-
|
97
|
-
function createBaseDoubleValue(): DoubleValue {
|
98
|
-
return { value: 0 };
|
99
|
-
}
|
100
|
-
|
101
|
-
export const DoubleValue = {
|
102
|
-
encode(message: DoubleValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
103
|
-
if (message.value !== 0) {
|
104
|
-
writer.uint32(9).double(message.value);
|
105
|
-
}
|
106
|
-
return writer;
|
107
|
-
},
|
108
|
-
|
109
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): DoubleValue {
|
110
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
111
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
112
|
-
const message = createBaseDoubleValue();
|
113
|
-
while (reader.pos < end) {
|
114
|
-
const tag = reader.uint32();
|
115
|
-
switch (tag >>> 3) {
|
116
|
-
case 1:
|
117
|
-
message.value = reader.double();
|
118
|
-
break;
|
119
|
-
default:
|
120
|
-
reader.skipType(tag & 7);
|
121
|
-
break;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
return message;
|
125
|
-
},
|
126
|
-
|
127
|
-
fromJSON(object: any): DoubleValue {
|
128
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
129
|
-
},
|
130
|
-
|
131
|
-
toJSON(message: DoubleValue): unknown {
|
132
|
-
const obj: any = {};
|
133
|
-
message.value !== undefined && (obj.value = message.value);
|
134
|
-
return obj;
|
135
|
-
},
|
136
|
-
|
137
|
-
create<I extends Exact<DeepPartial<DoubleValue>, I>>(base?: I): DoubleValue {
|
138
|
-
return DoubleValue.fromPartial(base ?? {});
|
139
|
-
},
|
140
|
-
|
141
|
-
fromPartial<I extends Exact<DeepPartial<DoubleValue>, I>>(object: I): DoubleValue {
|
142
|
-
const message = createBaseDoubleValue();
|
143
|
-
message.value = object.value ?? 0;
|
144
|
-
return message;
|
145
|
-
},
|
146
|
-
};
|
147
|
-
|
148
|
-
function createBaseFloatValue(): FloatValue {
|
149
|
-
return { value: 0 };
|
150
|
-
}
|
151
|
-
|
152
|
-
export const FloatValue = {
|
153
|
-
encode(message: FloatValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
154
|
-
if (message.value !== 0) {
|
155
|
-
writer.uint32(13).float(message.value);
|
156
|
-
}
|
157
|
-
return writer;
|
158
|
-
},
|
159
|
-
|
160
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): FloatValue {
|
161
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
162
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
163
|
-
const message = createBaseFloatValue();
|
164
|
-
while (reader.pos < end) {
|
165
|
-
const tag = reader.uint32();
|
166
|
-
switch (tag >>> 3) {
|
167
|
-
case 1:
|
168
|
-
message.value = reader.float();
|
169
|
-
break;
|
170
|
-
default:
|
171
|
-
reader.skipType(tag & 7);
|
172
|
-
break;
|
173
|
-
}
|
174
|
-
}
|
175
|
-
return message;
|
176
|
-
},
|
177
|
-
|
178
|
-
fromJSON(object: any): FloatValue {
|
179
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
180
|
-
},
|
181
|
-
|
182
|
-
toJSON(message: FloatValue): unknown {
|
183
|
-
const obj: any = {};
|
184
|
-
message.value !== undefined && (obj.value = message.value);
|
185
|
-
return obj;
|
186
|
-
},
|
187
|
-
|
188
|
-
create<I extends Exact<DeepPartial<FloatValue>, I>>(base?: I): FloatValue {
|
189
|
-
return FloatValue.fromPartial(base ?? {});
|
190
|
-
},
|
191
|
-
|
192
|
-
fromPartial<I extends Exact<DeepPartial<FloatValue>, I>>(object: I): FloatValue {
|
193
|
-
const message = createBaseFloatValue();
|
194
|
-
message.value = object.value ?? 0;
|
195
|
-
return message;
|
196
|
-
},
|
197
|
-
};
|
198
|
-
|
199
|
-
function createBaseInt64Value(): Int64Value {
|
200
|
-
return { value: 0 };
|
201
|
-
}
|
202
|
-
|
203
|
-
export const Int64Value = {
|
204
|
-
encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
205
|
-
if (message.value !== 0) {
|
206
|
-
writer.uint32(8).int64(message.value);
|
207
|
-
}
|
208
|
-
return writer;
|
209
|
-
},
|
210
|
-
|
211
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Int64Value {
|
212
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
213
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
214
|
-
const message = createBaseInt64Value();
|
215
|
-
while (reader.pos < end) {
|
216
|
-
const tag = reader.uint32();
|
217
|
-
switch (tag >>> 3) {
|
218
|
-
case 1:
|
219
|
-
message.value = longToNumber(reader.int64() as Long);
|
220
|
-
break;
|
221
|
-
default:
|
222
|
-
reader.skipType(tag & 7);
|
223
|
-
break;
|
224
|
-
}
|
225
|
-
}
|
226
|
-
return message;
|
227
|
-
},
|
228
|
-
|
229
|
-
fromJSON(object: any): Int64Value {
|
230
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
231
|
-
},
|
232
|
-
|
233
|
-
toJSON(message: Int64Value): unknown {
|
234
|
-
const obj: any = {};
|
235
|
-
message.value !== undefined && (obj.value = Math.round(message.value));
|
236
|
-
return obj;
|
237
|
-
},
|
238
|
-
|
239
|
-
create<I extends Exact<DeepPartial<Int64Value>, I>>(base?: I): Int64Value {
|
240
|
-
return Int64Value.fromPartial(base ?? {});
|
241
|
-
},
|
242
|
-
|
243
|
-
fromPartial<I extends Exact<DeepPartial<Int64Value>, I>>(object: I): Int64Value {
|
244
|
-
const message = createBaseInt64Value();
|
245
|
-
message.value = object.value ?? 0;
|
246
|
-
return message;
|
247
|
-
},
|
248
|
-
};
|
249
|
-
|
250
|
-
function createBaseUInt64Value(): UInt64Value {
|
251
|
-
return { value: 0 };
|
252
|
-
}
|
253
|
-
|
254
|
-
export const UInt64Value = {
|
255
|
-
encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
256
|
-
if (message.value !== 0) {
|
257
|
-
writer.uint32(8).uint64(message.value);
|
258
|
-
}
|
259
|
-
return writer;
|
260
|
-
},
|
261
|
-
|
262
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UInt64Value {
|
263
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
264
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
265
|
-
const message = createBaseUInt64Value();
|
266
|
-
while (reader.pos < end) {
|
267
|
-
const tag = reader.uint32();
|
268
|
-
switch (tag >>> 3) {
|
269
|
-
case 1:
|
270
|
-
message.value = longToNumber(reader.uint64() as Long);
|
271
|
-
break;
|
272
|
-
default:
|
273
|
-
reader.skipType(tag & 7);
|
274
|
-
break;
|
275
|
-
}
|
276
|
-
}
|
277
|
-
return message;
|
278
|
-
},
|
279
|
-
|
280
|
-
fromJSON(object: any): UInt64Value {
|
281
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
282
|
-
},
|
283
|
-
|
284
|
-
toJSON(message: UInt64Value): unknown {
|
285
|
-
const obj: any = {};
|
286
|
-
message.value !== undefined && (obj.value = Math.round(message.value));
|
287
|
-
return obj;
|
288
|
-
},
|
289
|
-
|
290
|
-
create<I extends Exact<DeepPartial<UInt64Value>, I>>(base?: I): UInt64Value {
|
291
|
-
return UInt64Value.fromPartial(base ?? {});
|
292
|
-
},
|
293
|
-
|
294
|
-
fromPartial<I extends Exact<DeepPartial<UInt64Value>, I>>(object: I): UInt64Value {
|
295
|
-
const message = createBaseUInt64Value();
|
296
|
-
message.value = object.value ?? 0;
|
297
|
-
return message;
|
298
|
-
},
|
299
|
-
};
|
300
|
-
|
301
|
-
function createBaseInt32Value(): Int32Value {
|
302
|
-
return { value: 0 };
|
303
|
-
}
|
304
|
-
|
305
|
-
export const Int32Value = {
|
306
|
-
encode(message: Int32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
307
|
-
if (message.value !== 0) {
|
308
|
-
writer.uint32(8).int32(message.value);
|
309
|
-
}
|
310
|
-
return writer;
|
311
|
-
},
|
312
|
-
|
313
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Int32Value {
|
314
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
315
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
316
|
-
const message = createBaseInt32Value();
|
317
|
-
while (reader.pos < end) {
|
318
|
-
const tag = reader.uint32();
|
319
|
-
switch (tag >>> 3) {
|
320
|
-
case 1:
|
321
|
-
message.value = reader.int32();
|
322
|
-
break;
|
323
|
-
default:
|
324
|
-
reader.skipType(tag & 7);
|
325
|
-
break;
|
326
|
-
}
|
327
|
-
}
|
328
|
-
return message;
|
329
|
-
},
|
330
|
-
|
331
|
-
fromJSON(object: any): Int32Value {
|
332
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
333
|
-
},
|
334
|
-
|
335
|
-
toJSON(message: Int32Value): unknown {
|
336
|
-
const obj: any = {};
|
337
|
-
message.value !== undefined && (obj.value = Math.round(message.value));
|
338
|
-
return obj;
|
339
|
-
},
|
340
|
-
|
341
|
-
create<I extends Exact<DeepPartial<Int32Value>, I>>(base?: I): Int32Value {
|
342
|
-
return Int32Value.fromPartial(base ?? {});
|
343
|
-
},
|
344
|
-
|
345
|
-
fromPartial<I extends Exact<DeepPartial<Int32Value>, I>>(object: I): Int32Value {
|
346
|
-
const message = createBaseInt32Value();
|
347
|
-
message.value = object.value ?? 0;
|
348
|
-
return message;
|
349
|
-
},
|
350
|
-
};
|
351
|
-
|
352
|
-
function createBaseUInt32Value(): UInt32Value {
|
353
|
-
return { value: 0 };
|
354
|
-
}
|
355
|
-
|
356
|
-
export const UInt32Value = {
|
357
|
-
encode(message: UInt32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
358
|
-
if (message.value !== 0) {
|
359
|
-
writer.uint32(8).uint32(message.value);
|
360
|
-
}
|
361
|
-
return writer;
|
362
|
-
},
|
363
|
-
|
364
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UInt32Value {
|
365
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
366
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
367
|
-
const message = createBaseUInt32Value();
|
368
|
-
while (reader.pos < end) {
|
369
|
-
const tag = reader.uint32();
|
370
|
-
switch (tag >>> 3) {
|
371
|
-
case 1:
|
372
|
-
message.value = reader.uint32();
|
373
|
-
break;
|
374
|
-
default:
|
375
|
-
reader.skipType(tag & 7);
|
376
|
-
break;
|
377
|
-
}
|
378
|
-
}
|
379
|
-
return message;
|
380
|
-
},
|
381
|
-
|
382
|
-
fromJSON(object: any): UInt32Value {
|
383
|
-
return { value: isSet(object.value) ? Number(object.value) : 0 };
|
384
|
-
},
|
385
|
-
|
386
|
-
toJSON(message: UInt32Value): unknown {
|
387
|
-
const obj: any = {};
|
388
|
-
message.value !== undefined && (obj.value = Math.round(message.value));
|
389
|
-
return obj;
|
390
|
-
},
|
391
|
-
|
392
|
-
create<I extends Exact<DeepPartial<UInt32Value>, I>>(base?: I): UInt32Value {
|
393
|
-
return UInt32Value.fromPartial(base ?? {});
|
394
|
-
},
|
395
|
-
|
396
|
-
fromPartial<I extends Exact<DeepPartial<UInt32Value>, I>>(object: I): UInt32Value {
|
397
|
-
const message = createBaseUInt32Value();
|
398
|
-
message.value = object.value ?? 0;
|
399
|
-
return message;
|
400
|
-
},
|
401
|
-
};
|
402
|
-
|
403
|
-
function createBaseBoolValue(): BoolValue {
|
404
|
-
return { value: false };
|
405
|
-
}
|
406
|
-
|
407
|
-
export const BoolValue = {
|
408
|
-
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
409
|
-
if (message.value === true) {
|
410
|
-
writer.uint32(8).bool(message.value);
|
411
|
-
}
|
412
|
-
return writer;
|
413
|
-
},
|
414
|
-
|
415
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BoolValue {
|
416
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
417
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
418
|
-
const message = createBaseBoolValue();
|
419
|
-
while (reader.pos < end) {
|
420
|
-
const tag = reader.uint32();
|
421
|
-
switch (tag >>> 3) {
|
422
|
-
case 1:
|
423
|
-
message.value = reader.bool();
|
424
|
-
break;
|
425
|
-
default:
|
426
|
-
reader.skipType(tag & 7);
|
427
|
-
break;
|
428
|
-
}
|
429
|
-
}
|
430
|
-
return message;
|
431
|
-
},
|
432
|
-
|
433
|
-
fromJSON(object: any): BoolValue {
|
434
|
-
return { value: isSet(object.value) ? Boolean(object.value) : false };
|
435
|
-
},
|
436
|
-
|
437
|
-
toJSON(message: BoolValue): unknown {
|
438
|
-
const obj: any = {};
|
439
|
-
message.value !== undefined && (obj.value = message.value);
|
440
|
-
return obj;
|
441
|
-
},
|
442
|
-
|
443
|
-
create<I extends Exact<DeepPartial<BoolValue>, I>>(base?: I): BoolValue {
|
444
|
-
return BoolValue.fromPartial(base ?? {});
|
445
|
-
},
|
446
|
-
|
447
|
-
fromPartial<I extends Exact<DeepPartial<BoolValue>, I>>(object: I): BoolValue {
|
448
|
-
const message = createBaseBoolValue();
|
449
|
-
message.value = object.value ?? false;
|
450
|
-
return message;
|
451
|
-
},
|
452
|
-
};
|
453
|
-
|
454
|
-
function createBaseStringValue(): StringValue {
|
455
|
-
return { value: "" };
|
456
|
-
}
|
457
|
-
|
458
|
-
export const StringValue = {
|
459
|
-
encode(message: StringValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
460
|
-
if (message.value !== "") {
|
461
|
-
writer.uint32(10).string(message.value);
|
462
|
-
}
|
463
|
-
return writer;
|
464
|
-
},
|
465
|
-
|
466
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): StringValue {
|
467
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
468
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
469
|
-
const message = createBaseStringValue();
|
470
|
-
while (reader.pos < end) {
|
471
|
-
const tag = reader.uint32();
|
472
|
-
switch (tag >>> 3) {
|
473
|
-
case 1:
|
474
|
-
message.value = reader.string();
|
475
|
-
break;
|
476
|
-
default:
|
477
|
-
reader.skipType(tag & 7);
|
478
|
-
break;
|
479
|
-
}
|
480
|
-
}
|
481
|
-
return message;
|
482
|
-
},
|
483
|
-
|
484
|
-
fromJSON(object: any): StringValue {
|
485
|
-
return { value: isSet(object.value) ? String(object.value) : "" };
|
486
|
-
},
|
487
|
-
|
488
|
-
toJSON(message: StringValue): unknown {
|
489
|
-
const obj: any = {};
|
490
|
-
message.value !== undefined && (obj.value = message.value);
|
491
|
-
return obj;
|
492
|
-
},
|
493
|
-
|
494
|
-
create<I extends Exact<DeepPartial<StringValue>, I>>(base?: I): StringValue {
|
495
|
-
return StringValue.fromPartial(base ?? {});
|
496
|
-
},
|
497
|
-
|
498
|
-
fromPartial<I extends Exact<DeepPartial<StringValue>, I>>(object: I): StringValue {
|
499
|
-
const message = createBaseStringValue();
|
500
|
-
message.value = object.value ?? "";
|
501
|
-
return message;
|
502
|
-
},
|
503
|
-
};
|
504
|
-
|
505
|
-
function createBaseBytesValue(): BytesValue {
|
506
|
-
return { value: new Uint8Array() };
|
507
|
-
}
|
508
|
-
|
509
|
-
export const BytesValue = {
|
510
|
-
encode(message: BytesValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
511
|
-
if (message.value.length !== 0) {
|
512
|
-
writer.uint32(10).bytes(message.value);
|
513
|
-
}
|
514
|
-
return writer;
|
515
|
-
},
|
516
|
-
|
517
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BytesValue {
|
518
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
519
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
520
|
-
const message = createBaseBytesValue();
|
521
|
-
while (reader.pos < end) {
|
522
|
-
const tag = reader.uint32();
|
523
|
-
switch (tag >>> 3) {
|
524
|
-
case 1:
|
525
|
-
message.value = reader.bytes();
|
526
|
-
break;
|
527
|
-
default:
|
528
|
-
reader.skipType(tag & 7);
|
529
|
-
break;
|
530
|
-
}
|
531
|
-
}
|
532
|
-
return message;
|
533
|
-
},
|
534
|
-
|
535
|
-
fromJSON(object: any): BytesValue {
|
536
|
-
return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() };
|
537
|
-
},
|
538
|
-
|
539
|
-
toJSON(message: BytesValue): unknown {
|
540
|
-
const obj: any = {};
|
541
|
-
message.value !== undefined &&
|
542
|
-
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
543
|
-
return obj;
|
544
|
-
},
|
545
|
-
|
546
|
-
create<I extends Exact<DeepPartial<BytesValue>, I>>(base?: I): BytesValue {
|
547
|
-
return BytesValue.fromPartial(base ?? {});
|
548
|
-
},
|
549
|
-
|
550
|
-
fromPartial<I extends Exact<DeepPartial<BytesValue>, I>>(object: I): BytesValue {
|
551
|
-
const message = createBaseBytesValue();
|
552
|
-
message.value = object.value ?? new Uint8Array();
|
553
|
-
return message;
|
554
|
-
},
|
555
|
-
};
|
556
|
-
|
557
|
-
declare var self: any | undefined;
|
558
|
-
declare var window: any | undefined;
|
559
|
-
declare var global: any | undefined;
|
560
|
-
var tsProtoGlobalThis: any = (() => {
|
561
|
-
if (typeof globalThis !== "undefined") {
|
562
|
-
return globalThis;
|
563
|
-
}
|
564
|
-
if (typeof self !== "undefined") {
|
565
|
-
return self;
|
566
|
-
}
|
567
|
-
if (typeof window !== "undefined") {
|
568
|
-
return window;
|
569
|
-
}
|
570
|
-
if (typeof global !== "undefined") {
|
571
|
-
return global;
|
572
|
-
}
|
573
|
-
throw "Unable to locate global object";
|
574
|
-
})();
|
575
|
-
|
576
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
577
|
-
if (tsProtoGlobalThis.Buffer) {
|
578
|
-
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
579
|
-
} else {
|
580
|
-
const bin = tsProtoGlobalThis.atob(b64);
|
581
|
-
const arr = new Uint8Array(bin.length);
|
582
|
-
for (let i = 0; i < bin.length; ++i) {
|
583
|
-
arr[i] = bin.charCodeAt(i);
|
584
|
-
}
|
585
|
-
return arr;
|
586
|
-
}
|
587
|
-
}
|
588
|
-
|
589
|
-
function base64FromBytes(arr: Uint8Array): string {
|
590
|
-
if (tsProtoGlobalThis.Buffer) {
|
591
|
-
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
592
|
-
} else {
|
593
|
-
const bin: string[] = [];
|
594
|
-
arr.forEach((byte) => {
|
595
|
-
bin.push(String.fromCharCode(byte));
|
596
|
-
});
|
597
|
-
return tsProtoGlobalThis.btoa(bin.join(""));
|
598
|
-
}
|
599
|
-
}
|
600
|
-
|
601
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
602
|
-
|
603
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
604
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
605
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
606
|
-
: Partial<T>;
|
607
|
-
|
608
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
609
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
610
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
611
|
-
|
612
|
-
function longToNumber(long: Long): number {
|
613
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
614
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
615
|
-
}
|
616
|
-
return long.toNumber();
|
617
|
-
}
|
618
|
-
|
619
|
-
if (_m0.util.Long !== Long) {
|
620
|
-
_m0.util.Long = Long as any;
|
621
|
-
_m0.configure();
|
622
|
-
}
|
623
|
-
|
624
|
-
function isSet(value: any): boolean {
|
625
|
-
return value !== null && value !== undefined;
|
626
|
-
}
|