mezon-js 2.13.76 → 2.13.77

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 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
@@ -1513,78 +1511,6 @@ export interface ChannelMessageHeader {
1513
1511
  reaction: string;
1514
1512
  }
1515
1513
 
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
1514
  /** Channel description record */
1589
1515
  export interface ChannelDescription {
1590
1516
  /** The clan of this channel */
@@ -7281,7 +7207,7 @@ export const Event_PropertiesEntry = {
7281
7207
  };
7282
7208
 
7283
7209
  function createBaseFriend(): Friend {
7284
- return { user: undefined, state: undefined, update_time: undefined, source_id: "" };
7210
+ return { user: undefined, state: 0, update_time: undefined, source_id: "" };
7285
7211
  }
7286
7212
 
7287
7213
  export const Friend = {
@@ -7289,8 +7215,8 @@ export const Friend = {
7289
7215
  if (message.user !== undefined) {
7290
7216
  User.encode(message.user, writer.uint32(10).fork()).ldelim();
7291
7217
  }
7292
- if (message.state !== undefined) {
7293
- Int32Value.encode({ value: message.state! }, writer.uint32(18).fork()).ldelim();
7218
+ if (message.state !== 0) {
7219
+ writer.uint32(16).int32(message.state);
7294
7220
  }
7295
7221
  if (message.update_time !== undefined) {
7296
7222
  Timestamp.encode(toTimestamp(message.update_time), writer.uint32(26).fork()).ldelim();
@@ -7316,11 +7242,11 @@ export const Friend = {
7316
7242
  message.user = User.decode(reader, reader.uint32());
7317
7243
  continue;
7318
7244
  case 2:
7319
- if (tag !== 18) {
7245
+ if (tag !== 16) {
7320
7246
  break;
7321
7247
  }
7322
7248
 
7323
- message.state = Int32Value.decode(reader, reader.uint32()).value;
7249
+ message.state = reader.int32();
7324
7250
  continue;
7325
7251
  case 3:
7326
7252
  if (tag !== 26) {
@@ -7348,7 +7274,7 @@ export const Friend = {
7348
7274
  fromJSON(object: any): Friend {
7349
7275
  return {
7350
7276
  user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
7351
- state: isSet(object.state) ? Number(object.state) : undefined,
7277
+ state: isSet(object.state) ? globalThis.Number(object.state) : 0,
7352
7278
  update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
7353
7279
  source_id: isSet(object.source_id) ? globalThis.String(object.source_id) : "",
7354
7280
  };
@@ -7359,8 +7285,8 @@ export const Friend = {
7359
7285
  if (message.user !== undefined) {
7360
7286
  obj.user = User.toJSON(message.user);
7361
7287
  }
7362
- if (message.state !== undefined) {
7363
- obj.state = message.state;
7288
+ if (message.state !== 0) {
7289
+ obj.state = Math.round(message.state);
7364
7290
  }
7365
7291
  if (message.update_time !== undefined) {
7366
7292
  obj.update_time = message.update_time.toISOString();
@@ -7377,7 +7303,7 @@ export const Friend = {
7377
7303
  fromPartial<I extends Exact<DeepPartial<Friend>, I>>(object: I): Friend {
7378
7304
  const message = createBaseFriend();
7379
7305
  message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
7380
- message.state = object.state ?? undefined;
7306
+ message.state = object.state ?? 0;
7381
7307
  message.update_time = object.update_time ?? undefined;
7382
7308
  message.source_id = object.source_id ?? "";
7383
7309
  return message;
@@ -14700,571 +14626,6 @@ export const ChannelMessageHeader = {
14700
14626
  },
14701
14627
  };
14702
14628
 
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
14629
  function createBaseChannelDescription(): ChannelDescription {
15269
14630
  return {
15270
14631
  clan_id: "",
package/dist/api/api.d.ts CHANGED
@@ -397,7 +397,7 @@ export interface Friend {
397
397
  /** The user object. */
398
398
  user: User | undefined;
399
399
  /** The friend status. */
400
- state: number | undefined;
400
+ state: number;
401
401
  /** Time of the latest relationship update. */
402
402
  update_time: Date | undefined;
403
403
  /** source id */
@@ -1142,71 +1142,6 @@ export interface ChannelMessageHeader {
1142
1142
  reaction: string;
1143
1143
  }
1144
1144
  /** Channel description record */
1145
- export interface ChannelDescriptionOld {
1146
- /** The clan of this channel */
1147
- clan_id: string;
1148
- /** The parent channel this message belongs to. */
1149
- parent_id: string;
1150
- /** The channel this message belongs to. */
1151
- channel_id: string;
1152
- /** The category of channel */
1153
- category_id: string;
1154
- /** The category name */
1155
- category_name: string;
1156
- /** The channel type. */
1157
- type: number | undefined;
1158
- /** creator ID. */
1159
- creator_id: string;
1160
- /** The channel lable */
1161
- channel_label: string;
1162
- /** The channel private */
1163
- channel_private: number;
1164
- /** DM avatars */
1165
- avatars: string[];
1166
- /** List DM user ids */
1167
- user_ids: string[];
1168
- /** last message id */
1169
- last_sent_message: ChannelMessageHeader | undefined;
1170
- /** last seen message id */
1171
- last_seen_message: ChannelMessageHeader | undefined;
1172
- /** DM status */
1173
- onlines: boolean[];
1174
- /** meeting code */
1175
- meeting_code: string;
1176
- /** count message unread */
1177
- count_mess_unread: number;
1178
- /** active channel */
1179
- active: number;
1180
- /** last pin message */
1181
- last_pin_message: string;
1182
- /** List DM usernames */
1183
- usernames: string[];
1184
- /** creator name */
1185
- creator_name: string;
1186
- /** create time ms */
1187
- create_time_seconds: number;
1188
- /** update time ms */
1189
- update_time_seconds: number;
1190
- /** List DM diplay names */
1191
- display_names: string[];
1192
- /** channel avatar */
1193
- channel_avatar: string;
1194
- /** clan_name */
1195
- clan_name: string;
1196
- /** app id */
1197
- app_id: string;
1198
- /** channel all message */
1199
- is_mute: boolean;
1200
- /** age restricted */
1201
- age_restricted: number;
1202
- /** channel description topic */
1203
- topic: string;
1204
- /** e2ee */
1205
- e2ee: number;
1206
- /** channel member count */
1207
- member_count: number;
1208
- }
1209
- /** Channel description record */
1210
1145
  export interface ChannelDescription {
1211
1146
  /** The clan of this channel */
1212
1147
  clan_id: string;
@@ -10085,250 +10020,6 @@ export declare const ChannelMessageHeader: {
10085
10020
  reaction?: string | undefined;
10086
10021
  } & { [K_1 in Exclude<keyof I_1, keyof ChannelMessageHeader>]: never; }>(object: I_1): ChannelMessageHeader;
10087
10022
  };
10088
- export declare const ChannelDescriptionOld: {
10089
- encode(message: ChannelDescriptionOld, writer?: _m0.Writer): _m0.Writer;
10090
- decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescriptionOld;
10091
- fromJSON(object: any): ChannelDescriptionOld;
10092
- toJSON(message: ChannelDescriptionOld): unknown;
10093
- create<I extends {
10094
- clan_id?: string | undefined;
10095
- parent_id?: string | undefined;
10096
- channel_id?: string | undefined;
10097
- category_id?: string | undefined;
10098
- category_name?: string | undefined;
10099
- type?: number | undefined;
10100
- creator_id?: string | undefined;
10101
- channel_label?: string | undefined;
10102
- channel_private?: number | undefined;
10103
- avatars?: string[] | undefined;
10104
- user_ids?: string[] | undefined;
10105
- last_sent_message?: {
10106
- id?: string | undefined;
10107
- timestamp_seconds?: number | undefined;
10108
- sender_id?: string | undefined;
10109
- content?: string | undefined;
10110
- attachment?: string | undefined;
10111
- reference?: string | undefined;
10112
- mention?: string | undefined;
10113
- reaction?: string | undefined;
10114
- } | undefined;
10115
- last_seen_message?: {
10116
- id?: string | undefined;
10117
- timestamp_seconds?: number | undefined;
10118
- sender_id?: string | undefined;
10119
- content?: string | undefined;
10120
- attachment?: string | undefined;
10121
- reference?: string | undefined;
10122
- mention?: string | undefined;
10123
- reaction?: string | undefined;
10124
- } | undefined;
10125
- onlines?: boolean[] | undefined;
10126
- meeting_code?: string | undefined;
10127
- count_mess_unread?: number | undefined;
10128
- active?: number | undefined;
10129
- last_pin_message?: string | undefined;
10130
- usernames?: string[] | undefined;
10131
- creator_name?: string | undefined;
10132
- create_time_seconds?: number | undefined;
10133
- update_time_seconds?: number | undefined;
10134
- display_names?: string[] | undefined;
10135
- channel_avatar?: string | undefined;
10136
- clan_name?: string | undefined;
10137
- app_id?: string | undefined;
10138
- is_mute?: boolean | undefined;
10139
- age_restricted?: number | undefined;
10140
- topic?: string | undefined;
10141
- e2ee?: number | undefined;
10142
- member_count?: number | undefined;
10143
- } & {
10144
- clan_id?: string | undefined;
10145
- parent_id?: string | undefined;
10146
- channel_id?: string | undefined;
10147
- category_id?: string | undefined;
10148
- category_name?: string | undefined;
10149
- type?: number | undefined;
10150
- creator_id?: string | undefined;
10151
- channel_label?: string | undefined;
10152
- channel_private?: number | undefined;
10153
- avatars?: (string[] & string[] & { [K in Exclude<keyof I["avatars"], keyof string[]>]: never; }) | undefined;
10154
- user_ids?: (string[] & string[] & { [K_1 in Exclude<keyof I["user_ids"], keyof string[]>]: never; }) | undefined;
10155
- last_sent_message?: ({
10156
- id?: string | undefined;
10157
- timestamp_seconds?: number | undefined;
10158
- sender_id?: string | undefined;
10159
- content?: string | undefined;
10160
- attachment?: string | undefined;
10161
- reference?: string | undefined;
10162
- mention?: string | undefined;
10163
- reaction?: string | undefined;
10164
- } & {
10165
- id?: string | undefined;
10166
- timestamp_seconds?: number | undefined;
10167
- sender_id?: string | undefined;
10168
- content?: string | undefined;
10169
- attachment?: string | undefined;
10170
- reference?: string | undefined;
10171
- mention?: string | undefined;
10172
- reaction?: string | undefined;
10173
- } & { [K_2 in Exclude<keyof I["last_sent_message"], keyof ChannelMessageHeader>]: never; }) | undefined;
10174
- last_seen_message?: ({
10175
- id?: string | undefined;
10176
- timestamp_seconds?: number | undefined;
10177
- sender_id?: string | undefined;
10178
- content?: string | undefined;
10179
- attachment?: string | undefined;
10180
- reference?: string | undefined;
10181
- mention?: string | undefined;
10182
- reaction?: string | undefined;
10183
- } & {
10184
- id?: string | undefined;
10185
- timestamp_seconds?: number | undefined;
10186
- sender_id?: string | undefined;
10187
- content?: string | undefined;
10188
- attachment?: string | undefined;
10189
- reference?: string | undefined;
10190
- mention?: string | undefined;
10191
- reaction?: string | undefined;
10192
- } & { [K_3 in Exclude<keyof I["last_seen_message"], keyof ChannelMessageHeader>]: never; }) | undefined;
10193
- onlines?: (boolean[] & boolean[] & { [K_4 in Exclude<keyof I["onlines"], keyof boolean[]>]: never; }) | undefined;
10194
- meeting_code?: string | undefined;
10195
- count_mess_unread?: number | undefined;
10196
- active?: number | undefined;
10197
- last_pin_message?: string | undefined;
10198
- usernames?: (string[] & string[] & { [K_5 in Exclude<keyof I["usernames"], keyof string[]>]: never; }) | undefined;
10199
- creator_name?: string | undefined;
10200
- create_time_seconds?: number | undefined;
10201
- update_time_seconds?: number | undefined;
10202
- display_names?: (string[] & string[] & { [K_6 in Exclude<keyof I["display_names"], keyof string[]>]: never; }) | undefined;
10203
- channel_avatar?: string | undefined;
10204
- clan_name?: string | undefined;
10205
- app_id?: string | undefined;
10206
- is_mute?: boolean | undefined;
10207
- age_restricted?: number | undefined;
10208
- topic?: string | undefined;
10209
- e2ee?: number | undefined;
10210
- member_count?: number | undefined;
10211
- } & { [K_7 in Exclude<keyof I, keyof ChannelDescriptionOld>]: never; }>(base?: I | undefined): ChannelDescriptionOld;
10212
- fromPartial<I_1 extends {
10213
- clan_id?: string | undefined;
10214
- parent_id?: string | undefined;
10215
- channel_id?: string | undefined;
10216
- category_id?: string | undefined;
10217
- category_name?: string | undefined;
10218
- type?: number | undefined;
10219
- creator_id?: string | undefined;
10220
- channel_label?: string | undefined;
10221
- channel_private?: number | undefined;
10222
- avatars?: string[] | undefined;
10223
- user_ids?: string[] | undefined;
10224
- last_sent_message?: {
10225
- id?: string | undefined;
10226
- timestamp_seconds?: number | undefined;
10227
- sender_id?: string | undefined;
10228
- content?: string | undefined;
10229
- attachment?: string | undefined;
10230
- reference?: string | undefined;
10231
- mention?: string | undefined;
10232
- reaction?: string | undefined;
10233
- } | undefined;
10234
- last_seen_message?: {
10235
- id?: string | undefined;
10236
- timestamp_seconds?: number | undefined;
10237
- sender_id?: string | undefined;
10238
- content?: string | undefined;
10239
- attachment?: string | undefined;
10240
- reference?: string | undefined;
10241
- mention?: string | undefined;
10242
- reaction?: string | undefined;
10243
- } | undefined;
10244
- onlines?: boolean[] | undefined;
10245
- meeting_code?: string | undefined;
10246
- count_mess_unread?: number | undefined;
10247
- active?: number | undefined;
10248
- last_pin_message?: string | undefined;
10249
- usernames?: string[] | undefined;
10250
- creator_name?: string | undefined;
10251
- create_time_seconds?: number | undefined;
10252
- update_time_seconds?: number | undefined;
10253
- display_names?: string[] | undefined;
10254
- channel_avatar?: string | undefined;
10255
- clan_name?: string | undefined;
10256
- app_id?: string | undefined;
10257
- is_mute?: boolean | undefined;
10258
- age_restricted?: number | undefined;
10259
- topic?: string | undefined;
10260
- e2ee?: number | undefined;
10261
- member_count?: number | undefined;
10262
- } & {
10263
- clan_id?: string | undefined;
10264
- parent_id?: string | undefined;
10265
- channel_id?: string | undefined;
10266
- category_id?: string | undefined;
10267
- category_name?: string | undefined;
10268
- type?: number | undefined;
10269
- creator_id?: string | undefined;
10270
- channel_label?: string | undefined;
10271
- channel_private?: number | undefined;
10272
- avatars?: (string[] & string[] & { [K_8 in Exclude<keyof I_1["avatars"], keyof string[]>]: never; }) | undefined;
10273
- user_ids?: (string[] & string[] & { [K_9 in Exclude<keyof I_1["user_ids"], keyof string[]>]: never; }) | undefined;
10274
- last_sent_message?: ({
10275
- id?: string | undefined;
10276
- timestamp_seconds?: number | undefined;
10277
- sender_id?: string | undefined;
10278
- content?: string | undefined;
10279
- attachment?: string | undefined;
10280
- reference?: string | undefined;
10281
- mention?: string | undefined;
10282
- reaction?: string | undefined;
10283
- } & {
10284
- id?: string | undefined;
10285
- timestamp_seconds?: number | undefined;
10286
- sender_id?: string | undefined;
10287
- content?: string | undefined;
10288
- attachment?: string | undefined;
10289
- reference?: string | undefined;
10290
- mention?: string | undefined;
10291
- reaction?: string | undefined;
10292
- } & { [K_10 in Exclude<keyof I_1["last_sent_message"], keyof ChannelMessageHeader>]: never; }) | undefined;
10293
- last_seen_message?: ({
10294
- id?: string | undefined;
10295
- timestamp_seconds?: number | undefined;
10296
- sender_id?: string | undefined;
10297
- content?: string | undefined;
10298
- attachment?: string | undefined;
10299
- reference?: string | undefined;
10300
- mention?: string | undefined;
10301
- reaction?: string | undefined;
10302
- } & {
10303
- id?: string | undefined;
10304
- timestamp_seconds?: number | undefined;
10305
- sender_id?: string | undefined;
10306
- content?: string | undefined;
10307
- attachment?: string | undefined;
10308
- reference?: string | undefined;
10309
- mention?: string | undefined;
10310
- reaction?: string | undefined;
10311
- } & { [K_11 in Exclude<keyof I_1["last_seen_message"], keyof ChannelMessageHeader>]: never; }) | undefined;
10312
- onlines?: (boolean[] & boolean[] & { [K_12 in Exclude<keyof I_1["onlines"], keyof boolean[]>]: never; }) | undefined;
10313
- meeting_code?: string | undefined;
10314
- count_mess_unread?: number | undefined;
10315
- active?: number | undefined;
10316
- last_pin_message?: string | undefined;
10317
- usernames?: (string[] & string[] & { [K_13 in Exclude<keyof I_1["usernames"], keyof string[]>]: never; }) | undefined;
10318
- creator_name?: string | undefined;
10319
- create_time_seconds?: number | undefined;
10320
- update_time_seconds?: number | undefined;
10321
- display_names?: (string[] & string[] & { [K_14 in Exclude<keyof I_1["display_names"], keyof string[]>]: never; }) | undefined;
10322
- channel_avatar?: string | undefined;
10323
- clan_name?: string | undefined;
10324
- app_id?: string | undefined;
10325
- is_mute?: boolean | undefined;
10326
- age_restricted?: number | undefined;
10327
- topic?: string | undefined;
10328
- e2ee?: number | undefined;
10329
- member_count?: number | undefined;
10330
- } & { [K_15 in Exclude<keyof I_1, keyof ChannelDescriptionOld>]: never; }>(object: I_1): ChannelDescriptionOld;
10331
- };
10332
10023
  export declare const ChannelDescription: {
10333
10024
  encode(message: ChannelDescription, writer?: _m0.Writer): _m0.Writer;
10334
10025
  decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescription;
@@ -4108,15 +4108,15 @@ var ChannelMessageList = {
4108
4108
  }
4109
4109
  };
4110
4110
  function createBaseFriend() {
4111
- return { user: void 0, state: void 0, update_time: void 0, source_id: "" };
4111
+ return { user: void 0, state: 0, update_time: void 0, source_id: "" };
4112
4112
  }
4113
4113
  var Friend = {
4114
4114
  encode(message, writer = import_minimal4.default.Writer.create()) {
4115
4115
  if (message.user !== void 0) {
4116
4116
  User.encode(message.user, writer.uint32(10).fork()).ldelim();
4117
4117
  }
4118
- if (message.state !== void 0) {
4119
- Int32Value.encode({ value: message.state }, writer.uint32(18).fork()).ldelim();
4118
+ if (message.state !== 0) {
4119
+ writer.uint32(16).int32(message.state);
4120
4120
  }
4121
4121
  if (message.update_time !== void 0) {
4122
4122
  Timestamp.encode(toTimestamp(message.update_time), writer.uint32(26).fork()).ldelim();
@@ -4140,10 +4140,10 @@ var Friend = {
4140
4140
  message.user = User.decode(reader, reader.uint32());
4141
4141
  continue;
4142
4142
  case 2:
4143
- if (tag !== 18) {
4143
+ if (tag !== 16) {
4144
4144
  break;
4145
4145
  }
4146
- message.state = Int32Value.decode(reader, reader.uint32()).value;
4146
+ message.state = reader.int32();
4147
4147
  continue;
4148
4148
  case 3:
4149
4149
  if (tag !== 26) {
@@ -4168,7 +4168,7 @@ var Friend = {
4168
4168
  fromJSON(object) {
4169
4169
  return {
4170
4170
  user: isSet3(object.user) ? User.fromJSON(object.user) : void 0,
4171
- state: isSet3(object.state) ? Number(object.state) : void 0,
4171
+ state: isSet3(object.state) ? globalThis.Number(object.state) : 0,
4172
4172
  update_time: isSet3(object.update_time) ? fromJsonTimestamp(object.update_time) : void 0,
4173
4173
  source_id: isSet3(object.source_id) ? globalThis.String(object.source_id) : ""
4174
4174
  };
@@ -4178,8 +4178,8 @@ var Friend = {
4178
4178
  if (message.user !== void 0) {
4179
4179
  obj.user = User.toJSON(message.user);
4180
4180
  }
4181
- if (message.state !== void 0) {
4182
- obj.state = message.state;
4181
+ if (message.state !== 0) {
4182
+ obj.state = Math.round(message.state);
4183
4183
  }
4184
4184
  if (message.update_time !== void 0) {
4185
4185
  obj.update_time = message.update_time.toISOString();
@@ -4196,7 +4196,7 @@ var Friend = {
4196
4196
  var _a, _b, _c;
4197
4197
  const message = createBaseFriend();
4198
4198
  message.user = object.user !== void 0 && object.user !== null ? User.fromPartial(object.user) : void 0;
4199
- message.state = (_a = object.state) != null ? _a : void 0;
4199
+ message.state = (_a = object.state) != null ? _a : 0;
4200
4200
  message.update_time = (_b = object.update_time) != null ? _b : void 0;
4201
4201
  message.source_id = (_c = object.source_id) != null ? _c : "";
4202
4202
  return message;
@@ -4083,15 +4083,15 @@ var ChannelMessageList = {
4083
4083
  }
4084
4084
  };
4085
4085
  function createBaseFriend() {
4086
- return { user: void 0, state: void 0, update_time: void 0, source_id: "" };
4086
+ return { user: void 0, state: 0, update_time: void 0, source_id: "" };
4087
4087
  }
4088
4088
  var Friend = {
4089
4089
  encode(message, writer = import_minimal4.default.Writer.create()) {
4090
4090
  if (message.user !== void 0) {
4091
4091
  User.encode(message.user, writer.uint32(10).fork()).ldelim();
4092
4092
  }
4093
- if (message.state !== void 0) {
4094
- Int32Value.encode({ value: message.state }, writer.uint32(18).fork()).ldelim();
4093
+ if (message.state !== 0) {
4094
+ writer.uint32(16).int32(message.state);
4095
4095
  }
4096
4096
  if (message.update_time !== void 0) {
4097
4097
  Timestamp.encode(toTimestamp(message.update_time), writer.uint32(26).fork()).ldelim();
@@ -4115,10 +4115,10 @@ var Friend = {
4115
4115
  message.user = User.decode(reader, reader.uint32());
4116
4116
  continue;
4117
4117
  case 2:
4118
- if (tag !== 18) {
4118
+ if (tag !== 16) {
4119
4119
  break;
4120
4120
  }
4121
- message.state = Int32Value.decode(reader, reader.uint32()).value;
4121
+ message.state = reader.int32();
4122
4122
  continue;
4123
4123
  case 3:
4124
4124
  if (tag !== 26) {
@@ -4143,7 +4143,7 @@ var Friend = {
4143
4143
  fromJSON(object) {
4144
4144
  return {
4145
4145
  user: isSet3(object.user) ? User.fromJSON(object.user) : void 0,
4146
- state: isSet3(object.state) ? Number(object.state) : void 0,
4146
+ state: isSet3(object.state) ? globalThis.Number(object.state) : 0,
4147
4147
  update_time: isSet3(object.update_time) ? fromJsonTimestamp(object.update_time) : void 0,
4148
4148
  source_id: isSet3(object.source_id) ? globalThis.String(object.source_id) : ""
4149
4149
  };
@@ -4153,8 +4153,8 @@ var Friend = {
4153
4153
  if (message.user !== void 0) {
4154
4154
  obj.user = User.toJSON(message.user);
4155
4155
  }
4156
- if (message.state !== void 0) {
4157
- obj.state = message.state;
4156
+ if (message.state !== 0) {
4157
+ obj.state = Math.round(message.state);
4158
4158
  }
4159
4159
  if (message.update_time !== void 0) {
4160
4160
  obj.update_time = message.update_time.toISOString();
@@ -4171,7 +4171,7 @@ var Friend = {
4171
4171
  var _a, _b, _c;
4172
4172
  const message = createBaseFriend();
4173
4173
  message.user = object.user !== void 0 && object.user !== null ? User.fromPartial(object.user) : void 0;
4174
- message.state = (_a = object.state) != null ? _a : void 0;
4174
+ message.state = (_a = object.state) != null ? _a : 0;
4175
4175
  message.update_time = (_b = object.update_time) != null ? _b : void 0;
4176
4176
  message.source_id = (_c = object.source_id) != null ? _c : "";
4177
4177
  return message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.13.76",
3
+ "version": "2.13.77",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },