mezon-js-protobuf 1.7.11 → 1.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/api/api.ts +96 -1
- package/dist/mezon-js-protobuf/api/api.d.ts +29 -0
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +215 -145
- package/dist/mezon-js-protobuf.cjs.js +116 -5
- package/dist/mezon-js-protobuf.esm.mjs +116 -5
- package/package.json +1 -1
- package/rtapi/realtime.ts +137 -2
|
@@ -6555,7 +6555,8 @@ function createBaseEnvelope() {
|
|
|
6555
6555
|
user_status_event: void 0,
|
|
6556
6556
|
remove_friend: void 0,
|
|
6557
6557
|
webhook_event: void 0,
|
|
6558
|
-
noti_user_channel: void 0
|
|
6558
|
+
noti_user_channel: void 0,
|
|
6559
|
+
join_channel_app_data: void 0
|
|
6559
6560
|
};
|
|
6560
6561
|
}
|
|
6561
6562
|
var Envelope = {
|
|
@@ -6776,6 +6777,9 @@ var Envelope = {
|
|
|
6776
6777
|
if (message.noti_user_channel !== void 0) {
|
|
6777
6778
|
NotificationUserChannel.encode(message.noti_user_channel, writer.uint32(578).fork()).ldelim();
|
|
6778
6779
|
}
|
|
6780
|
+
if (message.join_channel_app_data !== void 0) {
|
|
6781
|
+
JoinChannelAppData.encode(message.join_channel_app_data, writer.uint32(586).fork()).ldelim();
|
|
6782
|
+
}
|
|
6779
6783
|
return writer;
|
|
6780
6784
|
},
|
|
6781
6785
|
decode(input, length) {
|
|
@@ -7217,6 +7221,12 @@ var Envelope = {
|
|
|
7217
7221
|
}
|
|
7218
7222
|
message.noti_user_channel = NotificationUserChannel.decode(reader, reader.uint32());
|
|
7219
7223
|
continue;
|
|
7224
|
+
case 73:
|
|
7225
|
+
if (tag !== 586) {
|
|
7226
|
+
break;
|
|
7227
|
+
}
|
|
7228
|
+
message.join_channel_app_data = JoinChannelAppData.decode(reader, reader.uint32());
|
|
7229
|
+
continue;
|
|
7220
7230
|
}
|
|
7221
7231
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7222
7232
|
break;
|
|
@@ -7298,7 +7308,8 @@ var Envelope = {
|
|
|
7298
7308
|
user_status_event: isSet4(object.user_status_event) ? UserStatusEvent.fromJSON(object.user_status_event) : void 0,
|
|
7299
7309
|
remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
|
|
7300
7310
|
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
|
|
7301
|
-
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0
|
|
7311
|
+
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0,
|
|
7312
|
+
join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0
|
|
7302
7313
|
};
|
|
7303
7314
|
},
|
|
7304
7315
|
toJSON(message) {
|
|
@@ -7519,6 +7530,9 @@ var Envelope = {
|
|
|
7519
7530
|
if (message.noti_user_channel !== void 0) {
|
|
7520
7531
|
obj.noti_user_channel = NotificationUserChannel.toJSON(message.noti_user_channel);
|
|
7521
7532
|
}
|
|
7533
|
+
if (message.join_channel_app_data !== void 0) {
|
|
7534
|
+
obj.join_channel_app_data = JoinChannelAppData.toJSON(message.join_channel_app_data);
|
|
7535
|
+
}
|
|
7522
7536
|
return obj;
|
|
7523
7537
|
},
|
|
7524
7538
|
create(base) {
|
|
@@ -7599,6 +7613,7 @@ var Envelope = {
|
|
|
7599
7613
|
message.remove_friend = object.remove_friend !== void 0 && object.remove_friend !== null ? RemoveFriend.fromPartial(object.remove_friend) : void 0;
|
|
7600
7614
|
message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
|
|
7601
7615
|
message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
|
|
7616
|
+
message.join_channel_app_data = object.join_channel_app_data !== void 0 && object.join_channel_app_data !== null ? JoinChannelAppData.fromPartial(object.join_channel_app_data) : void 0;
|
|
7602
7617
|
return message;
|
|
7603
7618
|
}
|
|
7604
7619
|
};
|
|
@@ -10999,7 +11014,8 @@ function createBaseChannelCreatedEvent() {
|
|
|
10999
11014
|
channel_private: 0,
|
|
11000
11015
|
channel_type: void 0,
|
|
11001
11016
|
status: 0,
|
|
11002
|
-
app_url: ""
|
|
11017
|
+
app_url: "",
|
|
11018
|
+
clan_name: ""
|
|
11003
11019
|
};
|
|
11004
11020
|
}
|
|
11005
11021
|
var ChannelCreatedEvent = {
|
|
@@ -11034,6 +11050,9 @@ var ChannelCreatedEvent = {
|
|
|
11034
11050
|
if (message.app_url !== "") {
|
|
11035
11051
|
writer.uint32(82).string(message.app_url);
|
|
11036
11052
|
}
|
|
11053
|
+
if (message.clan_name !== "") {
|
|
11054
|
+
writer.uint32(90).string(message.clan_name);
|
|
11055
|
+
}
|
|
11037
11056
|
return writer;
|
|
11038
11057
|
},
|
|
11039
11058
|
decode(input, length) {
|
|
@@ -11103,6 +11122,12 @@ var ChannelCreatedEvent = {
|
|
|
11103
11122
|
}
|
|
11104
11123
|
message.app_url = reader.string();
|
|
11105
11124
|
continue;
|
|
11125
|
+
case 11:
|
|
11126
|
+
if (tag !== 90) {
|
|
11127
|
+
break;
|
|
11128
|
+
}
|
|
11129
|
+
message.clan_name = reader.string();
|
|
11130
|
+
continue;
|
|
11106
11131
|
}
|
|
11107
11132
|
if ((tag & 7) === 4 || tag === 0) {
|
|
11108
11133
|
break;
|
|
@@ -11122,7 +11147,8 @@ var ChannelCreatedEvent = {
|
|
|
11122
11147
|
channel_private: isSet4(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
|
|
11123
11148
|
channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : void 0,
|
|
11124
11149
|
status: isSet4(object.status) ? globalThis.Number(object.status) : 0,
|
|
11125
|
-
app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : ""
|
|
11150
|
+
app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : "",
|
|
11151
|
+
clan_name: isSet4(object.clan_name) ? globalThis.String(object.clan_name) : ""
|
|
11126
11152
|
};
|
|
11127
11153
|
},
|
|
11128
11154
|
toJSON(message) {
|
|
@@ -11157,13 +11183,16 @@ var ChannelCreatedEvent = {
|
|
|
11157
11183
|
if (message.app_url !== "") {
|
|
11158
11184
|
obj.app_url = message.app_url;
|
|
11159
11185
|
}
|
|
11186
|
+
if (message.clan_name !== "") {
|
|
11187
|
+
obj.clan_name = message.clan_name;
|
|
11188
|
+
}
|
|
11160
11189
|
return obj;
|
|
11161
11190
|
},
|
|
11162
11191
|
create(base) {
|
|
11163
11192
|
return ChannelCreatedEvent.fromPartial(base != null ? base : {});
|
|
11164
11193
|
},
|
|
11165
11194
|
fromPartial(object) {
|
|
11166
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
11195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
11167
11196
|
const message = createBaseChannelCreatedEvent();
|
|
11168
11197
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
11169
11198
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -11175,6 +11204,7 @@ var ChannelCreatedEvent = {
|
|
|
11175
11204
|
message.channel_type = (_h = object.channel_type) != null ? _h : void 0;
|
|
11176
11205
|
message.status = (_i = object.status) != null ? _i : 0;
|
|
11177
11206
|
message.app_url = (_j = object.app_url) != null ? _j : "";
|
|
11207
|
+
message.clan_name = (_k = object.clan_name) != null ? _k : "";
|
|
11178
11208
|
return message;
|
|
11179
11209
|
}
|
|
11180
11210
|
};
|
|
@@ -14835,6 +14865,87 @@ var UserStatusEvent = {
|
|
|
14835
14865
|
return message;
|
|
14836
14866
|
}
|
|
14837
14867
|
};
|
|
14868
|
+
function createBaseJoinChannelAppData() {
|
|
14869
|
+
return { user_id: "", username: "", hash: "" };
|
|
14870
|
+
}
|
|
14871
|
+
var JoinChannelAppData = {
|
|
14872
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
|
14873
|
+
if (message.user_id !== "") {
|
|
14874
|
+
writer.uint32(10).string(message.user_id);
|
|
14875
|
+
}
|
|
14876
|
+
if (message.username !== "") {
|
|
14877
|
+
writer.uint32(18).string(message.username);
|
|
14878
|
+
}
|
|
14879
|
+
if (message.hash !== "") {
|
|
14880
|
+
writer.uint32(26).string(message.hash);
|
|
14881
|
+
}
|
|
14882
|
+
return writer;
|
|
14883
|
+
},
|
|
14884
|
+
decode(input, length) {
|
|
14885
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
|
14886
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14887
|
+
const message = createBaseJoinChannelAppData();
|
|
14888
|
+
while (reader.pos < end) {
|
|
14889
|
+
const tag = reader.uint32();
|
|
14890
|
+
switch (tag >>> 3) {
|
|
14891
|
+
case 1:
|
|
14892
|
+
if (tag !== 10) {
|
|
14893
|
+
break;
|
|
14894
|
+
}
|
|
14895
|
+
message.user_id = reader.string();
|
|
14896
|
+
continue;
|
|
14897
|
+
case 2:
|
|
14898
|
+
if (tag !== 18) {
|
|
14899
|
+
break;
|
|
14900
|
+
}
|
|
14901
|
+
message.username = reader.string();
|
|
14902
|
+
continue;
|
|
14903
|
+
case 3:
|
|
14904
|
+
if (tag !== 26) {
|
|
14905
|
+
break;
|
|
14906
|
+
}
|
|
14907
|
+
message.hash = reader.string();
|
|
14908
|
+
continue;
|
|
14909
|
+
}
|
|
14910
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14911
|
+
break;
|
|
14912
|
+
}
|
|
14913
|
+
reader.skipType(tag & 7);
|
|
14914
|
+
}
|
|
14915
|
+
return message;
|
|
14916
|
+
},
|
|
14917
|
+
fromJSON(object) {
|
|
14918
|
+
return {
|
|
14919
|
+
user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
14920
|
+
username: isSet4(object.username) ? globalThis.String(object.username) : "",
|
|
14921
|
+
hash: isSet4(object.hash) ? globalThis.String(object.hash) : ""
|
|
14922
|
+
};
|
|
14923
|
+
},
|
|
14924
|
+
toJSON(message) {
|
|
14925
|
+
const obj = {};
|
|
14926
|
+
if (message.user_id !== "") {
|
|
14927
|
+
obj.user_id = message.user_id;
|
|
14928
|
+
}
|
|
14929
|
+
if (message.username !== "") {
|
|
14930
|
+
obj.username = message.username;
|
|
14931
|
+
}
|
|
14932
|
+
if (message.hash !== "") {
|
|
14933
|
+
obj.hash = message.hash;
|
|
14934
|
+
}
|
|
14935
|
+
return obj;
|
|
14936
|
+
},
|
|
14937
|
+
create(base) {
|
|
14938
|
+
return JoinChannelAppData.fromPartial(base != null ? base : {});
|
|
14939
|
+
},
|
|
14940
|
+
fromPartial(object) {
|
|
14941
|
+
var _a, _b, _c;
|
|
14942
|
+
const message = createBaseJoinChannelAppData();
|
|
14943
|
+
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
14944
|
+
message.username = (_b = object.username) != null ? _b : "";
|
|
14945
|
+
message.hash = (_c = object.hash) != null ? _c : "";
|
|
14946
|
+
return message;
|
|
14947
|
+
}
|
|
14948
|
+
};
|
|
14838
14949
|
function toTimestamp2(date) {
|
|
14839
14950
|
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
14840
14951
|
const nanos = date.getTime() % 1e3 * 1e6;
|
|
@@ -6542,7 +6542,8 @@ function createBaseEnvelope() {
|
|
|
6542
6542
|
user_status_event: void 0,
|
|
6543
6543
|
remove_friend: void 0,
|
|
6544
6544
|
webhook_event: void 0,
|
|
6545
|
-
noti_user_channel: void 0
|
|
6545
|
+
noti_user_channel: void 0,
|
|
6546
|
+
join_channel_app_data: void 0
|
|
6546
6547
|
};
|
|
6547
6548
|
}
|
|
6548
6549
|
var Envelope = {
|
|
@@ -6763,6 +6764,9 @@ var Envelope = {
|
|
|
6763
6764
|
if (message.noti_user_channel !== void 0) {
|
|
6764
6765
|
NotificationUserChannel.encode(message.noti_user_channel, writer.uint32(578).fork()).ldelim();
|
|
6765
6766
|
}
|
|
6767
|
+
if (message.join_channel_app_data !== void 0) {
|
|
6768
|
+
JoinChannelAppData.encode(message.join_channel_app_data, writer.uint32(586).fork()).ldelim();
|
|
6769
|
+
}
|
|
6766
6770
|
return writer;
|
|
6767
6771
|
},
|
|
6768
6772
|
decode(input, length) {
|
|
@@ -7204,6 +7208,12 @@ var Envelope = {
|
|
|
7204
7208
|
}
|
|
7205
7209
|
message.noti_user_channel = NotificationUserChannel.decode(reader, reader.uint32());
|
|
7206
7210
|
continue;
|
|
7211
|
+
case 73:
|
|
7212
|
+
if (tag !== 586) {
|
|
7213
|
+
break;
|
|
7214
|
+
}
|
|
7215
|
+
message.join_channel_app_data = JoinChannelAppData.decode(reader, reader.uint32());
|
|
7216
|
+
continue;
|
|
7207
7217
|
}
|
|
7208
7218
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7209
7219
|
break;
|
|
@@ -7285,7 +7295,8 @@ var Envelope = {
|
|
|
7285
7295
|
user_status_event: isSet4(object.user_status_event) ? UserStatusEvent.fromJSON(object.user_status_event) : void 0,
|
|
7286
7296
|
remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
|
|
7287
7297
|
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
|
|
7288
|
-
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0
|
|
7298
|
+
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0,
|
|
7299
|
+
join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0
|
|
7289
7300
|
};
|
|
7290
7301
|
},
|
|
7291
7302
|
toJSON(message) {
|
|
@@ -7506,6 +7517,9 @@ var Envelope = {
|
|
|
7506
7517
|
if (message.noti_user_channel !== void 0) {
|
|
7507
7518
|
obj.noti_user_channel = NotificationUserChannel.toJSON(message.noti_user_channel);
|
|
7508
7519
|
}
|
|
7520
|
+
if (message.join_channel_app_data !== void 0) {
|
|
7521
|
+
obj.join_channel_app_data = JoinChannelAppData.toJSON(message.join_channel_app_data);
|
|
7522
|
+
}
|
|
7509
7523
|
return obj;
|
|
7510
7524
|
},
|
|
7511
7525
|
create(base) {
|
|
@@ -7586,6 +7600,7 @@ var Envelope = {
|
|
|
7586
7600
|
message.remove_friend = object.remove_friend !== void 0 && object.remove_friend !== null ? RemoveFriend.fromPartial(object.remove_friend) : void 0;
|
|
7587
7601
|
message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
|
|
7588
7602
|
message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
|
|
7603
|
+
message.join_channel_app_data = object.join_channel_app_data !== void 0 && object.join_channel_app_data !== null ? JoinChannelAppData.fromPartial(object.join_channel_app_data) : void 0;
|
|
7589
7604
|
return message;
|
|
7590
7605
|
}
|
|
7591
7606
|
};
|
|
@@ -10986,7 +11001,8 @@ function createBaseChannelCreatedEvent() {
|
|
|
10986
11001
|
channel_private: 0,
|
|
10987
11002
|
channel_type: void 0,
|
|
10988
11003
|
status: 0,
|
|
10989
|
-
app_url: ""
|
|
11004
|
+
app_url: "",
|
|
11005
|
+
clan_name: ""
|
|
10990
11006
|
};
|
|
10991
11007
|
}
|
|
10992
11008
|
var ChannelCreatedEvent = {
|
|
@@ -11021,6 +11037,9 @@ var ChannelCreatedEvent = {
|
|
|
11021
11037
|
if (message.app_url !== "") {
|
|
11022
11038
|
writer.uint32(82).string(message.app_url);
|
|
11023
11039
|
}
|
|
11040
|
+
if (message.clan_name !== "") {
|
|
11041
|
+
writer.uint32(90).string(message.clan_name);
|
|
11042
|
+
}
|
|
11024
11043
|
return writer;
|
|
11025
11044
|
},
|
|
11026
11045
|
decode(input, length) {
|
|
@@ -11090,6 +11109,12 @@ var ChannelCreatedEvent = {
|
|
|
11090
11109
|
}
|
|
11091
11110
|
message.app_url = reader.string();
|
|
11092
11111
|
continue;
|
|
11112
|
+
case 11:
|
|
11113
|
+
if (tag !== 90) {
|
|
11114
|
+
break;
|
|
11115
|
+
}
|
|
11116
|
+
message.clan_name = reader.string();
|
|
11117
|
+
continue;
|
|
11093
11118
|
}
|
|
11094
11119
|
if ((tag & 7) === 4 || tag === 0) {
|
|
11095
11120
|
break;
|
|
@@ -11109,7 +11134,8 @@ var ChannelCreatedEvent = {
|
|
|
11109
11134
|
channel_private: isSet4(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
|
|
11110
11135
|
channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : void 0,
|
|
11111
11136
|
status: isSet4(object.status) ? globalThis.Number(object.status) : 0,
|
|
11112
|
-
app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : ""
|
|
11137
|
+
app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : "",
|
|
11138
|
+
clan_name: isSet4(object.clan_name) ? globalThis.String(object.clan_name) : ""
|
|
11113
11139
|
};
|
|
11114
11140
|
},
|
|
11115
11141
|
toJSON(message) {
|
|
@@ -11144,13 +11170,16 @@ var ChannelCreatedEvent = {
|
|
|
11144
11170
|
if (message.app_url !== "") {
|
|
11145
11171
|
obj.app_url = message.app_url;
|
|
11146
11172
|
}
|
|
11173
|
+
if (message.clan_name !== "") {
|
|
11174
|
+
obj.clan_name = message.clan_name;
|
|
11175
|
+
}
|
|
11147
11176
|
return obj;
|
|
11148
11177
|
},
|
|
11149
11178
|
create(base) {
|
|
11150
11179
|
return ChannelCreatedEvent.fromPartial(base != null ? base : {});
|
|
11151
11180
|
},
|
|
11152
11181
|
fromPartial(object) {
|
|
11153
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
11182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
11154
11183
|
const message = createBaseChannelCreatedEvent();
|
|
11155
11184
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
11156
11185
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -11162,6 +11191,7 @@ var ChannelCreatedEvent = {
|
|
|
11162
11191
|
message.channel_type = (_h = object.channel_type) != null ? _h : void 0;
|
|
11163
11192
|
message.status = (_i = object.status) != null ? _i : 0;
|
|
11164
11193
|
message.app_url = (_j = object.app_url) != null ? _j : "";
|
|
11194
|
+
message.clan_name = (_k = object.clan_name) != null ? _k : "";
|
|
11165
11195
|
return message;
|
|
11166
11196
|
}
|
|
11167
11197
|
};
|
|
@@ -14822,6 +14852,87 @@ var UserStatusEvent = {
|
|
|
14822
14852
|
return message;
|
|
14823
14853
|
}
|
|
14824
14854
|
};
|
|
14855
|
+
function createBaseJoinChannelAppData() {
|
|
14856
|
+
return { user_id: "", username: "", hash: "" };
|
|
14857
|
+
}
|
|
14858
|
+
var JoinChannelAppData = {
|
|
14859
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
|
14860
|
+
if (message.user_id !== "") {
|
|
14861
|
+
writer.uint32(10).string(message.user_id);
|
|
14862
|
+
}
|
|
14863
|
+
if (message.username !== "") {
|
|
14864
|
+
writer.uint32(18).string(message.username);
|
|
14865
|
+
}
|
|
14866
|
+
if (message.hash !== "") {
|
|
14867
|
+
writer.uint32(26).string(message.hash);
|
|
14868
|
+
}
|
|
14869
|
+
return writer;
|
|
14870
|
+
},
|
|
14871
|
+
decode(input, length) {
|
|
14872
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
|
14873
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14874
|
+
const message = createBaseJoinChannelAppData();
|
|
14875
|
+
while (reader.pos < end) {
|
|
14876
|
+
const tag = reader.uint32();
|
|
14877
|
+
switch (tag >>> 3) {
|
|
14878
|
+
case 1:
|
|
14879
|
+
if (tag !== 10) {
|
|
14880
|
+
break;
|
|
14881
|
+
}
|
|
14882
|
+
message.user_id = reader.string();
|
|
14883
|
+
continue;
|
|
14884
|
+
case 2:
|
|
14885
|
+
if (tag !== 18) {
|
|
14886
|
+
break;
|
|
14887
|
+
}
|
|
14888
|
+
message.username = reader.string();
|
|
14889
|
+
continue;
|
|
14890
|
+
case 3:
|
|
14891
|
+
if (tag !== 26) {
|
|
14892
|
+
break;
|
|
14893
|
+
}
|
|
14894
|
+
message.hash = reader.string();
|
|
14895
|
+
continue;
|
|
14896
|
+
}
|
|
14897
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14898
|
+
break;
|
|
14899
|
+
}
|
|
14900
|
+
reader.skipType(tag & 7);
|
|
14901
|
+
}
|
|
14902
|
+
return message;
|
|
14903
|
+
},
|
|
14904
|
+
fromJSON(object) {
|
|
14905
|
+
return {
|
|
14906
|
+
user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
14907
|
+
username: isSet4(object.username) ? globalThis.String(object.username) : "",
|
|
14908
|
+
hash: isSet4(object.hash) ? globalThis.String(object.hash) : ""
|
|
14909
|
+
};
|
|
14910
|
+
},
|
|
14911
|
+
toJSON(message) {
|
|
14912
|
+
const obj = {};
|
|
14913
|
+
if (message.user_id !== "") {
|
|
14914
|
+
obj.user_id = message.user_id;
|
|
14915
|
+
}
|
|
14916
|
+
if (message.username !== "") {
|
|
14917
|
+
obj.username = message.username;
|
|
14918
|
+
}
|
|
14919
|
+
if (message.hash !== "") {
|
|
14920
|
+
obj.hash = message.hash;
|
|
14921
|
+
}
|
|
14922
|
+
return obj;
|
|
14923
|
+
},
|
|
14924
|
+
create(base) {
|
|
14925
|
+
return JoinChannelAppData.fromPartial(base != null ? base : {});
|
|
14926
|
+
},
|
|
14927
|
+
fromPartial(object) {
|
|
14928
|
+
var _a, _b, _c;
|
|
14929
|
+
const message = createBaseJoinChannelAppData();
|
|
14930
|
+
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
14931
|
+
message.username = (_b = object.username) != null ? _b : "";
|
|
14932
|
+
message.hash = (_c = object.hash) != null ? _c : "";
|
|
14933
|
+
return message;
|
|
14934
|
+
}
|
|
14935
|
+
};
|
|
14825
14936
|
function toTimestamp2(date) {
|
|
14826
14937
|
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
14827
14938
|
const nanos = date.getTime() % 1e3 * 1e6;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.14",
|
|
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",
|
package/rtapi/realtime.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v1.181.
|
|
4
|
-
// protoc
|
|
3
|
+
// protoc-gen-ts_proto v1.181.2
|
|
4
|
+
// protoc v3.20.3
|
|
5
5
|
// source: rtapi/realtime.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -314,6 +314,7 @@ export interface Envelope {
|
|
|
314
314
|
| undefined;
|
|
315
315
|
/** */
|
|
316
316
|
noti_user_channel?: NotificationUserChannel | undefined;
|
|
317
|
+
join_channel_app_data?: JoinChannelAppData | undefined;
|
|
317
318
|
}
|
|
318
319
|
|
|
319
320
|
export interface FollowEvent {
|
|
@@ -906,6 +907,8 @@ export interface ChannelCreatedEvent {
|
|
|
906
907
|
status: number;
|
|
907
908
|
/** app url */
|
|
908
909
|
app_url: string;
|
|
910
|
+
/** clan_name */
|
|
911
|
+
clan_name: string;
|
|
909
912
|
}
|
|
910
913
|
|
|
911
914
|
export interface RoleEvent {
|
|
@@ -1325,6 +1328,12 @@ export interface UserStatusEvent {
|
|
|
1325
1328
|
custom_status: string;
|
|
1326
1329
|
}
|
|
1327
1330
|
|
|
1331
|
+
export interface JoinChannelAppData {
|
|
1332
|
+
user_id: string;
|
|
1333
|
+
username: string;
|
|
1334
|
+
hash: string;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1328
1337
|
function createBaseEnvelope(): Envelope {
|
|
1329
1338
|
return {
|
|
1330
1339
|
cid: "",
|
|
@@ -1399,6 +1408,7 @@ function createBaseEnvelope(): Envelope {
|
|
|
1399
1408
|
remove_friend: undefined,
|
|
1400
1409
|
webhook_event: undefined,
|
|
1401
1410
|
noti_user_channel: undefined,
|
|
1411
|
+
join_channel_app_data: undefined,
|
|
1402
1412
|
};
|
|
1403
1413
|
}
|
|
1404
1414
|
|
|
@@ -1620,6 +1630,9 @@ export const Envelope = {
|
|
|
1620
1630
|
if (message.noti_user_channel !== undefined) {
|
|
1621
1631
|
NotificationUserChannel.encode(message.noti_user_channel, writer.uint32(578).fork()).ldelim();
|
|
1622
1632
|
}
|
|
1633
|
+
if (message.join_channel_app_data !== undefined) {
|
|
1634
|
+
JoinChannelAppData.encode(message.join_channel_app_data, writer.uint32(586).fork()).ldelim();
|
|
1635
|
+
}
|
|
1623
1636
|
return writer;
|
|
1624
1637
|
},
|
|
1625
1638
|
|
|
@@ -2134,6 +2147,13 @@ export const Envelope = {
|
|
|
2134
2147
|
|
|
2135
2148
|
message.noti_user_channel = NotificationUserChannel.decode(reader, reader.uint32());
|
|
2136
2149
|
continue;
|
|
2150
|
+
case 73:
|
|
2151
|
+
if (tag !== 586) {
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
message.join_channel_app_data = JoinChannelAppData.decode(reader, reader.uint32());
|
|
2156
|
+
continue;
|
|
2137
2157
|
}
|
|
2138
2158
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2139
2159
|
break;
|
|
@@ -2311,6 +2331,9 @@ export const Envelope = {
|
|
|
2311
2331
|
noti_user_channel: isSet(object.noti_user_channel)
|
|
2312
2332
|
? NotificationUserChannel.fromJSON(object.noti_user_channel)
|
|
2313
2333
|
: undefined,
|
|
2334
|
+
join_channel_app_data: isSet(object.join_channel_app_data)
|
|
2335
|
+
? JoinChannelAppData.fromJSON(object.join_channel_app_data)
|
|
2336
|
+
: undefined,
|
|
2314
2337
|
};
|
|
2315
2338
|
},
|
|
2316
2339
|
|
|
@@ -2532,6 +2555,9 @@ export const Envelope = {
|
|
|
2532
2555
|
if (message.noti_user_channel !== undefined) {
|
|
2533
2556
|
obj.noti_user_channel = NotificationUserChannel.toJSON(message.noti_user_channel);
|
|
2534
2557
|
}
|
|
2558
|
+
if (message.join_channel_app_data !== undefined) {
|
|
2559
|
+
obj.join_channel_app_data = JoinChannelAppData.toJSON(message.join_channel_app_data);
|
|
2560
|
+
}
|
|
2535
2561
|
return obj;
|
|
2536
2562
|
},
|
|
2537
2563
|
|
|
@@ -2770,6 +2796,10 @@ export const Envelope = {
|
|
|
2770
2796
|
message.noti_user_channel = (object.noti_user_channel !== undefined && object.noti_user_channel !== null)
|
|
2771
2797
|
? NotificationUserChannel.fromPartial(object.noti_user_channel)
|
|
2772
2798
|
: undefined;
|
|
2799
|
+
message.join_channel_app_data =
|
|
2800
|
+
(object.join_channel_app_data !== undefined && object.join_channel_app_data !== null)
|
|
2801
|
+
? JoinChannelAppData.fromPartial(object.join_channel_app_data)
|
|
2802
|
+
: undefined;
|
|
2773
2803
|
return message;
|
|
2774
2804
|
},
|
|
2775
2805
|
};
|
|
@@ -7230,6 +7260,7 @@ function createBaseChannelCreatedEvent(): ChannelCreatedEvent {
|
|
|
7230
7260
|
channel_type: undefined,
|
|
7231
7261
|
status: 0,
|
|
7232
7262
|
app_url: "",
|
|
7263
|
+
clan_name: "",
|
|
7233
7264
|
};
|
|
7234
7265
|
}
|
|
7235
7266
|
|
|
@@ -7265,6 +7296,9 @@ export const ChannelCreatedEvent = {
|
|
|
7265
7296
|
if (message.app_url !== "") {
|
|
7266
7297
|
writer.uint32(82).string(message.app_url);
|
|
7267
7298
|
}
|
|
7299
|
+
if (message.clan_name !== "") {
|
|
7300
|
+
writer.uint32(90).string(message.clan_name);
|
|
7301
|
+
}
|
|
7268
7302
|
return writer;
|
|
7269
7303
|
},
|
|
7270
7304
|
|
|
@@ -7345,6 +7379,13 @@ export const ChannelCreatedEvent = {
|
|
|
7345
7379
|
|
|
7346
7380
|
message.app_url = reader.string();
|
|
7347
7381
|
continue;
|
|
7382
|
+
case 11:
|
|
7383
|
+
if (tag !== 90) {
|
|
7384
|
+
break;
|
|
7385
|
+
}
|
|
7386
|
+
|
|
7387
|
+
message.clan_name = reader.string();
|
|
7388
|
+
continue;
|
|
7348
7389
|
}
|
|
7349
7390
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7350
7391
|
break;
|
|
@@ -7366,6 +7407,7 @@ export const ChannelCreatedEvent = {
|
|
|
7366
7407
|
channel_type: isSet(object.channel_type) ? Number(object.channel_type) : undefined,
|
|
7367
7408
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
7368
7409
|
app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
|
|
7410
|
+
clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
7369
7411
|
};
|
|
7370
7412
|
},
|
|
7371
7413
|
|
|
@@ -7401,6 +7443,9 @@ export const ChannelCreatedEvent = {
|
|
|
7401
7443
|
if (message.app_url !== "") {
|
|
7402
7444
|
obj.app_url = message.app_url;
|
|
7403
7445
|
}
|
|
7446
|
+
if (message.clan_name !== "") {
|
|
7447
|
+
obj.clan_name = message.clan_name;
|
|
7448
|
+
}
|
|
7404
7449
|
return obj;
|
|
7405
7450
|
},
|
|
7406
7451
|
|
|
@@ -7419,6 +7464,7 @@ export const ChannelCreatedEvent = {
|
|
|
7419
7464
|
message.channel_type = object.channel_type ?? undefined;
|
|
7420
7465
|
message.status = object.status ?? 0;
|
|
7421
7466
|
message.app_url = object.app_url ?? "";
|
|
7467
|
+
message.clan_name = object.clan_name ?? "";
|
|
7422
7468
|
return message;
|
|
7423
7469
|
},
|
|
7424
7470
|
};
|
|
@@ -11554,6 +11600,95 @@ export const UserStatusEvent = {
|
|
|
11554
11600
|
},
|
|
11555
11601
|
};
|
|
11556
11602
|
|
|
11603
|
+
function createBaseJoinChannelAppData(): JoinChannelAppData {
|
|
11604
|
+
return { user_id: "", username: "", hash: "" };
|
|
11605
|
+
}
|
|
11606
|
+
|
|
11607
|
+
export const JoinChannelAppData = {
|
|
11608
|
+
encode(message: JoinChannelAppData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
11609
|
+
if (message.user_id !== "") {
|
|
11610
|
+
writer.uint32(10).string(message.user_id);
|
|
11611
|
+
}
|
|
11612
|
+
if (message.username !== "") {
|
|
11613
|
+
writer.uint32(18).string(message.username);
|
|
11614
|
+
}
|
|
11615
|
+
if (message.hash !== "") {
|
|
11616
|
+
writer.uint32(26).string(message.hash);
|
|
11617
|
+
}
|
|
11618
|
+
return writer;
|
|
11619
|
+
},
|
|
11620
|
+
|
|
11621
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): JoinChannelAppData {
|
|
11622
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
11623
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
11624
|
+
const message = createBaseJoinChannelAppData();
|
|
11625
|
+
while (reader.pos < end) {
|
|
11626
|
+
const tag = reader.uint32();
|
|
11627
|
+
switch (tag >>> 3) {
|
|
11628
|
+
case 1:
|
|
11629
|
+
if (tag !== 10) {
|
|
11630
|
+
break;
|
|
11631
|
+
}
|
|
11632
|
+
|
|
11633
|
+
message.user_id = reader.string();
|
|
11634
|
+
continue;
|
|
11635
|
+
case 2:
|
|
11636
|
+
if (tag !== 18) {
|
|
11637
|
+
break;
|
|
11638
|
+
}
|
|
11639
|
+
|
|
11640
|
+
message.username = reader.string();
|
|
11641
|
+
continue;
|
|
11642
|
+
case 3:
|
|
11643
|
+
if (tag !== 26) {
|
|
11644
|
+
break;
|
|
11645
|
+
}
|
|
11646
|
+
|
|
11647
|
+
message.hash = reader.string();
|
|
11648
|
+
continue;
|
|
11649
|
+
}
|
|
11650
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
11651
|
+
break;
|
|
11652
|
+
}
|
|
11653
|
+
reader.skipType(tag & 7);
|
|
11654
|
+
}
|
|
11655
|
+
return message;
|
|
11656
|
+
},
|
|
11657
|
+
|
|
11658
|
+
fromJSON(object: any): JoinChannelAppData {
|
|
11659
|
+
return {
|
|
11660
|
+
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
11661
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
11662
|
+
hash: isSet(object.hash) ? globalThis.String(object.hash) : "",
|
|
11663
|
+
};
|
|
11664
|
+
},
|
|
11665
|
+
|
|
11666
|
+
toJSON(message: JoinChannelAppData): unknown {
|
|
11667
|
+
const obj: any = {};
|
|
11668
|
+
if (message.user_id !== "") {
|
|
11669
|
+
obj.user_id = message.user_id;
|
|
11670
|
+
}
|
|
11671
|
+
if (message.username !== "") {
|
|
11672
|
+
obj.username = message.username;
|
|
11673
|
+
}
|
|
11674
|
+
if (message.hash !== "") {
|
|
11675
|
+
obj.hash = message.hash;
|
|
11676
|
+
}
|
|
11677
|
+
return obj;
|
|
11678
|
+
},
|
|
11679
|
+
|
|
11680
|
+
create<I extends Exact<DeepPartial<JoinChannelAppData>, I>>(base?: I): JoinChannelAppData {
|
|
11681
|
+
return JoinChannelAppData.fromPartial(base ?? ({} as any));
|
|
11682
|
+
},
|
|
11683
|
+
fromPartial<I extends Exact<DeepPartial<JoinChannelAppData>, I>>(object: I): JoinChannelAppData {
|
|
11684
|
+
const message = createBaseJoinChannelAppData();
|
|
11685
|
+
message.user_id = object.user_id ?? "";
|
|
11686
|
+
message.username = object.username ?? "";
|
|
11687
|
+
message.hash = object.hash ?? "";
|
|
11688
|
+
return message;
|
|
11689
|
+
},
|
|
11690
|
+
};
|
|
11691
|
+
|
|
11557
11692
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
11558
11693
|
|
|
11559
11694
|
export type DeepPartial<T> = T extends Builtin ? T
|