mezon-js-protobuf 1.8.49 → 1.8.50
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 +144 -1
- package/dist/mezon-js-protobuf/api/api.d.ts +55 -0
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +416 -331
- package/dist/mezon-js-protobuf.cjs.js +126 -5
- package/dist/mezon-js-protobuf.esm.mjs +126 -5
- package/package.json +1 -1
- package/rtapi/realtime.ts +118 -1
|
@@ -4061,7 +4061,17 @@ var ChannelUserList = {
|
|
|
4061
4061
|
}
|
|
4062
4062
|
};
|
|
4063
4063
|
function createBaseChannelUserList_ChannelUser() {
|
|
4064
|
-
return {
|
|
4064
|
+
return {
|
|
4065
|
+
user_id: "",
|
|
4066
|
+
role_id: [],
|
|
4067
|
+
id: "",
|
|
4068
|
+
thread_id: "",
|
|
4069
|
+
clan_nick: "",
|
|
4070
|
+
clan_avatar: "",
|
|
4071
|
+
clan_id: "",
|
|
4072
|
+
added_by: "",
|
|
4073
|
+
is_banned: false
|
|
4074
|
+
};
|
|
4065
4075
|
}
|
|
4066
4076
|
var ChannelUserList_ChannelUser = {
|
|
4067
4077
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
@@ -4089,6 +4099,9 @@ var ChannelUserList_ChannelUser = {
|
|
|
4089
4099
|
if (message.added_by !== "") {
|
|
4090
4100
|
writer.uint32(66).string(message.added_by);
|
|
4091
4101
|
}
|
|
4102
|
+
if (message.is_banned !== false) {
|
|
4103
|
+
writer.uint32(72).bool(message.is_banned);
|
|
4104
|
+
}
|
|
4092
4105
|
return writer;
|
|
4093
4106
|
},
|
|
4094
4107
|
decode(input, length) {
|
|
@@ -4146,6 +4159,12 @@ var ChannelUserList_ChannelUser = {
|
|
|
4146
4159
|
}
|
|
4147
4160
|
message.added_by = reader.string();
|
|
4148
4161
|
continue;
|
|
4162
|
+
case 9:
|
|
4163
|
+
if (tag !== 72) {
|
|
4164
|
+
break;
|
|
4165
|
+
}
|
|
4166
|
+
message.is_banned = reader.bool();
|
|
4167
|
+
continue;
|
|
4149
4168
|
}
|
|
4150
4169
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4151
4170
|
break;
|
|
@@ -4163,7 +4182,8 @@ var ChannelUserList_ChannelUser = {
|
|
|
4163
4182
|
clan_nick: isSet3(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
|
|
4164
4183
|
clan_avatar: isSet3(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
|
|
4165
4184
|
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
4166
|
-
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : ""
|
|
4185
|
+
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : "",
|
|
4186
|
+
is_banned: isSet3(object.is_banned) ? globalThis.Boolean(object.is_banned) : false
|
|
4167
4187
|
};
|
|
4168
4188
|
},
|
|
4169
4189
|
toJSON(message) {
|
|
@@ -4193,13 +4213,16 @@ var ChannelUserList_ChannelUser = {
|
|
|
4193
4213
|
if (message.added_by !== "") {
|
|
4194
4214
|
obj.added_by = message.added_by;
|
|
4195
4215
|
}
|
|
4216
|
+
if (message.is_banned !== false) {
|
|
4217
|
+
obj.is_banned = message.is_banned;
|
|
4218
|
+
}
|
|
4196
4219
|
return obj;
|
|
4197
4220
|
},
|
|
4198
4221
|
create(base) {
|
|
4199
4222
|
return ChannelUserList_ChannelUser.fromPartial(base != null ? base : {});
|
|
4200
4223
|
},
|
|
4201
4224
|
fromPartial(object) {
|
|
4202
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4225
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4203
4226
|
const message = createBaseChannelUserList_ChannelUser();
|
|
4204
4227
|
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
4205
4228
|
message.role_id = ((_b = object.role_id) == null ? void 0 : _b.map((e) => e)) || [];
|
|
@@ -4209,6 +4232,7 @@ var ChannelUserList_ChannelUser = {
|
|
|
4209
4232
|
message.clan_avatar = (_f = object.clan_avatar) != null ? _f : "";
|
|
4210
4233
|
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
4211
4234
|
message.added_by = (_h = object.added_by) != null ? _h : "";
|
|
4235
|
+
message.is_banned = (_i = object.is_banned) != null ? _i : false;
|
|
4212
4236
|
return message;
|
|
4213
4237
|
}
|
|
4214
4238
|
};
|
|
@@ -14492,7 +14516,8 @@ function createBaseEnvelope() {
|
|
|
14492
14516
|
un_block_friend: void 0,
|
|
14493
14517
|
meet_participant_event: void 0,
|
|
14494
14518
|
transfer_ownership_event: void 0,
|
|
14495
|
-
add_friend: void 0
|
|
14519
|
+
add_friend: void 0,
|
|
14520
|
+
ban_user_event: void 0
|
|
14496
14521
|
};
|
|
14497
14522
|
}
|
|
14498
14523
|
var Envelope = {
|
|
@@ -14761,6 +14786,9 @@ var Envelope = {
|
|
|
14761
14786
|
if (message.add_friend !== void 0) {
|
|
14762
14787
|
AddFriend.encode(message.add_friend, writer.uint32(706).fork()).ldelim();
|
|
14763
14788
|
}
|
|
14789
|
+
if (message.ban_user_event !== void 0) {
|
|
14790
|
+
BannedUserEvent.encode(message.ban_user_event, writer.uint32(714).fork()).ldelim();
|
|
14791
|
+
}
|
|
14764
14792
|
return writer;
|
|
14765
14793
|
},
|
|
14766
14794
|
decode(input, length) {
|
|
@@ -15298,6 +15326,12 @@ var Envelope = {
|
|
|
15298
15326
|
}
|
|
15299
15327
|
message.add_friend = AddFriend.decode(reader, reader.uint32());
|
|
15300
15328
|
continue;
|
|
15329
|
+
case 89:
|
|
15330
|
+
if (tag !== 714) {
|
|
15331
|
+
break;
|
|
15332
|
+
}
|
|
15333
|
+
message.ban_user_event = BannedUserEvent.decode(reader, reader.uint32());
|
|
15334
|
+
continue;
|
|
15301
15335
|
}
|
|
15302
15336
|
if ((tag & 7) === 4 || tag === 0) {
|
|
15303
15337
|
break;
|
|
@@ -15395,7 +15429,8 @@ var Envelope = {
|
|
|
15395
15429
|
un_block_friend: isSet4(object.un_block_friend) ? UnblockFriend.fromJSON(object.un_block_friend) : void 0,
|
|
15396
15430
|
meet_participant_event: isSet4(object.meet_participant_event) ? MeetParticipantEvent.fromJSON(object.meet_participant_event) : void 0,
|
|
15397
15431
|
transfer_ownership_event: isSet4(object.transfer_ownership_event) ? TransferOwnershipEvent.fromJSON(object.transfer_ownership_event) : void 0,
|
|
15398
|
-
add_friend: isSet4(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : void 0
|
|
15432
|
+
add_friend: isSet4(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : void 0,
|
|
15433
|
+
ban_user_event: isSet4(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : void 0
|
|
15399
15434
|
};
|
|
15400
15435
|
},
|
|
15401
15436
|
toJSON(message) {
|
|
@@ -15666,6 +15701,9 @@ var Envelope = {
|
|
|
15666
15701
|
if (message.add_friend !== void 0) {
|
|
15667
15702
|
obj.add_friend = AddFriend.toJSON(message.add_friend);
|
|
15668
15703
|
}
|
|
15704
|
+
if (message.ban_user_event !== void 0) {
|
|
15705
|
+
obj.ban_user_event = BannedUserEvent.toJSON(message.ban_user_event);
|
|
15706
|
+
}
|
|
15669
15707
|
return obj;
|
|
15670
15708
|
},
|
|
15671
15709
|
create(base) {
|
|
@@ -15762,6 +15800,7 @@ var Envelope = {
|
|
|
15762
15800
|
message.meet_participant_event = object.meet_participant_event !== void 0 && object.meet_participant_event !== null ? MeetParticipantEvent.fromPartial(object.meet_participant_event) : void 0;
|
|
15763
15801
|
message.transfer_ownership_event = object.transfer_ownership_event !== void 0 && object.transfer_ownership_event !== null ? TransferOwnershipEvent.fromPartial(object.transfer_ownership_event) : void 0;
|
|
15764
15802
|
message.add_friend = object.add_friend !== void 0 && object.add_friend !== null ? AddFriend.fromPartial(object.add_friend) : void 0;
|
|
15803
|
+
message.ban_user_event = object.ban_user_event !== void 0 && object.ban_user_event !== null ? BannedUserEvent.fromPartial(object.ban_user_event) : void 0;
|
|
15765
15804
|
return message;
|
|
15766
15805
|
}
|
|
15767
15806
|
};
|
|
@@ -15802,6 +15841,88 @@ var FollowEvent = {
|
|
|
15802
15841
|
return message;
|
|
15803
15842
|
}
|
|
15804
15843
|
};
|
|
15844
|
+
function createBaseBannedUserEvent() {
|
|
15845
|
+
return { user_ids: [], action: 0, banner_id: "" };
|
|
15846
|
+
}
|
|
15847
|
+
var BannedUserEvent = {
|
|
15848
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
|
15849
|
+
for (const v of message.user_ids) {
|
|
15850
|
+
writer.uint32(10).string(v);
|
|
15851
|
+
}
|
|
15852
|
+
if (message.action !== 0) {
|
|
15853
|
+
writer.uint32(16).int32(message.action);
|
|
15854
|
+
}
|
|
15855
|
+
if (message.banner_id !== "") {
|
|
15856
|
+
writer.uint32(26).string(message.banner_id);
|
|
15857
|
+
}
|
|
15858
|
+
return writer;
|
|
15859
|
+
},
|
|
15860
|
+
decode(input, length) {
|
|
15861
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
|
15862
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
15863
|
+
const message = createBaseBannedUserEvent();
|
|
15864
|
+
while (reader.pos < end) {
|
|
15865
|
+
const tag = reader.uint32();
|
|
15866
|
+
switch (tag >>> 3) {
|
|
15867
|
+
case 1:
|
|
15868
|
+
if (tag !== 10) {
|
|
15869
|
+
break;
|
|
15870
|
+
}
|
|
15871
|
+
message.user_ids.push(reader.string());
|
|
15872
|
+
continue;
|
|
15873
|
+
case 2:
|
|
15874
|
+
if (tag !== 16) {
|
|
15875
|
+
break;
|
|
15876
|
+
}
|
|
15877
|
+
message.action = reader.int32();
|
|
15878
|
+
continue;
|
|
15879
|
+
case 3:
|
|
15880
|
+
if (tag !== 26) {
|
|
15881
|
+
break;
|
|
15882
|
+
}
|
|
15883
|
+
message.banner_id = reader.string();
|
|
15884
|
+
continue;
|
|
15885
|
+
}
|
|
15886
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15887
|
+
break;
|
|
15888
|
+
}
|
|
15889
|
+
reader.skipType(tag & 7);
|
|
15890
|
+
}
|
|
15891
|
+
return message;
|
|
15892
|
+
},
|
|
15893
|
+
fromJSON(object) {
|
|
15894
|
+
return {
|
|
15895
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
15896
|
+
action: isSet4(object.action) ? globalThis.Number(object.action) : 0,
|
|
15897
|
+
banner_id: isSet4(object.banner_id) ? globalThis.String(object.banner_id) : ""
|
|
15898
|
+
};
|
|
15899
|
+
},
|
|
15900
|
+
toJSON(message) {
|
|
15901
|
+
var _a;
|
|
15902
|
+
const obj = {};
|
|
15903
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
15904
|
+
obj.user_ids = message.user_ids;
|
|
15905
|
+
}
|
|
15906
|
+
if (message.action !== 0) {
|
|
15907
|
+
obj.action = Math.round(message.action);
|
|
15908
|
+
}
|
|
15909
|
+
if (message.banner_id !== "") {
|
|
15910
|
+
obj.banner_id = message.banner_id;
|
|
15911
|
+
}
|
|
15912
|
+
return obj;
|
|
15913
|
+
},
|
|
15914
|
+
create(base) {
|
|
15915
|
+
return BannedUserEvent.fromPartial(base != null ? base : {});
|
|
15916
|
+
},
|
|
15917
|
+
fromPartial(object) {
|
|
15918
|
+
var _a, _b, _c;
|
|
15919
|
+
const message = createBaseBannedUserEvent();
|
|
15920
|
+
message.user_ids = ((_a = object.user_ids) == null ? void 0 : _a.map((e) => e)) || [];
|
|
15921
|
+
message.action = (_b = object.action) != null ? _b : 0;
|
|
15922
|
+
message.banner_id = (_c = object.banner_id) != null ? _c : "";
|
|
15923
|
+
return message;
|
|
15924
|
+
}
|
|
15925
|
+
};
|
|
15805
15926
|
function createBaseChannelCanvas() {
|
|
15806
15927
|
return {
|
|
15807
15928
|
id: "",
|
|
@@ -4048,7 +4048,17 @@ var ChannelUserList = {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
};
|
|
4050
4050
|
function createBaseChannelUserList_ChannelUser() {
|
|
4051
|
-
return {
|
|
4051
|
+
return {
|
|
4052
|
+
user_id: "",
|
|
4053
|
+
role_id: [],
|
|
4054
|
+
id: "",
|
|
4055
|
+
thread_id: "",
|
|
4056
|
+
clan_nick: "",
|
|
4057
|
+
clan_avatar: "",
|
|
4058
|
+
clan_id: "",
|
|
4059
|
+
added_by: "",
|
|
4060
|
+
is_banned: false
|
|
4061
|
+
};
|
|
4052
4062
|
}
|
|
4053
4063
|
var ChannelUserList_ChannelUser = {
|
|
4054
4064
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
@@ -4076,6 +4086,9 @@ var ChannelUserList_ChannelUser = {
|
|
|
4076
4086
|
if (message.added_by !== "") {
|
|
4077
4087
|
writer.uint32(66).string(message.added_by);
|
|
4078
4088
|
}
|
|
4089
|
+
if (message.is_banned !== false) {
|
|
4090
|
+
writer.uint32(72).bool(message.is_banned);
|
|
4091
|
+
}
|
|
4079
4092
|
return writer;
|
|
4080
4093
|
},
|
|
4081
4094
|
decode(input, length) {
|
|
@@ -4133,6 +4146,12 @@ var ChannelUserList_ChannelUser = {
|
|
|
4133
4146
|
}
|
|
4134
4147
|
message.added_by = reader.string();
|
|
4135
4148
|
continue;
|
|
4149
|
+
case 9:
|
|
4150
|
+
if (tag !== 72) {
|
|
4151
|
+
break;
|
|
4152
|
+
}
|
|
4153
|
+
message.is_banned = reader.bool();
|
|
4154
|
+
continue;
|
|
4136
4155
|
}
|
|
4137
4156
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4138
4157
|
break;
|
|
@@ -4150,7 +4169,8 @@ var ChannelUserList_ChannelUser = {
|
|
|
4150
4169
|
clan_nick: isSet3(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
|
|
4151
4170
|
clan_avatar: isSet3(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
|
|
4152
4171
|
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
4153
|
-
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : ""
|
|
4172
|
+
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : "",
|
|
4173
|
+
is_banned: isSet3(object.is_banned) ? globalThis.Boolean(object.is_banned) : false
|
|
4154
4174
|
};
|
|
4155
4175
|
},
|
|
4156
4176
|
toJSON(message) {
|
|
@@ -4180,13 +4200,16 @@ var ChannelUserList_ChannelUser = {
|
|
|
4180
4200
|
if (message.added_by !== "") {
|
|
4181
4201
|
obj.added_by = message.added_by;
|
|
4182
4202
|
}
|
|
4203
|
+
if (message.is_banned !== false) {
|
|
4204
|
+
obj.is_banned = message.is_banned;
|
|
4205
|
+
}
|
|
4183
4206
|
return obj;
|
|
4184
4207
|
},
|
|
4185
4208
|
create(base) {
|
|
4186
4209
|
return ChannelUserList_ChannelUser.fromPartial(base != null ? base : {});
|
|
4187
4210
|
},
|
|
4188
4211
|
fromPartial(object) {
|
|
4189
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4212
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4190
4213
|
const message = createBaseChannelUserList_ChannelUser();
|
|
4191
4214
|
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
4192
4215
|
message.role_id = ((_b = object.role_id) == null ? void 0 : _b.map((e) => e)) || [];
|
|
@@ -4196,6 +4219,7 @@ var ChannelUserList_ChannelUser = {
|
|
|
4196
4219
|
message.clan_avatar = (_f = object.clan_avatar) != null ? _f : "";
|
|
4197
4220
|
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
4198
4221
|
message.added_by = (_h = object.added_by) != null ? _h : "";
|
|
4222
|
+
message.is_banned = (_i = object.is_banned) != null ? _i : false;
|
|
4199
4223
|
return message;
|
|
4200
4224
|
}
|
|
4201
4225
|
};
|
|
@@ -14479,7 +14503,8 @@ function createBaseEnvelope() {
|
|
|
14479
14503
|
un_block_friend: void 0,
|
|
14480
14504
|
meet_participant_event: void 0,
|
|
14481
14505
|
transfer_ownership_event: void 0,
|
|
14482
|
-
add_friend: void 0
|
|
14506
|
+
add_friend: void 0,
|
|
14507
|
+
ban_user_event: void 0
|
|
14483
14508
|
};
|
|
14484
14509
|
}
|
|
14485
14510
|
var Envelope = {
|
|
@@ -14748,6 +14773,9 @@ var Envelope = {
|
|
|
14748
14773
|
if (message.add_friend !== void 0) {
|
|
14749
14774
|
AddFriend.encode(message.add_friend, writer.uint32(706).fork()).ldelim();
|
|
14750
14775
|
}
|
|
14776
|
+
if (message.ban_user_event !== void 0) {
|
|
14777
|
+
BannedUserEvent.encode(message.ban_user_event, writer.uint32(714).fork()).ldelim();
|
|
14778
|
+
}
|
|
14751
14779
|
return writer;
|
|
14752
14780
|
},
|
|
14753
14781
|
decode(input, length) {
|
|
@@ -15285,6 +15313,12 @@ var Envelope = {
|
|
|
15285
15313
|
}
|
|
15286
15314
|
message.add_friend = AddFriend.decode(reader, reader.uint32());
|
|
15287
15315
|
continue;
|
|
15316
|
+
case 89:
|
|
15317
|
+
if (tag !== 714) {
|
|
15318
|
+
break;
|
|
15319
|
+
}
|
|
15320
|
+
message.ban_user_event = BannedUserEvent.decode(reader, reader.uint32());
|
|
15321
|
+
continue;
|
|
15288
15322
|
}
|
|
15289
15323
|
if ((tag & 7) === 4 || tag === 0) {
|
|
15290
15324
|
break;
|
|
@@ -15382,7 +15416,8 @@ var Envelope = {
|
|
|
15382
15416
|
un_block_friend: isSet4(object.un_block_friend) ? UnblockFriend.fromJSON(object.un_block_friend) : void 0,
|
|
15383
15417
|
meet_participant_event: isSet4(object.meet_participant_event) ? MeetParticipantEvent.fromJSON(object.meet_participant_event) : void 0,
|
|
15384
15418
|
transfer_ownership_event: isSet4(object.transfer_ownership_event) ? TransferOwnershipEvent.fromJSON(object.transfer_ownership_event) : void 0,
|
|
15385
|
-
add_friend: isSet4(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : void 0
|
|
15419
|
+
add_friend: isSet4(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : void 0,
|
|
15420
|
+
ban_user_event: isSet4(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : void 0
|
|
15386
15421
|
};
|
|
15387
15422
|
},
|
|
15388
15423
|
toJSON(message) {
|
|
@@ -15653,6 +15688,9 @@ var Envelope = {
|
|
|
15653
15688
|
if (message.add_friend !== void 0) {
|
|
15654
15689
|
obj.add_friend = AddFriend.toJSON(message.add_friend);
|
|
15655
15690
|
}
|
|
15691
|
+
if (message.ban_user_event !== void 0) {
|
|
15692
|
+
obj.ban_user_event = BannedUserEvent.toJSON(message.ban_user_event);
|
|
15693
|
+
}
|
|
15656
15694
|
return obj;
|
|
15657
15695
|
},
|
|
15658
15696
|
create(base) {
|
|
@@ -15749,6 +15787,7 @@ var Envelope = {
|
|
|
15749
15787
|
message.meet_participant_event = object.meet_participant_event !== void 0 && object.meet_participant_event !== null ? MeetParticipantEvent.fromPartial(object.meet_participant_event) : void 0;
|
|
15750
15788
|
message.transfer_ownership_event = object.transfer_ownership_event !== void 0 && object.transfer_ownership_event !== null ? TransferOwnershipEvent.fromPartial(object.transfer_ownership_event) : void 0;
|
|
15751
15789
|
message.add_friend = object.add_friend !== void 0 && object.add_friend !== null ? AddFriend.fromPartial(object.add_friend) : void 0;
|
|
15790
|
+
message.ban_user_event = object.ban_user_event !== void 0 && object.ban_user_event !== null ? BannedUserEvent.fromPartial(object.ban_user_event) : void 0;
|
|
15752
15791
|
return message;
|
|
15753
15792
|
}
|
|
15754
15793
|
};
|
|
@@ -15789,6 +15828,88 @@ var FollowEvent = {
|
|
|
15789
15828
|
return message;
|
|
15790
15829
|
}
|
|
15791
15830
|
};
|
|
15831
|
+
function createBaseBannedUserEvent() {
|
|
15832
|
+
return { user_ids: [], action: 0, banner_id: "" };
|
|
15833
|
+
}
|
|
15834
|
+
var BannedUserEvent = {
|
|
15835
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
|
15836
|
+
for (const v of message.user_ids) {
|
|
15837
|
+
writer.uint32(10).string(v);
|
|
15838
|
+
}
|
|
15839
|
+
if (message.action !== 0) {
|
|
15840
|
+
writer.uint32(16).int32(message.action);
|
|
15841
|
+
}
|
|
15842
|
+
if (message.banner_id !== "") {
|
|
15843
|
+
writer.uint32(26).string(message.banner_id);
|
|
15844
|
+
}
|
|
15845
|
+
return writer;
|
|
15846
|
+
},
|
|
15847
|
+
decode(input, length) {
|
|
15848
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
|
15849
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
15850
|
+
const message = createBaseBannedUserEvent();
|
|
15851
|
+
while (reader.pos < end) {
|
|
15852
|
+
const tag = reader.uint32();
|
|
15853
|
+
switch (tag >>> 3) {
|
|
15854
|
+
case 1:
|
|
15855
|
+
if (tag !== 10) {
|
|
15856
|
+
break;
|
|
15857
|
+
}
|
|
15858
|
+
message.user_ids.push(reader.string());
|
|
15859
|
+
continue;
|
|
15860
|
+
case 2:
|
|
15861
|
+
if (tag !== 16) {
|
|
15862
|
+
break;
|
|
15863
|
+
}
|
|
15864
|
+
message.action = reader.int32();
|
|
15865
|
+
continue;
|
|
15866
|
+
case 3:
|
|
15867
|
+
if (tag !== 26) {
|
|
15868
|
+
break;
|
|
15869
|
+
}
|
|
15870
|
+
message.banner_id = reader.string();
|
|
15871
|
+
continue;
|
|
15872
|
+
}
|
|
15873
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15874
|
+
break;
|
|
15875
|
+
}
|
|
15876
|
+
reader.skipType(tag & 7);
|
|
15877
|
+
}
|
|
15878
|
+
return message;
|
|
15879
|
+
},
|
|
15880
|
+
fromJSON(object) {
|
|
15881
|
+
return {
|
|
15882
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
15883
|
+
action: isSet4(object.action) ? globalThis.Number(object.action) : 0,
|
|
15884
|
+
banner_id: isSet4(object.banner_id) ? globalThis.String(object.banner_id) : ""
|
|
15885
|
+
};
|
|
15886
|
+
},
|
|
15887
|
+
toJSON(message) {
|
|
15888
|
+
var _a;
|
|
15889
|
+
const obj = {};
|
|
15890
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
15891
|
+
obj.user_ids = message.user_ids;
|
|
15892
|
+
}
|
|
15893
|
+
if (message.action !== 0) {
|
|
15894
|
+
obj.action = Math.round(message.action);
|
|
15895
|
+
}
|
|
15896
|
+
if (message.banner_id !== "") {
|
|
15897
|
+
obj.banner_id = message.banner_id;
|
|
15898
|
+
}
|
|
15899
|
+
return obj;
|
|
15900
|
+
},
|
|
15901
|
+
create(base) {
|
|
15902
|
+
return BannedUserEvent.fromPartial(base != null ? base : {});
|
|
15903
|
+
},
|
|
15904
|
+
fromPartial(object) {
|
|
15905
|
+
var _a, _b, _c;
|
|
15906
|
+
const message = createBaseBannedUserEvent();
|
|
15907
|
+
message.user_ids = ((_a = object.user_ids) == null ? void 0 : _a.map((e) => e)) || [];
|
|
15908
|
+
message.action = (_b = object.action) != null ? _b : 0;
|
|
15909
|
+
message.banner_id = (_c = object.banner_id) != null ? _c : "";
|
|
15910
|
+
return message;
|
|
15911
|
+
}
|
|
15912
|
+
};
|
|
15792
15913
|
function createBaseChannelCanvas() {
|
|
15793
15914
|
return {
|
|
15794
15915
|
id: "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.50",
|
|
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
|
@@ -440,12 +440,22 @@ export interface Envelope {
|
|
|
440
440
|
| TransferOwnershipEvent
|
|
441
441
|
| undefined;
|
|
442
442
|
/** Add friend event */
|
|
443
|
-
add_friend?:
|
|
443
|
+
add_friend?:
|
|
444
|
+
| AddFriend
|
|
445
|
+
| undefined;
|
|
446
|
+
/** Ban channel user */
|
|
447
|
+
ban_user_event?: BannedUserEvent | undefined;
|
|
444
448
|
}
|
|
445
449
|
|
|
446
450
|
export interface FollowEvent {
|
|
447
451
|
}
|
|
448
452
|
|
|
453
|
+
export interface BannedUserEvent {
|
|
454
|
+
user_ids: string[];
|
|
455
|
+
action: number;
|
|
456
|
+
banner_id: string;
|
|
457
|
+
}
|
|
458
|
+
|
|
449
459
|
export interface ChannelCanvas {
|
|
450
460
|
/** id */
|
|
451
461
|
id: string;
|
|
@@ -1818,6 +1828,7 @@ function createBaseEnvelope(): Envelope {
|
|
|
1818
1828
|
meet_participant_event: undefined,
|
|
1819
1829
|
transfer_ownership_event: undefined,
|
|
1820
1830
|
add_friend: undefined,
|
|
1831
|
+
ban_user_event: undefined,
|
|
1821
1832
|
};
|
|
1822
1833
|
}
|
|
1823
1834
|
|
|
@@ -2088,6 +2099,9 @@ export const Envelope = {
|
|
|
2088
2099
|
if (message.add_friend !== undefined) {
|
|
2089
2100
|
AddFriend.encode(message.add_friend, writer.uint32(706).fork()).ldelim();
|
|
2090
2101
|
}
|
|
2102
|
+
if (message.ban_user_event !== undefined) {
|
|
2103
|
+
BannedUserEvent.encode(message.ban_user_event, writer.uint32(714).fork()).ldelim();
|
|
2104
|
+
}
|
|
2091
2105
|
return writer;
|
|
2092
2106
|
},
|
|
2093
2107
|
|
|
@@ -2714,6 +2728,13 @@ export const Envelope = {
|
|
|
2714
2728
|
|
|
2715
2729
|
message.add_friend = AddFriend.decode(reader, reader.uint32());
|
|
2716
2730
|
continue;
|
|
2731
|
+
case 89:
|
|
2732
|
+
if (tag !== 714) {
|
|
2733
|
+
break;
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
message.ban_user_event = BannedUserEvent.decode(reader, reader.uint32());
|
|
2737
|
+
continue;
|
|
2717
2738
|
}
|
|
2718
2739
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2719
2740
|
break;
|
|
@@ -2925,6 +2946,7 @@ export const Envelope = {
|
|
|
2925
2946
|
? TransferOwnershipEvent.fromJSON(object.transfer_ownership_event)
|
|
2926
2947
|
: undefined,
|
|
2927
2948
|
add_friend: isSet(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : undefined,
|
|
2949
|
+
ban_user_event: isSet(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : undefined,
|
|
2928
2950
|
};
|
|
2929
2951
|
},
|
|
2930
2952
|
|
|
@@ -3196,6 +3218,9 @@ export const Envelope = {
|
|
|
3196
3218
|
if (message.add_friend !== undefined) {
|
|
3197
3219
|
obj.add_friend = AddFriend.toJSON(message.add_friend);
|
|
3198
3220
|
}
|
|
3221
|
+
if (message.ban_user_event !== undefined) {
|
|
3222
|
+
obj.ban_user_event = BannedUserEvent.toJSON(message.ban_user_event);
|
|
3223
|
+
}
|
|
3199
3224
|
return obj;
|
|
3200
3225
|
},
|
|
3201
3226
|
|
|
@@ -3487,6 +3512,9 @@ export const Envelope = {
|
|
|
3487
3512
|
message.add_friend = (object.add_friend !== undefined && object.add_friend !== null)
|
|
3488
3513
|
? AddFriend.fromPartial(object.add_friend)
|
|
3489
3514
|
: undefined;
|
|
3515
|
+
message.ban_user_event = (object.ban_user_event !== undefined && object.ban_user_event !== null)
|
|
3516
|
+
? BannedUserEvent.fromPartial(object.ban_user_event)
|
|
3517
|
+
: undefined;
|
|
3490
3518
|
return message;
|
|
3491
3519
|
},
|
|
3492
3520
|
};
|
|
@@ -3534,6 +3562,95 @@ export const FollowEvent = {
|
|
|
3534
3562
|
},
|
|
3535
3563
|
};
|
|
3536
3564
|
|
|
3565
|
+
function createBaseBannedUserEvent(): BannedUserEvent {
|
|
3566
|
+
return { user_ids: [], action: 0, banner_id: "" };
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
export const BannedUserEvent = {
|
|
3570
|
+
encode(message: BannedUserEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3571
|
+
for (const v of message.user_ids) {
|
|
3572
|
+
writer.uint32(10).string(v!);
|
|
3573
|
+
}
|
|
3574
|
+
if (message.action !== 0) {
|
|
3575
|
+
writer.uint32(16).int32(message.action);
|
|
3576
|
+
}
|
|
3577
|
+
if (message.banner_id !== "") {
|
|
3578
|
+
writer.uint32(26).string(message.banner_id);
|
|
3579
|
+
}
|
|
3580
|
+
return writer;
|
|
3581
|
+
},
|
|
3582
|
+
|
|
3583
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BannedUserEvent {
|
|
3584
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3585
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3586
|
+
const message = createBaseBannedUserEvent();
|
|
3587
|
+
while (reader.pos < end) {
|
|
3588
|
+
const tag = reader.uint32();
|
|
3589
|
+
switch (tag >>> 3) {
|
|
3590
|
+
case 1:
|
|
3591
|
+
if (tag !== 10) {
|
|
3592
|
+
break;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
message.user_ids.push(reader.string());
|
|
3596
|
+
continue;
|
|
3597
|
+
case 2:
|
|
3598
|
+
if (tag !== 16) {
|
|
3599
|
+
break;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
message.action = reader.int32();
|
|
3603
|
+
continue;
|
|
3604
|
+
case 3:
|
|
3605
|
+
if (tag !== 26) {
|
|
3606
|
+
break;
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
message.banner_id = reader.string();
|
|
3610
|
+
continue;
|
|
3611
|
+
}
|
|
3612
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3613
|
+
break;
|
|
3614
|
+
}
|
|
3615
|
+
reader.skipType(tag & 7);
|
|
3616
|
+
}
|
|
3617
|
+
return message;
|
|
3618
|
+
},
|
|
3619
|
+
|
|
3620
|
+
fromJSON(object: any): BannedUserEvent {
|
|
3621
|
+
return {
|
|
3622
|
+
user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
|
|
3623
|
+
action: isSet(object.action) ? globalThis.Number(object.action) : 0,
|
|
3624
|
+
banner_id: isSet(object.banner_id) ? globalThis.String(object.banner_id) : "",
|
|
3625
|
+
};
|
|
3626
|
+
},
|
|
3627
|
+
|
|
3628
|
+
toJSON(message: BannedUserEvent): unknown {
|
|
3629
|
+
const obj: any = {};
|
|
3630
|
+
if (message.user_ids?.length) {
|
|
3631
|
+
obj.user_ids = message.user_ids;
|
|
3632
|
+
}
|
|
3633
|
+
if (message.action !== 0) {
|
|
3634
|
+
obj.action = Math.round(message.action);
|
|
3635
|
+
}
|
|
3636
|
+
if (message.banner_id !== "") {
|
|
3637
|
+
obj.banner_id = message.banner_id;
|
|
3638
|
+
}
|
|
3639
|
+
return obj;
|
|
3640
|
+
},
|
|
3641
|
+
|
|
3642
|
+
create<I extends Exact<DeepPartial<BannedUserEvent>, I>>(base?: I): BannedUserEvent {
|
|
3643
|
+
return BannedUserEvent.fromPartial(base ?? ({} as any));
|
|
3644
|
+
},
|
|
3645
|
+
fromPartial<I extends Exact<DeepPartial<BannedUserEvent>, I>>(object: I): BannedUserEvent {
|
|
3646
|
+
const message = createBaseBannedUserEvent();
|
|
3647
|
+
message.user_ids = object.user_ids?.map((e) => e) || [];
|
|
3648
|
+
message.action = object.action ?? 0;
|
|
3649
|
+
message.banner_id = object.banner_id ?? "";
|
|
3650
|
+
return message;
|
|
3651
|
+
},
|
|
3652
|
+
};
|
|
3653
|
+
|
|
3537
3654
|
function createBaseChannelCanvas(): ChannelCanvas {
|
|
3538
3655
|
return {
|
|
3539
3656
|
id: "",
|