mezon-js-protobuf 1.8.22 → 1.8.24
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 +200 -275
- package/dist/mezon-js-protobuf/api/api.d.ts +129 -148
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +695 -593
- package/dist/mezon-js-protobuf.cjs.js +84 -9
- package/dist/mezon-js-protobuf.esm.mjs +84 -9
- package/package.json +1 -1
- package/rtapi/realtime.ts +36 -0
|
@@ -4061,7 +4061,7 @@ var ChannelUserList = {
|
|
|
4061
4061
|
}
|
|
4062
4062
|
};
|
|
4063
4063
|
function createBaseChannelUserList_ChannelUser() {
|
|
4064
|
-
return { user_id: "", role_id: [], id: "", thread_id: "", clan_nick: "", clan_avatar: "", clan_id: "" };
|
|
4064
|
+
return { user_id: "", role_id: [], id: "", thread_id: "", clan_nick: "", clan_avatar: "", clan_id: "", added_by: "" };
|
|
4065
4065
|
}
|
|
4066
4066
|
var ChannelUserList_ChannelUser = {
|
|
4067
4067
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
@@ -4086,6 +4086,9 @@ var ChannelUserList_ChannelUser = {
|
|
|
4086
4086
|
if (message.clan_id !== "") {
|
|
4087
4087
|
writer.uint32(58).string(message.clan_id);
|
|
4088
4088
|
}
|
|
4089
|
+
if (message.added_by !== "") {
|
|
4090
|
+
writer.uint32(66).string(message.added_by);
|
|
4091
|
+
}
|
|
4089
4092
|
return writer;
|
|
4090
4093
|
},
|
|
4091
4094
|
decode(input, length) {
|
|
@@ -4137,6 +4140,12 @@ var ChannelUserList_ChannelUser = {
|
|
|
4137
4140
|
}
|
|
4138
4141
|
message.clan_id = reader.string();
|
|
4139
4142
|
continue;
|
|
4143
|
+
case 8:
|
|
4144
|
+
if (tag !== 66) {
|
|
4145
|
+
break;
|
|
4146
|
+
}
|
|
4147
|
+
message.added_by = reader.string();
|
|
4148
|
+
continue;
|
|
4140
4149
|
}
|
|
4141
4150
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4142
4151
|
break;
|
|
@@ -4153,7 +4162,8 @@ var ChannelUserList_ChannelUser = {
|
|
|
4153
4162
|
thread_id: isSet3(object.thread_id) ? globalThis.String(object.thread_id) : "",
|
|
4154
4163
|
clan_nick: isSet3(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
|
|
4155
4164
|
clan_avatar: isSet3(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
|
|
4156
|
-
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : ""
|
|
4165
|
+
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
4166
|
+
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : ""
|
|
4157
4167
|
};
|
|
4158
4168
|
},
|
|
4159
4169
|
toJSON(message) {
|
|
@@ -4180,13 +4190,16 @@ var ChannelUserList_ChannelUser = {
|
|
|
4180
4190
|
if (message.clan_id !== "") {
|
|
4181
4191
|
obj.clan_id = message.clan_id;
|
|
4182
4192
|
}
|
|
4193
|
+
if (message.added_by !== "") {
|
|
4194
|
+
obj.added_by = message.added_by;
|
|
4195
|
+
}
|
|
4183
4196
|
return obj;
|
|
4184
4197
|
},
|
|
4185
4198
|
create(base) {
|
|
4186
4199
|
return ChannelUserList_ChannelUser.fromPartial(base != null ? base : {});
|
|
4187
4200
|
},
|
|
4188
4201
|
fromPartial(object) {
|
|
4189
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
4202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4190
4203
|
const message = createBaseChannelUserList_ChannelUser();
|
|
4191
4204
|
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
4192
4205
|
message.role_id = ((_b = object.role_id) == null ? void 0 : _b.map((e) => e)) || [];
|
|
@@ -4195,6 +4208,7 @@ var ChannelUserList_ChannelUser = {
|
|
|
4195
4208
|
message.clan_nick = (_e = object.clan_nick) != null ? _e : "";
|
|
4196
4209
|
message.clan_avatar = (_f = object.clan_avatar) != null ? _f : "";
|
|
4197
4210
|
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
4211
|
+
message.added_by = (_h = object.added_by) != null ? _h : "";
|
|
4198
4212
|
return message;
|
|
4199
4213
|
}
|
|
4200
4214
|
};
|
|
@@ -6362,7 +6376,9 @@ function createBaseClanDesc() {
|
|
|
6362
6376
|
is_onboarding: false,
|
|
6363
6377
|
welcome_channel_id: "",
|
|
6364
6378
|
onboarding_banner: "",
|
|
6365
|
-
clan_order: 0
|
|
6379
|
+
clan_order: 0,
|
|
6380
|
+
is_community: false,
|
|
6381
|
+
community_banner: ""
|
|
6366
6382
|
};
|
|
6367
6383
|
}
|
|
6368
6384
|
var ClanDesc = {
|
|
@@ -6400,6 +6416,12 @@ var ClanDesc = {
|
|
|
6400
6416
|
if (message.clan_order !== 0) {
|
|
6401
6417
|
writer.uint32(88).int32(message.clan_order);
|
|
6402
6418
|
}
|
|
6419
|
+
if (message.is_community !== false) {
|
|
6420
|
+
writer.uint32(96).bool(message.is_community);
|
|
6421
|
+
}
|
|
6422
|
+
if (message.community_banner !== "") {
|
|
6423
|
+
writer.uint32(106).string(message.community_banner);
|
|
6424
|
+
}
|
|
6403
6425
|
return writer;
|
|
6404
6426
|
},
|
|
6405
6427
|
decode(input, length) {
|
|
@@ -6475,6 +6497,18 @@ var ClanDesc = {
|
|
|
6475
6497
|
}
|
|
6476
6498
|
message.clan_order = reader.int32();
|
|
6477
6499
|
continue;
|
|
6500
|
+
case 12:
|
|
6501
|
+
if (tag !== 96) {
|
|
6502
|
+
break;
|
|
6503
|
+
}
|
|
6504
|
+
message.is_community = reader.bool();
|
|
6505
|
+
continue;
|
|
6506
|
+
case 13:
|
|
6507
|
+
if (tag !== 106) {
|
|
6508
|
+
break;
|
|
6509
|
+
}
|
|
6510
|
+
message.community_banner = reader.string();
|
|
6511
|
+
continue;
|
|
6478
6512
|
}
|
|
6479
6513
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6480
6514
|
break;
|
|
@@ -6495,7 +6529,9 @@ var ClanDesc = {
|
|
|
6495
6529
|
is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
|
|
6496
6530
|
welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
|
|
6497
6531
|
onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
|
|
6498
|
-
clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0
|
|
6532
|
+
clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0,
|
|
6533
|
+
is_community: isSet3(object.is_community) ? globalThis.Boolean(object.is_community) : false,
|
|
6534
|
+
community_banner: isSet3(object.community_banner) ? globalThis.String(object.community_banner) : ""
|
|
6499
6535
|
};
|
|
6500
6536
|
},
|
|
6501
6537
|
toJSON(message) {
|
|
@@ -6533,13 +6569,19 @@ var ClanDesc = {
|
|
|
6533
6569
|
if (message.clan_order !== 0) {
|
|
6534
6570
|
obj.clan_order = Math.round(message.clan_order);
|
|
6535
6571
|
}
|
|
6572
|
+
if (message.is_community !== false) {
|
|
6573
|
+
obj.is_community = message.is_community;
|
|
6574
|
+
}
|
|
6575
|
+
if (message.community_banner !== "") {
|
|
6576
|
+
obj.community_banner = message.community_banner;
|
|
6577
|
+
}
|
|
6536
6578
|
return obj;
|
|
6537
6579
|
},
|
|
6538
6580
|
create(base) {
|
|
6539
6581
|
return ClanDesc.fromPartial(base != null ? base : {});
|
|
6540
6582
|
},
|
|
6541
6583
|
fromPartial(object) {
|
|
6542
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
6584
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
6543
6585
|
const message = createBaseClanDesc();
|
|
6544
6586
|
message.creator_id = (_a = object.creator_id) != null ? _a : "";
|
|
6545
6587
|
message.clan_name = (_b = object.clan_name) != null ? _b : "";
|
|
@@ -6552,6 +6594,8 @@ var ClanDesc = {
|
|
|
6552
6594
|
message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
|
|
6553
6595
|
message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
|
|
6554
6596
|
message.clan_order = (_k = object.clan_order) != null ? _k : 0;
|
|
6597
|
+
message.is_community = (_l = object.is_community) != null ? _l : false;
|
|
6598
|
+
message.community_banner = (_m = object.community_banner) != null ? _m : "";
|
|
6555
6599
|
return message;
|
|
6556
6600
|
}
|
|
6557
6601
|
};
|
|
@@ -20457,7 +20501,9 @@ function createBaseChannelUpdatedEvent() {
|
|
|
20457
20501
|
topic: "",
|
|
20458
20502
|
age_restricted: 0,
|
|
20459
20503
|
active: 0,
|
|
20460
|
-
count_mess_unread: 0
|
|
20504
|
+
count_mess_unread: 0,
|
|
20505
|
+
user_ids: [],
|
|
20506
|
+
role_ids: []
|
|
20461
20507
|
};
|
|
20462
20508
|
}
|
|
20463
20509
|
var ChannelUpdatedEvent = {
|
|
@@ -20513,6 +20559,12 @@ var ChannelUpdatedEvent = {
|
|
|
20513
20559
|
if (message.count_mess_unread !== 0) {
|
|
20514
20560
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
20515
20561
|
}
|
|
20562
|
+
for (const v of message.user_ids) {
|
|
20563
|
+
writer.uint32(146).string(v);
|
|
20564
|
+
}
|
|
20565
|
+
for (const v of message.role_ids) {
|
|
20566
|
+
writer.uint32(154).string(v);
|
|
20567
|
+
}
|
|
20516
20568
|
return writer;
|
|
20517
20569
|
},
|
|
20518
20570
|
decode(input, length) {
|
|
@@ -20624,6 +20676,18 @@ var ChannelUpdatedEvent = {
|
|
|
20624
20676
|
}
|
|
20625
20677
|
message.count_mess_unread = reader.int32();
|
|
20626
20678
|
continue;
|
|
20679
|
+
case 18:
|
|
20680
|
+
if (tag !== 146) {
|
|
20681
|
+
break;
|
|
20682
|
+
}
|
|
20683
|
+
message.user_ids.push(reader.string());
|
|
20684
|
+
continue;
|
|
20685
|
+
case 19:
|
|
20686
|
+
if (tag !== 154) {
|
|
20687
|
+
break;
|
|
20688
|
+
}
|
|
20689
|
+
message.role_ids.push(reader.string());
|
|
20690
|
+
continue;
|
|
20627
20691
|
}
|
|
20628
20692
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20629
20693
|
break;
|
|
@@ -20650,10 +20714,13 @@ var ChannelUpdatedEvent = {
|
|
|
20650
20714
|
topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
|
|
20651
20715
|
age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
20652
20716
|
active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
|
|
20653
|
-
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
|
|
20717
|
+
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
20718
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
20719
|
+
role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
|
|
20654
20720
|
};
|
|
20655
20721
|
},
|
|
20656
20722
|
toJSON(message) {
|
|
20723
|
+
var _a, _b;
|
|
20657
20724
|
const obj = {};
|
|
20658
20725
|
if (message.clan_id !== "") {
|
|
20659
20726
|
obj.clan_id = message.clan_id;
|
|
@@ -20706,13 +20773,19 @@ var ChannelUpdatedEvent = {
|
|
|
20706
20773
|
if (message.count_mess_unread !== 0) {
|
|
20707
20774
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
20708
20775
|
}
|
|
20776
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
20777
|
+
obj.user_ids = message.user_ids;
|
|
20778
|
+
}
|
|
20779
|
+
if ((_b = message.role_ids) == null ? void 0 : _b.length) {
|
|
20780
|
+
obj.role_ids = message.role_ids;
|
|
20781
|
+
}
|
|
20709
20782
|
return obj;
|
|
20710
20783
|
},
|
|
20711
20784
|
create(base) {
|
|
20712
20785
|
return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
|
|
20713
20786
|
},
|
|
20714
20787
|
fromPartial(object) {
|
|
20715
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
20788
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
20716
20789
|
const message = createBaseChannelUpdatedEvent();
|
|
20717
20790
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
20718
20791
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -20731,6 +20804,8 @@ var ChannelUpdatedEvent = {
|
|
|
20731
20804
|
message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
|
|
20732
20805
|
message.active = (_p = object.active) != null ? _p : 0;
|
|
20733
20806
|
message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
|
|
20807
|
+
message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
|
|
20808
|
+
message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
|
|
20734
20809
|
return message;
|
|
20735
20810
|
}
|
|
20736
20811
|
};
|
|
@@ -4048,7 +4048,7 @@ var ChannelUserList = {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
};
|
|
4050
4050
|
function createBaseChannelUserList_ChannelUser() {
|
|
4051
|
-
return { user_id: "", role_id: [], id: "", thread_id: "", clan_nick: "", clan_avatar: "", clan_id: "" };
|
|
4051
|
+
return { user_id: "", role_id: [], id: "", thread_id: "", clan_nick: "", clan_avatar: "", clan_id: "", added_by: "" };
|
|
4052
4052
|
}
|
|
4053
4053
|
var ChannelUserList_ChannelUser = {
|
|
4054
4054
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
@@ -4073,6 +4073,9 @@ var ChannelUserList_ChannelUser = {
|
|
|
4073
4073
|
if (message.clan_id !== "") {
|
|
4074
4074
|
writer.uint32(58).string(message.clan_id);
|
|
4075
4075
|
}
|
|
4076
|
+
if (message.added_by !== "") {
|
|
4077
|
+
writer.uint32(66).string(message.added_by);
|
|
4078
|
+
}
|
|
4076
4079
|
return writer;
|
|
4077
4080
|
},
|
|
4078
4081
|
decode(input, length) {
|
|
@@ -4124,6 +4127,12 @@ var ChannelUserList_ChannelUser = {
|
|
|
4124
4127
|
}
|
|
4125
4128
|
message.clan_id = reader.string();
|
|
4126
4129
|
continue;
|
|
4130
|
+
case 8:
|
|
4131
|
+
if (tag !== 66) {
|
|
4132
|
+
break;
|
|
4133
|
+
}
|
|
4134
|
+
message.added_by = reader.string();
|
|
4135
|
+
continue;
|
|
4127
4136
|
}
|
|
4128
4137
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4129
4138
|
break;
|
|
@@ -4140,7 +4149,8 @@ var ChannelUserList_ChannelUser = {
|
|
|
4140
4149
|
thread_id: isSet3(object.thread_id) ? globalThis.String(object.thread_id) : "",
|
|
4141
4150
|
clan_nick: isSet3(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
|
|
4142
4151
|
clan_avatar: isSet3(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
|
|
4143
|
-
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : ""
|
|
4152
|
+
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
4153
|
+
added_by: isSet3(object.added_by) ? globalThis.String(object.added_by) : ""
|
|
4144
4154
|
};
|
|
4145
4155
|
},
|
|
4146
4156
|
toJSON(message) {
|
|
@@ -4167,13 +4177,16 @@ var ChannelUserList_ChannelUser = {
|
|
|
4167
4177
|
if (message.clan_id !== "") {
|
|
4168
4178
|
obj.clan_id = message.clan_id;
|
|
4169
4179
|
}
|
|
4180
|
+
if (message.added_by !== "") {
|
|
4181
|
+
obj.added_by = message.added_by;
|
|
4182
|
+
}
|
|
4170
4183
|
return obj;
|
|
4171
4184
|
},
|
|
4172
4185
|
create(base) {
|
|
4173
4186
|
return ChannelUserList_ChannelUser.fromPartial(base != null ? base : {});
|
|
4174
4187
|
},
|
|
4175
4188
|
fromPartial(object) {
|
|
4176
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
4189
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4177
4190
|
const message = createBaseChannelUserList_ChannelUser();
|
|
4178
4191
|
message.user_id = (_a = object.user_id) != null ? _a : "";
|
|
4179
4192
|
message.role_id = ((_b = object.role_id) == null ? void 0 : _b.map((e) => e)) || [];
|
|
@@ -4182,6 +4195,7 @@ var ChannelUserList_ChannelUser = {
|
|
|
4182
4195
|
message.clan_nick = (_e = object.clan_nick) != null ? _e : "";
|
|
4183
4196
|
message.clan_avatar = (_f = object.clan_avatar) != null ? _f : "";
|
|
4184
4197
|
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
4198
|
+
message.added_by = (_h = object.added_by) != null ? _h : "";
|
|
4185
4199
|
return message;
|
|
4186
4200
|
}
|
|
4187
4201
|
};
|
|
@@ -6349,7 +6363,9 @@ function createBaseClanDesc() {
|
|
|
6349
6363
|
is_onboarding: false,
|
|
6350
6364
|
welcome_channel_id: "",
|
|
6351
6365
|
onboarding_banner: "",
|
|
6352
|
-
clan_order: 0
|
|
6366
|
+
clan_order: 0,
|
|
6367
|
+
is_community: false,
|
|
6368
|
+
community_banner: ""
|
|
6353
6369
|
};
|
|
6354
6370
|
}
|
|
6355
6371
|
var ClanDesc = {
|
|
@@ -6387,6 +6403,12 @@ var ClanDesc = {
|
|
|
6387
6403
|
if (message.clan_order !== 0) {
|
|
6388
6404
|
writer.uint32(88).int32(message.clan_order);
|
|
6389
6405
|
}
|
|
6406
|
+
if (message.is_community !== false) {
|
|
6407
|
+
writer.uint32(96).bool(message.is_community);
|
|
6408
|
+
}
|
|
6409
|
+
if (message.community_banner !== "") {
|
|
6410
|
+
writer.uint32(106).string(message.community_banner);
|
|
6411
|
+
}
|
|
6390
6412
|
return writer;
|
|
6391
6413
|
},
|
|
6392
6414
|
decode(input, length) {
|
|
@@ -6462,6 +6484,18 @@ var ClanDesc = {
|
|
|
6462
6484
|
}
|
|
6463
6485
|
message.clan_order = reader.int32();
|
|
6464
6486
|
continue;
|
|
6487
|
+
case 12:
|
|
6488
|
+
if (tag !== 96) {
|
|
6489
|
+
break;
|
|
6490
|
+
}
|
|
6491
|
+
message.is_community = reader.bool();
|
|
6492
|
+
continue;
|
|
6493
|
+
case 13:
|
|
6494
|
+
if (tag !== 106) {
|
|
6495
|
+
break;
|
|
6496
|
+
}
|
|
6497
|
+
message.community_banner = reader.string();
|
|
6498
|
+
continue;
|
|
6465
6499
|
}
|
|
6466
6500
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6467
6501
|
break;
|
|
@@ -6482,7 +6516,9 @@ var ClanDesc = {
|
|
|
6482
6516
|
is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
|
|
6483
6517
|
welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
|
|
6484
6518
|
onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
|
|
6485
|
-
clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0
|
|
6519
|
+
clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0,
|
|
6520
|
+
is_community: isSet3(object.is_community) ? globalThis.Boolean(object.is_community) : false,
|
|
6521
|
+
community_banner: isSet3(object.community_banner) ? globalThis.String(object.community_banner) : ""
|
|
6486
6522
|
};
|
|
6487
6523
|
},
|
|
6488
6524
|
toJSON(message) {
|
|
@@ -6520,13 +6556,19 @@ var ClanDesc = {
|
|
|
6520
6556
|
if (message.clan_order !== 0) {
|
|
6521
6557
|
obj.clan_order = Math.round(message.clan_order);
|
|
6522
6558
|
}
|
|
6559
|
+
if (message.is_community !== false) {
|
|
6560
|
+
obj.is_community = message.is_community;
|
|
6561
|
+
}
|
|
6562
|
+
if (message.community_banner !== "") {
|
|
6563
|
+
obj.community_banner = message.community_banner;
|
|
6564
|
+
}
|
|
6523
6565
|
return obj;
|
|
6524
6566
|
},
|
|
6525
6567
|
create(base) {
|
|
6526
6568
|
return ClanDesc.fromPartial(base != null ? base : {});
|
|
6527
6569
|
},
|
|
6528
6570
|
fromPartial(object) {
|
|
6529
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
6571
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
6530
6572
|
const message = createBaseClanDesc();
|
|
6531
6573
|
message.creator_id = (_a = object.creator_id) != null ? _a : "";
|
|
6532
6574
|
message.clan_name = (_b = object.clan_name) != null ? _b : "";
|
|
@@ -6539,6 +6581,8 @@ var ClanDesc = {
|
|
|
6539
6581
|
message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
|
|
6540
6582
|
message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
|
|
6541
6583
|
message.clan_order = (_k = object.clan_order) != null ? _k : 0;
|
|
6584
|
+
message.is_community = (_l = object.is_community) != null ? _l : false;
|
|
6585
|
+
message.community_banner = (_m = object.community_banner) != null ? _m : "";
|
|
6542
6586
|
return message;
|
|
6543
6587
|
}
|
|
6544
6588
|
};
|
|
@@ -20444,7 +20488,9 @@ function createBaseChannelUpdatedEvent() {
|
|
|
20444
20488
|
topic: "",
|
|
20445
20489
|
age_restricted: 0,
|
|
20446
20490
|
active: 0,
|
|
20447
|
-
count_mess_unread: 0
|
|
20491
|
+
count_mess_unread: 0,
|
|
20492
|
+
user_ids: [],
|
|
20493
|
+
role_ids: []
|
|
20448
20494
|
};
|
|
20449
20495
|
}
|
|
20450
20496
|
var ChannelUpdatedEvent = {
|
|
@@ -20500,6 +20546,12 @@ var ChannelUpdatedEvent = {
|
|
|
20500
20546
|
if (message.count_mess_unread !== 0) {
|
|
20501
20547
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
20502
20548
|
}
|
|
20549
|
+
for (const v of message.user_ids) {
|
|
20550
|
+
writer.uint32(146).string(v);
|
|
20551
|
+
}
|
|
20552
|
+
for (const v of message.role_ids) {
|
|
20553
|
+
writer.uint32(154).string(v);
|
|
20554
|
+
}
|
|
20503
20555
|
return writer;
|
|
20504
20556
|
},
|
|
20505
20557
|
decode(input, length) {
|
|
@@ -20611,6 +20663,18 @@ var ChannelUpdatedEvent = {
|
|
|
20611
20663
|
}
|
|
20612
20664
|
message.count_mess_unread = reader.int32();
|
|
20613
20665
|
continue;
|
|
20666
|
+
case 18:
|
|
20667
|
+
if (tag !== 146) {
|
|
20668
|
+
break;
|
|
20669
|
+
}
|
|
20670
|
+
message.user_ids.push(reader.string());
|
|
20671
|
+
continue;
|
|
20672
|
+
case 19:
|
|
20673
|
+
if (tag !== 154) {
|
|
20674
|
+
break;
|
|
20675
|
+
}
|
|
20676
|
+
message.role_ids.push(reader.string());
|
|
20677
|
+
continue;
|
|
20614
20678
|
}
|
|
20615
20679
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20616
20680
|
break;
|
|
@@ -20637,10 +20701,13 @@ var ChannelUpdatedEvent = {
|
|
|
20637
20701
|
topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
|
|
20638
20702
|
age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
20639
20703
|
active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
|
|
20640
|
-
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
|
|
20704
|
+
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
20705
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
20706
|
+
role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
|
|
20641
20707
|
};
|
|
20642
20708
|
},
|
|
20643
20709
|
toJSON(message) {
|
|
20710
|
+
var _a, _b;
|
|
20644
20711
|
const obj = {};
|
|
20645
20712
|
if (message.clan_id !== "") {
|
|
20646
20713
|
obj.clan_id = message.clan_id;
|
|
@@ -20693,13 +20760,19 @@ var ChannelUpdatedEvent = {
|
|
|
20693
20760
|
if (message.count_mess_unread !== 0) {
|
|
20694
20761
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
20695
20762
|
}
|
|
20763
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
20764
|
+
obj.user_ids = message.user_ids;
|
|
20765
|
+
}
|
|
20766
|
+
if ((_b = message.role_ids) == null ? void 0 : _b.length) {
|
|
20767
|
+
obj.role_ids = message.role_ids;
|
|
20768
|
+
}
|
|
20696
20769
|
return obj;
|
|
20697
20770
|
},
|
|
20698
20771
|
create(base) {
|
|
20699
20772
|
return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
|
|
20700
20773
|
},
|
|
20701
20774
|
fromPartial(object) {
|
|
20702
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
20775
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
20703
20776
|
const message = createBaseChannelUpdatedEvent();
|
|
20704
20777
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
20705
20778
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -20718,6 +20791,8 @@ var ChannelUpdatedEvent = {
|
|
|
20718
20791
|
message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
|
|
20719
20792
|
message.active = (_p = object.active) != null ? _p : 0;
|
|
20720
20793
|
message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
|
|
20794
|
+
message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
|
|
20795
|
+
message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
|
|
20721
20796
|
return message;
|
|
20722
20797
|
}
|
|
20723
20798
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.24",
|
|
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
|
@@ -1210,6 +1210,10 @@ export interface ChannelUpdatedEvent {
|
|
|
1210
1210
|
active: number;
|
|
1211
1211
|
/** count message unread */
|
|
1212
1212
|
count_mess_unread: number;
|
|
1213
|
+
/** The users to add. */
|
|
1214
|
+
user_ids: string[];
|
|
1215
|
+
/** This is the role that needs to be added to the channel */
|
|
1216
|
+
role_ids: string[];
|
|
1213
1217
|
}
|
|
1214
1218
|
|
|
1215
1219
|
/** Stop receiving status updates for some set of users. */
|
|
@@ -9569,6 +9573,8 @@ function createBaseChannelUpdatedEvent(): ChannelUpdatedEvent {
|
|
|
9569
9573
|
age_restricted: 0,
|
|
9570
9574
|
active: 0,
|
|
9571
9575
|
count_mess_unread: 0,
|
|
9576
|
+
user_ids: [],
|
|
9577
|
+
role_ids: [],
|
|
9572
9578
|
};
|
|
9573
9579
|
}
|
|
9574
9580
|
|
|
@@ -9625,6 +9631,12 @@ export const ChannelUpdatedEvent = {
|
|
|
9625
9631
|
if (message.count_mess_unread !== 0) {
|
|
9626
9632
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
9627
9633
|
}
|
|
9634
|
+
for (const v of message.user_ids) {
|
|
9635
|
+
writer.uint32(146).string(v!);
|
|
9636
|
+
}
|
|
9637
|
+
for (const v of message.role_ids) {
|
|
9638
|
+
writer.uint32(154).string(v!);
|
|
9639
|
+
}
|
|
9628
9640
|
return writer;
|
|
9629
9641
|
},
|
|
9630
9642
|
|
|
@@ -9754,6 +9766,20 @@ export const ChannelUpdatedEvent = {
|
|
|
9754
9766
|
|
|
9755
9767
|
message.count_mess_unread = reader.int32();
|
|
9756
9768
|
continue;
|
|
9769
|
+
case 18:
|
|
9770
|
+
if (tag !== 146) {
|
|
9771
|
+
break;
|
|
9772
|
+
}
|
|
9773
|
+
|
|
9774
|
+
message.user_ids.push(reader.string());
|
|
9775
|
+
continue;
|
|
9776
|
+
case 19:
|
|
9777
|
+
if (tag !== 154) {
|
|
9778
|
+
break;
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
message.role_ids.push(reader.string());
|
|
9782
|
+
continue;
|
|
9757
9783
|
}
|
|
9758
9784
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9759
9785
|
break;
|
|
@@ -9782,6 +9808,8 @@ export const ChannelUpdatedEvent = {
|
|
|
9782
9808
|
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
9783
9809
|
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
9784
9810
|
count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
9811
|
+
user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
|
|
9812
|
+
role_ids: globalThis.Array.isArray(object?.role_ids) ? object.role_ids.map((e: any) => globalThis.String(e)) : [],
|
|
9785
9813
|
};
|
|
9786
9814
|
},
|
|
9787
9815
|
|
|
@@ -9838,6 +9866,12 @@ export const ChannelUpdatedEvent = {
|
|
|
9838
9866
|
if (message.count_mess_unread !== 0) {
|
|
9839
9867
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
9840
9868
|
}
|
|
9869
|
+
if (message.user_ids?.length) {
|
|
9870
|
+
obj.user_ids = message.user_ids;
|
|
9871
|
+
}
|
|
9872
|
+
if (message.role_ids?.length) {
|
|
9873
|
+
obj.role_ids = message.role_ids;
|
|
9874
|
+
}
|
|
9841
9875
|
return obj;
|
|
9842
9876
|
},
|
|
9843
9877
|
|
|
@@ -9863,6 +9897,8 @@ export const ChannelUpdatedEvent = {
|
|
|
9863
9897
|
message.age_restricted = object.age_restricted ?? 0;
|
|
9864
9898
|
message.active = object.active ?? 0;
|
|
9865
9899
|
message.count_mess_unread = object.count_mess_unread ?? 0;
|
|
9900
|
+
message.user_ids = object.user_ids?.map((e) => e) || [];
|
|
9901
|
+
message.role_ids = object.role_ids?.map((e) => e) || [];
|
|
9866
9902
|
return message;
|
|
9867
9903
|
},
|
|
9868
9904
|
};
|