mezon-js-protobuf 1.8.89 → 1.8.91
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/api/api.ts +4199 -5623
- package/build.js +1 -1
- package/build.mjs +1 -1
- package/dist/mezon-js/api/api.d.ts +5016 -5250
- package/dist/mezon-js-protobuf/api/api.d.ts +5016 -5250
- package/dist/mezon-js-protobuf/google/protobuf/struct.d.ts +1 -1
- package/dist/mezon-js-protobuf/google/protobuf/wrappers.d.ts +11 -11
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +8713 -8713
- package/dist/mezon-js-protobuf.cjs.js +3978 -4827
- package/dist/mezon-js-protobuf.esm.mjs +3978 -4827
- package/google/protobuf/struct.ts +1 -1
- package/google/protobuf/wrappers.ts +21 -27
- package/package.json +4 -4
- package/rtapi/realtime.ts +1729 -2337
- package/tsconfig.json +1 -4
|
@@ -533,7 +533,7 @@ export const ListValue = {
|
|
|
533
533
|
},
|
|
534
534
|
};
|
|
535
535
|
|
|
536
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean |
|
|
536
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
537
537
|
|
|
538
538
|
export type DeepPartial<T> = T extends Builtin ? T
|
|
539
539
|
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
@@ -37,7 +37,7 @@ export interface FloatValue {
|
|
|
37
37
|
*/
|
|
38
38
|
export interface Int64Value {
|
|
39
39
|
/** The int64 value. */
|
|
40
|
-
value:
|
|
40
|
+
value: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -47,7 +47,7 @@ export interface Int64Value {
|
|
|
47
47
|
*/
|
|
48
48
|
export interface UInt64Value {
|
|
49
49
|
/** The uint64 value. */
|
|
50
|
-
value:
|
|
50
|
+
value: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
@@ -215,16 +215,13 @@ export const FloatValue = {
|
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
function createBaseInt64Value(): Int64Value {
|
|
218
|
-
return { value:
|
|
218
|
+
return { value: "0" };
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export const Int64Value = {
|
|
222
222
|
encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
223
|
-
if (message.value !==
|
|
224
|
-
|
|
225
|
-
throw new globalThis.Error("value provided for field message.value of type int64 too large");
|
|
226
|
-
}
|
|
227
|
-
writer.uint32(8).int64(message.value.toString());
|
|
223
|
+
if (message.value !== "0") {
|
|
224
|
+
writer.uint32(8).int64(message.value);
|
|
228
225
|
}
|
|
229
226
|
return writer;
|
|
230
227
|
},
|
|
@@ -241,7 +238,7 @@ export const Int64Value = {
|
|
|
241
238
|
break;
|
|
242
239
|
}
|
|
243
240
|
|
|
244
|
-
message.value =
|
|
241
|
+
message.value = longToString(reader.int64() as Long);
|
|
245
242
|
continue;
|
|
246
243
|
}
|
|
247
244
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -253,13 +250,13 @@ export const Int64Value = {
|
|
|
253
250
|
},
|
|
254
251
|
|
|
255
252
|
fromJSON(object: any): Int64Value {
|
|
256
|
-
return { value: isSet(object.value) ?
|
|
253
|
+
return { value: isSet(object.value) ? globalThis.String(object.value) : "0" };
|
|
257
254
|
},
|
|
258
255
|
|
|
259
256
|
toJSON(message: Int64Value): unknown {
|
|
260
257
|
const obj: any = {};
|
|
261
|
-
if (message.value !==
|
|
262
|
-
obj.value = message.value
|
|
258
|
+
if (message.value !== "0") {
|
|
259
|
+
obj.value = message.value;
|
|
263
260
|
}
|
|
264
261
|
return obj;
|
|
265
262
|
},
|
|
@@ -269,22 +266,19 @@ export const Int64Value = {
|
|
|
269
266
|
},
|
|
270
267
|
fromPartial<I extends Exact<DeepPartial<Int64Value>, I>>(object: I): Int64Value {
|
|
271
268
|
const message = createBaseInt64Value();
|
|
272
|
-
message.value = object.value ??
|
|
269
|
+
message.value = object.value ?? "0";
|
|
273
270
|
return message;
|
|
274
271
|
},
|
|
275
272
|
};
|
|
276
273
|
|
|
277
274
|
function createBaseUInt64Value(): UInt64Value {
|
|
278
|
-
return { value:
|
|
275
|
+
return { value: "0" };
|
|
279
276
|
}
|
|
280
277
|
|
|
281
278
|
export const UInt64Value = {
|
|
282
279
|
encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
283
|
-
if (message.value !==
|
|
284
|
-
|
|
285
|
-
throw new globalThis.Error("value provided for field message.value of type uint64 too large");
|
|
286
|
-
}
|
|
287
|
-
writer.uint32(8).uint64(message.value.toString());
|
|
280
|
+
if (message.value !== "0") {
|
|
281
|
+
writer.uint32(8).uint64(message.value);
|
|
288
282
|
}
|
|
289
283
|
return writer;
|
|
290
284
|
},
|
|
@@ -301,7 +295,7 @@ export const UInt64Value = {
|
|
|
301
295
|
break;
|
|
302
296
|
}
|
|
303
297
|
|
|
304
|
-
message.value =
|
|
298
|
+
message.value = longToString(reader.uint64() as Long);
|
|
305
299
|
continue;
|
|
306
300
|
}
|
|
307
301
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -313,13 +307,13 @@ export const UInt64Value = {
|
|
|
313
307
|
},
|
|
314
308
|
|
|
315
309
|
fromJSON(object: any): UInt64Value {
|
|
316
|
-
return { value: isSet(object.value) ?
|
|
310
|
+
return { value: isSet(object.value) ? globalThis.String(object.value) : "0" };
|
|
317
311
|
},
|
|
318
312
|
|
|
319
313
|
toJSON(message: UInt64Value): unknown {
|
|
320
314
|
const obj: any = {};
|
|
321
|
-
if (message.value !==
|
|
322
|
-
obj.value = message.value
|
|
315
|
+
if (message.value !== "0") {
|
|
316
|
+
obj.value = message.value;
|
|
323
317
|
}
|
|
324
318
|
return obj;
|
|
325
319
|
},
|
|
@@ -329,7 +323,7 @@ export const UInt64Value = {
|
|
|
329
323
|
},
|
|
330
324
|
fromPartial<I extends Exact<DeepPartial<UInt64Value>, I>>(object: I): UInt64Value {
|
|
331
325
|
const message = createBaseUInt64Value();
|
|
332
|
-
message.value = object.value ??
|
|
326
|
+
message.value = object.value ?? "0";
|
|
333
327
|
return message;
|
|
334
328
|
},
|
|
335
329
|
};
|
|
@@ -644,7 +638,7 @@ function base64FromBytes(arr: Uint8Array): string {
|
|
|
644
638
|
}
|
|
645
639
|
}
|
|
646
640
|
|
|
647
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean |
|
|
641
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
648
642
|
|
|
649
643
|
export type DeepPartial<T> = T extends Builtin ? T
|
|
650
644
|
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
@@ -656,8 +650,8 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
|
656
650
|
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
657
651
|
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
658
652
|
|
|
659
|
-
function
|
|
660
|
-
return
|
|
653
|
+
function longToString(long: Long) {
|
|
654
|
+
return long.toString();
|
|
661
655
|
}
|
|
662
656
|
|
|
663
657
|
if (_m0.util.Long !== Long) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.91",
|
|
4
4
|
"description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
|
|
5
5
|
"main": "dist/mezon-js-protobuf.cjs.js",
|
|
6
6
|
"module": "dist/mezon-js-protobuf.esm.mjs",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"mezon",
|
|
27
27
|
"realtime",
|
|
28
28
|
"realtime chat"
|
|
29
|
-
]
|
|
29
|
+
]
|
|
30
|
+
,
|
|
30
31
|
"repository": "https://github.com/nccasia/mezon-js",
|
|
31
32
|
"homepage": "https://mezon.vn",
|
|
32
33
|
"bugs": "https://github.com/nccasia/mezon-js/issues",
|
|
33
34
|
"license": "Apache-2.0",
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@scarf/scarf": "^1.1.1"
|
|
36
|
-
"typescript": "^4.9.5"
|
|
36
|
+
"@scarf/scarf": "^1.1.1"
|
|
37
37
|
}
|
|
38
38
|
}
|