mezon-js 2.13.76 → 2.13.78
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 +45 -650
- package/dist/api/api.d.ts +13 -310
- package/dist/mezon-js.cjs.js +40 -12
- package/dist/mezon-js.esm.mjs +40 -12
- package/package.json +1 -1
package/api/api.ts
CHANGED
|
@@ -558,9 +558,7 @@ export interface Friend {
|
|
|
558
558
|
| User
|
|
559
559
|
| undefined;
|
|
560
560
|
/** The friend status. */
|
|
561
|
-
state:
|
|
562
|
-
| number
|
|
563
|
-
| undefined;
|
|
561
|
+
state: number;
|
|
564
562
|
/** Time of the latest relationship update. */
|
|
565
563
|
update_time:
|
|
566
564
|
| Date
|
|
@@ -1015,6 +1013,10 @@ export interface Session {
|
|
|
1015
1013
|
user_id: string;
|
|
1016
1014
|
/** Whether to enable "Remember Me" for extended session duration. */
|
|
1017
1015
|
is_remember: boolean;
|
|
1016
|
+
/** api url */
|
|
1017
|
+
api_url: string;
|
|
1018
|
+
/** id token for zklogin */
|
|
1019
|
+
id_token: string;
|
|
1018
1020
|
}
|
|
1019
1021
|
|
|
1020
1022
|
/** Update username */
|
|
@@ -1513,78 +1515,6 @@ export interface ChannelMessageHeader {
|
|
|
1513
1515
|
reaction: string;
|
|
1514
1516
|
}
|
|
1515
1517
|
|
|
1516
|
-
/** Channel description record */
|
|
1517
|
-
export interface ChannelDescriptionOld {
|
|
1518
|
-
/** The clan of this channel */
|
|
1519
|
-
clan_id: string;
|
|
1520
|
-
/** The parent channel this message belongs to. */
|
|
1521
|
-
parent_id: string;
|
|
1522
|
-
/** The channel this message belongs to. */
|
|
1523
|
-
channel_id: string;
|
|
1524
|
-
/** The category of channel */
|
|
1525
|
-
category_id: string;
|
|
1526
|
-
/** The category name */
|
|
1527
|
-
category_name: string;
|
|
1528
|
-
/** The channel type. */
|
|
1529
|
-
type:
|
|
1530
|
-
| number
|
|
1531
|
-
| undefined;
|
|
1532
|
-
/** creator ID. */
|
|
1533
|
-
creator_id: string;
|
|
1534
|
-
/** The channel lable */
|
|
1535
|
-
channel_label: string;
|
|
1536
|
-
/** The channel private */
|
|
1537
|
-
channel_private: number;
|
|
1538
|
-
/** DM avatars */
|
|
1539
|
-
avatars: string[];
|
|
1540
|
-
/** List DM user ids */
|
|
1541
|
-
user_ids: string[];
|
|
1542
|
-
/** last message id */
|
|
1543
|
-
last_sent_message:
|
|
1544
|
-
| ChannelMessageHeader
|
|
1545
|
-
| undefined;
|
|
1546
|
-
/** last seen message id */
|
|
1547
|
-
last_seen_message:
|
|
1548
|
-
| ChannelMessageHeader
|
|
1549
|
-
| undefined;
|
|
1550
|
-
/** DM status */
|
|
1551
|
-
onlines: boolean[];
|
|
1552
|
-
/** meeting code */
|
|
1553
|
-
meeting_code: string;
|
|
1554
|
-
/** count message unread */
|
|
1555
|
-
count_mess_unread: number;
|
|
1556
|
-
/** active channel */
|
|
1557
|
-
active: number;
|
|
1558
|
-
/** last pin message */
|
|
1559
|
-
last_pin_message: string;
|
|
1560
|
-
/** List DM usernames */
|
|
1561
|
-
usernames: string[];
|
|
1562
|
-
/** creator name */
|
|
1563
|
-
creator_name: string;
|
|
1564
|
-
/** create time ms */
|
|
1565
|
-
create_time_seconds: number;
|
|
1566
|
-
/** update time ms */
|
|
1567
|
-
update_time_seconds: number;
|
|
1568
|
-
/** List DM diplay names */
|
|
1569
|
-
display_names: string[];
|
|
1570
|
-
/** channel avatar */
|
|
1571
|
-
channel_avatar: string;
|
|
1572
|
-
/** clan_name */
|
|
1573
|
-
clan_name: string;
|
|
1574
|
-
/** app id */
|
|
1575
|
-
app_id: string;
|
|
1576
|
-
/** channel all message */
|
|
1577
|
-
is_mute: boolean;
|
|
1578
|
-
/** age restricted */
|
|
1579
|
-
age_restricted: number;
|
|
1580
|
-
/** channel description topic */
|
|
1581
|
-
topic: string;
|
|
1582
|
-
/** e2ee */
|
|
1583
|
-
e2ee: number;
|
|
1584
|
-
/** channel member count */
|
|
1585
|
-
member_count: number;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
1518
|
/** Channel description record */
|
|
1589
1519
|
export interface ChannelDescription {
|
|
1590
1520
|
/** The clan of this channel */
|
|
@@ -7281,7 +7211,7 @@ export const Event_PropertiesEntry = {
|
|
|
7281
7211
|
};
|
|
7282
7212
|
|
|
7283
7213
|
function createBaseFriend(): Friend {
|
|
7284
|
-
return { user: undefined, state:
|
|
7214
|
+
return { user: undefined, state: 0, update_time: undefined, source_id: "" };
|
|
7285
7215
|
}
|
|
7286
7216
|
|
|
7287
7217
|
export const Friend = {
|
|
@@ -7289,8 +7219,8 @@ export const Friend = {
|
|
|
7289
7219
|
if (message.user !== undefined) {
|
|
7290
7220
|
User.encode(message.user, writer.uint32(10).fork()).ldelim();
|
|
7291
7221
|
}
|
|
7292
|
-
if (message.state !==
|
|
7293
|
-
|
|
7222
|
+
if (message.state !== 0) {
|
|
7223
|
+
writer.uint32(16).int32(message.state);
|
|
7294
7224
|
}
|
|
7295
7225
|
if (message.update_time !== undefined) {
|
|
7296
7226
|
Timestamp.encode(toTimestamp(message.update_time), writer.uint32(26).fork()).ldelim();
|
|
@@ -7316,11 +7246,11 @@ export const Friend = {
|
|
|
7316
7246
|
message.user = User.decode(reader, reader.uint32());
|
|
7317
7247
|
continue;
|
|
7318
7248
|
case 2:
|
|
7319
|
-
if (tag !==
|
|
7249
|
+
if (tag !== 16) {
|
|
7320
7250
|
break;
|
|
7321
7251
|
}
|
|
7322
7252
|
|
|
7323
|
-
message.state =
|
|
7253
|
+
message.state = reader.int32();
|
|
7324
7254
|
continue;
|
|
7325
7255
|
case 3:
|
|
7326
7256
|
if (tag !== 26) {
|
|
@@ -7348,7 +7278,7 @@ export const Friend = {
|
|
|
7348
7278
|
fromJSON(object: any): Friend {
|
|
7349
7279
|
return {
|
|
7350
7280
|
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
|
|
7351
|
-
state: isSet(object.state) ? Number(object.state) :
|
|
7281
|
+
state: isSet(object.state) ? globalThis.Number(object.state) : 0,
|
|
7352
7282
|
update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
|
|
7353
7283
|
source_id: isSet(object.source_id) ? globalThis.String(object.source_id) : "",
|
|
7354
7284
|
};
|
|
@@ -7359,8 +7289,8 @@ export const Friend = {
|
|
|
7359
7289
|
if (message.user !== undefined) {
|
|
7360
7290
|
obj.user = User.toJSON(message.user);
|
|
7361
7291
|
}
|
|
7362
|
-
if (message.state !==
|
|
7363
|
-
obj.state = message.state;
|
|
7292
|
+
if (message.state !== 0) {
|
|
7293
|
+
obj.state = Math.round(message.state);
|
|
7364
7294
|
}
|
|
7365
7295
|
if (message.update_time !== undefined) {
|
|
7366
7296
|
obj.update_time = message.update_time.toISOString();
|
|
@@ -7377,7 +7307,7 @@ export const Friend = {
|
|
|
7377
7307
|
fromPartial<I extends Exact<DeepPartial<Friend>, I>>(object: I): Friend {
|
|
7378
7308
|
const message = createBaseFriend();
|
|
7379
7309
|
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
|
|
7380
|
-
message.state = object.state ??
|
|
7310
|
+
message.state = object.state ?? 0;
|
|
7381
7311
|
message.update_time = object.update_time ?? undefined;
|
|
7382
7312
|
message.source_id = object.source_id ?? "";
|
|
7383
7313
|
return message;
|
|
@@ -10445,7 +10375,7 @@ export const Rpc = {
|
|
|
10445
10375
|
};
|
|
10446
10376
|
|
|
10447
10377
|
function createBaseSession(): Session {
|
|
10448
|
-
return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false };
|
|
10378
|
+
return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false, api_url: "", id_token: "" };
|
|
10449
10379
|
}
|
|
10450
10380
|
|
|
10451
10381
|
export const Session = {
|
|
@@ -10465,6 +10395,12 @@ export const Session = {
|
|
|
10465
10395
|
if (message.is_remember !== false) {
|
|
10466
10396
|
writer.uint32(40).bool(message.is_remember);
|
|
10467
10397
|
}
|
|
10398
|
+
if (message.api_url !== "") {
|
|
10399
|
+
writer.uint32(50).string(message.api_url);
|
|
10400
|
+
}
|
|
10401
|
+
if (message.id_token !== "") {
|
|
10402
|
+
writer.uint32(58).string(message.id_token);
|
|
10403
|
+
}
|
|
10468
10404
|
return writer;
|
|
10469
10405
|
},
|
|
10470
10406
|
|
|
@@ -10510,6 +10446,20 @@ export const Session = {
|
|
|
10510
10446
|
|
|
10511
10447
|
message.is_remember = reader.bool();
|
|
10512
10448
|
continue;
|
|
10449
|
+
case 6:
|
|
10450
|
+
if (tag !== 50) {
|
|
10451
|
+
break;
|
|
10452
|
+
}
|
|
10453
|
+
|
|
10454
|
+
message.api_url = reader.string();
|
|
10455
|
+
continue;
|
|
10456
|
+
case 7:
|
|
10457
|
+
if (tag !== 58) {
|
|
10458
|
+
break;
|
|
10459
|
+
}
|
|
10460
|
+
|
|
10461
|
+
message.id_token = reader.string();
|
|
10462
|
+
continue;
|
|
10513
10463
|
}
|
|
10514
10464
|
if ((tag & 7) === 4 || tag === 0) {
|
|
10515
10465
|
break;
|
|
@@ -10526,6 +10476,8 @@ export const Session = {
|
|
|
10526
10476
|
refresh_token: isSet(object.refresh_token) ? globalThis.String(object.refresh_token) : "",
|
|
10527
10477
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
10528
10478
|
is_remember: isSet(object.is_remember) ? globalThis.Boolean(object.is_remember) : false,
|
|
10479
|
+
api_url: isSet(object.api_url) ? globalThis.String(object.api_url) : "",
|
|
10480
|
+
id_token: isSet(object.id_token) ? globalThis.String(object.id_token) : "",
|
|
10529
10481
|
};
|
|
10530
10482
|
},
|
|
10531
10483
|
|
|
@@ -10546,6 +10498,12 @@ export const Session = {
|
|
|
10546
10498
|
if (message.is_remember !== false) {
|
|
10547
10499
|
obj.is_remember = message.is_remember;
|
|
10548
10500
|
}
|
|
10501
|
+
if (message.api_url !== "") {
|
|
10502
|
+
obj.api_url = message.api_url;
|
|
10503
|
+
}
|
|
10504
|
+
if (message.id_token !== "") {
|
|
10505
|
+
obj.id_token = message.id_token;
|
|
10506
|
+
}
|
|
10549
10507
|
return obj;
|
|
10550
10508
|
},
|
|
10551
10509
|
|
|
@@ -10559,6 +10517,8 @@ export const Session = {
|
|
|
10559
10517
|
message.refresh_token = object.refresh_token ?? "";
|
|
10560
10518
|
message.user_id = object.user_id ?? "";
|
|
10561
10519
|
message.is_remember = object.is_remember ?? false;
|
|
10520
|
+
message.api_url = object.api_url ?? "";
|
|
10521
|
+
message.id_token = object.id_token ?? "";
|
|
10562
10522
|
return message;
|
|
10563
10523
|
},
|
|
10564
10524
|
};
|
|
@@ -14700,571 +14660,6 @@ export const ChannelMessageHeader = {
|
|
|
14700
14660
|
},
|
|
14701
14661
|
};
|
|
14702
14662
|
|
|
14703
|
-
function createBaseChannelDescriptionOld(): ChannelDescriptionOld {
|
|
14704
|
-
return {
|
|
14705
|
-
clan_id: "",
|
|
14706
|
-
parent_id: "",
|
|
14707
|
-
channel_id: "",
|
|
14708
|
-
category_id: "",
|
|
14709
|
-
category_name: "",
|
|
14710
|
-
type: undefined,
|
|
14711
|
-
creator_id: "",
|
|
14712
|
-
channel_label: "",
|
|
14713
|
-
channel_private: 0,
|
|
14714
|
-
avatars: [],
|
|
14715
|
-
user_ids: [],
|
|
14716
|
-
last_sent_message: undefined,
|
|
14717
|
-
last_seen_message: undefined,
|
|
14718
|
-
onlines: [],
|
|
14719
|
-
meeting_code: "",
|
|
14720
|
-
count_mess_unread: 0,
|
|
14721
|
-
active: 0,
|
|
14722
|
-
last_pin_message: "",
|
|
14723
|
-
usernames: [],
|
|
14724
|
-
creator_name: "",
|
|
14725
|
-
create_time_seconds: 0,
|
|
14726
|
-
update_time_seconds: 0,
|
|
14727
|
-
display_names: [],
|
|
14728
|
-
channel_avatar: "",
|
|
14729
|
-
clan_name: "",
|
|
14730
|
-
app_id: "",
|
|
14731
|
-
is_mute: false,
|
|
14732
|
-
age_restricted: 0,
|
|
14733
|
-
topic: "",
|
|
14734
|
-
e2ee: 0,
|
|
14735
|
-
member_count: 0,
|
|
14736
|
-
};
|
|
14737
|
-
}
|
|
14738
|
-
|
|
14739
|
-
export const ChannelDescriptionOld = {
|
|
14740
|
-
encode(message: ChannelDescriptionOld, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
14741
|
-
if (message.clan_id !== "") {
|
|
14742
|
-
writer.uint32(10).string(message.clan_id);
|
|
14743
|
-
}
|
|
14744
|
-
if (message.parent_id !== "") {
|
|
14745
|
-
writer.uint32(18).string(message.parent_id);
|
|
14746
|
-
}
|
|
14747
|
-
if (message.channel_id !== "") {
|
|
14748
|
-
writer.uint32(26).string(message.channel_id);
|
|
14749
|
-
}
|
|
14750
|
-
if (message.category_id !== "") {
|
|
14751
|
-
writer.uint32(34).string(message.category_id);
|
|
14752
|
-
}
|
|
14753
|
-
if (message.category_name !== "") {
|
|
14754
|
-
writer.uint32(42).string(message.category_name);
|
|
14755
|
-
}
|
|
14756
|
-
if (message.type !== undefined) {
|
|
14757
|
-
Int32Value.encode({ value: message.type! }, writer.uint32(50).fork()).ldelim();
|
|
14758
|
-
}
|
|
14759
|
-
if (message.creator_id !== "") {
|
|
14760
|
-
writer.uint32(58).string(message.creator_id);
|
|
14761
|
-
}
|
|
14762
|
-
if (message.channel_label !== "") {
|
|
14763
|
-
writer.uint32(66).string(message.channel_label);
|
|
14764
|
-
}
|
|
14765
|
-
if (message.channel_private !== 0) {
|
|
14766
|
-
writer.uint32(72).int32(message.channel_private);
|
|
14767
|
-
}
|
|
14768
|
-
for (const v of message.avatars) {
|
|
14769
|
-
writer.uint32(82).string(v!);
|
|
14770
|
-
}
|
|
14771
|
-
for (const v of message.user_ids) {
|
|
14772
|
-
writer.uint32(90).string(v!);
|
|
14773
|
-
}
|
|
14774
|
-
if (message.last_sent_message !== undefined) {
|
|
14775
|
-
ChannelMessageHeader.encode(message.last_sent_message, writer.uint32(98).fork()).ldelim();
|
|
14776
|
-
}
|
|
14777
|
-
if (message.last_seen_message !== undefined) {
|
|
14778
|
-
ChannelMessageHeader.encode(message.last_seen_message, writer.uint32(106).fork()).ldelim();
|
|
14779
|
-
}
|
|
14780
|
-
writer.uint32(114).fork();
|
|
14781
|
-
for (const v of message.onlines) {
|
|
14782
|
-
writer.bool(v);
|
|
14783
|
-
}
|
|
14784
|
-
writer.ldelim();
|
|
14785
|
-
if (message.meeting_code !== "") {
|
|
14786
|
-
writer.uint32(122).string(message.meeting_code);
|
|
14787
|
-
}
|
|
14788
|
-
if (message.count_mess_unread !== 0) {
|
|
14789
|
-
writer.uint32(128).int32(message.count_mess_unread);
|
|
14790
|
-
}
|
|
14791
|
-
if (message.active !== 0) {
|
|
14792
|
-
writer.uint32(136).int32(message.active);
|
|
14793
|
-
}
|
|
14794
|
-
if (message.last_pin_message !== "") {
|
|
14795
|
-
writer.uint32(146).string(message.last_pin_message);
|
|
14796
|
-
}
|
|
14797
|
-
for (const v of message.usernames) {
|
|
14798
|
-
writer.uint32(154).string(v!);
|
|
14799
|
-
}
|
|
14800
|
-
if (message.creator_name !== "") {
|
|
14801
|
-
writer.uint32(162).string(message.creator_name);
|
|
14802
|
-
}
|
|
14803
|
-
if (message.create_time_seconds !== 0) {
|
|
14804
|
-
writer.uint32(168).uint32(message.create_time_seconds);
|
|
14805
|
-
}
|
|
14806
|
-
if (message.update_time_seconds !== 0) {
|
|
14807
|
-
writer.uint32(176).uint32(message.update_time_seconds);
|
|
14808
|
-
}
|
|
14809
|
-
for (const v of message.display_names) {
|
|
14810
|
-
writer.uint32(186).string(v!);
|
|
14811
|
-
}
|
|
14812
|
-
if (message.channel_avatar !== "") {
|
|
14813
|
-
writer.uint32(194).string(message.channel_avatar);
|
|
14814
|
-
}
|
|
14815
|
-
if (message.clan_name !== "") {
|
|
14816
|
-
writer.uint32(202).string(message.clan_name);
|
|
14817
|
-
}
|
|
14818
|
-
if (message.app_id !== "") {
|
|
14819
|
-
writer.uint32(210).string(message.app_id);
|
|
14820
|
-
}
|
|
14821
|
-
if (message.is_mute !== false) {
|
|
14822
|
-
writer.uint32(216).bool(message.is_mute);
|
|
14823
|
-
}
|
|
14824
|
-
if (message.age_restricted !== 0) {
|
|
14825
|
-
writer.uint32(224).int32(message.age_restricted);
|
|
14826
|
-
}
|
|
14827
|
-
if (message.topic !== "") {
|
|
14828
|
-
writer.uint32(234).string(message.topic);
|
|
14829
|
-
}
|
|
14830
|
-
if (message.e2ee !== 0) {
|
|
14831
|
-
writer.uint32(240).int32(message.e2ee);
|
|
14832
|
-
}
|
|
14833
|
-
if (message.member_count !== 0) {
|
|
14834
|
-
writer.uint32(248).int32(message.member_count);
|
|
14835
|
-
}
|
|
14836
|
-
return writer;
|
|
14837
|
-
},
|
|
14838
|
-
|
|
14839
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescriptionOld {
|
|
14840
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
14841
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
14842
|
-
const message = createBaseChannelDescriptionOld();
|
|
14843
|
-
while (reader.pos < end) {
|
|
14844
|
-
const tag = reader.uint32();
|
|
14845
|
-
switch (tag >>> 3) {
|
|
14846
|
-
case 1:
|
|
14847
|
-
if (tag !== 10) {
|
|
14848
|
-
break;
|
|
14849
|
-
}
|
|
14850
|
-
|
|
14851
|
-
message.clan_id = reader.string();
|
|
14852
|
-
continue;
|
|
14853
|
-
case 2:
|
|
14854
|
-
if (tag !== 18) {
|
|
14855
|
-
break;
|
|
14856
|
-
}
|
|
14857
|
-
|
|
14858
|
-
message.parent_id = reader.string();
|
|
14859
|
-
continue;
|
|
14860
|
-
case 3:
|
|
14861
|
-
if (tag !== 26) {
|
|
14862
|
-
break;
|
|
14863
|
-
}
|
|
14864
|
-
|
|
14865
|
-
message.channel_id = reader.string();
|
|
14866
|
-
continue;
|
|
14867
|
-
case 4:
|
|
14868
|
-
if (tag !== 34) {
|
|
14869
|
-
break;
|
|
14870
|
-
}
|
|
14871
|
-
|
|
14872
|
-
message.category_id = reader.string();
|
|
14873
|
-
continue;
|
|
14874
|
-
case 5:
|
|
14875
|
-
if (tag !== 42) {
|
|
14876
|
-
break;
|
|
14877
|
-
}
|
|
14878
|
-
|
|
14879
|
-
message.category_name = reader.string();
|
|
14880
|
-
continue;
|
|
14881
|
-
case 6:
|
|
14882
|
-
if (tag !== 50) {
|
|
14883
|
-
break;
|
|
14884
|
-
}
|
|
14885
|
-
|
|
14886
|
-
message.type = Int32Value.decode(reader, reader.uint32()).value;
|
|
14887
|
-
continue;
|
|
14888
|
-
case 7:
|
|
14889
|
-
if (tag !== 58) {
|
|
14890
|
-
break;
|
|
14891
|
-
}
|
|
14892
|
-
|
|
14893
|
-
message.creator_id = reader.string();
|
|
14894
|
-
continue;
|
|
14895
|
-
case 8:
|
|
14896
|
-
if (tag !== 66) {
|
|
14897
|
-
break;
|
|
14898
|
-
}
|
|
14899
|
-
|
|
14900
|
-
message.channel_label = reader.string();
|
|
14901
|
-
continue;
|
|
14902
|
-
case 9:
|
|
14903
|
-
if (tag !== 72) {
|
|
14904
|
-
break;
|
|
14905
|
-
}
|
|
14906
|
-
|
|
14907
|
-
message.channel_private = reader.int32();
|
|
14908
|
-
continue;
|
|
14909
|
-
case 10:
|
|
14910
|
-
if (tag !== 82) {
|
|
14911
|
-
break;
|
|
14912
|
-
}
|
|
14913
|
-
|
|
14914
|
-
message.avatars.push(reader.string());
|
|
14915
|
-
continue;
|
|
14916
|
-
case 11:
|
|
14917
|
-
if (tag !== 90) {
|
|
14918
|
-
break;
|
|
14919
|
-
}
|
|
14920
|
-
|
|
14921
|
-
message.user_ids.push(reader.string());
|
|
14922
|
-
continue;
|
|
14923
|
-
case 12:
|
|
14924
|
-
if (tag !== 98) {
|
|
14925
|
-
break;
|
|
14926
|
-
}
|
|
14927
|
-
|
|
14928
|
-
message.last_sent_message = ChannelMessageHeader.decode(reader, reader.uint32());
|
|
14929
|
-
continue;
|
|
14930
|
-
case 13:
|
|
14931
|
-
if (tag !== 106) {
|
|
14932
|
-
break;
|
|
14933
|
-
}
|
|
14934
|
-
|
|
14935
|
-
message.last_seen_message = ChannelMessageHeader.decode(reader, reader.uint32());
|
|
14936
|
-
continue;
|
|
14937
|
-
case 14:
|
|
14938
|
-
if (tag === 112) {
|
|
14939
|
-
message.onlines.push(reader.bool());
|
|
14940
|
-
|
|
14941
|
-
continue;
|
|
14942
|
-
}
|
|
14943
|
-
|
|
14944
|
-
if (tag === 114) {
|
|
14945
|
-
const end2 = reader.uint32() + reader.pos;
|
|
14946
|
-
while (reader.pos < end2) {
|
|
14947
|
-
message.onlines.push(reader.bool());
|
|
14948
|
-
}
|
|
14949
|
-
|
|
14950
|
-
continue;
|
|
14951
|
-
}
|
|
14952
|
-
|
|
14953
|
-
break;
|
|
14954
|
-
case 15:
|
|
14955
|
-
if (tag !== 122) {
|
|
14956
|
-
break;
|
|
14957
|
-
}
|
|
14958
|
-
|
|
14959
|
-
message.meeting_code = reader.string();
|
|
14960
|
-
continue;
|
|
14961
|
-
case 16:
|
|
14962
|
-
if (tag !== 128) {
|
|
14963
|
-
break;
|
|
14964
|
-
}
|
|
14965
|
-
|
|
14966
|
-
message.count_mess_unread = reader.int32();
|
|
14967
|
-
continue;
|
|
14968
|
-
case 17:
|
|
14969
|
-
if (tag !== 136) {
|
|
14970
|
-
break;
|
|
14971
|
-
}
|
|
14972
|
-
|
|
14973
|
-
message.active = reader.int32();
|
|
14974
|
-
continue;
|
|
14975
|
-
case 18:
|
|
14976
|
-
if (tag !== 146) {
|
|
14977
|
-
break;
|
|
14978
|
-
}
|
|
14979
|
-
|
|
14980
|
-
message.last_pin_message = reader.string();
|
|
14981
|
-
continue;
|
|
14982
|
-
case 19:
|
|
14983
|
-
if (tag !== 154) {
|
|
14984
|
-
break;
|
|
14985
|
-
}
|
|
14986
|
-
|
|
14987
|
-
message.usernames.push(reader.string());
|
|
14988
|
-
continue;
|
|
14989
|
-
case 20:
|
|
14990
|
-
if (tag !== 162) {
|
|
14991
|
-
break;
|
|
14992
|
-
}
|
|
14993
|
-
|
|
14994
|
-
message.creator_name = reader.string();
|
|
14995
|
-
continue;
|
|
14996
|
-
case 21:
|
|
14997
|
-
if (tag !== 168) {
|
|
14998
|
-
break;
|
|
14999
|
-
}
|
|
15000
|
-
|
|
15001
|
-
message.create_time_seconds = reader.uint32();
|
|
15002
|
-
continue;
|
|
15003
|
-
case 22:
|
|
15004
|
-
if (tag !== 176) {
|
|
15005
|
-
break;
|
|
15006
|
-
}
|
|
15007
|
-
|
|
15008
|
-
message.update_time_seconds = reader.uint32();
|
|
15009
|
-
continue;
|
|
15010
|
-
case 23:
|
|
15011
|
-
if (tag !== 186) {
|
|
15012
|
-
break;
|
|
15013
|
-
}
|
|
15014
|
-
|
|
15015
|
-
message.display_names.push(reader.string());
|
|
15016
|
-
continue;
|
|
15017
|
-
case 24:
|
|
15018
|
-
if (tag !== 194) {
|
|
15019
|
-
break;
|
|
15020
|
-
}
|
|
15021
|
-
|
|
15022
|
-
message.channel_avatar = reader.string();
|
|
15023
|
-
continue;
|
|
15024
|
-
case 25:
|
|
15025
|
-
if (tag !== 202) {
|
|
15026
|
-
break;
|
|
15027
|
-
}
|
|
15028
|
-
|
|
15029
|
-
message.clan_name = reader.string();
|
|
15030
|
-
continue;
|
|
15031
|
-
case 26:
|
|
15032
|
-
if (tag !== 210) {
|
|
15033
|
-
break;
|
|
15034
|
-
}
|
|
15035
|
-
|
|
15036
|
-
message.app_id = reader.string();
|
|
15037
|
-
continue;
|
|
15038
|
-
case 27:
|
|
15039
|
-
if (tag !== 216) {
|
|
15040
|
-
break;
|
|
15041
|
-
}
|
|
15042
|
-
|
|
15043
|
-
message.is_mute = reader.bool();
|
|
15044
|
-
continue;
|
|
15045
|
-
case 28:
|
|
15046
|
-
if (tag !== 224) {
|
|
15047
|
-
break;
|
|
15048
|
-
}
|
|
15049
|
-
|
|
15050
|
-
message.age_restricted = reader.int32();
|
|
15051
|
-
continue;
|
|
15052
|
-
case 29:
|
|
15053
|
-
if (tag !== 234) {
|
|
15054
|
-
break;
|
|
15055
|
-
}
|
|
15056
|
-
|
|
15057
|
-
message.topic = reader.string();
|
|
15058
|
-
continue;
|
|
15059
|
-
case 30:
|
|
15060
|
-
if (tag !== 240) {
|
|
15061
|
-
break;
|
|
15062
|
-
}
|
|
15063
|
-
|
|
15064
|
-
message.e2ee = reader.int32();
|
|
15065
|
-
continue;
|
|
15066
|
-
case 31:
|
|
15067
|
-
if (tag !== 248) {
|
|
15068
|
-
break;
|
|
15069
|
-
}
|
|
15070
|
-
|
|
15071
|
-
message.member_count = reader.int32();
|
|
15072
|
-
continue;
|
|
15073
|
-
}
|
|
15074
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
15075
|
-
break;
|
|
15076
|
-
}
|
|
15077
|
-
reader.skipType(tag & 7);
|
|
15078
|
-
}
|
|
15079
|
-
return message;
|
|
15080
|
-
},
|
|
15081
|
-
|
|
15082
|
-
fromJSON(object: any): ChannelDescriptionOld {
|
|
15083
|
-
return {
|
|
15084
|
-
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
15085
|
-
parent_id: isSet(object.parent_id) ? globalThis.String(object.parent_id) : "",
|
|
15086
|
-
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
15087
|
-
category_id: isSet(object.category_id) ? globalThis.String(object.category_id) : "",
|
|
15088
|
-
category_name: isSet(object.category_name) ? globalThis.String(object.category_name) : "",
|
|
15089
|
-
type: isSet(object.type) ? Number(object.type) : undefined,
|
|
15090
|
-
creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
|
|
15091
|
-
channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
|
|
15092
|
-
channel_private: isSet(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
|
|
15093
|
-
avatars: globalThis.Array.isArray(object?.avatars) ? object.avatars.map((e: any) => globalThis.String(e)) : [],
|
|
15094
|
-
user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
|
|
15095
|
-
last_sent_message: isSet(object.last_sent_message)
|
|
15096
|
-
? ChannelMessageHeader.fromJSON(object.last_sent_message)
|
|
15097
|
-
: undefined,
|
|
15098
|
-
last_seen_message: isSet(object.last_seen_message)
|
|
15099
|
-
? ChannelMessageHeader.fromJSON(object.last_seen_message)
|
|
15100
|
-
: undefined,
|
|
15101
|
-
onlines: globalThis.Array.isArray(object?.onlines) ? object.onlines.map((e: any) => globalThis.Boolean(e)) : [],
|
|
15102
|
-
meeting_code: isSet(object.meeting_code) ? globalThis.String(object.meeting_code) : "",
|
|
15103
|
-
count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
15104
|
-
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
15105
|
-
last_pin_message: isSet(object.last_pin_message) ? globalThis.String(object.last_pin_message) : "",
|
|
15106
|
-
usernames: globalThis.Array.isArray(object?.usernames)
|
|
15107
|
-
? object.usernames.map((e: any) => globalThis.String(e))
|
|
15108
|
-
: [],
|
|
15109
|
-
creator_name: isSet(object.creator_name) ? globalThis.String(object.creator_name) : "",
|
|
15110
|
-
create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
15111
|
-
update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
15112
|
-
display_names: globalThis.Array.isArray(object?.display_names)
|
|
15113
|
-
? object.display_names.map((e: any) => globalThis.String(e))
|
|
15114
|
-
: [],
|
|
15115
|
-
channel_avatar: isSet(object.channel_avatar) ? globalThis.String(object.channel_avatar) : "",
|
|
15116
|
-
clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
15117
|
-
app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
15118
|
-
is_mute: isSet(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
|
|
15119
|
-
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
15120
|
-
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
15121
|
-
e2ee: isSet(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
|
|
15122
|
-
member_count: isSet(object.member_count) ? globalThis.Number(object.member_count) : 0,
|
|
15123
|
-
};
|
|
15124
|
-
},
|
|
15125
|
-
|
|
15126
|
-
toJSON(message: ChannelDescriptionOld): unknown {
|
|
15127
|
-
const obj: any = {};
|
|
15128
|
-
if (message.clan_id !== "") {
|
|
15129
|
-
obj.clan_id = message.clan_id;
|
|
15130
|
-
}
|
|
15131
|
-
if (message.parent_id !== "") {
|
|
15132
|
-
obj.parent_id = message.parent_id;
|
|
15133
|
-
}
|
|
15134
|
-
if (message.channel_id !== "") {
|
|
15135
|
-
obj.channel_id = message.channel_id;
|
|
15136
|
-
}
|
|
15137
|
-
if (message.category_id !== "") {
|
|
15138
|
-
obj.category_id = message.category_id;
|
|
15139
|
-
}
|
|
15140
|
-
if (message.category_name !== "") {
|
|
15141
|
-
obj.category_name = message.category_name;
|
|
15142
|
-
}
|
|
15143
|
-
if (message.type !== undefined) {
|
|
15144
|
-
obj.type = message.type;
|
|
15145
|
-
}
|
|
15146
|
-
if (message.creator_id !== "") {
|
|
15147
|
-
obj.creator_id = message.creator_id;
|
|
15148
|
-
}
|
|
15149
|
-
if (message.channel_label !== "") {
|
|
15150
|
-
obj.channel_label = message.channel_label;
|
|
15151
|
-
}
|
|
15152
|
-
if (message.channel_private !== 0) {
|
|
15153
|
-
obj.channel_private = Math.round(message.channel_private);
|
|
15154
|
-
}
|
|
15155
|
-
if (message.avatars?.length) {
|
|
15156
|
-
obj.avatars = message.avatars;
|
|
15157
|
-
}
|
|
15158
|
-
if (message.user_ids?.length) {
|
|
15159
|
-
obj.user_ids = message.user_ids;
|
|
15160
|
-
}
|
|
15161
|
-
if (message.last_sent_message !== undefined) {
|
|
15162
|
-
obj.last_sent_message = ChannelMessageHeader.toJSON(message.last_sent_message);
|
|
15163
|
-
}
|
|
15164
|
-
if (message.last_seen_message !== undefined) {
|
|
15165
|
-
obj.last_seen_message = ChannelMessageHeader.toJSON(message.last_seen_message);
|
|
15166
|
-
}
|
|
15167
|
-
if (message.onlines?.length) {
|
|
15168
|
-
obj.onlines = message.onlines;
|
|
15169
|
-
}
|
|
15170
|
-
if (message.meeting_code !== "") {
|
|
15171
|
-
obj.meeting_code = message.meeting_code;
|
|
15172
|
-
}
|
|
15173
|
-
if (message.count_mess_unread !== 0) {
|
|
15174
|
-
obj.count_mess_unread = Math.round(message.count_mess_unread);
|
|
15175
|
-
}
|
|
15176
|
-
if (message.active !== 0) {
|
|
15177
|
-
obj.active = Math.round(message.active);
|
|
15178
|
-
}
|
|
15179
|
-
if (message.last_pin_message !== "") {
|
|
15180
|
-
obj.last_pin_message = message.last_pin_message;
|
|
15181
|
-
}
|
|
15182
|
-
if (message.usernames?.length) {
|
|
15183
|
-
obj.usernames = message.usernames;
|
|
15184
|
-
}
|
|
15185
|
-
if (message.creator_name !== "") {
|
|
15186
|
-
obj.creator_name = message.creator_name;
|
|
15187
|
-
}
|
|
15188
|
-
if (message.create_time_seconds !== 0) {
|
|
15189
|
-
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
15190
|
-
}
|
|
15191
|
-
if (message.update_time_seconds !== 0) {
|
|
15192
|
-
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
15193
|
-
}
|
|
15194
|
-
if (message.display_names?.length) {
|
|
15195
|
-
obj.display_names = message.display_names;
|
|
15196
|
-
}
|
|
15197
|
-
if (message.channel_avatar !== "") {
|
|
15198
|
-
obj.channel_avatar = message.channel_avatar;
|
|
15199
|
-
}
|
|
15200
|
-
if (message.clan_name !== "") {
|
|
15201
|
-
obj.clan_name = message.clan_name;
|
|
15202
|
-
}
|
|
15203
|
-
if (message.app_id !== "") {
|
|
15204
|
-
obj.app_id = message.app_id;
|
|
15205
|
-
}
|
|
15206
|
-
if (message.is_mute !== false) {
|
|
15207
|
-
obj.is_mute = message.is_mute;
|
|
15208
|
-
}
|
|
15209
|
-
if (message.age_restricted !== 0) {
|
|
15210
|
-
obj.age_restricted = Math.round(message.age_restricted);
|
|
15211
|
-
}
|
|
15212
|
-
if (message.topic !== "") {
|
|
15213
|
-
obj.topic = message.topic;
|
|
15214
|
-
}
|
|
15215
|
-
if (message.e2ee !== 0) {
|
|
15216
|
-
obj.e2ee = Math.round(message.e2ee);
|
|
15217
|
-
}
|
|
15218
|
-
if (message.member_count !== 0) {
|
|
15219
|
-
obj.member_count = Math.round(message.member_count);
|
|
15220
|
-
}
|
|
15221
|
-
return obj;
|
|
15222
|
-
},
|
|
15223
|
-
|
|
15224
|
-
create<I extends Exact<DeepPartial<ChannelDescriptionOld>, I>>(base?: I): ChannelDescriptionOld {
|
|
15225
|
-
return ChannelDescriptionOld.fromPartial(base ?? ({} as any));
|
|
15226
|
-
},
|
|
15227
|
-
fromPartial<I extends Exact<DeepPartial<ChannelDescriptionOld>, I>>(object: I): ChannelDescriptionOld {
|
|
15228
|
-
const message = createBaseChannelDescriptionOld();
|
|
15229
|
-
message.clan_id = object.clan_id ?? "";
|
|
15230
|
-
message.parent_id = object.parent_id ?? "";
|
|
15231
|
-
message.channel_id = object.channel_id ?? "";
|
|
15232
|
-
message.category_id = object.category_id ?? "";
|
|
15233
|
-
message.category_name = object.category_name ?? "";
|
|
15234
|
-
message.type = object.type ?? undefined;
|
|
15235
|
-
message.creator_id = object.creator_id ?? "";
|
|
15236
|
-
message.channel_label = object.channel_label ?? "";
|
|
15237
|
-
message.channel_private = object.channel_private ?? 0;
|
|
15238
|
-
message.avatars = object.avatars?.map((e) => e) || [];
|
|
15239
|
-
message.user_ids = object.user_ids?.map((e) => e) || [];
|
|
15240
|
-
message.last_sent_message = (object.last_sent_message !== undefined && object.last_sent_message !== null)
|
|
15241
|
-
? ChannelMessageHeader.fromPartial(object.last_sent_message)
|
|
15242
|
-
: undefined;
|
|
15243
|
-
message.last_seen_message = (object.last_seen_message !== undefined && object.last_seen_message !== null)
|
|
15244
|
-
? ChannelMessageHeader.fromPartial(object.last_seen_message)
|
|
15245
|
-
: undefined;
|
|
15246
|
-
message.onlines = object.onlines?.map((e) => e) || [];
|
|
15247
|
-
message.meeting_code = object.meeting_code ?? "";
|
|
15248
|
-
message.count_mess_unread = object.count_mess_unread ?? 0;
|
|
15249
|
-
message.active = object.active ?? 0;
|
|
15250
|
-
message.last_pin_message = object.last_pin_message ?? "";
|
|
15251
|
-
message.usernames = object.usernames?.map((e) => e) || [];
|
|
15252
|
-
message.creator_name = object.creator_name ?? "";
|
|
15253
|
-
message.create_time_seconds = object.create_time_seconds ?? 0;
|
|
15254
|
-
message.update_time_seconds = object.update_time_seconds ?? 0;
|
|
15255
|
-
message.display_names = object.display_names?.map((e) => e) || [];
|
|
15256
|
-
message.channel_avatar = object.channel_avatar ?? "";
|
|
15257
|
-
message.clan_name = object.clan_name ?? "";
|
|
15258
|
-
message.app_id = object.app_id ?? "";
|
|
15259
|
-
message.is_mute = object.is_mute ?? false;
|
|
15260
|
-
message.age_restricted = object.age_restricted ?? 0;
|
|
15261
|
-
message.topic = object.topic ?? "";
|
|
15262
|
-
message.e2ee = object.e2ee ?? 0;
|
|
15263
|
-
message.member_count = object.member_count ?? 0;
|
|
15264
|
-
return message;
|
|
15265
|
-
},
|
|
15266
|
-
};
|
|
15267
|
-
|
|
15268
14663
|
function createBaseChannelDescription(): ChannelDescription {
|
|
15269
14664
|
return {
|
|
15270
14665
|
clan_id: "",
|