mezon-js-protobuf 1.8.74 → 1.8.76

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
@@ -323,15 +323,15 @@ export interface ChannelMessage {
323
323
  /** The clan avatar */
324
324
  clan_avatar: string;
325
325
  /** Emoji reaction */
326
- reactions: string;
326
+ reactions: Uint8Array;
327
327
  /** Message mention */
328
- mentions: string;
328
+ mentions: Uint8Array;
329
329
  /** Message attachment */
330
- attachments: string;
330
+ attachments: Uint8Array;
331
331
  /** Message reference */
332
- references: string;
332
+ references: Uint8Array;
333
333
  /** referenced message */
334
- referenced_message: string;
334
+ referenced_message: Uint8Array;
335
335
  /** create time in ms */
336
336
  create_time_seconds: number;
337
337
  /** update time in ms */
@@ -1013,11 +1013,16 @@ export interface Session {
1013
1013
  user_id: string;
1014
1014
  /** Whether to enable "Remember Me" for extended session duration. */
1015
1015
  is_remember: boolean;
1016
+ /** api url */
1017
+ api_url: string;
1018
+ /** id token for zklogin */
1019
+ id_token: string;
1016
1020
  }
1017
1021
 
1018
1022
  /** Update username */
1019
1023
  export interface UpdateUsernameRequest {
1020
1024
  username: string;
1025
+ display_name: string;
1021
1026
  }
1022
1027
 
1023
1028
  /** Update a user's account details. */
@@ -1502,13 +1507,13 @@ export interface ChannelMessageHeader {
1502
1507
  /** the content */
1503
1508
  content: string;
1504
1509
  /** the attachment */
1505
- attachment: string;
1510
+ attachment: Uint8Array;
1506
1511
  /** the reference */
1507
- reference: string;
1512
+ reference: Uint8Array;
1508
1513
  /** the mention */
1509
- mention: string;
1514
+ mention: Uint8Array;
1510
1515
  /** the reactions */
1511
- reaction: string;
1516
+ reaction: Uint8Array;
1512
1517
  }
1513
1518
 
1514
1519
  /** Channel description record */
@@ -1585,6 +1590,12 @@ export interface ChannelDescription {
1585
1590
  export interface ChannelDescList {
1586
1591
  /** A list of channel. */
1587
1592
  channeldesc: ChannelDescription[];
1593
+ }
1594
+
1595
+ /** A list of channel description, usually a result of a list operation. */
1596
+ export interface ChannelDescListNoPool {
1597
+ /** A list of channel. */
1598
+ channeldesc: ChannelDescription[];
1588
1599
  /** Page thread */
1589
1600
  page: number;
1590
1601
  }
@@ -3668,10 +3679,10 @@ export interface Message2InboxRequest {
3668
3679
  clan_id: string;
3669
3680
  avatar: string;
3670
3681
  content: string;
3671
- mentions: string;
3672
- attachments: string;
3673
- reactions: string;
3674
- references: string;
3682
+ mentions: Uint8Array;
3683
+ attachments: Uint8Array;
3684
+ reactions: Uint8Array;
3685
+ references: Uint8Array;
3675
3686
  }
3676
3687
 
3677
3688
  /** Send an email with password to the server. Used with authenticate/link/unlink. */
@@ -3786,6 +3797,34 @@ export interface LogedDevice {
3786
3797
  is_current: boolean;
3787
3798
  }
3788
3799
 
3800
+ export interface DirectFcmProto {
3801
+ title: string;
3802
+ link: string;
3803
+ content: string;
3804
+ channel_id: string;
3805
+ sender_id: string;
3806
+ avatar: string;
3807
+ clan_id: string;
3808
+ attachments: Uint8Array;
3809
+ display_name: string;
3810
+ create_time_seconds: number;
3811
+ update_time_seconds: number;
3812
+ username: string;
3813
+ mentions: Uint8Array;
3814
+ }
3815
+
3816
+ export interface MessageMentionList {
3817
+ mentions: MessageMention[];
3818
+ }
3819
+
3820
+ export interface MessageAttachmentList {
3821
+ attachments: MessageAttachment[];
3822
+ }
3823
+
3824
+ export interface MessageRefList {
3825
+ refs: MessageRef[];
3826
+ }
3827
+
3789
3828
  function createBaseAccount(): Account {
3790
3829
  return {
3791
3830
  user: undefined,
@@ -4970,11 +5009,11 @@ function createBaseChannelMessage(): ChannelMessage {
4970
5009
  display_name: "",
4971
5010
  clan_nick: "",
4972
5011
  clan_avatar: "",
4973
- reactions: "",
4974
- mentions: "",
4975
- attachments: "",
4976
- references: "",
4977
- referenced_message: "",
5012
+ reactions: new Uint8Array(0),
5013
+ mentions: new Uint8Array(0),
5014
+ attachments: new Uint8Array(0),
5015
+ references: new Uint8Array(0),
5016
+ referenced_message: new Uint8Array(0),
4978
5017
  create_time_seconds: 0,
4979
5018
  update_time_seconds: 0,
4980
5019
  mode: 0,
@@ -5034,20 +5073,20 @@ export const ChannelMessage = {
5034
5073
  if (message.clan_avatar !== "") {
5035
5074
  writer.uint32(130).string(message.clan_avatar);
5036
5075
  }
5037
- if (message.reactions !== "") {
5038
- writer.uint32(138).string(message.reactions);
5076
+ if (message.reactions.length !== 0) {
5077
+ writer.uint32(138).bytes(message.reactions);
5039
5078
  }
5040
- if (message.mentions !== "") {
5041
- writer.uint32(146).string(message.mentions);
5079
+ if (message.mentions.length !== 0) {
5080
+ writer.uint32(146).bytes(message.mentions);
5042
5081
  }
5043
- if (message.attachments !== "") {
5044
- writer.uint32(154).string(message.attachments);
5082
+ if (message.attachments.length !== 0) {
5083
+ writer.uint32(154).bytes(message.attachments);
5045
5084
  }
5046
- if (message.references !== "") {
5047
- writer.uint32(162).string(message.references);
5085
+ if (message.references.length !== 0) {
5086
+ writer.uint32(162).bytes(message.references);
5048
5087
  }
5049
- if (message.referenced_message !== "") {
5050
- writer.uint32(170).string(message.referenced_message);
5088
+ if (message.referenced_message.length !== 0) {
5089
+ writer.uint32(170).bytes(message.referenced_message);
5051
5090
  }
5052
5091
  if (message.create_time_seconds !== 0) {
5053
5092
  writer.uint32(176).uint32(message.create_time_seconds);
@@ -5194,35 +5233,35 @@ export const ChannelMessage = {
5194
5233
  break;
5195
5234
  }
5196
5235
 
5197
- message.reactions = reader.string();
5236
+ message.reactions = reader.bytes();
5198
5237
  continue;
5199
5238
  case 18:
5200
5239
  if (tag !== 146) {
5201
5240
  break;
5202
5241
  }
5203
5242
 
5204
- message.mentions = reader.string();
5243
+ message.mentions = reader.bytes();
5205
5244
  continue;
5206
5245
  case 19:
5207
5246
  if (tag !== 154) {
5208
5247
  break;
5209
5248
  }
5210
5249
 
5211
- message.attachments = reader.string();
5250
+ message.attachments = reader.bytes();
5212
5251
  continue;
5213
5252
  case 20:
5214
5253
  if (tag !== 162) {
5215
5254
  break;
5216
5255
  }
5217
5256
 
5218
- message.references = reader.string();
5257
+ message.references = reader.bytes();
5219
5258
  continue;
5220
5259
  case 21:
5221
5260
  if (tag !== 170) {
5222
5261
  break;
5223
5262
  }
5224
5263
 
5225
- message.referenced_message = reader.string();
5264
+ message.referenced_message = reader.bytes();
5226
5265
  continue;
5227
5266
  case 22:
5228
5267
  if (tag !== 176) {
@@ -5293,11 +5332,13 @@ export const ChannelMessage = {
5293
5332
  display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
5294
5333
  clan_nick: isSet(object.clan_nick) ? globalThis.String(object.clan_nick) : "",
5295
5334
  clan_avatar: isSet(object.clan_avatar) ? globalThis.String(object.clan_avatar) : "",
5296
- reactions: isSet(object.reactions) ? globalThis.String(object.reactions) : "",
5297
- mentions: isSet(object.mentions) ? globalThis.String(object.mentions) : "",
5298
- attachments: isSet(object.attachments) ? globalThis.String(object.attachments) : "",
5299
- references: isSet(object.references) ? globalThis.String(object.references) : "",
5300
- referenced_message: isSet(object.referenced_message) ? globalThis.String(object.referenced_message) : "",
5335
+ reactions: isSet(object.reactions) ? bytesFromBase64(object.reactions) : new Uint8Array(0),
5336
+ mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
5337
+ attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
5338
+ references: isSet(object.references) ? bytesFromBase64(object.references) : new Uint8Array(0),
5339
+ referenced_message: isSet(object.referenced_message)
5340
+ ? bytesFromBase64(object.referenced_message)
5341
+ : new Uint8Array(0),
5301
5342
  create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
5302
5343
  update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
5303
5344
  mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
@@ -5357,20 +5398,20 @@ export const ChannelMessage = {
5357
5398
  if (message.clan_avatar !== "") {
5358
5399
  obj.clan_avatar = message.clan_avatar;
5359
5400
  }
5360
- if (message.reactions !== "") {
5361
- obj.reactions = message.reactions;
5401
+ if (message.reactions.length !== 0) {
5402
+ obj.reactions = base64FromBytes(message.reactions);
5362
5403
  }
5363
- if (message.mentions !== "") {
5364
- obj.mentions = message.mentions;
5404
+ if (message.mentions.length !== 0) {
5405
+ obj.mentions = base64FromBytes(message.mentions);
5365
5406
  }
5366
- if (message.attachments !== "") {
5367
- obj.attachments = message.attachments;
5407
+ if (message.attachments.length !== 0) {
5408
+ obj.attachments = base64FromBytes(message.attachments);
5368
5409
  }
5369
- if (message.references !== "") {
5370
- obj.references = message.references;
5410
+ if (message.references.length !== 0) {
5411
+ obj.references = base64FromBytes(message.references);
5371
5412
  }
5372
- if (message.referenced_message !== "") {
5373
- obj.referenced_message = message.referenced_message;
5413
+ if (message.referenced_message.length !== 0) {
5414
+ obj.referenced_message = base64FromBytes(message.referenced_message);
5374
5415
  }
5375
5416
  if (message.create_time_seconds !== 0) {
5376
5417
  obj.create_time_seconds = Math.round(message.create_time_seconds);
@@ -5414,11 +5455,11 @@ export const ChannelMessage = {
5414
5455
  message.display_name = object.display_name ?? "";
5415
5456
  message.clan_nick = object.clan_nick ?? "";
5416
5457
  message.clan_avatar = object.clan_avatar ?? "";
5417
- message.reactions = object.reactions ?? "";
5418
- message.mentions = object.mentions ?? "";
5419
- message.attachments = object.attachments ?? "";
5420
- message.references = object.references ?? "";
5421
- message.referenced_message = object.referenced_message ?? "";
5458
+ message.reactions = object.reactions ?? new Uint8Array(0);
5459
+ message.mentions = object.mentions ?? new Uint8Array(0);
5460
+ message.attachments = object.attachments ?? new Uint8Array(0);
5461
+ message.references = object.references ?? new Uint8Array(0);
5462
+ message.referenced_message = object.referenced_message ?? new Uint8Array(0);
5422
5463
  message.create_time_seconds = object.create_time_seconds ?? 0;
5423
5464
  message.update_time_seconds = object.update_time_seconds ?? 0;
5424
5465
  message.mode = object.mode ?? 0;
@@ -10371,7 +10412,7 @@ export const Rpc = {
10371
10412
  };
10372
10413
 
10373
10414
  function createBaseSession(): Session {
10374
- return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false };
10415
+ return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false, api_url: "", id_token: "" };
10375
10416
  }
10376
10417
 
10377
10418
  export const Session = {
@@ -10391,6 +10432,12 @@ export const Session = {
10391
10432
  if (message.is_remember !== false) {
10392
10433
  writer.uint32(40).bool(message.is_remember);
10393
10434
  }
10435
+ if (message.api_url !== "") {
10436
+ writer.uint32(50).string(message.api_url);
10437
+ }
10438
+ if (message.id_token !== "") {
10439
+ writer.uint32(58).string(message.id_token);
10440
+ }
10394
10441
  return writer;
10395
10442
  },
10396
10443
 
@@ -10436,6 +10483,20 @@ export const Session = {
10436
10483
 
10437
10484
  message.is_remember = reader.bool();
10438
10485
  continue;
10486
+ case 6:
10487
+ if (tag !== 50) {
10488
+ break;
10489
+ }
10490
+
10491
+ message.api_url = reader.string();
10492
+ continue;
10493
+ case 7:
10494
+ if (tag !== 58) {
10495
+ break;
10496
+ }
10497
+
10498
+ message.id_token = reader.string();
10499
+ continue;
10439
10500
  }
10440
10501
  if ((tag & 7) === 4 || tag === 0) {
10441
10502
  break;
@@ -10452,6 +10513,8 @@ export const Session = {
10452
10513
  refresh_token: isSet(object.refresh_token) ? globalThis.String(object.refresh_token) : "",
10453
10514
  user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
10454
10515
  is_remember: isSet(object.is_remember) ? globalThis.Boolean(object.is_remember) : false,
10516
+ api_url: isSet(object.api_url) ? globalThis.String(object.api_url) : "",
10517
+ id_token: isSet(object.id_token) ? globalThis.String(object.id_token) : "",
10455
10518
  };
10456
10519
  },
10457
10520
 
@@ -10472,6 +10535,12 @@ export const Session = {
10472
10535
  if (message.is_remember !== false) {
10473
10536
  obj.is_remember = message.is_remember;
10474
10537
  }
10538
+ if (message.api_url !== "") {
10539
+ obj.api_url = message.api_url;
10540
+ }
10541
+ if (message.id_token !== "") {
10542
+ obj.id_token = message.id_token;
10543
+ }
10475
10544
  return obj;
10476
10545
  },
10477
10546
 
@@ -10485,12 +10554,14 @@ export const Session = {
10485
10554
  message.refresh_token = object.refresh_token ?? "";
10486
10555
  message.user_id = object.user_id ?? "";
10487
10556
  message.is_remember = object.is_remember ?? false;
10557
+ message.api_url = object.api_url ?? "";
10558
+ message.id_token = object.id_token ?? "";
10488
10559
  return message;
10489
10560
  },
10490
10561
  };
10491
10562
 
10492
10563
  function createBaseUpdateUsernameRequest(): UpdateUsernameRequest {
10493
- return { username: "" };
10564
+ return { username: "", display_name: "" };
10494
10565
  }
10495
10566
 
10496
10567
  export const UpdateUsernameRequest = {
@@ -10498,6 +10569,9 @@ export const UpdateUsernameRequest = {
10498
10569
  if (message.username !== "") {
10499
10570
  writer.uint32(10).string(message.username);
10500
10571
  }
10572
+ if (message.display_name !== "") {
10573
+ writer.uint32(18).string(message.display_name);
10574
+ }
10501
10575
  return writer;
10502
10576
  },
10503
10577
 
@@ -10515,6 +10589,13 @@ export const UpdateUsernameRequest = {
10515
10589
 
10516
10590
  message.username = reader.string();
10517
10591
  continue;
10592
+ case 2:
10593
+ if (tag !== 18) {
10594
+ break;
10595
+ }
10596
+
10597
+ message.display_name = reader.string();
10598
+ continue;
10518
10599
  }
10519
10600
  if ((tag & 7) === 4 || tag === 0) {
10520
10601
  break;
@@ -10525,7 +10606,10 @@ export const UpdateUsernameRequest = {
10525
10606
  },
10526
10607
 
10527
10608
  fromJSON(object: any): UpdateUsernameRequest {
10528
- return { username: isSet(object.username) ? globalThis.String(object.username) : "" };
10609
+ return {
10610
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
10611
+ display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
10612
+ };
10529
10613
  },
10530
10614
 
10531
10615
  toJSON(message: UpdateUsernameRequest): unknown {
@@ -10533,6 +10617,9 @@ export const UpdateUsernameRequest = {
10533
10617
  if (message.username !== "") {
10534
10618
  obj.username = message.username;
10535
10619
  }
10620
+ if (message.display_name !== "") {
10621
+ obj.display_name = message.display_name;
10622
+ }
10536
10623
  return obj;
10537
10624
  },
10538
10625
 
@@ -10542,6 +10629,7 @@ export const UpdateUsernameRequest = {
10542
10629
  fromPartial<I extends Exact<DeepPartial<UpdateUsernameRequest>, I>>(object: I): UpdateUsernameRequest {
10543
10630
  const message = createBaseUpdateUsernameRequest();
10544
10631
  message.username = object.username ?? "";
10632
+ message.display_name = object.display_name ?? "";
10545
10633
  return message;
10546
10634
  },
10547
10635
  };
@@ -14459,10 +14547,10 @@ function createBaseChannelMessageHeader(): ChannelMessageHeader {
14459
14547
  timestamp_seconds: 0,
14460
14548
  sender_id: "",
14461
14549
  content: "",
14462
- attachment: "",
14463
- reference: "",
14464
- mention: "",
14465
- reaction: "",
14550
+ attachment: new Uint8Array(0),
14551
+ reference: new Uint8Array(0),
14552
+ mention: new Uint8Array(0),
14553
+ reaction: new Uint8Array(0),
14466
14554
  };
14467
14555
  }
14468
14556
 
@@ -14480,17 +14568,17 @@ export const ChannelMessageHeader = {
14480
14568
  if (message.content !== "") {
14481
14569
  writer.uint32(34).string(message.content);
14482
14570
  }
14483
- if (message.attachment !== "") {
14484
- writer.uint32(42).string(message.attachment);
14571
+ if (message.attachment.length !== 0) {
14572
+ writer.uint32(42).bytes(message.attachment);
14485
14573
  }
14486
- if (message.reference !== "") {
14487
- writer.uint32(50).string(message.reference);
14574
+ if (message.reference.length !== 0) {
14575
+ writer.uint32(50).bytes(message.reference);
14488
14576
  }
14489
- if (message.mention !== "") {
14490
- writer.uint32(58).string(message.mention);
14577
+ if (message.mention.length !== 0) {
14578
+ writer.uint32(58).bytes(message.mention);
14491
14579
  }
14492
- if (message.reaction !== "") {
14493
- writer.uint32(66).string(message.reaction);
14580
+ if (message.reaction.length !== 0) {
14581
+ writer.uint32(66).bytes(message.reaction);
14494
14582
  }
14495
14583
  return writer;
14496
14584
  },
@@ -14535,28 +14623,28 @@ export const ChannelMessageHeader = {
14535
14623
  break;
14536
14624
  }
14537
14625
 
14538
- message.attachment = reader.string();
14626
+ message.attachment = reader.bytes();
14539
14627
  continue;
14540
14628
  case 6:
14541
14629
  if (tag !== 50) {
14542
14630
  break;
14543
14631
  }
14544
14632
 
14545
- message.reference = reader.string();
14633
+ message.reference = reader.bytes();
14546
14634
  continue;
14547
14635
  case 7:
14548
14636
  if (tag !== 58) {
14549
14637
  break;
14550
14638
  }
14551
14639
 
14552
- message.mention = reader.string();
14640
+ message.mention = reader.bytes();
14553
14641
  continue;
14554
14642
  case 8:
14555
14643
  if (tag !== 66) {
14556
14644
  break;
14557
14645
  }
14558
14646
 
14559
- message.reaction = reader.string();
14647
+ message.reaction = reader.bytes();
14560
14648
  continue;
14561
14649
  }
14562
14650
  if ((tag & 7) === 4 || tag === 0) {
@@ -14573,10 +14661,10 @@ export const ChannelMessageHeader = {
14573
14661
  timestamp_seconds: isSet(object.timestamp_seconds) ? globalThis.Number(object.timestamp_seconds) : 0,
14574
14662
  sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
14575
14663
  content: isSet(object.content) ? globalThis.String(object.content) : "",
14576
- attachment: isSet(object.attachment) ? globalThis.String(object.attachment) : "",
14577
- reference: isSet(object.reference) ? globalThis.String(object.reference) : "",
14578
- mention: isSet(object.mention) ? globalThis.String(object.mention) : "",
14579
- reaction: isSet(object.reaction) ? globalThis.String(object.reaction) : "",
14664
+ attachment: isSet(object.attachment) ? bytesFromBase64(object.attachment) : new Uint8Array(0),
14665
+ reference: isSet(object.reference) ? bytesFromBase64(object.reference) : new Uint8Array(0),
14666
+ mention: isSet(object.mention) ? bytesFromBase64(object.mention) : new Uint8Array(0),
14667
+ reaction: isSet(object.reaction) ? bytesFromBase64(object.reaction) : new Uint8Array(0),
14580
14668
  };
14581
14669
  },
14582
14670
 
@@ -14594,17 +14682,17 @@ export const ChannelMessageHeader = {
14594
14682
  if (message.content !== "") {
14595
14683
  obj.content = message.content;
14596
14684
  }
14597
- if (message.attachment !== "") {
14598
- obj.attachment = message.attachment;
14685
+ if (message.attachment.length !== 0) {
14686
+ obj.attachment = base64FromBytes(message.attachment);
14599
14687
  }
14600
- if (message.reference !== "") {
14601
- obj.reference = message.reference;
14688
+ if (message.reference.length !== 0) {
14689
+ obj.reference = base64FromBytes(message.reference);
14602
14690
  }
14603
- if (message.mention !== "") {
14604
- obj.mention = message.mention;
14691
+ if (message.mention.length !== 0) {
14692
+ obj.mention = base64FromBytes(message.mention);
14605
14693
  }
14606
- if (message.reaction !== "") {
14607
- obj.reaction = message.reaction;
14694
+ if (message.reaction.length !== 0) {
14695
+ obj.reaction = base64FromBytes(message.reaction);
14608
14696
  }
14609
14697
  return obj;
14610
14698
  },
@@ -14618,10 +14706,10 @@ export const ChannelMessageHeader = {
14618
14706
  message.timestamp_seconds = object.timestamp_seconds ?? 0;
14619
14707
  message.sender_id = object.sender_id ?? "";
14620
14708
  message.content = object.content ?? "";
14621
- message.attachment = object.attachment ?? "";
14622
- message.reference = object.reference ?? "";
14623
- message.mention = object.mention ?? "";
14624
- message.reaction = object.reaction ?? "";
14709
+ message.attachment = object.attachment ?? new Uint8Array(0);
14710
+ message.reference = object.reference ?? new Uint8Array(0);
14711
+ message.mention = object.mention ?? new Uint8Array(0);
14712
+ message.reaction = object.reaction ?? new Uint8Array(0);
14625
14713
  return message;
14626
14714
  },
14627
14715
  };
@@ -15192,11 +15280,72 @@ export const ChannelDescription = {
15192
15280
  };
15193
15281
 
15194
15282
  function createBaseChannelDescList(): ChannelDescList {
15195
- return { channeldesc: [], page: 0 };
15283
+ return { channeldesc: [] };
15196
15284
  }
15197
15285
 
15198
15286
  export const ChannelDescList = {
15199
15287
  encode(message: ChannelDescList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
15288
+ for (const v of message.channeldesc) {
15289
+ ChannelDescription.encode(v!, writer.uint32(10).fork()).ldelim();
15290
+ }
15291
+ return writer;
15292
+ },
15293
+
15294
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescList {
15295
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
15296
+ let end = length === undefined ? reader.len : reader.pos + length;
15297
+ const message = createBaseChannelDescList();
15298
+ while (reader.pos < end) {
15299
+ const tag = reader.uint32();
15300
+ switch (tag >>> 3) {
15301
+ case 1:
15302
+ if (tag !== 10) {
15303
+ break;
15304
+ }
15305
+
15306
+ message.channeldesc.push(ChannelDescription.decode(reader, reader.uint32()));
15307
+ continue;
15308
+ }
15309
+ if ((tag & 7) === 4 || tag === 0) {
15310
+ break;
15311
+ }
15312
+ reader.skipType(tag & 7);
15313
+ }
15314
+ return message;
15315
+ },
15316
+
15317
+ fromJSON(object: any): ChannelDescList {
15318
+ return {
15319
+ channeldesc: globalThis.Array.isArray(object?.channeldesc)
15320
+ ? object.channeldesc.map((e: any) => ChannelDescription.fromJSON(e))
15321
+ : [],
15322
+ };
15323
+ },
15324
+
15325
+ toJSON(message: ChannelDescList): unknown {
15326
+ const obj: any = {};
15327
+ if (message.channeldesc?.length) {
15328
+ obj.channeldesc = message.channeldesc.map((e) => ChannelDescription.toJSON(e));
15329
+ }
15330
+ return obj;
15331
+ },
15332
+
15333
+ create<I extends Exact<DeepPartial<ChannelDescList>, I>>(base?: I): ChannelDescList {
15334
+ return ChannelDescList.fromPartial(base ?? ({} as any));
15335
+ },
15336
+ fromPartial<I extends Exact<DeepPartial<ChannelDescList>, I>>(object: I): ChannelDescList {
15337
+ const message = createBaseChannelDescList();
15338
+ message.channeldesc = object.channeldesc?.map((e) => ChannelDescription.fromPartial(e)) || [];
15339
+ return message;
15340
+ },
15341
+ };
15342
+
15343
+ function createBaseChannelDescListNoPool(): ChannelDescListNoPool {
15344
+ return { channeldesc: [], page: 0 };
15345
+ }
15346
+
15347
+ export const ChannelDescListNoPool = {
15348
+ encode(message: ChannelDescListNoPool, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
15200
15349
  for (const v of message.channeldesc) {
15201
15350
  ChannelDescription.encode(v!, writer.uint32(10).fork()).ldelim();
15202
15351
  }
@@ -15206,10 +15355,10 @@ export const ChannelDescList = {
15206
15355
  return writer;
15207
15356
  },
15208
15357
 
15209
- decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescList {
15358
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChannelDescListNoPool {
15210
15359
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
15211
15360
  let end = length === undefined ? reader.len : reader.pos + length;
15212
- const message = createBaseChannelDescList();
15361
+ const message = createBaseChannelDescListNoPool();
15213
15362
  while (reader.pos < end) {
15214
15363
  const tag = reader.uint32();
15215
15364
  switch (tag >>> 3) {
@@ -15236,7 +15385,7 @@ export const ChannelDescList = {
15236
15385
  return message;
15237
15386
  },
15238
15387
 
15239
- fromJSON(object: any): ChannelDescList {
15388
+ fromJSON(object: any): ChannelDescListNoPool {
15240
15389
  return {
15241
15390
  channeldesc: globalThis.Array.isArray(object?.channeldesc)
15242
15391
  ? object.channeldesc.map((e: any) => ChannelDescription.fromJSON(e))
@@ -15245,7 +15394,7 @@ export const ChannelDescList = {
15245
15394
  };
15246
15395
  },
15247
15396
 
15248
- toJSON(message: ChannelDescList): unknown {
15397
+ toJSON(message: ChannelDescListNoPool): unknown {
15249
15398
  const obj: any = {};
15250
15399
  if (message.channeldesc?.length) {
15251
15400
  obj.channeldesc = message.channeldesc.map((e) => ChannelDescription.toJSON(e));
@@ -15256,11 +15405,11 @@ export const ChannelDescList = {
15256
15405
  return obj;
15257
15406
  },
15258
15407
 
15259
- create<I extends Exact<DeepPartial<ChannelDescList>, I>>(base?: I): ChannelDescList {
15260
- return ChannelDescList.fromPartial(base ?? ({} as any));
15408
+ create<I extends Exact<DeepPartial<ChannelDescListNoPool>, I>>(base?: I): ChannelDescListNoPool {
15409
+ return ChannelDescListNoPool.fromPartial(base ?? ({} as any));
15261
15410
  },
15262
- fromPartial<I extends Exact<DeepPartial<ChannelDescList>, I>>(object: I): ChannelDescList {
15263
- const message = createBaseChannelDescList();
15411
+ fromPartial<I extends Exact<DeepPartial<ChannelDescListNoPool>, I>>(object: I): ChannelDescListNoPool {
15412
+ const message = createBaseChannelDescListNoPool();
15264
15413
  message.channeldesc = object.channeldesc?.map((e) => ChannelDescription.fromPartial(e)) || [];
15265
15414
  message.page = object.page ?? 0;
15266
15415
  return message;
@@ -37332,10 +37481,10 @@ function createBaseMessage2InboxRequest(): Message2InboxRequest {
37332
37481
  clan_id: "",
37333
37482
  avatar: "",
37334
37483
  content: "",
37335
- mentions: "",
37336
- attachments: "",
37337
- reactions: "",
37338
- references: "",
37484
+ mentions: new Uint8Array(0),
37485
+ attachments: new Uint8Array(0),
37486
+ reactions: new Uint8Array(0),
37487
+ references: new Uint8Array(0),
37339
37488
  };
37340
37489
  }
37341
37490
 
@@ -37356,17 +37505,17 @@ export const Message2InboxRequest = {
37356
37505
  if (message.content !== "") {
37357
37506
  writer.uint32(42).string(message.content);
37358
37507
  }
37359
- if (message.mentions !== "") {
37360
- writer.uint32(50).string(message.mentions);
37508
+ if (message.mentions.length !== 0) {
37509
+ writer.uint32(50).bytes(message.mentions);
37361
37510
  }
37362
- if (message.attachments !== "") {
37363
- writer.uint32(58).string(message.attachments);
37511
+ if (message.attachments.length !== 0) {
37512
+ writer.uint32(58).bytes(message.attachments);
37364
37513
  }
37365
- if (message.reactions !== "") {
37366
- writer.uint32(66).string(message.reactions);
37514
+ if (message.reactions.length !== 0) {
37515
+ writer.uint32(66).bytes(message.reactions);
37367
37516
  }
37368
- if (message.references !== "") {
37369
- writer.uint32(74).string(message.references);
37517
+ if (message.references.length !== 0) {
37518
+ writer.uint32(74).bytes(message.references);
37370
37519
  }
37371
37520
  return writer;
37372
37521
  },
@@ -37418,28 +37567,28 @@ export const Message2InboxRequest = {
37418
37567
  break;
37419
37568
  }
37420
37569
 
37421
- message.mentions = reader.string();
37570
+ message.mentions = reader.bytes();
37422
37571
  continue;
37423
37572
  case 7:
37424
37573
  if (tag !== 58) {
37425
37574
  break;
37426
37575
  }
37427
37576
 
37428
- message.attachments = reader.string();
37577
+ message.attachments = reader.bytes();
37429
37578
  continue;
37430
37579
  case 8:
37431
37580
  if (tag !== 66) {
37432
37581
  break;
37433
37582
  }
37434
37583
 
37435
- message.reactions = reader.string();
37584
+ message.reactions = reader.bytes();
37436
37585
  continue;
37437
37586
  case 9:
37438
37587
  if (tag !== 74) {
37439
37588
  break;
37440
37589
  }
37441
37590
 
37442
- message.references = reader.string();
37591
+ message.references = reader.bytes();
37443
37592
  continue;
37444
37593
  }
37445
37594
  if ((tag & 7) === 4 || tag === 0) {
@@ -37457,10 +37606,10 @@ export const Message2InboxRequest = {
37457
37606
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
37458
37607
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
37459
37608
  content: isSet(object.content) ? globalThis.String(object.content) : "",
37460
- mentions: isSet(object.mentions) ? globalThis.String(object.mentions) : "",
37461
- attachments: isSet(object.attachments) ? globalThis.String(object.attachments) : "",
37462
- reactions: isSet(object.reactions) ? globalThis.String(object.reactions) : "",
37463
- references: isSet(object.references) ? globalThis.String(object.references) : "",
37609
+ mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
37610
+ attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
37611
+ reactions: isSet(object.reactions) ? bytesFromBase64(object.reactions) : new Uint8Array(0),
37612
+ references: isSet(object.references) ? bytesFromBase64(object.references) : new Uint8Array(0),
37464
37613
  };
37465
37614
  },
37466
37615
 
@@ -37481,17 +37630,17 @@ export const Message2InboxRequest = {
37481
37630
  if (message.content !== "") {
37482
37631
  obj.content = message.content;
37483
37632
  }
37484
- if (message.mentions !== "") {
37485
- obj.mentions = message.mentions;
37633
+ if (message.mentions.length !== 0) {
37634
+ obj.mentions = base64FromBytes(message.mentions);
37486
37635
  }
37487
- if (message.attachments !== "") {
37488
- obj.attachments = message.attachments;
37636
+ if (message.attachments.length !== 0) {
37637
+ obj.attachments = base64FromBytes(message.attachments);
37489
37638
  }
37490
- if (message.reactions !== "") {
37491
- obj.reactions = message.reactions;
37639
+ if (message.reactions.length !== 0) {
37640
+ obj.reactions = base64FromBytes(message.reactions);
37492
37641
  }
37493
- if (message.references !== "") {
37494
- obj.references = message.references;
37642
+ if (message.references.length !== 0) {
37643
+ obj.references = base64FromBytes(message.references);
37495
37644
  }
37496
37645
  return obj;
37497
37646
  },
@@ -37506,10 +37655,10 @@ export const Message2InboxRequest = {
37506
37655
  message.clan_id = object.clan_id ?? "";
37507
37656
  message.avatar = object.avatar ?? "";
37508
37657
  message.content = object.content ?? "";
37509
- message.mentions = object.mentions ?? "";
37510
- message.attachments = object.attachments ?? "";
37511
- message.reactions = object.reactions ?? "";
37512
- message.references = object.references ?? "";
37658
+ message.mentions = object.mentions ?? new Uint8Array(0);
37659
+ message.attachments = object.attachments ?? new Uint8Array(0);
37660
+ message.reactions = object.reactions ?? new Uint8Array(0);
37661
+ message.references = object.references ?? new Uint8Array(0);
37513
37662
  return message;
37514
37663
  },
37515
37664
  };
@@ -39068,6 +39217,438 @@ export const LogedDevice = {
39068
39217
  },
39069
39218
  };
39070
39219
 
39220
+ function createBaseDirectFcmProto(): DirectFcmProto {
39221
+ return {
39222
+ title: "",
39223
+ link: "",
39224
+ content: "",
39225
+ channel_id: "",
39226
+ sender_id: "",
39227
+ avatar: "",
39228
+ clan_id: "",
39229
+ attachments: new Uint8Array(0),
39230
+ display_name: "",
39231
+ create_time_seconds: 0,
39232
+ update_time_seconds: 0,
39233
+ username: "",
39234
+ mentions: new Uint8Array(0),
39235
+ };
39236
+ }
39237
+
39238
+ export const DirectFcmProto = {
39239
+ encode(message: DirectFcmProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39240
+ if (message.title !== "") {
39241
+ writer.uint32(10).string(message.title);
39242
+ }
39243
+ if (message.link !== "") {
39244
+ writer.uint32(18).string(message.link);
39245
+ }
39246
+ if (message.content !== "") {
39247
+ writer.uint32(26).string(message.content);
39248
+ }
39249
+ if (message.channel_id !== "") {
39250
+ writer.uint32(34).string(message.channel_id);
39251
+ }
39252
+ if (message.sender_id !== "") {
39253
+ writer.uint32(42).string(message.sender_id);
39254
+ }
39255
+ if (message.avatar !== "") {
39256
+ writer.uint32(50).string(message.avatar);
39257
+ }
39258
+ if (message.clan_id !== "") {
39259
+ writer.uint32(58).string(message.clan_id);
39260
+ }
39261
+ if (message.attachments.length !== 0) {
39262
+ writer.uint32(66).bytes(message.attachments);
39263
+ }
39264
+ if (message.display_name !== "") {
39265
+ writer.uint32(74).string(message.display_name);
39266
+ }
39267
+ if (message.create_time_seconds !== 0) {
39268
+ writer.uint32(80).int32(message.create_time_seconds);
39269
+ }
39270
+ if (message.update_time_seconds !== 0) {
39271
+ writer.uint32(88).int32(message.update_time_seconds);
39272
+ }
39273
+ if (message.username !== "") {
39274
+ writer.uint32(98).string(message.username);
39275
+ }
39276
+ if (message.mentions.length !== 0) {
39277
+ writer.uint32(106).bytes(message.mentions);
39278
+ }
39279
+ return writer;
39280
+ },
39281
+
39282
+ decode(input: _m0.Reader | Uint8Array, length?: number): DirectFcmProto {
39283
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39284
+ let end = length === undefined ? reader.len : reader.pos + length;
39285
+ const message = createBaseDirectFcmProto();
39286
+ while (reader.pos < end) {
39287
+ const tag = reader.uint32();
39288
+ switch (tag >>> 3) {
39289
+ case 1:
39290
+ if (tag !== 10) {
39291
+ break;
39292
+ }
39293
+
39294
+ message.title = reader.string();
39295
+ continue;
39296
+ case 2:
39297
+ if (tag !== 18) {
39298
+ break;
39299
+ }
39300
+
39301
+ message.link = reader.string();
39302
+ continue;
39303
+ case 3:
39304
+ if (tag !== 26) {
39305
+ break;
39306
+ }
39307
+
39308
+ message.content = reader.string();
39309
+ continue;
39310
+ case 4:
39311
+ if (tag !== 34) {
39312
+ break;
39313
+ }
39314
+
39315
+ message.channel_id = reader.string();
39316
+ continue;
39317
+ case 5:
39318
+ if (tag !== 42) {
39319
+ break;
39320
+ }
39321
+
39322
+ message.sender_id = reader.string();
39323
+ continue;
39324
+ case 6:
39325
+ if (tag !== 50) {
39326
+ break;
39327
+ }
39328
+
39329
+ message.avatar = reader.string();
39330
+ continue;
39331
+ case 7:
39332
+ if (tag !== 58) {
39333
+ break;
39334
+ }
39335
+
39336
+ message.clan_id = reader.string();
39337
+ continue;
39338
+ case 8:
39339
+ if (tag !== 66) {
39340
+ break;
39341
+ }
39342
+
39343
+ message.attachments = reader.bytes();
39344
+ continue;
39345
+ case 9:
39346
+ if (tag !== 74) {
39347
+ break;
39348
+ }
39349
+
39350
+ message.display_name = reader.string();
39351
+ continue;
39352
+ case 10:
39353
+ if (tag !== 80) {
39354
+ break;
39355
+ }
39356
+
39357
+ message.create_time_seconds = reader.int32();
39358
+ continue;
39359
+ case 11:
39360
+ if (tag !== 88) {
39361
+ break;
39362
+ }
39363
+
39364
+ message.update_time_seconds = reader.int32();
39365
+ continue;
39366
+ case 12:
39367
+ if (tag !== 98) {
39368
+ break;
39369
+ }
39370
+
39371
+ message.username = reader.string();
39372
+ continue;
39373
+ case 13:
39374
+ if (tag !== 106) {
39375
+ break;
39376
+ }
39377
+
39378
+ message.mentions = reader.bytes();
39379
+ continue;
39380
+ }
39381
+ if ((tag & 7) === 4 || tag === 0) {
39382
+ break;
39383
+ }
39384
+ reader.skipType(tag & 7);
39385
+ }
39386
+ return message;
39387
+ },
39388
+
39389
+ fromJSON(object: any): DirectFcmProto {
39390
+ return {
39391
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
39392
+ link: isSet(object.link) ? globalThis.String(object.link) : "",
39393
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
39394
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
39395
+ sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
39396
+ avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
39397
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
39398
+ attachments: isSet(object.attachments) ? bytesFromBase64(object.attachments) : new Uint8Array(0),
39399
+ display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
39400
+ create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
39401
+ update_time_seconds: isSet(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
39402
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
39403
+ mentions: isSet(object.mentions) ? bytesFromBase64(object.mentions) : new Uint8Array(0),
39404
+ };
39405
+ },
39406
+
39407
+ toJSON(message: DirectFcmProto): unknown {
39408
+ const obj: any = {};
39409
+ if (message.title !== "") {
39410
+ obj.title = message.title;
39411
+ }
39412
+ if (message.link !== "") {
39413
+ obj.link = message.link;
39414
+ }
39415
+ if (message.content !== "") {
39416
+ obj.content = message.content;
39417
+ }
39418
+ if (message.channel_id !== "") {
39419
+ obj.channel_id = message.channel_id;
39420
+ }
39421
+ if (message.sender_id !== "") {
39422
+ obj.sender_id = message.sender_id;
39423
+ }
39424
+ if (message.avatar !== "") {
39425
+ obj.avatar = message.avatar;
39426
+ }
39427
+ if (message.clan_id !== "") {
39428
+ obj.clan_id = message.clan_id;
39429
+ }
39430
+ if (message.attachments.length !== 0) {
39431
+ obj.attachments = base64FromBytes(message.attachments);
39432
+ }
39433
+ if (message.display_name !== "") {
39434
+ obj.display_name = message.display_name;
39435
+ }
39436
+ if (message.create_time_seconds !== 0) {
39437
+ obj.create_time_seconds = Math.round(message.create_time_seconds);
39438
+ }
39439
+ if (message.update_time_seconds !== 0) {
39440
+ obj.update_time_seconds = Math.round(message.update_time_seconds);
39441
+ }
39442
+ if (message.username !== "") {
39443
+ obj.username = message.username;
39444
+ }
39445
+ if (message.mentions.length !== 0) {
39446
+ obj.mentions = base64FromBytes(message.mentions);
39447
+ }
39448
+ return obj;
39449
+ },
39450
+
39451
+ create<I extends Exact<DeepPartial<DirectFcmProto>, I>>(base?: I): DirectFcmProto {
39452
+ return DirectFcmProto.fromPartial(base ?? ({} as any));
39453
+ },
39454
+ fromPartial<I extends Exact<DeepPartial<DirectFcmProto>, I>>(object: I): DirectFcmProto {
39455
+ const message = createBaseDirectFcmProto();
39456
+ message.title = object.title ?? "";
39457
+ message.link = object.link ?? "";
39458
+ message.content = object.content ?? "";
39459
+ message.channel_id = object.channel_id ?? "";
39460
+ message.sender_id = object.sender_id ?? "";
39461
+ message.avatar = object.avatar ?? "";
39462
+ message.clan_id = object.clan_id ?? "";
39463
+ message.attachments = object.attachments ?? new Uint8Array(0);
39464
+ message.display_name = object.display_name ?? "";
39465
+ message.create_time_seconds = object.create_time_seconds ?? 0;
39466
+ message.update_time_seconds = object.update_time_seconds ?? 0;
39467
+ message.username = object.username ?? "";
39468
+ message.mentions = object.mentions ?? new Uint8Array(0);
39469
+ return message;
39470
+ },
39471
+ };
39472
+
39473
+ function createBaseMessageMentionList(): MessageMentionList {
39474
+ return { mentions: [] };
39475
+ }
39476
+
39477
+ export const MessageMentionList = {
39478
+ encode(message: MessageMentionList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39479
+ for (const v of message.mentions) {
39480
+ MessageMention.encode(v!, writer.uint32(10).fork()).ldelim();
39481
+ }
39482
+ return writer;
39483
+ },
39484
+
39485
+ decode(input: _m0.Reader | Uint8Array, length?: number): MessageMentionList {
39486
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39487
+ let end = length === undefined ? reader.len : reader.pos + length;
39488
+ const message = createBaseMessageMentionList();
39489
+ while (reader.pos < end) {
39490
+ const tag = reader.uint32();
39491
+ switch (tag >>> 3) {
39492
+ case 1:
39493
+ if (tag !== 10) {
39494
+ break;
39495
+ }
39496
+
39497
+ message.mentions.push(MessageMention.decode(reader, reader.uint32()));
39498
+ continue;
39499
+ }
39500
+ if ((tag & 7) === 4 || tag === 0) {
39501
+ break;
39502
+ }
39503
+ reader.skipType(tag & 7);
39504
+ }
39505
+ return message;
39506
+ },
39507
+
39508
+ fromJSON(object: any): MessageMentionList {
39509
+ return {
39510
+ mentions: globalThis.Array.isArray(object?.mentions)
39511
+ ? object.mentions.map((e: any) => MessageMention.fromJSON(e))
39512
+ : [],
39513
+ };
39514
+ },
39515
+
39516
+ toJSON(message: MessageMentionList): unknown {
39517
+ const obj: any = {};
39518
+ if (message.mentions?.length) {
39519
+ obj.mentions = message.mentions.map((e) => MessageMention.toJSON(e));
39520
+ }
39521
+ return obj;
39522
+ },
39523
+
39524
+ create<I extends Exact<DeepPartial<MessageMentionList>, I>>(base?: I): MessageMentionList {
39525
+ return MessageMentionList.fromPartial(base ?? ({} as any));
39526
+ },
39527
+ fromPartial<I extends Exact<DeepPartial<MessageMentionList>, I>>(object: I): MessageMentionList {
39528
+ const message = createBaseMessageMentionList();
39529
+ message.mentions = object.mentions?.map((e) => MessageMention.fromPartial(e)) || [];
39530
+ return message;
39531
+ },
39532
+ };
39533
+
39534
+ function createBaseMessageAttachmentList(): MessageAttachmentList {
39535
+ return { attachments: [] };
39536
+ }
39537
+
39538
+ export const MessageAttachmentList = {
39539
+ encode(message: MessageAttachmentList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39540
+ for (const v of message.attachments) {
39541
+ MessageAttachment.encode(v!, writer.uint32(10).fork()).ldelim();
39542
+ }
39543
+ return writer;
39544
+ },
39545
+
39546
+ decode(input: _m0.Reader | Uint8Array, length?: number): MessageAttachmentList {
39547
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39548
+ let end = length === undefined ? reader.len : reader.pos + length;
39549
+ const message = createBaseMessageAttachmentList();
39550
+ while (reader.pos < end) {
39551
+ const tag = reader.uint32();
39552
+ switch (tag >>> 3) {
39553
+ case 1:
39554
+ if (tag !== 10) {
39555
+ break;
39556
+ }
39557
+
39558
+ message.attachments.push(MessageAttachment.decode(reader, reader.uint32()));
39559
+ continue;
39560
+ }
39561
+ if ((tag & 7) === 4 || tag === 0) {
39562
+ break;
39563
+ }
39564
+ reader.skipType(tag & 7);
39565
+ }
39566
+ return message;
39567
+ },
39568
+
39569
+ fromJSON(object: any): MessageAttachmentList {
39570
+ return {
39571
+ attachments: globalThis.Array.isArray(object?.attachments)
39572
+ ? object.attachments.map((e: any) => MessageAttachment.fromJSON(e))
39573
+ : [],
39574
+ };
39575
+ },
39576
+
39577
+ toJSON(message: MessageAttachmentList): unknown {
39578
+ const obj: any = {};
39579
+ if (message.attachments?.length) {
39580
+ obj.attachments = message.attachments.map((e) => MessageAttachment.toJSON(e));
39581
+ }
39582
+ return obj;
39583
+ },
39584
+
39585
+ create<I extends Exact<DeepPartial<MessageAttachmentList>, I>>(base?: I): MessageAttachmentList {
39586
+ return MessageAttachmentList.fromPartial(base ?? ({} as any));
39587
+ },
39588
+ fromPartial<I extends Exact<DeepPartial<MessageAttachmentList>, I>>(object: I): MessageAttachmentList {
39589
+ const message = createBaseMessageAttachmentList();
39590
+ message.attachments = object.attachments?.map((e) => MessageAttachment.fromPartial(e)) || [];
39591
+ return message;
39592
+ },
39593
+ };
39594
+
39595
+ function createBaseMessageRefList(): MessageRefList {
39596
+ return { refs: [] };
39597
+ }
39598
+
39599
+ export const MessageRefList = {
39600
+ encode(message: MessageRefList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
39601
+ for (const v of message.refs) {
39602
+ MessageRef.encode(v!, writer.uint32(10).fork()).ldelim();
39603
+ }
39604
+ return writer;
39605
+ },
39606
+
39607
+ decode(input: _m0.Reader | Uint8Array, length?: number): MessageRefList {
39608
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
39609
+ let end = length === undefined ? reader.len : reader.pos + length;
39610
+ const message = createBaseMessageRefList();
39611
+ while (reader.pos < end) {
39612
+ const tag = reader.uint32();
39613
+ switch (tag >>> 3) {
39614
+ case 1:
39615
+ if (tag !== 10) {
39616
+ break;
39617
+ }
39618
+
39619
+ message.refs.push(MessageRef.decode(reader, reader.uint32()));
39620
+ continue;
39621
+ }
39622
+ if ((tag & 7) === 4 || tag === 0) {
39623
+ break;
39624
+ }
39625
+ reader.skipType(tag & 7);
39626
+ }
39627
+ return message;
39628
+ },
39629
+
39630
+ fromJSON(object: any): MessageRefList {
39631
+ return { refs: globalThis.Array.isArray(object?.refs) ? object.refs.map((e: any) => MessageRef.fromJSON(e)) : [] };
39632
+ },
39633
+
39634
+ toJSON(message: MessageRefList): unknown {
39635
+ const obj: any = {};
39636
+ if (message.refs?.length) {
39637
+ obj.refs = message.refs.map((e) => MessageRef.toJSON(e));
39638
+ }
39639
+ return obj;
39640
+ },
39641
+
39642
+ create<I extends Exact<DeepPartial<MessageRefList>, I>>(base?: I): MessageRefList {
39643
+ return MessageRefList.fromPartial(base ?? ({} as any));
39644
+ },
39645
+ fromPartial<I extends Exact<DeepPartial<MessageRefList>, I>>(object: I): MessageRefList {
39646
+ const message = createBaseMessageRefList();
39647
+ message.refs = object.refs?.map((e) => MessageRef.fromPartial(e)) || [];
39648
+ return message;
39649
+ },
39650
+ };
39651
+
39071
39652
  function bytesFromBase64(b64: string): Uint8Array {
39072
39653
  if ((globalThis as any).Buffer) {
39073
39654
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));