@dcl/protocol 1.0.0-25007945013.commit-ba53eb0 → 1.0.0-25007946712.commit-f0cdbab
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/out-js/decentraland/kernel/apis/comms_api.gen.d.ts +130 -0
- package/out-js/decentraland/kernel/apis/comms_api.gen.js +536 -1
- package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +52 -0
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +339 -5
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/apis/comms_api.gen.ts +589 -0
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +376 -0
- package/package.json +2 -2
- package/proto/decentraland/kernel/apis/comms_api.proto +37 -1
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +25 -0
- package/proto/decentraland/sdk/components/particle_system.proto +5 -1
|
@@ -34,6 +34,15 @@ export interface Packet {
|
|
|
34
34
|
} | {
|
|
35
35
|
$case: "movementCompressed";
|
|
36
36
|
movementCompressed: MovementCompressed;
|
|
37
|
+
} | {
|
|
38
|
+
$case: "lookAtPosition";
|
|
39
|
+
lookAtPosition: LookAtPosition;
|
|
40
|
+
} | {
|
|
41
|
+
$case: "reaction";
|
|
42
|
+
reaction: Reaction;
|
|
43
|
+
} | {
|
|
44
|
+
$case: "chatReaction";
|
|
45
|
+
chatReaction: ChatReaction;
|
|
37
46
|
} | undefined;
|
|
38
47
|
protocolVersion: number;
|
|
39
48
|
}
|
|
@@ -146,6 +155,25 @@ export declare enum Voice_VoiceCodec {
|
|
|
146
155
|
}
|
|
147
156
|
export declare function voice_VoiceCodecFromJSON(object: any): Voice_VoiceCodec;
|
|
148
157
|
export declare function voice_VoiceCodecToJSON(object: Voice_VoiceCodec): string;
|
|
158
|
+
/** Message sent to force an avatar to look at a position */
|
|
159
|
+
export interface LookAtPosition {
|
|
160
|
+
timestamp: number;
|
|
161
|
+
/** world position */
|
|
162
|
+
positionX: number;
|
|
163
|
+
positionY: number;
|
|
164
|
+
positionZ: number;
|
|
165
|
+
targetAvatarWalletAddress: string;
|
|
166
|
+
}
|
|
167
|
+
export interface Reaction {
|
|
168
|
+
emojiIndex: number;
|
|
169
|
+
timestamp: number;
|
|
170
|
+
count: number;
|
|
171
|
+
}
|
|
172
|
+
export interface ChatReaction {
|
|
173
|
+
emojiIndex: number;
|
|
174
|
+
messageId: string;
|
|
175
|
+
address: string;
|
|
176
|
+
}
|
|
149
177
|
export declare namespace Packet {
|
|
150
178
|
function encode(message: Packet, writer?: _m0.Writer): _m0.Writer;
|
|
151
179
|
function decode(input: _m0.Reader | Uint8Array, length?: number): Packet;
|
|
@@ -242,6 +270,30 @@ export declare namespace Voice {
|
|
|
242
270
|
function create<I extends Exact<DeepPartial<Voice>, I>>(base?: I): Voice;
|
|
243
271
|
function fromPartial<I extends Exact<DeepPartial<Voice>, I>>(object: I): Voice;
|
|
244
272
|
}
|
|
273
|
+
export declare namespace LookAtPosition {
|
|
274
|
+
function encode(message: LookAtPosition, writer?: _m0.Writer): _m0.Writer;
|
|
275
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): LookAtPosition;
|
|
276
|
+
function fromJSON(object: any): LookAtPosition;
|
|
277
|
+
function toJSON(message: LookAtPosition): unknown;
|
|
278
|
+
function create<I extends Exact<DeepPartial<LookAtPosition>, I>>(base?: I): LookAtPosition;
|
|
279
|
+
function fromPartial<I extends Exact<DeepPartial<LookAtPosition>, I>>(object: I): LookAtPosition;
|
|
280
|
+
}
|
|
281
|
+
export declare namespace Reaction {
|
|
282
|
+
function encode(message: Reaction, writer?: _m0.Writer): _m0.Writer;
|
|
283
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): Reaction;
|
|
284
|
+
function fromJSON(object: any): Reaction;
|
|
285
|
+
function toJSON(message: Reaction): unknown;
|
|
286
|
+
function create<I extends Exact<DeepPartial<Reaction>, I>>(base?: I): Reaction;
|
|
287
|
+
function fromPartial<I extends Exact<DeepPartial<Reaction>, I>>(object: I): Reaction;
|
|
288
|
+
}
|
|
289
|
+
export declare namespace ChatReaction {
|
|
290
|
+
function encode(message: ChatReaction, writer?: _m0.Writer): _m0.Writer;
|
|
291
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): ChatReaction;
|
|
292
|
+
function fromJSON(object: any): ChatReaction;
|
|
293
|
+
function toJSON(message: ChatReaction): unknown;
|
|
294
|
+
function create<I extends Exact<DeepPartial<ChatReaction>, I>>(base?: I): ChatReaction;
|
|
295
|
+
function fromPartial<I extends Exact<DeepPartial<ChatReaction>, I>>(object: I): ChatReaction;
|
|
296
|
+
}
|
|
245
297
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
246
298
|
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
247
299
|
$case: string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Voice = exports.Scene = exports.Chat = exports.ProfileResponse = exports.ProfileRequest = exports.AnnounceProfileVersion = exports.SceneEmote = exports.PlayerEmote = exports.MovementCompressed = exports.Movement = exports.Position = exports.Packet = exports.Voice_VoiceCodec = exports.Movement_GlideState = exports.protobufPackage = void 0;
|
|
6
|
+
exports.ChatReaction = exports.Reaction = exports.LookAtPosition = exports.Voice = exports.Scene = exports.Chat = exports.ProfileResponse = exports.ProfileRequest = exports.AnnounceProfileVersion = exports.SceneEmote = exports.PlayerEmote = exports.MovementCompressed = exports.Movement = exports.Position = exports.Packet = exports.Voice_VoiceCodec = exports.Movement_GlideState = exports.protobufPackage = void 0;
|
|
7
7
|
exports.movement_GlideStateFromJSON = movement_GlideStateFromJSON;
|
|
8
8
|
exports.movement_GlideStateToJSON = movement_GlideStateToJSON;
|
|
9
9
|
exports.voice_VoiceCodecFromJSON = voice_VoiceCodecFromJSON;
|
|
@@ -121,6 +121,15 @@ var Packet;
|
|
|
121
121
|
case "movementCompressed":
|
|
122
122
|
MovementCompressed.encode(message.message.movementCompressed, writer.uint32(98).fork()).ldelim();
|
|
123
123
|
break;
|
|
124
|
+
case "lookAtPosition":
|
|
125
|
+
LookAtPosition.encode(message.message.lookAtPosition, writer.uint32(106).fork()).ldelim();
|
|
126
|
+
break;
|
|
127
|
+
case "reaction":
|
|
128
|
+
Reaction.encode(message.message.reaction, writer.uint32(114).fork()).ldelim();
|
|
129
|
+
break;
|
|
130
|
+
case "chatReaction":
|
|
131
|
+
ChatReaction.encode(message.message.chatReaction, writer.uint32(122).fork()).ldelim();
|
|
132
|
+
break;
|
|
124
133
|
}
|
|
125
134
|
if (message.protocolVersion !== 0) {
|
|
126
135
|
writer.uint32(88).uint32(message.protocolVersion);
|
|
@@ -210,6 +219,24 @@ var Packet;
|
|
|
210
219
|
movementCompressed: MovementCompressed.decode(reader, reader.uint32()),
|
|
211
220
|
};
|
|
212
221
|
continue;
|
|
222
|
+
case 13:
|
|
223
|
+
if (tag !== 106) {
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
message.message = { $case: "lookAtPosition", lookAtPosition: LookAtPosition.decode(reader, reader.uint32()) };
|
|
227
|
+
continue;
|
|
228
|
+
case 14:
|
|
229
|
+
if (tag !== 114) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
message.message = { $case: "reaction", reaction: Reaction.decode(reader, reader.uint32()) };
|
|
233
|
+
continue;
|
|
234
|
+
case 15:
|
|
235
|
+
if (tag !== 122) {
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
message.message = { $case: "chatReaction", chatReaction: ChatReaction.decode(reader, reader.uint32()) };
|
|
239
|
+
continue;
|
|
213
240
|
case 11:
|
|
214
241
|
if (tag !== 88) {
|
|
215
242
|
break;
|
|
@@ -249,13 +276,19 @@ var Packet;
|
|
|
249
276
|
? { $case: "sceneEmote", sceneEmote: SceneEmote.fromJSON(object.sceneEmote) }
|
|
250
277
|
: isSet(object.movementCompressed)
|
|
251
278
|
? { $case: "movementCompressed", movementCompressed: MovementCompressed.fromJSON(object.movementCompressed) }
|
|
252
|
-
:
|
|
279
|
+
: isSet(object.lookAtPosition)
|
|
280
|
+
? { $case: "lookAtPosition", lookAtPosition: LookAtPosition.fromJSON(object.lookAtPosition) }
|
|
281
|
+
: isSet(object.reaction)
|
|
282
|
+
? { $case: "reaction", reaction: Reaction.fromJSON(object.reaction) }
|
|
283
|
+
: isSet(object.chatReaction)
|
|
284
|
+
? { $case: "chatReaction", chatReaction: ChatReaction.fromJSON(object.chatReaction) }
|
|
285
|
+
: undefined,
|
|
253
286
|
protocolVersion: isSet(object.protocolVersion) ? Number(object.protocolVersion) : 0,
|
|
254
287
|
};
|
|
255
288
|
}
|
|
256
289
|
Packet.fromJSON = fromJSON;
|
|
257
290
|
function toJSON(message) {
|
|
258
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
291
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17;
|
|
259
292
|
const obj = {};
|
|
260
293
|
((_a = message.message) === null || _a === void 0 ? void 0 : _a.$case) === "position" &&
|
|
261
294
|
(obj.position = ((_b = message.message) === null || _b === void 0 ? void 0 : _b.position) ? Position.toJSON((_c = message.message) === null || _c === void 0 ? void 0 : _c.position) : undefined);
|
|
@@ -287,6 +320,16 @@ var Packet;
|
|
|
287
320
|
(obj.movementCompressed = ((_7 = message.message) === null || _7 === void 0 ? void 0 : _7.movementCompressed)
|
|
288
321
|
? MovementCompressed.toJSON((_8 = message.message) === null || _8 === void 0 ? void 0 : _8.movementCompressed)
|
|
289
322
|
: undefined);
|
|
323
|
+
((_9 = message.message) === null || _9 === void 0 ? void 0 : _9.$case) === "lookAtPosition" &&
|
|
324
|
+
(obj.lookAtPosition = ((_10 = message.message) === null || _10 === void 0 ? void 0 : _10.lookAtPosition)
|
|
325
|
+
? LookAtPosition.toJSON((_11 = message.message) === null || _11 === void 0 ? void 0 : _11.lookAtPosition)
|
|
326
|
+
: undefined);
|
|
327
|
+
((_12 = message.message) === null || _12 === void 0 ? void 0 : _12.$case) === "reaction" &&
|
|
328
|
+
(obj.reaction = ((_13 = message.message) === null || _13 === void 0 ? void 0 : _13.reaction) ? Reaction.toJSON((_14 = message.message) === null || _14 === void 0 ? void 0 : _14.reaction) : undefined);
|
|
329
|
+
((_15 = message.message) === null || _15 === void 0 ? void 0 : _15.$case) === "chatReaction" &&
|
|
330
|
+
(obj.chatReaction = ((_16 = message.message) === null || _16 === void 0 ? void 0 : _16.chatReaction)
|
|
331
|
+
? ChatReaction.toJSON((_17 = message.message) === null || _17 === void 0 ? void 0 : _17.chatReaction)
|
|
332
|
+
: undefined);
|
|
290
333
|
message.protocolVersion !== undefined && (obj.protocolVersion = Math.round(message.protocolVersion));
|
|
291
334
|
return obj;
|
|
292
335
|
}
|
|
@@ -296,7 +339,7 @@ var Packet;
|
|
|
296
339
|
}
|
|
297
340
|
Packet.create = create;
|
|
298
341
|
function fromPartial(object) {
|
|
299
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
342
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
300
343
|
const message = createBasePacket();
|
|
301
344
|
if (((_a = object.message) === null || _a === void 0 ? void 0 : _a.$case) === "position" &&
|
|
302
345
|
((_b = object.message) === null || _b === void 0 ? void 0 : _b.position) !== undefined &&
|
|
@@ -359,7 +402,25 @@ var Packet;
|
|
|
359
402
|
movementCompressed: MovementCompressed.fromPartial(object.message.movementCompressed),
|
|
360
403
|
};
|
|
361
404
|
}
|
|
362
|
-
|
|
405
|
+
if (((_9 = object.message) === null || _9 === void 0 ? void 0 : _9.$case) === "lookAtPosition" &&
|
|
406
|
+
((_10 = object.message) === null || _10 === void 0 ? void 0 : _10.lookAtPosition) !== undefined &&
|
|
407
|
+
((_11 = object.message) === null || _11 === void 0 ? void 0 : _11.lookAtPosition) !== null) {
|
|
408
|
+
message.message = {
|
|
409
|
+
$case: "lookAtPosition",
|
|
410
|
+
lookAtPosition: LookAtPosition.fromPartial(object.message.lookAtPosition),
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
if (((_12 = object.message) === null || _12 === void 0 ? void 0 : _12.$case) === "reaction" &&
|
|
414
|
+
((_13 = object.message) === null || _13 === void 0 ? void 0 : _13.reaction) !== undefined &&
|
|
415
|
+
((_14 = object.message) === null || _14 === void 0 ? void 0 : _14.reaction) !== null) {
|
|
416
|
+
message.message = { $case: "reaction", reaction: Reaction.fromPartial(object.message.reaction) };
|
|
417
|
+
}
|
|
418
|
+
if (((_15 = object.message) === null || _15 === void 0 ? void 0 : _15.$case) === "chatReaction" &&
|
|
419
|
+
((_16 = object.message) === null || _16 === void 0 ? void 0 : _16.chatReaction) !== undefined &&
|
|
420
|
+
((_17 = object.message) === null || _17 === void 0 ? void 0 : _17.chatReaction) !== null) {
|
|
421
|
+
message.message = { $case: "chatReaction", chatReaction: ChatReaction.fromPartial(object.message.chatReaction) };
|
|
422
|
+
}
|
|
423
|
+
message.protocolVersion = (_18 = object.protocolVersion) !== null && _18 !== void 0 ? _18 : 0;
|
|
363
424
|
return message;
|
|
364
425
|
}
|
|
365
426
|
Packet.fromPartial = fromPartial;
|
|
@@ -1583,6 +1644,279 @@ var Voice;
|
|
|
1583
1644
|
}
|
|
1584
1645
|
Voice.fromPartial = fromPartial;
|
|
1585
1646
|
})(Voice || (exports.Voice = Voice = {}));
|
|
1647
|
+
function createBaseLookAtPosition() {
|
|
1648
|
+
return { timestamp: 0, positionX: 0, positionY: 0, positionZ: 0, targetAvatarWalletAddress: "" };
|
|
1649
|
+
}
|
|
1650
|
+
var LookAtPosition;
|
|
1651
|
+
(function (LookAtPosition) {
|
|
1652
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1653
|
+
if (message.timestamp !== 0) {
|
|
1654
|
+
writer.uint32(13).float(message.timestamp);
|
|
1655
|
+
}
|
|
1656
|
+
if (message.positionX !== 0) {
|
|
1657
|
+
writer.uint32(21).float(message.positionX);
|
|
1658
|
+
}
|
|
1659
|
+
if (message.positionY !== 0) {
|
|
1660
|
+
writer.uint32(29).float(message.positionY);
|
|
1661
|
+
}
|
|
1662
|
+
if (message.positionZ !== 0) {
|
|
1663
|
+
writer.uint32(37).float(message.positionZ);
|
|
1664
|
+
}
|
|
1665
|
+
if (message.targetAvatarWalletAddress !== "") {
|
|
1666
|
+
writer.uint32(42).string(message.targetAvatarWalletAddress);
|
|
1667
|
+
}
|
|
1668
|
+
return writer;
|
|
1669
|
+
}
|
|
1670
|
+
LookAtPosition.encode = encode;
|
|
1671
|
+
function decode(input, length) {
|
|
1672
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1673
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1674
|
+
const message = createBaseLookAtPosition();
|
|
1675
|
+
while (reader.pos < end) {
|
|
1676
|
+
const tag = reader.uint32();
|
|
1677
|
+
switch (tag >>> 3) {
|
|
1678
|
+
case 1:
|
|
1679
|
+
if (tag !== 13) {
|
|
1680
|
+
break;
|
|
1681
|
+
}
|
|
1682
|
+
message.timestamp = reader.float();
|
|
1683
|
+
continue;
|
|
1684
|
+
case 2:
|
|
1685
|
+
if (tag !== 21) {
|
|
1686
|
+
break;
|
|
1687
|
+
}
|
|
1688
|
+
message.positionX = reader.float();
|
|
1689
|
+
continue;
|
|
1690
|
+
case 3:
|
|
1691
|
+
if (tag !== 29) {
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
message.positionY = reader.float();
|
|
1695
|
+
continue;
|
|
1696
|
+
case 4:
|
|
1697
|
+
if (tag !== 37) {
|
|
1698
|
+
break;
|
|
1699
|
+
}
|
|
1700
|
+
message.positionZ = reader.float();
|
|
1701
|
+
continue;
|
|
1702
|
+
case 5:
|
|
1703
|
+
if (tag !== 42) {
|
|
1704
|
+
break;
|
|
1705
|
+
}
|
|
1706
|
+
message.targetAvatarWalletAddress = reader.string();
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1710
|
+
break;
|
|
1711
|
+
}
|
|
1712
|
+
reader.skipType(tag & 7);
|
|
1713
|
+
}
|
|
1714
|
+
return message;
|
|
1715
|
+
}
|
|
1716
|
+
LookAtPosition.decode = decode;
|
|
1717
|
+
function fromJSON(object) {
|
|
1718
|
+
return {
|
|
1719
|
+
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1720
|
+
positionX: isSet(object.positionX) ? Number(object.positionX) : 0,
|
|
1721
|
+
positionY: isSet(object.positionY) ? Number(object.positionY) : 0,
|
|
1722
|
+
positionZ: isSet(object.positionZ) ? Number(object.positionZ) : 0,
|
|
1723
|
+
targetAvatarWalletAddress: isSet(object.targetAvatarWalletAddress)
|
|
1724
|
+
? String(object.targetAvatarWalletAddress)
|
|
1725
|
+
: "",
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
LookAtPosition.fromJSON = fromJSON;
|
|
1729
|
+
function toJSON(message) {
|
|
1730
|
+
const obj = {};
|
|
1731
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1732
|
+
message.positionX !== undefined && (obj.positionX = message.positionX);
|
|
1733
|
+
message.positionY !== undefined && (obj.positionY = message.positionY);
|
|
1734
|
+
message.positionZ !== undefined && (obj.positionZ = message.positionZ);
|
|
1735
|
+
message.targetAvatarWalletAddress !== undefined &&
|
|
1736
|
+
(obj.targetAvatarWalletAddress = message.targetAvatarWalletAddress);
|
|
1737
|
+
return obj;
|
|
1738
|
+
}
|
|
1739
|
+
LookAtPosition.toJSON = toJSON;
|
|
1740
|
+
function create(base) {
|
|
1741
|
+
return LookAtPosition.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1742
|
+
}
|
|
1743
|
+
LookAtPosition.create = create;
|
|
1744
|
+
function fromPartial(object) {
|
|
1745
|
+
var _a, _b, _c, _d, _e;
|
|
1746
|
+
const message = createBaseLookAtPosition();
|
|
1747
|
+
message.timestamp = (_a = object.timestamp) !== null && _a !== void 0 ? _a : 0;
|
|
1748
|
+
message.positionX = (_b = object.positionX) !== null && _b !== void 0 ? _b : 0;
|
|
1749
|
+
message.positionY = (_c = object.positionY) !== null && _c !== void 0 ? _c : 0;
|
|
1750
|
+
message.positionZ = (_d = object.positionZ) !== null && _d !== void 0 ? _d : 0;
|
|
1751
|
+
message.targetAvatarWalletAddress = (_e = object.targetAvatarWalletAddress) !== null && _e !== void 0 ? _e : "";
|
|
1752
|
+
return message;
|
|
1753
|
+
}
|
|
1754
|
+
LookAtPosition.fromPartial = fromPartial;
|
|
1755
|
+
})(LookAtPosition || (exports.LookAtPosition = LookAtPosition = {}));
|
|
1756
|
+
function createBaseReaction() {
|
|
1757
|
+
return { emojiIndex: 0, timestamp: 0, count: 0 };
|
|
1758
|
+
}
|
|
1759
|
+
var Reaction;
|
|
1760
|
+
(function (Reaction) {
|
|
1761
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1762
|
+
if (message.emojiIndex !== 0) {
|
|
1763
|
+
writer.uint32(8).int32(message.emojiIndex);
|
|
1764
|
+
}
|
|
1765
|
+
if (message.timestamp !== 0) {
|
|
1766
|
+
writer.uint32(21).float(message.timestamp);
|
|
1767
|
+
}
|
|
1768
|
+
if (message.count !== 0) {
|
|
1769
|
+
writer.uint32(24).int32(message.count);
|
|
1770
|
+
}
|
|
1771
|
+
return writer;
|
|
1772
|
+
}
|
|
1773
|
+
Reaction.encode = encode;
|
|
1774
|
+
function decode(input, length) {
|
|
1775
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1776
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1777
|
+
const message = createBaseReaction();
|
|
1778
|
+
while (reader.pos < end) {
|
|
1779
|
+
const tag = reader.uint32();
|
|
1780
|
+
switch (tag >>> 3) {
|
|
1781
|
+
case 1:
|
|
1782
|
+
if (tag !== 8) {
|
|
1783
|
+
break;
|
|
1784
|
+
}
|
|
1785
|
+
message.emojiIndex = reader.int32();
|
|
1786
|
+
continue;
|
|
1787
|
+
case 2:
|
|
1788
|
+
if (tag !== 21) {
|
|
1789
|
+
break;
|
|
1790
|
+
}
|
|
1791
|
+
message.timestamp = reader.float();
|
|
1792
|
+
continue;
|
|
1793
|
+
case 3:
|
|
1794
|
+
if (tag !== 24) {
|
|
1795
|
+
break;
|
|
1796
|
+
}
|
|
1797
|
+
message.count = reader.int32();
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
reader.skipType(tag & 7);
|
|
1804
|
+
}
|
|
1805
|
+
return message;
|
|
1806
|
+
}
|
|
1807
|
+
Reaction.decode = decode;
|
|
1808
|
+
function fromJSON(object) {
|
|
1809
|
+
return {
|
|
1810
|
+
emojiIndex: isSet(object.emojiIndex) ? Number(object.emojiIndex) : 0,
|
|
1811
|
+
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1812
|
+
count: isSet(object.count) ? Number(object.count) : 0,
|
|
1813
|
+
};
|
|
1814
|
+
}
|
|
1815
|
+
Reaction.fromJSON = fromJSON;
|
|
1816
|
+
function toJSON(message) {
|
|
1817
|
+
const obj = {};
|
|
1818
|
+
message.emojiIndex !== undefined && (obj.emojiIndex = Math.round(message.emojiIndex));
|
|
1819
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1820
|
+
message.count !== undefined && (obj.count = Math.round(message.count));
|
|
1821
|
+
return obj;
|
|
1822
|
+
}
|
|
1823
|
+
Reaction.toJSON = toJSON;
|
|
1824
|
+
function create(base) {
|
|
1825
|
+
return Reaction.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1826
|
+
}
|
|
1827
|
+
Reaction.create = create;
|
|
1828
|
+
function fromPartial(object) {
|
|
1829
|
+
var _a, _b, _c;
|
|
1830
|
+
const message = createBaseReaction();
|
|
1831
|
+
message.emojiIndex = (_a = object.emojiIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1832
|
+
message.timestamp = (_b = object.timestamp) !== null && _b !== void 0 ? _b : 0;
|
|
1833
|
+
message.count = (_c = object.count) !== null && _c !== void 0 ? _c : 0;
|
|
1834
|
+
return message;
|
|
1835
|
+
}
|
|
1836
|
+
Reaction.fromPartial = fromPartial;
|
|
1837
|
+
})(Reaction || (exports.Reaction = Reaction = {}));
|
|
1838
|
+
function createBaseChatReaction() {
|
|
1839
|
+
return { emojiIndex: 0, messageId: "", address: "" };
|
|
1840
|
+
}
|
|
1841
|
+
var ChatReaction;
|
|
1842
|
+
(function (ChatReaction) {
|
|
1843
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1844
|
+
if (message.emojiIndex !== 0) {
|
|
1845
|
+
writer.uint32(8).int32(message.emojiIndex);
|
|
1846
|
+
}
|
|
1847
|
+
if (message.messageId !== "") {
|
|
1848
|
+
writer.uint32(18).string(message.messageId);
|
|
1849
|
+
}
|
|
1850
|
+
if (message.address !== "") {
|
|
1851
|
+
writer.uint32(26).string(message.address);
|
|
1852
|
+
}
|
|
1853
|
+
return writer;
|
|
1854
|
+
}
|
|
1855
|
+
ChatReaction.encode = encode;
|
|
1856
|
+
function decode(input, length) {
|
|
1857
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1858
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1859
|
+
const message = createBaseChatReaction();
|
|
1860
|
+
while (reader.pos < end) {
|
|
1861
|
+
const tag = reader.uint32();
|
|
1862
|
+
switch (tag >>> 3) {
|
|
1863
|
+
case 1:
|
|
1864
|
+
if (tag !== 8) {
|
|
1865
|
+
break;
|
|
1866
|
+
}
|
|
1867
|
+
message.emojiIndex = reader.int32();
|
|
1868
|
+
continue;
|
|
1869
|
+
case 2:
|
|
1870
|
+
if (tag !== 18) {
|
|
1871
|
+
break;
|
|
1872
|
+
}
|
|
1873
|
+
message.messageId = reader.string();
|
|
1874
|
+
continue;
|
|
1875
|
+
case 3:
|
|
1876
|
+
if (tag !== 26) {
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1879
|
+
message.address = reader.string();
|
|
1880
|
+
continue;
|
|
1881
|
+
}
|
|
1882
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1883
|
+
break;
|
|
1884
|
+
}
|
|
1885
|
+
reader.skipType(tag & 7);
|
|
1886
|
+
}
|
|
1887
|
+
return message;
|
|
1888
|
+
}
|
|
1889
|
+
ChatReaction.decode = decode;
|
|
1890
|
+
function fromJSON(object) {
|
|
1891
|
+
return {
|
|
1892
|
+
emojiIndex: isSet(object.emojiIndex) ? Number(object.emojiIndex) : 0,
|
|
1893
|
+
messageId: isSet(object.messageId) ? String(object.messageId) : "",
|
|
1894
|
+
address: isSet(object.address) ? String(object.address) : "",
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
ChatReaction.fromJSON = fromJSON;
|
|
1898
|
+
function toJSON(message) {
|
|
1899
|
+
const obj = {};
|
|
1900
|
+
message.emojiIndex !== undefined && (obj.emojiIndex = Math.round(message.emojiIndex));
|
|
1901
|
+
message.messageId !== undefined && (obj.messageId = message.messageId);
|
|
1902
|
+
message.address !== undefined && (obj.address = message.address);
|
|
1903
|
+
return obj;
|
|
1904
|
+
}
|
|
1905
|
+
ChatReaction.toJSON = toJSON;
|
|
1906
|
+
function create(base) {
|
|
1907
|
+
return ChatReaction.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1908
|
+
}
|
|
1909
|
+
ChatReaction.create = create;
|
|
1910
|
+
function fromPartial(object) {
|
|
1911
|
+
var _a, _b, _c;
|
|
1912
|
+
const message = createBaseChatReaction();
|
|
1913
|
+
message.emojiIndex = (_a = object.emojiIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1914
|
+
message.messageId = (_b = object.messageId) !== null && _b !== void 0 ? _b : "";
|
|
1915
|
+
message.address = (_c = object.address) !== null && _c !== void 0 ? _c : "";
|
|
1916
|
+
return message;
|
|
1917
|
+
}
|
|
1918
|
+
ChatReaction.fromPartial = fromPartial;
|
|
1919
|
+
})(ChatReaction || (exports.ChatReaction = ChatReaction = {}));
|
|
1586
1920
|
const tsProtoGlobalThis = (() => {
|
|
1587
1921
|
if (typeof globalThis !== "undefined") {
|
|
1588
1922
|
return globalThis;
|