mezon-js-protobuf 1.8.23 → 1.8.25
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 +220 -51
- package/dist/mezon-js-protobuf/api/api.d.ts +125 -51
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +693 -593
- package/dist/mezon-js-protobuf.cjs.js +100 -9
- package/dist/mezon-js-protobuf.esm.mjs +100 -9
- package/package.json +1 -1
- package/rtapi/realtime.ts +72 -0
|
@@ -6376,7 +6376,9 @@ function createBaseClanDesc() {
|
|
|
6376
6376
|
is_onboarding: false,
|
|
6377
6377
|
welcome_channel_id: "",
|
|
6378
6378
|
onboarding_banner: "",
|
|
6379
|
-
clan_order: 0
|
|
6379
|
+
clan_order: 0,
|
|
6380
|
+
is_community: false,
|
|
6381
|
+
community_banner: ""
|
|
6380
6382
|
};
|
|
6381
6383
|
}
|
|
6382
6384
|
var ClanDesc = {
|
|
@@ -6414,6 +6416,12 @@ var ClanDesc = {
|
|
|
6414
6416
|
if (message.clan_order !== 0) {
|
|
6415
6417
|
writer.uint32(88).int32(message.clan_order);
|
|
6416
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
|
+
}
|
|
6417
6425
|
return writer;
|
|
6418
6426
|
},
|
|
6419
6427
|
decode(input, length) {
|
|
@@ -6489,6 +6497,18 @@ var ClanDesc = {
|
|
|
6489
6497
|
}
|
|
6490
6498
|
message.clan_order = reader.int32();
|
|
6491
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;
|
|
6492
6512
|
}
|
|
6493
6513
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6494
6514
|
break;
|
|
@@ -6509,7 +6529,9 @@ var ClanDesc = {
|
|
|
6509
6529
|
is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
|
|
6510
6530
|
welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
|
|
6511
6531
|
onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
|
|
6512
|
-
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) : ""
|
|
6513
6535
|
};
|
|
6514
6536
|
},
|
|
6515
6537
|
toJSON(message) {
|
|
@@ -6547,13 +6569,19 @@ var ClanDesc = {
|
|
|
6547
6569
|
if (message.clan_order !== 0) {
|
|
6548
6570
|
obj.clan_order = Math.round(message.clan_order);
|
|
6549
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
|
+
}
|
|
6550
6578
|
return obj;
|
|
6551
6579
|
},
|
|
6552
6580
|
create(base) {
|
|
6553
6581
|
return ClanDesc.fromPartial(base != null ? base : {});
|
|
6554
6582
|
},
|
|
6555
6583
|
fromPartial(object) {
|
|
6556
|
-
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;
|
|
6557
6585
|
const message = createBaseClanDesc();
|
|
6558
6586
|
message.creator_id = (_a = object.creator_id) != null ? _a : "";
|
|
6559
6587
|
message.clan_name = (_b = object.clan_name) != null ? _b : "";
|
|
@@ -6566,6 +6594,8 @@ var ClanDesc = {
|
|
|
6566
6594
|
message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
|
|
6567
6595
|
message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
|
|
6568
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 : "";
|
|
6569
6599
|
return message;
|
|
6570
6600
|
}
|
|
6571
6601
|
};
|
|
@@ -17326,7 +17356,9 @@ function createBaseChannelMessageRemove() {
|
|
|
17326
17356
|
mode: 0,
|
|
17327
17357
|
is_public: false,
|
|
17328
17358
|
has_attachment: false,
|
|
17329
|
-
topic_id: ""
|
|
17359
|
+
topic_id: "",
|
|
17360
|
+
mentions: "",
|
|
17361
|
+
references: ""
|
|
17330
17362
|
};
|
|
17331
17363
|
}
|
|
17332
17364
|
var ChannelMessageRemove = {
|
|
@@ -17352,6 +17384,12 @@ var ChannelMessageRemove = {
|
|
|
17352
17384
|
if (message.topic_id !== "") {
|
|
17353
17385
|
writer.uint32(58).string(message.topic_id);
|
|
17354
17386
|
}
|
|
17387
|
+
if (message.mentions !== "") {
|
|
17388
|
+
writer.uint32(66).string(message.mentions);
|
|
17389
|
+
}
|
|
17390
|
+
if (message.references !== "") {
|
|
17391
|
+
writer.uint32(74).string(message.references);
|
|
17392
|
+
}
|
|
17355
17393
|
return writer;
|
|
17356
17394
|
},
|
|
17357
17395
|
decode(input, length) {
|
|
@@ -17403,6 +17441,18 @@ var ChannelMessageRemove = {
|
|
|
17403
17441
|
}
|
|
17404
17442
|
message.topic_id = reader.string();
|
|
17405
17443
|
continue;
|
|
17444
|
+
case 8:
|
|
17445
|
+
if (tag !== 66) {
|
|
17446
|
+
break;
|
|
17447
|
+
}
|
|
17448
|
+
message.mentions = reader.string();
|
|
17449
|
+
continue;
|
|
17450
|
+
case 9:
|
|
17451
|
+
if (tag !== 74) {
|
|
17452
|
+
break;
|
|
17453
|
+
}
|
|
17454
|
+
message.references = reader.string();
|
|
17455
|
+
continue;
|
|
17406
17456
|
}
|
|
17407
17457
|
if ((tag & 7) === 4 || tag === 0) {
|
|
17408
17458
|
break;
|
|
@@ -17419,7 +17469,9 @@ var ChannelMessageRemove = {
|
|
|
17419
17469
|
mode: isSet4(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
17420
17470
|
is_public: isSet4(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
17421
17471
|
has_attachment: isSet4(object.has_attachment) ? globalThis.Boolean(object.has_attachment) : false,
|
|
17422
|
-
topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : ""
|
|
17472
|
+
topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : "",
|
|
17473
|
+
mentions: isSet4(object.mentions) ? globalThis.String(object.mentions) : "",
|
|
17474
|
+
references: isSet4(object.references) ? globalThis.String(object.references) : ""
|
|
17423
17475
|
};
|
|
17424
17476
|
},
|
|
17425
17477
|
toJSON(message) {
|
|
@@ -17445,13 +17497,19 @@ var ChannelMessageRemove = {
|
|
|
17445
17497
|
if (message.topic_id !== "") {
|
|
17446
17498
|
obj.topic_id = message.topic_id;
|
|
17447
17499
|
}
|
|
17500
|
+
if (message.mentions !== "") {
|
|
17501
|
+
obj.mentions = message.mentions;
|
|
17502
|
+
}
|
|
17503
|
+
if (message.references !== "") {
|
|
17504
|
+
obj.references = message.references;
|
|
17505
|
+
}
|
|
17448
17506
|
return obj;
|
|
17449
17507
|
},
|
|
17450
17508
|
create(base) {
|
|
17451
17509
|
return ChannelMessageRemove.fromPartial(base != null ? base : {});
|
|
17452
17510
|
},
|
|
17453
17511
|
fromPartial(object) {
|
|
17454
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
17512
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
17455
17513
|
const message = createBaseChannelMessageRemove();
|
|
17456
17514
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
17457
17515
|
message.channel_id = (_b = object.channel_id) != null ? _b : "";
|
|
@@ -17460,6 +17518,8 @@ var ChannelMessageRemove = {
|
|
|
17460
17518
|
message.is_public = (_e = object.is_public) != null ? _e : false;
|
|
17461
17519
|
message.has_attachment = (_f = object.has_attachment) != null ? _f : false;
|
|
17462
17520
|
message.topic_id = (_g = object.topic_id) != null ? _g : "";
|
|
17521
|
+
message.mentions = (_h = object.mentions) != null ? _h : "";
|
|
17522
|
+
message.references = (_i = object.references) != null ? _i : "";
|
|
17463
17523
|
return message;
|
|
17464
17524
|
}
|
|
17465
17525
|
};
|
|
@@ -20471,7 +20531,9 @@ function createBaseChannelUpdatedEvent() {
|
|
|
20471
20531
|
topic: "",
|
|
20472
20532
|
age_restricted: 0,
|
|
20473
20533
|
active: 0,
|
|
20474
|
-
count_mess_unread: 0
|
|
20534
|
+
count_mess_unread: 0,
|
|
20535
|
+
user_ids: [],
|
|
20536
|
+
role_ids: []
|
|
20475
20537
|
};
|
|
20476
20538
|
}
|
|
20477
20539
|
var ChannelUpdatedEvent = {
|
|
@@ -20527,6 +20589,12 @@ var ChannelUpdatedEvent = {
|
|
|
20527
20589
|
if (message.count_mess_unread !== 0) {
|
|
20528
20590
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
20529
20591
|
}
|
|
20592
|
+
for (const v of message.user_ids) {
|
|
20593
|
+
writer.uint32(146).string(v);
|
|
20594
|
+
}
|
|
20595
|
+
for (const v of message.role_ids) {
|
|
20596
|
+
writer.uint32(154).string(v);
|
|
20597
|
+
}
|
|
20530
20598
|
return writer;
|
|
20531
20599
|
},
|
|
20532
20600
|
decode(input, length) {
|
|
@@ -20638,6 +20706,18 @@ var ChannelUpdatedEvent = {
|
|
|
20638
20706
|
}
|
|
20639
20707
|
message.count_mess_unread = reader.int32();
|
|
20640
20708
|
continue;
|
|
20709
|
+
case 18:
|
|
20710
|
+
if (tag !== 146) {
|
|
20711
|
+
break;
|
|
20712
|
+
}
|
|
20713
|
+
message.user_ids.push(reader.string());
|
|
20714
|
+
continue;
|
|
20715
|
+
case 19:
|
|
20716
|
+
if (tag !== 154) {
|
|
20717
|
+
break;
|
|
20718
|
+
}
|
|
20719
|
+
message.role_ids.push(reader.string());
|
|
20720
|
+
continue;
|
|
20641
20721
|
}
|
|
20642
20722
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20643
20723
|
break;
|
|
@@ -20664,10 +20744,13 @@ var ChannelUpdatedEvent = {
|
|
|
20664
20744
|
topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
|
|
20665
20745
|
age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
20666
20746
|
active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
|
|
20667
|
-
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
|
|
20747
|
+
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
20748
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
20749
|
+
role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
|
|
20668
20750
|
};
|
|
20669
20751
|
},
|
|
20670
20752
|
toJSON(message) {
|
|
20753
|
+
var _a, _b;
|
|
20671
20754
|
const obj = {};
|
|
20672
20755
|
if (message.clan_id !== "") {
|
|
20673
20756
|
obj.clan_id = message.clan_id;
|
|
@@ -20720,13 +20803,19 @@ var ChannelUpdatedEvent = {
|
|
|
20720
20803
|
if (message.count_mess_unread !== 0) {
|
|
20721
20804
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
20722
20805
|
}
|
|
20806
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
20807
|
+
obj.user_ids = message.user_ids;
|
|
20808
|
+
}
|
|
20809
|
+
if ((_b = message.role_ids) == null ? void 0 : _b.length) {
|
|
20810
|
+
obj.role_ids = message.role_ids;
|
|
20811
|
+
}
|
|
20723
20812
|
return obj;
|
|
20724
20813
|
},
|
|
20725
20814
|
create(base) {
|
|
20726
20815
|
return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
|
|
20727
20816
|
},
|
|
20728
20817
|
fromPartial(object) {
|
|
20729
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
20818
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
20730
20819
|
const message = createBaseChannelUpdatedEvent();
|
|
20731
20820
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
20732
20821
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -20745,6 +20834,8 @@ var ChannelUpdatedEvent = {
|
|
|
20745
20834
|
message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
|
|
20746
20835
|
message.active = (_p = object.active) != null ? _p : 0;
|
|
20747
20836
|
message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
|
|
20837
|
+
message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
|
|
20838
|
+
message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
|
|
20748
20839
|
return message;
|
|
20749
20840
|
}
|
|
20750
20841
|
};
|
|
@@ -6363,7 +6363,9 @@ function createBaseClanDesc() {
|
|
|
6363
6363
|
is_onboarding: false,
|
|
6364
6364
|
welcome_channel_id: "",
|
|
6365
6365
|
onboarding_banner: "",
|
|
6366
|
-
clan_order: 0
|
|
6366
|
+
clan_order: 0,
|
|
6367
|
+
is_community: false,
|
|
6368
|
+
community_banner: ""
|
|
6367
6369
|
};
|
|
6368
6370
|
}
|
|
6369
6371
|
var ClanDesc = {
|
|
@@ -6401,6 +6403,12 @@ var ClanDesc = {
|
|
|
6401
6403
|
if (message.clan_order !== 0) {
|
|
6402
6404
|
writer.uint32(88).int32(message.clan_order);
|
|
6403
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
|
+
}
|
|
6404
6412
|
return writer;
|
|
6405
6413
|
},
|
|
6406
6414
|
decode(input, length) {
|
|
@@ -6476,6 +6484,18 @@ var ClanDesc = {
|
|
|
6476
6484
|
}
|
|
6477
6485
|
message.clan_order = reader.int32();
|
|
6478
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;
|
|
6479
6499
|
}
|
|
6480
6500
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6481
6501
|
break;
|
|
@@ -6496,7 +6516,9 @@ var ClanDesc = {
|
|
|
6496
6516
|
is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
|
|
6497
6517
|
welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
|
|
6498
6518
|
onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
|
|
6499
|
-
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) : ""
|
|
6500
6522
|
};
|
|
6501
6523
|
},
|
|
6502
6524
|
toJSON(message) {
|
|
@@ -6534,13 +6556,19 @@ var ClanDesc = {
|
|
|
6534
6556
|
if (message.clan_order !== 0) {
|
|
6535
6557
|
obj.clan_order = Math.round(message.clan_order);
|
|
6536
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
|
+
}
|
|
6537
6565
|
return obj;
|
|
6538
6566
|
},
|
|
6539
6567
|
create(base) {
|
|
6540
6568
|
return ClanDesc.fromPartial(base != null ? base : {});
|
|
6541
6569
|
},
|
|
6542
6570
|
fromPartial(object) {
|
|
6543
|
-
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;
|
|
6544
6572
|
const message = createBaseClanDesc();
|
|
6545
6573
|
message.creator_id = (_a = object.creator_id) != null ? _a : "";
|
|
6546
6574
|
message.clan_name = (_b = object.clan_name) != null ? _b : "";
|
|
@@ -6553,6 +6581,8 @@ var ClanDesc = {
|
|
|
6553
6581
|
message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
|
|
6554
6582
|
message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
|
|
6555
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 : "";
|
|
6556
6586
|
return message;
|
|
6557
6587
|
}
|
|
6558
6588
|
};
|
|
@@ -17313,7 +17343,9 @@ function createBaseChannelMessageRemove() {
|
|
|
17313
17343
|
mode: 0,
|
|
17314
17344
|
is_public: false,
|
|
17315
17345
|
has_attachment: false,
|
|
17316
|
-
topic_id: ""
|
|
17346
|
+
topic_id: "",
|
|
17347
|
+
mentions: "",
|
|
17348
|
+
references: ""
|
|
17317
17349
|
};
|
|
17318
17350
|
}
|
|
17319
17351
|
var ChannelMessageRemove = {
|
|
@@ -17339,6 +17371,12 @@ var ChannelMessageRemove = {
|
|
|
17339
17371
|
if (message.topic_id !== "") {
|
|
17340
17372
|
writer.uint32(58).string(message.topic_id);
|
|
17341
17373
|
}
|
|
17374
|
+
if (message.mentions !== "") {
|
|
17375
|
+
writer.uint32(66).string(message.mentions);
|
|
17376
|
+
}
|
|
17377
|
+
if (message.references !== "") {
|
|
17378
|
+
writer.uint32(74).string(message.references);
|
|
17379
|
+
}
|
|
17342
17380
|
return writer;
|
|
17343
17381
|
},
|
|
17344
17382
|
decode(input, length) {
|
|
@@ -17390,6 +17428,18 @@ var ChannelMessageRemove = {
|
|
|
17390
17428
|
}
|
|
17391
17429
|
message.topic_id = reader.string();
|
|
17392
17430
|
continue;
|
|
17431
|
+
case 8:
|
|
17432
|
+
if (tag !== 66) {
|
|
17433
|
+
break;
|
|
17434
|
+
}
|
|
17435
|
+
message.mentions = reader.string();
|
|
17436
|
+
continue;
|
|
17437
|
+
case 9:
|
|
17438
|
+
if (tag !== 74) {
|
|
17439
|
+
break;
|
|
17440
|
+
}
|
|
17441
|
+
message.references = reader.string();
|
|
17442
|
+
continue;
|
|
17393
17443
|
}
|
|
17394
17444
|
if ((tag & 7) === 4 || tag === 0) {
|
|
17395
17445
|
break;
|
|
@@ -17406,7 +17456,9 @@ var ChannelMessageRemove = {
|
|
|
17406
17456
|
mode: isSet4(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
17407
17457
|
is_public: isSet4(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
17408
17458
|
has_attachment: isSet4(object.has_attachment) ? globalThis.Boolean(object.has_attachment) : false,
|
|
17409
|
-
topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : ""
|
|
17459
|
+
topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : "",
|
|
17460
|
+
mentions: isSet4(object.mentions) ? globalThis.String(object.mentions) : "",
|
|
17461
|
+
references: isSet4(object.references) ? globalThis.String(object.references) : ""
|
|
17410
17462
|
};
|
|
17411
17463
|
},
|
|
17412
17464
|
toJSON(message) {
|
|
@@ -17432,13 +17484,19 @@ var ChannelMessageRemove = {
|
|
|
17432
17484
|
if (message.topic_id !== "") {
|
|
17433
17485
|
obj.topic_id = message.topic_id;
|
|
17434
17486
|
}
|
|
17487
|
+
if (message.mentions !== "") {
|
|
17488
|
+
obj.mentions = message.mentions;
|
|
17489
|
+
}
|
|
17490
|
+
if (message.references !== "") {
|
|
17491
|
+
obj.references = message.references;
|
|
17492
|
+
}
|
|
17435
17493
|
return obj;
|
|
17436
17494
|
},
|
|
17437
17495
|
create(base) {
|
|
17438
17496
|
return ChannelMessageRemove.fromPartial(base != null ? base : {});
|
|
17439
17497
|
},
|
|
17440
17498
|
fromPartial(object) {
|
|
17441
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
17499
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
17442
17500
|
const message = createBaseChannelMessageRemove();
|
|
17443
17501
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
17444
17502
|
message.channel_id = (_b = object.channel_id) != null ? _b : "";
|
|
@@ -17447,6 +17505,8 @@ var ChannelMessageRemove = {
|
|
|
17447
17505
|
message.is_public = (_e = object.is_public) != null ? _e : false;
|
|
17448
17506
|
message.has_attachment = (_f = object.has_attachment) != null ? _f : false;
|
|
17449
17507
|
message.topic_id = (_g = object.topic_id) != null ? _g : "";
|
|
17508
|
+
message.mentions = (_h = object.mentions) != null ? _h : "";
|
|
17509
|
+
message.references = (_i = object.references) != null ? _i : "";
|
|
17450
17510
|
return message;
|
|
17451
17511
|
}
|
|
17452
17512
|
};
|
|
@@ -20458,7 +20518,9 @@ function createBaseChannelUpdatedEvent() {
|
|
|
20458
20518
|
topic: "",
|
|
20459
20519
|
age_restricted: 0,
|
|
20460
20520
|
active: 0,
|
|
20461
|
-
count_mess_unread: 0
|
|
20521
|
+
count_mess_unread: 0,
|
|
20522
|
+
user_ids: [],
|
|
20523
|
+
role_ids: []
|
|
20462
20524
|
};
|
|
20463
20525
|
}
|
|
20464
20526
|
var ChannelUpdatedEvent = {
|
|
@@ -20514,6 +20576,12 @@ var ChannelUpdatedEvent = {
|
|
|
20514
20576
|
if (message.count_mess_unread !== 0) {
|
|
20515
20577
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
20516
20578
|
}
|
|
20579
|
+
for (const v of message.user_ids) {
|
|
20580
|
+
writer.uint32(146).string(v);
|
|
20581
|
+
}
|
|
20582
|
+
for (const v of message.role_ids) {
|
|
20583
|
+
writer.uint32(154).string(v);
|
|
20584
|
+
}
|
|
20517
20585
|
return writer;
|
|
20518
20586
|
},
|
|
20519
20587
|
decode(input, length) {
|
|
@@ -20625,6 +20693,18 @@ var ChannelUpdatedEvent = {
|
|
|
20625
20693
|
}
|
|
20626
20694
|
message.count_mess_unread = reader.int32();
|
|
20627
20695
|
continue;
|
|
20696
|
+
case 18:
|
|
20697
|
+
if (tag !== 146) {
|
|
20698
|
+
break;
|
|
20699
|
+
}
|
|
20700
|
+
message.user_ids.push(reader.string());
|
|
20701
|
+
continue;
|
|
20702
|
+
case 19:
|
|
20703
|
+
if (tag !== 154) {
|
|
20704
|
+
break;
|
|
20705
|
+
}
|
|
20706
|
+
message.role_ids.push(reader.string());
|
|
20707
|
+
continue;
|
|
20628
20708
|
}
|
|
20629
20709
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20630
20710
|
break;
|
|
@@ -20651,10 +20731,13 @@ var ChannelUpdatedEvent = {
|
|
|
20651
20731
|
topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
|
|
20652
20732
|
age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
20653
20733
|
active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
|
|
20654
|
-
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
|
|
20734
|
+
count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
20735
|
+
user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
|
|
20736
|
+
role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
|
|
20655
20737
|
};
|
|
20656
20738
|
},
|
|
20657
20739
|
toJSON(message) {
|
|
20740
|
+
var _a, _b;
|
|
20658
20741
|
const obj = {};
|
|
20659
20742
|
if (message.clan_id !== "") {
|
|
20660
20743
|
obj.clan_id = message.clan_id;
|
|
@@ -20707,13 +20790,19 @@ var ChannelUpdatedEvent = {
|
|
|
20707
20790
|
if (message.count_mess_unread !== 0) {
|
|
20708
20791
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
20709
20792
|
}
|
|
20793
|
+
if ((_a = message.user_ids) == null ? void 0 : _a.length) {
|
|
20794
|
+
obj.user_ids = message.user_ids;
|
|
20795
|
+
}
|
|
20796
|
+
if ((_b = message.role_ids) == null ? void 0 : _b.length) {
|
|
20797
|
+
obj.role_ids = message.role_ids;
|
|
20798
|
+
}
|
|
20710
20799
|
return obj;
|
|
20711
20800
|
},
|
|
20712
20801
|
create(base) {
|
|
20713
20802
|
return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
|
|
20714
20803
|
},
|
|
20715
20804
|
fromPartial(object) {
|
|
20716
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
20805
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
20717
20806
|
const message = createBaseChannelUpdatedEvent();
|
|
20718
20807
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
20719
20808
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -20732,6 +20821,8 @@ var ChannelUpdatedEvent = {
|
|
|
20732
20821
|
message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
|
|
20733
20822
|
message.active = (_p = object.active) != null ? _p : 0;
|
|
20734
20823
|
message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
|
|
20824
|
+
message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
|
|
20825
|
+
message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
|
|
20735
20826
|
return message;
|
|
20736
20827
|
}
|
|
20737
20828
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.25",
|
|
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
|
@@ -743,6 +743,10 @@ export interface ChannelMessageRemove {
|
|
|
743
743
|
has_attachment: boolean;
|
|
744
744
|
/** */
|
|
745
745
|
topic_id: string;
|
|
746
|
+
/** Message mention */
|
|
747
|
+
mentions: string;
|
|
748
|
+
/** Message reference */
|
|
749
|
+
references: string;
|
|
746
750
|
}
|
|
747
751
|
|
|
748
752
|
/** A set of joins and leaves on a particular channel. */
|
|
@@ -1210,6 +1214,10 @@ export interface ChannelUpdatedEvent {
|
|
|
1210
1214
|
active: number;
|
|
1211
1215
|
/** count message unread */
|
|
1212
1216
|
count_mess_unread: number;
|
|
1217
|
+
/** The users to add. */
|
|
1218
|
+
user_ids: string[];
|
|
1219
|
+
/** This is the role that needs to be added to the channel */
|
|
1220
|
+
role_ids: string[];
|
|
1213
1221
|
}
|
|
1214
1222
|
|
|
1215
1223
|
/** Stop receiving status updates for some set of users. */
|
|
@@ -6122,6 +6130,8 @@ function createBaseChannelMessageRemove(): ChannelMessageRemove {
|
|
|
6122
6130
|
is_public: false,
|
|
6123
6131
|
has_attachment: false,
|
|
6124
6132
|
topic_id: "",
|
|
6133
|
+
mentions: "",
|
|
6134
|
+
references: "",
|
|
6125
6135
|
};
|
|
6126
6136
|
}
|
|
6127
6137
|
|
|
@@ -6148,6 +6158,12 @@ export const ChannelMessageRemove = {
|
|
|
6148
6158
|
if (message.topic_id !== "") {
|
|
6149
6159
|
writer.uint32(58).string(message.topic_id);
|
|
6150
6160
|
}
|
|
6161
|
+
if (message.mentions !== "") {
|
|
6162
|
+
writer.uint32(66).string(message.mentions);
|
|
6163
|
+
}
|
|
6164
|
+
if (message.references !== "") {
|
|
6165
|
+
writer.uint32(74).string(message.references);
|
|
6166
|
+
}
|
|
6151
6167
|
return writer;
|
|
6152
6168
|
},
|
|
6153
6169
|
|
|
@@ -6207,6 +6223,20 @@ export const ChannelMessageRemove = {
|
|
|
6207
6223
|
|
|
6208
6224
|
message.topic_id = reader.string();
|
|
6209
6225
|
continue;
|
|
6226
|
+
case 8:
|
|
6227
|
+
if (tag !== 66) {
|
|
6228
|
+
break;
|
|
6229
|
+
}
|
|
6230
|
+
|
|
6231
|
+
message.mentions = reader.string();
|
|
6232
|
+
continue;
|
|
6233
|
+
case 9:
|
|
6234
|
+
if (tag !== 74) {
|
|
6235
|
+
break;
|
|
6236
|
+
}
|
|
6237
|
+
|
|
6238
|
+
message.references = reader.string();
|
|
6239
|
+
continue;
|
|
6210
6240
|
}
|
|
6211
6241
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6212
6242
|
break;
|
|
@@ -6225,6 +6255,8 @@ export const ChannelMessageRemove = {
|
|
|
6225
6255
|
is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
6226
6256
|
has_attachment: isSet(object.has_attachment) ? globalThis.Boolean(object.has_attachment) : false,
|
|
6227
6257
|
topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
|
|
6258
|
+
mentions: isSet(object.mentions) ? globalThis.String(object.mentions) : "",
|
|
6259
|
+
references: isSet(object.references) ? globalThis.String(object.references) : "",
|
|
6228
6260
|
};
|
|
6229
6261
|
},
|
|
6230
6262
|
|
|
@@ -6251,6 +6283,12 @@ export const ChannelMessageRemove = {
|
|
|
6251
6283
|
if (message.topic_id !== "") {
|
|
6252
6284
|
obj.topic_id = message.topic_id;
|
|
6253
6285
|
}
|
|
6286
|
+
if (message.mentions !== "") {
|
|
6287
|
+
obj.mentions = message.mentions;
|
|
6288
|
+
}
|
|
6289
|
+
if (message.references !== "") {
|
|
6290
|
+
obj.references = message.references;
|
|
6291
|
+
}
|
|
6254
6292
|
return obj;
|
|
6255
6293
|
},
|
|
6256
6294
|
|
|
@@ -6266,6 +6304,8 @@ export const ChannelMessageRemove = {
|
|
|
6266
6304
|
message.is_public = object.is_public ?? false;
|
|
6267
6305
|
message.has_attachment = object.has_attachment ?? false;
|
|
6268
6306
|
message.topic_id = object.topic_id ?? "";
|
|
6307
|
+
message.mentions = object.mentions ?? "";
|
|
6308
|
+
message.references = object.references ?? "";
|
|
6269
6309
|
return message;
|
|
6270
6310
|
},
|
|
6271
6311
|
};
|
|
@@ -9569,6 +9609,8 @@ function createBaseChannelUpdatedEvent(): ChannelUpdatedEvent {
|
|
|
9569
9609
|
age_restricted: 0,
|
|
9570
9610
|
active: 0,
|
|
9571
9611
|
count_mess_unread: 0,
|
|
9612
|
+
user_ids: [],
|
|
9613
|
+
role_ids: [],
|
|
9572
9614
|
};
|
|
9573
9615
|
}
|
|
9574
9616
|
|
|
@@ -9625,6 +9667,12 @@ export const ChannelUpdatedEvent = {
|
|
|
9625
9667
|
if (message.count_mess_unread !== 0) {
|
|
9626
9668
|
writer.uint32(136).int32(message.count_mess_unread);
|
|
9627
9669
|
}
|
|
9670
|
+
for (const v of message.user_ids) {
|
|
9671
|
+
writer.uint32(146).string(v!);
|
|
9672
|
+
}
|
|
9673
|
+
for (const v of message.role_ids) {
|
|
9674
|
+
writer.uint32(154).string(v!);
|
|
9675
|
+
}
|
|
9628
9676
|
return writer;
|
|
9629
9677
|
},
|
|
9630
9678
|
|
|
@@ -9754,6 +9802,20 @@ export const ChannelUpdatedEvent = {
|
|
|
9754
9802
|
|
|
9755
9803
|
message.count_mess_unread = reader.int32();
|
|
9756
9804
|
continue;
|
|
9805
|
+
case 18:
|
|
9806
|
+
if (tag !== 146) {
|
|
9807
|
+
break;
|
|
9808
|
+
}
|
|
9809
|
+
|
|
9810
|
+
message.user_ids.push(reader.string());
|
|
9811
|
+
continue;
|
|
9812
|
+
case 19:
|
|
9813
|
+
if (tag !== 154) {
|
|
9814
|
+
break;
|
|
9815
|
+
}
|
|
9816
|
+
|
|
9817
|
+
message.role_ids.push(reader.string());
|
|
9818
|
+
continue;
|
|
9757
9819
|
}
|
|
9758
9820
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9759
9821
|
break;
|
|
@@ -9782,6 +9844,8 @@ export const ChannelUpdatedEvent = {
|
|
|
9782
9844
|
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
9783
9845
|
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
9784
9846
|
count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
9847
|
+
user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
|
|
9848
|
+
role_ids: globalThis.Array.isArray(object?.role_ids) ? object.role_ids.map((e: any) => globalThis.String(e)) : [],
|
|
9785
9849
|
};
|
|
9786
9850
|
},
|
|
9787
9851
|
|
|
@@ -9838,6 +9902,12 @@ export const ChannelUpdatedEvent = {
|
|
|
9838
9902
|
if (message.count_mess_unread !== 0) {
|
|
9839
9903
|
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
9840
9904
|
}
|
|
9905
|
+
if (message.user_ids?.length) {
|
|
9906
|
+
obj.user_ids = message.user_ids;
|
|
9907
|
+
}
|
|
9908
|
+
if (message.role_ids?.length) {
|
|
9909
|
+
obj.role_ids = message.role_ids;
|
|
9910
|
+
}
|
|
9841
9911
|
return obj;
|
|
9842
9912
|
},
|
|
9843
9913
|
|
|
@@ -9863,6 +9933,8 @@ export const ChannelUpdatedEvent = {
|
|
|
9863
9933
|
message.age_restricted = object.age_restricted ?? 0;
|
|
9864
9934
|
message.active = object.active ?? 0;
|
|
9865
9935
|
message.count_mess_unread = object.count_mess_unread ?? 0;
|
|
9936
|
+
message.user_ids = object.user_ids?.map((e) => e) || [];
|
|
9937
|
+
message.role_ids = object.role_ids?.map((e) => e) || [];
|
|
9866
9938
|
return message;
|
|
9867
9939
|
},
|
|
9868
9940
|
};
|