@tgsnake/skema 1.3.0 → 1.5.0

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/dist/raw/Raw.js CHANGED
@@ -5,7 +5,7 @@ const index_js_1 = require("@/raw/core/index.js");
5
5
  const deps_js_1 = require("@/deps.js");
6
6
  var Raw;
7
7
  (function (Raw) {
8
- Raw.Layer = 211;
8
+ Raw.Layer = 216;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -4009,6 +4009,7 @@ var Raw;
4009
4009
  contactRequirePremium;
4010
4010
  botBusiness;
4011
4011
  botHasMainApp;
4012
+ botForumView;
4012
4013
  id;
4013
4014
  accessHash;
4014
4015
  firstName;
@@ -4061,6 +4062,7 @@ var Raw;
4061
4062
  'contactRequirePremium',
4062
4063
  'botBusiness',
4063
4064
  'botHasMainApp',
4065
+ 'botForumView',
4064
4066
  'id',
4065
4067
  'accessHash',
4066
4068
  'firstName',
@@ -4107,6 +4109,7 @@ var Raw;
4107
4109
  this.contactRequirePremium = params.contactRequirePremium;
4108
4110
  this.botBusiness = params.botBusiness;
4109
4111
  this.botHasMainApp = params.botHasMainApp;
4112
+ this.botForumView = params.botForumView;
4110
4113
  this.id = params.id;
4111
4114
  this.accessHash = params.accessHash;
4112
4115
  this.firstName = params.firstName;
@@ -4156,6 +4159,7 @@ var Raw;
4156
4159
  let contactRequirePremium = flags2 & (1 << 10) ? true : false;
4157
4160
  let botBusiness = flags2 & (1 << 11) ? true : false;
4158
4161
  let botHasMainApp = flags2 & (1 << 13) ? true : false;
4162
+ let botForumView = flags2 & (1 << 16) ? true : false;
4159
4163
  let id = await index_js_1.Primitive.Long.read(_data);
4160
4164
  let accessHash = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
4161
4165
  let firstName = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
@@ -4202,6 +4206,7 @@ var Raw;
4202
4206
  contactRequirePremium: contactRequirePremium,
4203
4207
  botBusiness: botBusiness,
4204
4208
  botHasMainApp: botHasMainApp,
4209
+ botForumView: botForumView,
4205
4210
  id: id,
4206
4211
  accessHash: accessHash,
4207
4212
  firstName: firstName,
@@ -4267,6 +4272,7 @@ var Raw;
4267
4272
  flags2 |= this.contactRequirePremium ? 1 << 10 : 0;
4268
4273
  flags2 |= this.botBusiness ? 1 << 11 : 0;
4269
4274
  flags2 |= this.botHasMainApp ? 1 << 13 : 0;
4275
+ flags2 |= this.botForumView ? 1 << 16 : 0;
4270
4276
  flags2 |= this.usernames ? 1 << 0 : 0;
4271
4277
  flags2 |= this.storiesMaxId !== undefined ? 1 << 5 : 0;
4272
4278
  flags2 |= this.color !== undefined ? 1 << 8 : 0;
@@ -5450,11 +5456,12 @@ var Raw;
5450
5456
  botVerification;
5451
5457
  stargiftsCount;
5452
5458
  sendPaidMessagesStars;
5459
+ mainTab;
5453
5460
  constructor(params) {
5454
5461
  super();
5455
5462
  this.classType = 'types';
5456
5463
  this.className = 'ChannelFull';
5457
- this.constructorId = 0xe07429de;
5464
+ this.constructorId = 0xe4e0b29d;
5458
5465
  this.subclassOfId = 0xd49a2697;
5459
5466
  this._slots = [
5460
5467
  'canViewParticipants',
@@ -5522,6 +5529,7 @@ var Raw;
5522
5529
  'botVerification',
5523
5530
  'stargiftsCount',
5524
5531
  'sendPaidMessagesStars',
5532
+ 'mainTab',
5525
5533
  ];
5526
5534
  this.canViewParticipants = params.canViewParticipants;
5527
5535
  this.canSetUsername = params.canSetUsername;
@@ -5588,6 +5596,7 @@ var Raw;
5588
5596
  this.botVerification = params.botVerification;
5589
5597
  this.stargiftsCount = params.stargiftsCount;
5590
5598
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
5599
+ this.mainTab = params.mainTab;
5591
5600
  }
5592
5601
  static async read(_data, ..._args) {
5593
5602
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -5657,6 +5666,7 @@ var Raw;
5657
5666
  let botVerification = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
5658
5667
  let stargiftsCount = flags2 & (1 << 18) ? await index_js_1.Primitive.Int.read(_data) : undefined;
5659
5668
  let sendPaidMessagesStars = flags2 & (1 << 21) ? await index_js_1.Primitive.Long.read(_data) : undefined;
5669
+ let mainTab = flags2 & (1 << 22) ? await index_js_1.TLObject.read(_data) : undefined;
5660
5670
  return new Raw.ChannelFull({
5661
5671
  canViewParticipants: canViewParticipants,
5662
5672
  canSetUsername: canSetUsername,
@@ -5723,6 +5733,7 @@ var Raw;
5723
5733
  botVerification: botVerification,
5724
5734
  stargiftsCount: stargiftsCount,
5725
5735
  sendPaidMessagesStars: sendPaidMessagesStars,
5736
+ mainTab: mainTab,
5726
5737
  });
5727
5738
  }
5728
5739
  write() {
@@ -5787,6 +5798,7 @@ var Raw;
5787
5798
  flags2 |= this.botVerification !== undefined ? 1 << 17 : 0;
5788
5799
  flags2 |= this.stargiftsCount !== undefined ? 1 << 18 : 0;
5789
5800
  flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 21 : 0;
5801
+ flags2 |= this.mainTab !== undefined ? 1 << 22 : 0;
5790
5802
  b.write(index_js_1.Primitive.Int.write(flags2));
5791
5803
  if (this.id !== undefined) {
5792
5804
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -5920,6 +5932,9 @@ var Raw;
5920
5932
  if (this.sendPaidMessagesStars !== undefined) {
5921
5933
  b.write(index_js_1.Primitive.Long.write(this.sendPaidMessagesStars));
5922
5934
  }
5935
+ if (this.mainTab !== undefined) {
5936
+ b.write(this.mainTab.write());
5937
+ }
5923
5938
  return deps_js_1.Buffer.from(b.buffer);
5924
5939
  }
5925
5940
  }
@@ -8575,25 +8590,25 @@ var Raw;
8575
8590
  }
8576
8591
  Raw.MessageActionGroupCallScheduled = MessageActionGroupCallScheduled;
8577
8592
  class MessageActionSetChatTheme extends index_js_1.TLObject {
8578
- emoticon;
8593
+ theme;
8579
8594
  constructor(params) {
8580
8595
  super();
8581
8596
  this.classType = 'types';
8582
8597
  this.className = 'MessageActionSetChatTheme';
8583
- this.constructorId = 0xaa786345;
8598
+ this.constructorId = 0xb91bbd3a;
8584
8599
  this.subclassOfId = 0x8680d126;
8585
- this._slots = ['emoticon'];
8586
- this.emoticon = params.emoticon;
8600
+ this._slots = ['theme'];
8601
+ this.theme = params.theme;
8587
8602
  }
8588
8603
  static async read(_data, ..._args) {
8589
- let emoticon = await index_js_1.Primitive.String.read(_data);
8590
- return new Raw.MessageActionSetChatTheme({ emoticon: emoticon });
8604
+ let theme = await index_js_1.TLObject.read(_data);
8605
+ return new Raw.MessageActionSetChatTheme({ theme: theme });
8591
8606
  }
8592
8607
  write() {
8593
8608
  const b = new deps_js_1.BytesIO();
8594
8609
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
8595
- if (this.emoticon !== undefined) {
8596
- b.write(index_js_1.Primitive.String.write(this.emoticon));
8610
+ if (this.theme !== undefined) {
8611
+ b.write(this.theme.write());
8597
8612
  }
8598
8613
  return deps_js_1.Buffer.from(b.buffer);
8599
8614
  }
@@ -8743,6 +8758,7 @@ var Raw;
8743
8758
  }
8744
8759
  Raw.MessageActionGiftPremium = MessageActionGiftPremium;
8745
8760
  class MessageActionTopicCreate extends index_js_1.TLObject {
8761
+ titleMissing;
8746
8762
  title;
8747
8763
  iconColor;
8748
8764
  iconEmojiId;
@@ -8752,17 +8768,20 @@ var Raw;
8752
8768
  this.className = 'MessageActionTopicCreate';
8753
8769
  this.constructorId = 0xd999256;
8754
8770
  this.subclassOfId = 0x8680d126;
8755
- this._slots = ['title', 'iconColor', 'iconEmojiId'];
8771
+ this._slots = ['titleMissing', 'title', 'iconColor', 'iconEmojiId'];
8772
+ this.titleMissing = params.titleMissing;
8756
8773
  this.title = params.title;
8757
8774
  this.iconColor = params.iconColor;
8758
8775
  this.iconEmojiId = params.iconEmojiId;
8759
8776
  }
8760
8777
  static async read(_data, ..._args) {
8761
8778
  let flags = await index_js_1.Primitive.Int.read(_data);
8779
+ let titleMissing = flags & (1 << 1) ? true : false;
8762
8780
  let title = await index_js_1.Primitive.String.read(_data);
8763
8781
  let iconColor = await index_js_1.Primitive.Int.read(_data);
8764
8782
  let iconEmojiId = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
8765
8783
  return new Raw.MessageActionTopicCreate({
8784
+ titleMissing: titleMissing,
8766
8785
  title: title,
8767
8786
  iconColor: iconColor,
8768
8787
  iconEmojiId: iconEmojiId,
@@ -8772,6 +8791,7 @@ var Raw;
8772
8791
  const b = new deps_js_1.BytesIO();
8773
8792
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
8774
8793
  let flags = 0;
8794
+ flags |= this.titleMissing ? 1 << 1 : 0;
8775
8795
  flags |= this.iconEmojiId !== undefined ? 1 << 0 : 0;
8776
8796
  b.write(index_js_1.Primitive.Int.write(flags));
8777
8797
  if (this.title !== undefined) {
@@ -9368,6 +9388,8 @@ var Raw;
9368
9388
  upgraded;
9369
9389
  refunded;
9370
9390
  canUpgrade;
9391
+ prepaidUpgrade;
9392
+ upgradeSeparate;
9371
9393
  gift;
9372
9394
  message;
9373
9395
  convertStars;
@@ -9376,11 +9398,13 @@ var Raw;
9376
9398
  fromId;
9377
9399
  peer;
9378
9400
  savedId;
9401
+ prepaidUpgradeHash;
9402
+ giftMsgId;
9379
9403
  constructor(params) {
9380
9404
  super();
9381
9405
  this.classType = 'types';
9382
9406
  this.className = 'MessageActionStarGift';
9383
- this.constructorId = 0x4717e8a4;
9407
+ this.constructorId = 0xf24de7fa;
9384
9408
  this.subclassOfId = 0x8680d126;
9385
9409
  this._slots = [
9386
9410
  'nameHidden',
@@ -9389,6 +9413,8 @@ var Raw;
9389
9413
  'upgraded',
9390
9414
  'refunded',
9391
9415
  'canUpgrade',
9416
+ 'prepaidUpgrade',
9417
+ 'upgradeSeparate',
9392
9418
  'gift',
9393
9419
  'message',
9394
9420
  'convertStars',
@@ -9397,6 +9423,8 @@ var Raw;
9397
9423
  'fromId',
9398
9424
  'peer',
9399
9425
  'savedId',
9426
+ 'prepaidUpgradeHash',
9427
+ 'giftMsgId',
9400
9428
  ];
9401
9429
  this.nameHidden = params.nameHidden;
9402
9430
  this.saved = params.saved;
@@ -9404,6 +9432,8 @@ var Raw;
9404
9432
  this.upgraded = params.upgraded;
9405
9433
  this.refunded = params.refunded;
9406
9434
  this.canUpgrade = params.canUpgrade;
9435
+ this.prepaidUpgrade = params.prepaidUpgrade;
9436
+ this.upgradeSeparate = params.upgradeSeparate;
9407
9437
  this.gift = params.gift;
9408
9438
  this.message = params.message;
9409
9439
  this.convertStars = params.convertStars;
@@ -9412,6 +9442,8 @@ var Raw;
9412
9442
  this.fromId = params.fromId;
9413
9443
  this.peer = params.peer;
9414
9444
  this.savedId = params.savedId;
9445
+ this.prepaidUpgradeHash = params.prepaidUpgradeHash;
9446
+ this.giftMsgId = params.giftMsgId;
9415
9447
  }
9416
9448
  static async read(_data, ..._args) {
9417
9449
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -9421,6 +9453,8 @@ var Raw;
9421
9453
  let upgraded = flags & (1 << 5) ? true : false;
9422
9454
  let refunded = flags & (1 << 9) ? true : false;
9423
9455
  let canUpgrade = flags & (1 << 10) ? true : false;
9456
+ let prepaidUpgrade = flags & (1 << 13) ? true : false;
9457
+ let upgradeSeparate = flags & (1 << 16) ? true : false;
9424
9458
  let gift = await index_js_1.TLObject.read(_data);
9425
9459
  let message = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
9426
9460
  let convertStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
@@ -9429,6 +9463,8 @@ var Raw;
9429
9463
  let fromId = flags & (1 << 11) ? await index_js_1.TLObject.read(_data) : undefined;
9430
9464
  let peer = flags & (1 << 12) ? await index_js_1.TLObject.read(_data) : undefined;
9431
9465
  let savedId = flags & (1 << 12) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9466
+ let prepaidUpgradeHash = flags & (1 << 14) ? await index_js_1.Primitive.String.read(_data) : undefined;
9467
+ let giftMsgId = flags & (1 << 15) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9432
9468
  return new Raw.MessageActionStarGift({
9433
9469
  nameHidden: nameHidden,
9434
9470
  saved: saved,
@@ -9436,6 +9472,8 @@ var Raw;
9436
9472
  upgraded: upgraded,
9437
9473
  refunded: refunded,
9438
9474
  canUpgrade: canUpgrade,
9475
+ prepaidUpgrade: prepaidUpgrade,
9476
+ upgradeSeparate: upgradeSeparate,
9439
9477
  gift: gift,
9440
9478
  message: message,
9441
9479
  convertStars: convertStars,
@@ -9444,6 +9482,8 @@ var Raw;
9444
9482
  fromId: fromId,
9445
9483
  peer: peer,
9446
9484
  savedId: savedId,
9485
+ prepaidUpgradeHash: prepaidUpgradeHash,
9486
+ giftMsgId: giftMsgId,
9447
9487
  });
9448
9488
  }
9449
9489
  write() {
@@ -9456,6 +9496,8 @@ var Raw;
9456
9496
  flags |= this.upgraded ? 1 << 5 : 0;
9457
9497
  flags |= this.refunded ? 1 << 9 : 0;
9458
9498
  flags |= this.canUpgrade ? 1 << 10 : 0;
9499
+ flags |= this.prepaidUpgrade ? 1 << 13 : 0;
9500
+ flags |= this.upgradeSeparate ? 1 << 16 : 0;
9459
9501
  flags |= this.message !== undefined ? 1 << 1 : 0;
9460
9502
  flags |= this.convertStars !== undefined ? 1 << 4 : 0;
9461
9503
  flags |= this.upgradeMsgId !== undefined ? 1 << 5 : 0;
@@ -9463,6 +9505,8 @@ var Raw;
9463
9505
  flags |= this.fromId !== undefined ? 1 << 11 : 0;
9464
9506
  flags |= this.peer !== undefined ? 1 << 12 : 0;
9465
9507
  flags |= this.savedId !== undefined ? 1 << 12 : 0;
9508
+ flags |= this.prepaidUpgradeHash !== undefined ? 1 << 14 : 0;
9509
+ flags |= this.giftMsgId !== undefined ? 1 << 15 : 0;
9466
9510
  b.write(index_js_1.Primitive.Int.write(flags));
9467
9511
  if (this.gift !== undefined) {
9468
9512
  b.write(this.gift.write());
@@ -9488,6 +9532,12 @@ var Raw;
9488
9532
  if (this.savedId !== undefined) {
9489
9533
  b.write(index_js_1.Primitive.Long.write(this.savedId));
9490
9534
  }
9535
+ if (this.prepaidUpgradeHash !== undefined) {
9536
+ b.write(index_js_1.Primitive.String.write(this.prepaidUpgradeHash));
9537
+ }
9538
+ if (this.giftMsgId !== undefined) {
9539
+ b.write(index_js_1.Primitive.Int.write(this.giftMsgId));
9540
+ }
9491
9541
  return deps_js_1.Buffer.from(b.buffer);
9492
9542
  }
9493
9543
  }
@@ -9497,6 +9547,8 @@ var Raw;
9497
9547
  transferred;
9498
9548
  saved;
9499
9549
  refunded;
9550
+ prepaidUpgrade;
9551
+ assigned;
9500
9552
  gift;
9501
9553
  canExportAt;
9502
9554
  transferStars;
@@ -9506,17 +9558,20 @@ var Raw;
9506
9558
  resaleAmount;
9507
9559
  canTransferAt;
9508
9560
  canResellAt;
9561
+ dropOriginalDetailsStars;
9509
9562
  constructor(params) {
9510
9563
  super();
9511
9564
  this.classType = 'types';
9512
9565
  this.className = 'MessageActionStarGiftUnique';
9513
- this.constructorId = 0x34f762f3;
9566
+ this.constructorId = 0x95728543;
9514
9567
  this.subclassOfId = 0x8680d126;
9515
9568
  this._slots = [
9516
9569
  'upgrade',
9517
9570
  'transferred',
9518
9571
  'saved',
9519
9572
  'refunded',
9573
+ 'prepaidUpgrade',
9574
+ 'assigned',
9520
9575
  'gift',
9521
9576
  'canExportAt',
9522
9577
  'transferStars',
@@ -9526,11 +9581,14 @@ var Raw;
9526
9581
  'resaleAmount',
9527
9582
  'canTransferAt',
9528
9583
  'canResellAt',
9584
+ 'dropOriginalDetailsStars',
9529
9585
  ];
9530
9586
  this.upgrade = params.upgrade;
9531
9587
  this.transferred = params.transferred;
9532
9588
  this.saved = params.saved;
9533
9589
  this.refunded = params.refunded;
9590
+ this.prepaidUpgrade = params.prepaidUpgrade;
9591
+ this.assigned = params.assigned;
9534
9592
  this.gift = params.gift;
9535
9593
  this.canExportAt = params.canExportAt;
9536
9594
  this.transferStars = params.transferStars;
@@ -9540,6 +9598,7 @@ var Raw;
9540
9598
  this.resaleAmount = params.resaleAmount;
9541
9599
  this.canTransferAt = params.canTransferAt;
9542
9600
  this.canResellAt = params.canResellAt;
9601
+ this.dropOriginalDetailsStars = params.dropOriginalDetailsStars;
9543
9602
  }
9544
9603
  static async read(_data, ..._args) {
9545
9604
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -9547,6 +9606,8 @@ var Raw;
9547
9606
  let transferred = flags & (1 << 1) ? true : false;
9548
9607
  let saved = flags & (1 << 2) ? true : false;
9549
9608
  let refunded = flags & (1 << 5) ? true : false;
9609
+ let prepaidUpgrade = flags & (1 << 11) ? true : false;
9610
+ let assigned = flags & (1 << 13) ? true : false;
9550
9611
  let gift = await index_js_1.TLObject.read(_data);
9551
9612
  let canExportAt = flags & (1 << 3) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9552
9613
  let transferStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
@@ -9556,11 +9617,14 @@ var Raw;
9556
9617
  let resaleAmount = flags & (1 << 8) ? await index_js_1.TLObject.read(_data) : undefined;
9557
9618
  let canTransferAt = flags & (1 << 9) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9558
9619
  let canResellAt = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9620
+ let dropOriginalDetailsStars = flags & (1 << 12) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9559
9621
  return new Raw.MessageActionStarGiftUnique({
9560
9622
  upgrade: upgrade,
9561
9623
  transferred: transferred,
9562
9624
  saved: saved,
9563
9625
  refunded: refunded,
9626
+ prepaidUpgrade: prepaidUpgrade,
9627
+ assigned: assigned,
9564
9628
  gift: gift,
9565
9629
  canExportAt: canExportAt,
9566
9630
  transferStars: transferStars,
@@ -9570,6 +9634,7 @@ var Raw;
9570
9634
  resaleAmount: resaleAmount,
9571
9635
  canTransferAt: canTransferAt,
9572
9636
  canResellAt: canResellAt,
9637
+ dropOriginalDetailsStars: dropOriginalDetailsStars,
9573
9638
  });
9574
9639
  }
9575
9640
  write() {
@@ -9580,6 +9645,8 @@ var Raw;
9580
9645
  flags |= this.transferred ? 1 << 1 : 0;
9581
9646
  flags |= this.saved ? 1 << 2 : 0;
9582
9647
  flags |= this.refunded ? 1 << 5 : 0;
9648
+ flags |= this.prepaidUpgrade ? 1 << 11 : 0;
9649
+ flags |= this.assigned ? 1 << 13 : 0;
9583
9650
  flags |= this.canExportAt !== undefined ? 1 << 3 : 0;
9584
9651
  flags |= this.transferStars !== undefined ? 1 << 4 : 0;
9585
9652
  flags |= this.fromId !== undefined ? 1 << 6 : 0;
@@ -9588,6 +9655,7 @@ var Raw;
9588
9655
  flags |= this.resaleAmount !== undefined ? 1 << 8 : 0;
9589
9656
  flags |= this.canTransferAt !== undefined ? 1 << 9 : 0;
9590
9657
  flags |= this.canResellAt !== undefined ? 1 << 10 : 0;
9658
+ flags |= this.dropOriginalDetailsStars !== undefined ? 1 << 12 : 0;
9591
9659
  b.write(index_js_1.Primitive.Int.write(flags));
9592
9660
  if (this.gift !== undefined) {
9593
9661
  b.write(this.gift.write());
@@ -9616,6 +9684,9 @@ var Raw;
9616
9684
  if (this.canResellAt !== undefined) {
9617
9685
  b.write(index_js_1.Primitive.Int.write(this.canResellAt));
9618
9686
  }
9687
+ if (this.dropOriginalDetailsStars !== undefined) {
9688
+ b.write(index_js_1.Primitive.Long.write(this.dropOriginalDetailsStars));
9689
+ }
9619
9690
  return deps_js_1.Buffer.from(b.buffer);
9620
9691
  }
9621
9692
  }
@@ -9973,6 +10044,31 @@ var Raw;
9973
10044
  }
9974
10045
  }
9975
10046
  Raw.MessageActionGiftTon = MessageActionGiftTon;
10047
+ class MessageActionSuggestBirthday extends index_js_1.TLObject {
10048
+ birthday;
10049
+ constructor(params) {
10050
+ super();
10051
+ this.classType = 'types';
10052
+ this.className = 'MessageActionSuggestBirthday';
10053
+ this.constructorId = 0x2c8f2a25;
10054
+ this.subclassOfId = 0x8680d126;
10055
+ this._slots = ['birthday'];
10056
+ this.birthday = params.birthday;
10057
+ }
10058
+ static async read(_data, ..._args) {
10059
+ let birthday = await index_js_1.TLObject.read(_data);
10060
+ return new Raw.MessageActionSuggestBirthday({ birthday: birthday });
10061
+ }
10062
+ write() {
10063
+ const b = new deps_js_1.BytesIO();
10064
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10065
+ if (this.birthday !== undefined) {
10066
+ b.write(this.birthday.write());
10067
+ }
10068
+ return deps_js_1.Buffer.from(b.buffer);
10069
+ }
10070
+ }
10071
+ Raw.MessageActionSuggestBirthday = MessageActionSuggestBirthday;
9976
10072
  class Dialog extends index_js_1.TLObject {
9977
10073
  pinned;
9978
10074
  unreadMark;
@@ -11455,7 +11551,7 @@ var Raw;
11455
11551
  commonChatsCount;
11456
11552
  folderId;
11457
11553
  ttlPeriod;
11458
- themeEmoticon;
11554
+ theme;
11459
11555
  privateForwardName;
11460
11556
  botGroupAdminRights;
11461
11557
  botBroadcastAdminRights;
@@ -11477,11 +11573,14 @@ var Raw;
11477
11573
  starsRating;
11478
11574
  starsMyPendingRating;
11479
11575
  starsMyPendingRatingDate;
11576
+ mainTab;
11577
+ savedMusic;
11578
+ note;
11480
11579
  constructor(params) {
11481
11580
  super();
11482
11581
  this.classType = 'types';
11483
11582
  this.className = 'UserFull';
11484
- this.constructorId = 0x7e63ce1f;
11583
+ this.constructorId = 0xa02bc13e;
11485
11584
  this.subclassOfId = 0x1f4661b9;
11486
11585
  this._slots = [
11487
11586
  'blocked',
@@ -11513,7 +11612,7 @@ var Raw;
11513
11612
  'commonChatsCount',
11514
11613
  'folderId',
11515
11614
  'ttlPeriod',
11516
- 'themeEmoticon',
11615
+ 'theme',
11517
11616
  'privateForwardName',
11518
11617
  'botGroupAdminRights',
11519
11618
  'botBroadcastAdminRights',
@@ -11535,6 +11634,9 @@ var Raw;
11535
11634
  'starsRating',
11536
11635
  'starsMyPendingRating',
11537
11636
  'starsMyPendingRatingDate',
11637
+ 'mainTab',
11638
+ 'savedMusic',
11639
+ 'note',
11538
11640
  ];
11539
11641
  this.blocked = params.blocked;
11540
11642
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -11565,7 +11667,7 @@ var Raw;
11565
11667
  this.commonChatsCount = params.commonChatsCount;
11566
11668
  this.folderId = params.folderId;
11567
11669
  this.ttlPeriod = params.ttlPeriod;
11568
- this.themeEmoticon = params.themeEmoticon;
11670
+ this.theme = params.theme;
11569
11671
  this.privateForwardName = params.privateForwardName;
11570
11672
  this.botGroupAdminRights = params.botGroupAdminRights;
11571
11673
  this.botBroadcastAdminRights = params.botBroadcastAdminRights;
@@ -11587,6 +11689,9 @@ var Raw;
11587
11689
  this.starsRating = params.starsRating;
11588
11690
  this.starsMyPendingRating = params.starsMyPendingRating;
11589
11691
  this.starsMyPendingRatingDate = params.starsMyPendingRatingDate;
11692
+ this.mainTab = params.mainTab;
11693
+ this.savedMusic = params.savedMusic;
11694
+ this.note = params.note;
11590
11695
  }
11591
11696
  static async read(_data, ..._args) {
11592
11697
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -11620,7 +11725,7 @@ var Raw;
11620
11725
  let commonChatsCount = await index_js_1.Primitive.Int.read(_data);
11621
11726
  let folderId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11622
11727
  let ttlPeriod = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11623
- let themeEmoticon = flags & (1 << 15) ? await index_js_1.Primitive.String.read(_data) : undefined;
11728
+ let theme = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11624
11729
  let privateForwardName = flags & (1 << 16) ? await index_js_1.Primitive.String.read(_data) : undefined;
11625
11730
  let botGroupAdminRights = flags & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11626
11731
  let botBroadcastAdminRights = flags & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -11642,6 +11747,9 @@ var Raw;
11642
11747
  let starsRating = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11643
11748
  let starsMyPendingRating = flags2 & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
11644
11749
  let starsMyPendingRatingDate = flags2 & (1 << 18) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11750
+ let mainTab = flags2 & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
11751
+ let savedMusic = flags2 & (1 << 21) ? await index_js_1.TLObject.read(_data) : undefined;
11752
+ let note = flags2 & (1 << 22) ? await index_js_1.TLObject.read(_data) : undefined;
11645
11753
  return new Raw.UserFull({
11646
11754
  blocked: blocked,
11647
11755
  phoneCallsAvailable: phoneCallsAvailable,
@@ -11672,7 +11780,7 @@ var Raw;
11672
11780
  commonChatsCount: commonChatsCount,
11673
11781
  folderId: folderId,
11674
11782
  ttlPeriod: ttlPeriod,
11675
- themeEmoticon: themeEmoticon,
11783
+ theme: theme,
11676
11784
  privateForwardName: privateForwardName,
11677
11785
  botGroupAdminRights: botGroupAdminRights,
11678
11786
  botBroadcastAdminRights: botBroadcastAdminRights,
@@ -11694,6 +11802,9 @@ var Raw;
11694
11802
  starsRating: starsRating,
11695
11803
  starsMyPendingRating: starsMyPendingRating,
11696
11804
  starsMyPendingRatingDate: starsMyPendingRatingDate,
11805
+ mainTab: mainTab,
11806
+ savedMusic: savedMusic,
11807
+ note: note,
11697
11808
  });
11698
11809
  }
11699
11810
  write() {
@@ -11721,7 +11832,7 @@ var Raw;
11721
11832
  flags |= this.pinnedMsgId !== undefined ? 1 << 6 : 0;
11722
11833
  flags |= this.folderId !== undefined ? 1 << 11 : 0;
11723
11834
  flags |= this.ttlPeriod !== undefined ? 1 << 14 : 0;
11724
- flags |= this.themeEmoticon !== undefined ? 1 << 15 : 0;
11835
+ flags |= this.theme !== undefined ? 1 << 15 : 0;
11725
11836
  flags |= this.privateForwardName !== undefined ? 1 << 16 : 0;
11726
11837
  flags |= this.botGroupAdminRights !== undefined ? 1 << 17 : 0;
11727
11838
  flags |= this.botBroadcastAdminRights !== undefined ? 1 << 18 : 0;
@@ -11749,6 +11860,9 @@ var Raw;
11749
11860
  flags2 |= this.starsRating !== undefined ? 1 << 17 : 0;
11750
11861
  flags2 |= this.starsMyPendingRating !== undefined ? 1 << 18 : 0;
11751
11862
  flags2 |= this.starsMyPendingRatingDate !== undefined ? 1 << 18 : 0;
11863
+ flags2 |= this.mainTab !== undefined ? 1 << 20 : 0;
11864
+ flags2 |= this.savedMusic !== undefined ? 1 << 21 : 0;
11865
+ flags2 |= this.note !== undefined ? 1 << 22 : 0;
11752
11866
  b.write(index_js_1.Primitive.Int.write(flags2));
11753
11867
  if (this.id !== undefined) {
11754
11868
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -11786,8 +11900,8 @@ var Raw;
11786
11900
  if (this.ttlPeriod !== undefined) {
11787
11901
  b.write(index_js_1.Primitive.Int.write(this.ttlPeriod));
11788
11902
  }
11789
- if (this.themeEmoticon !== undefined) {
11790
- b.write(index_js_1.Primitive.String.write(this.themeEmoticon));
11903
+ if (this.theme !== undefined) {
11904
+ b.write(this.theme.write());
11791
11905
  }
11792
11906
  if (this.privateForwardName !== undefined) {
11793
11907
  b.write(index_js_1.Primitive.String.write(this.privateForwardName));
@@ -11852,6 +11966,15 @@ var Raw;
11852
11966
  if (this.starsMyPendingRatingDate !== undefined) {
11853
11967
  b.write(index_js_1.Primitive.Int.write(this.starsMyPendingRatingDate));
11854
11968
  }
11969
+ if (this.mainTab !== undefined) {
11970
+ b.write(this.mainTab.write());
11971
+ }
11972
+ if (this.savedMusic !== undefined) {
11973
+ b.write(this.savedMusic.write());
11974
+ }
11975
+ if (this.note !== undefined) {
11976
+ b.write(this.note.write());
11977
+ }
11855
11978
  return deps_js_1.Buffer.from(b.buffer);
11856
11979
  }
11857
11980
  }
@@ -12386,28 +12509,38 @@ var Raw;
12386
12509
  Raw.UpdateDeleteMessages = UpdateDeleteMessages;
12387
12510
  class UpdateUserTyping extends index_js_1.TLObject {
12388
12511
  userId;
12512
+ topMsgId;
12389
12513
  action;
12390
12514
  constructor(params) {
12391
12515
  super();
12392
12516
  this.classType = 'types';
12393
12517
  this.className = 'UpdateUserTyping';
12394
- this.constructorId = 0xc01e857f;
12518
+ this.constructorId = 0x2a17bf5c;
12395
12519
  this.subclassOfId = 0x9f89304e;
12396
- this._slots = ['userId', 'action'];
12520
+ this._slots = ['userId', 'topMsgId', 'action'];
12397
12521
  this.userId = params.userId;
12522
+ this.topMsgId = params.topMsgId;
12398
12523
  this.action = params.action;
12399
12524
  }
12400
12525
  static async read(_data, ..._args) {
12526
+ let flags = await index_js_1.Primitive.Int.read(_data);
12401
12527
  let userId = await index_js_1.Primitive.Long.read(_data);
12528
+ let topMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
12402
12529
  let action = await index_js_1.TLObject.read(_data);
12403
- return new Raw.UpdateUserTyping({ userId: userId, action: action });
12530
+ return new Raw.UpdateUserTyping({ userId: userId, topMsgId: topMsgId, action: action });
12404
12531
  }
12405
12532
  write() {
12406
12533
  const b = new deps_js_1.BytesIO();
12407
12534
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
12535
+ let flags = 0;
12536
+ flags |= this.topMsgId !== undefined ? 1 << 0 : 0;
12537
+ b.write(index_js_1.Primitive.Int.write(flags));
12408
12538
  if (this.userId !== undefined) {
12409
12539
  b.write(index_js_1.Primitive.Long.write(this.userId));
12410
12540
  }
12541
+ if (this.topMsgId !== undefined) {
12542
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
12543
+ }
12411
12544
  if (this.action !== undefined) {
12412
12545
  b.write(this.action.write());
12413
12546
  }
@@ -13025,6 +13158,7 @@ var Raw;
13025
13158
  class UpdateReadHistoryInbox extends index_js_1.TLObject {
13026
13159
  folderId;
13027
13160
  peer;
13161
+ topMsgId;
13028
13162
  maxId;
13029
13163
  stillUnreadCount;
13030
13164
  pts;
@@ -13033,11 +13167,20 @@ var Raw;
13033
13167
  super();
13034
13168
  this.classType = 'types';
13035
13169
  this.className = 'UpdateReadHistoryInbox';
13036
- this.constructorId = 0x9c974fdf;
13170
+ this.constructorId = 0x9e84bc99;
13037
13171
  this.subclassOfId = 0x9f89304e;
13038
- this._slots = ['folderId', 'peer', 'maxId', 'stillUnreadCount', 'pts', 'ptsCount'];
13172
+ this._slots = [
13173
+ 'folderId',
13174
+ 'peer',
13175
+ 'topMsgId',
13176
+ 'maxId',
13177
+ 'stillUnreadCount',
13178
+ 'pts',
13179
+ 'ptsCount',
13180
+ ];
13039
13181
  this.folderId = params.folderId;
13040
13182
  this.peer = params.peer;
13183
+ this.topMsgId = params.topMsgId;
13041
13184
  this.maxId = params.maxId;
13042
13185
  this.stillUnreadCount = params.stillUnreadCount;
13043
13186
  this.pts = params.pts;
@@ -13047,6 +13190,7 @@ var Raw;
13047
13190
  let flags = await index_js_1.Primitive.Int.read(_data);
13048
13191
  let folderId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
13049
13192
  let peer = await index_js_1.TLObject.read(_data);
13193
+ let topMsgId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
13050
13194
  let maxId = await index_js_1.Primitive.Int.read(_data);
13051
13195
  let stillUnreadCount = await index_js_1.Primitive.Int.read(_data);
13052
13196
  let pts = await index_js_1.Primitive.Int.read(_data);
@@ -13054,6 +13198,7 @@ var Raw;
13054
13198
  return new Raw.UpdateReadHistoryInbox({
13055
13199
  folderId: folderId,
13056
13200
  peer: peer,
13201
+ topMsgId: topMsgId,
13057
13202
  maxId: maxId,
13058
13203
  stillUnreadCount: stillUnreadCount,
13059
13204
  pts: pts,
@@ -13065,6 +13210,7 @@ var Raw;
13065
13210
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
13066
13211
  let flags = 0;
13067
13212
  flags |= this.folderId !== undefined ? 1 << 0 : 0;
13213
+ flags |= this.topMsgId !== undefined ? 1 << 1 : 0;
13068
13214
  b.write(index_js_1.Primitive.Int.write(flags));
13069
13215
  if (this.folderId !== undefined) {
13070
13216
  b.write(index_js_1.Primitive.Int.write(this.folderId));
@@ -13072,6 +13218,9 @@ var Raw;
13072
13218
  if (this.peer !== undefined) {
13073
13219
  b.write(this.peer.write());
13074
13220
  }
13221
+ if (this.topMsgId !== undefined) {
13222
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
13223
+ }
13075
13224
  if (this.maxId !== undefined) {
13076
13225
  b.write(index_js_1.Primitive.Int.write(this.maxId));
13077
13226
  }
@@ -16426,83 +16575,6 @@ var Raw;
16426
16575
  }
16427
16576
  }
16428
16577
  Raw.UpdateMessageExtendedMedia = UpdateMessageExtendedMedia;
16429
- class UpdateChannelPinnedTopic extends index_js_1.TLObject {
16430
- pinned;
16431
- channelId;
16432
- topicId;
16433
- constructor(params) {
16434
- super();
16435
- this.classType = 'types';
16436
- this.className = 'UpdateChannelPinnedTopic';
16437
- this.constructorId = 0x192efbe3;
16438
- this.subclassOfId = 0x9f89304e;
16439
- this._slots = ['pinned', 'channelId', 'topicId'];
16440
- this.pinned = params.pinned;
16441
- this.channelId = params.channelId;
16442
- this.topicId = params.topicId;
16443
- }
16444
- static async read(_data, ..._args) {
16445
- let flags = await index_js_1.Primitive.Int.read(_data);
16446
- let pinned = flags & (1 << 0) ? true : false;
16447
- let channelId = await index_js_1.Primitive.Long.read(_data);
16448
- let topicId = await index_js_1.Primitive.Int.read(_data);
16449
- return new Raw.UpdateChannelPinnedTopic({
16450
- pinned: pinned,
16451
- channelId: channelId,
16452
- topicId: topicId,
16453
- });
16454
- }
16455
- write() {
16456
- const b = new deps_js_1.BytesIO();
16457
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
16458
- let flags = 0;
16459
- flags |= this.pinned ? 1 << 0 : 0;
16460
- b.write(index_js_1.Primitive.Int.write(flags));
16461
- if (this.channelId !== undefined) {
16462
- b.write(index_js_1.Primitive.Long.write(this.channelId));
16463
- }
16464
- if (this.topicId !== undefined) {
16465
- b.write(index_js_1.Primitive.Int.write(this.topicId));
16466
- }
16467
- return deps_js_1.Buffer.from(b.buffer);
16468
- }
16469
- }
16470
- Raw.UpdateChannelPinnedTopic = UpdateChannelPinnedTopic;
16471
- class UpdateChannelPinnedTopics extends index_js_1.TLObject {
16472
- channelId;
16473
- order;
16474
- constructor(params) {
16475
- super();
16476
- this.classType = 'types';
16477
- this.className = 'UpdateChannelPinnedTopics';
16478
- this.constructorId = 0xfe198602;
16479
- this.subclassOfId = 0x9f89304e;
16480
- this._slots = ['channelId', 'order'];
16481
- this.channelId = params.channelId;
16482
- this.order = params.order;
16483
- }
16484
- static async read(_data, ..._args) {
16485
- let flags = await index_js_1.Primitive.Int.read(_data);
16486
- let channelId = await index_js_1.Primitive.Long.read(_data);
16487
- let order = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
16488
- return new Raw.UpdateChannelPinnedTopics({ channelId: channelId, order: order });
16489
- }
16490
- write() {
16491
- const b = new deps_js_1.BytesIO();
16492
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
16493
- let flags = 0;
16494
- flags |= this.order ? 1 << 0 : 0;
16495
- b.write(index_js_1.Primitive.Int.write(flags));
16496
- if (this.channelId !== undefined) {
16497
- b.write(index_js_1.Primitive.Long.write(this.channelId));
16498
- }
16499
- if (this.order) {
16500
- b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
16501
- }
16502
- return deps_js_1.Buffer.from(b.buffer);
16503
- }
16504
- }
16505
- Raw.UpdateChannelPinnedTopics = UpdateChannelPinnedTopics;
16506
16578
  class UpdateUser extends index_js_1.TLObject {
16507
16579
  userId;
16508
16580
  constructor(params) {
@@ -17790,6 +17862,168 @@ var Raw;
17790
17862
  }
17791
17863
  }
17792
17864
  Raw.UpdateMonoForumNoPaidException = UpdateMonoForumNoPaidException;
17865
+ class UpdateGroupCallMessage extends index_js_1.TLObject {
17866
+ call;
17867
+ fromId;
17868
+ randomId;
17869
+ message;
17870
+ constructor(params) {
17871
+ super();
17872
+ this.classType = 'types';
17873
+ this.className = 'UpdateGroupCallMessage';
17874
+ this.constructorId = 0x78c314e0;
17875
+ this.subclassOfId = 0x9f89304e;
17876
+ this._slots = ['call', 'fromId', 'randomId', 'message'];
17877
+ this.call = params.call;
17878
+ this.fromId = params.fromId;
17879
+ this.randomId = params.randomId;
17880
+ this.message = params.message;
17881
+ }
17882
+ static async read(_data, ..._args) {
17883
+ let call = await index_js_1.TLObject.read(_data);
17884
+ let fromId = await index_js_1.TLObject.read(_data);
17885
+ let randomId = await index_js_1.Primitive.Long.read(_data);
17886
+ let message = await index_js_1.TLObject.read(_data);
17887
+ return new Raw.UpdateGroupCallMessage({
17888
+ call: call,
17889
+ fromId: fromId,
17890
+ randomId: randomId,
17891
+ message: message,
17892
+ });
17893
+ }
17894
+ write() {
17895
+ const b = new deps_js_1.BytesIO();
17896
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
17897
+ if (this.call !== undefined) {
17898
+ b.write(this.call.write());
17899
+ }
17900
+ if (this.fromId !== undefined) {
17901
+ b.write(this.fromId.write());
17902
+ }
17903
+ if (this.randomId !== undefined) {
17904
+ b.write(index_js_1.Primitive.Long.write(this.randomId));
17905
+ }
17906
+ if (this.message !== undefined) {
17907
+ b.write(this.message.write());
17908
+ }
17909
+ return deps_js_1.Buffer.from(b.buffer);
17910
+ }
17911
+ }
17912
+ Raw.UpdateGroupCallMessage = UpdateGroupCallMessage;
17913
+ class UpdateGroupCallEncryptedMessage extends index_js_1.TLObject {
17914
+ call;
17915
+ fromId;
17916
+ encryptedMessage;
17917
+ constructor(params) {
17918
+ super();
17919
+ this.classType = 'types';
17920
+ this.className = 'UpdateGroupCallEncryptedMessage';
17921
+ this.constructorId = 0xc957a766;
17922
+ this.subclassOfId = 0x9f89304e;
17923
+ this._slots = ['call', 'fromId', 'encryptedMessage'];
17924
+ this.call = params.call;
17925
+ this.fromId = params.fromId;
17926
+ this.encryptedMessage = params.encryptedMessage;
17927
+ }
17928
+ static async read(_data, ..._args) {
17929
+ let call = await index_js_1.TLObject.read(_data);
17930
+ let fromId = await index_js_1.TLObject.read(_data);
17931
+ let encryptedMessage = await index_js_1.Primitive.Bytes.read(_data);
17932
+ return new Raw.UpdateGroupCallEncryptedMessage({
17933
+ call: call,
17934
+ fromId: fromId,
17935
+ encryptedMessage: encryptedMessage,
17936
+ });
17937
+ }
17938
+ write() {
17939
+ const b = new deps_js_1.BytesIO();
17940
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
17941
+ if (this.call !== undefined) {
17942
+ b.write(this.call.write());
17943
+ }
17944
+ if (this.fromId !== undefined) {
17945
+ b.write(this.fromId.write());
17946
+ }
17947
+ if (this.encryptedMessage !== undefined) {
17948
+ b.write(index_js_1.Primitive.Bytes.write(this.encryptedMessage));
17949
+ }
17950
+ return deps_js_1.Buffer.from(b.buffer);
17951
+ }
17952
+ }
17953
+ Raw.UpdateGroupCallEncryptedMessage = UpdateGroupCallEncryptedMessage;
17954
+ class UpdatePinnedForumTopic extends index_js_1.TLObject {
17955
+ pinned;
17956
+ peer;
17957
+ topicId;
17958
+ constructor(params) {
17959
+ super();
17960
+ this.classType = 'types';
17961
+ this.className = 'UpdatePinnedForumTopic';
17962
+ this.constructorId = 0x683b2c52;
17963
+ this.subclassOfId = 0x9f89304e;
17964
+ this._slots = ['pinned', 'peer', 'topicId'];
17965
+ this.pinned = params.pinned;
17966
+ this.peer = params.peer;
17967
+ this.topicId = params.topicId;
17968
+ }
17969
+ static async read(_data, ..._args) {
17970
+ let flags = await index_js_1.Primitive.Int.read(_data);
17971
+ let pinned = flags & (1 << 0) ? true : false;
17972
+ let peer = await index_js_1.TLObject.read(_data);
17973
+ let topicId = await index_js_1.Primitive.Int.read(_data);
17974
+ return new Raw.UpdatePinnedForumTopic({ pinned: pinned, peer: peer, topicId: topicId });
17975
+ }
17976
+ write() {
17977
+ const b = new deps_js_1.BytesIO();
17978
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
17979
+ let flags = 0;
17980
+ flags |= this.pinned ? 1 << 0 : 0;
17981
+ b.write(index_js_1.Primitive.Int.write(flags));
17982
+ if (this.peer !== undefined) {
17983
+ b.write(this.peer.write());
17984
+ }
17985
+ if (this.topicId !== undefined) {
17986
+ b.write(index_js_1.Primitive.Int.write(this.topicId));
17987
+ }
17988
+ return deps_js_1.Buffer.from(b.buffer);
17989
+ }
17990
+ }
17991
+ Raw.UpdatePinnedForumTopic = UpdatePinnedForumTopic;
17992
+ class UpdatePinnedForumTopics extends index_js_1.TLObject {
17993
+ peer;
17994
+ order;
17995
+ constructor(params) {
17996
+ super();
17997
+ this.classType = 'types';
17998
+ this.className = 'UpdatePinnedForumTopics';
17999
+ this.constructorId = 0xdef143d0;
18000
+ this.subclassOfId = 0x9f89304e;
18001
+ this._slots = ['peer', 'order'];
18002
+ this.peer = params.peer;
18003
+ this.order = params.order;
18004
+ }
18005
+ static async read(_data, ..._args) {
18006
+ let flags = await index_js_1.Primitive.Int.read(_data);
18007
+ let peer = await index_js_1.TLObject.read(_data);
18008
+ let order = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
18009
+ return new Raw.UpdatePinnedForumTopics({ peer: peer, order: order });
18010
+ }
18011
+ write() {
18012
+ const b = new deps_js_1.BytesIO();
18013
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
18014
+ let flags = 0;
18015
+ flags |= this.order ? 1 << 0 : 0;
18016
+ b.write(index_js_1.Primitive.Int.write(flags));
18017
+ if (this.peer !== undefined) {
18018
+ b.write(this.peer.write());
18019
+ }
18020
+ if (this.order) {
18021
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
18022
+ }
18023
+ return deps_js_1.Buffer.from(b.buffer);
18024
+ }
18025
+ }
18026
+ Raw.UpdatePinnedForumTopics = UpdatePinnedForumTopics;
17793
18027
  class UpdatesTooLong extends index_js_1.TLObject {
17794
18028
  constructor() {
17795
18029
  super();
@@ -20177,6 +20411,37 @@ var Raw;
20177
20411
  }
20178
20412
  }
20179
20413
  Raw.SendMessageEmojiInteractionSeen = SendMessageEmojiInteractionSeen;
20414
+ class SendMessageTextDraftAction extends index_js_1.TLObject {
20415
+ randomId;
20416
+ text;
20417
+ constructor(params) {
20418
+ super();
20419
+ this.classType = 'types';
20420
+ this.className = 'SendMessageTextDraftAction';
20421
+ this.constructorId = 0x376d975c;
20422
+ this.subclassOfId = 0x20b2cc21;
20423
+ this._slots = ['randomId', 'text'];
20424
+ this.randomId = params.randomId;
20425
+ this.text = params.text;
20426
+ }
20427
+ static async read(_data, ..._args) {
20428
+ let randomId = await index_js_1.Primitive.Long.read(_data);
20429
+ let text = await index_js_1.TLObject.read(_data);
20430
+ return new Raw.SendMessageTextDraftAction({ randomId: randomId, text: text });
20431
+ }
20432
+ write() {
20433
+ const b = new deps_js_1.BytesIO();
20434
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
20435
+ if (this.randomId !== undefined) {
20436
+ b.write(index_js_1.Primitive.Long.write(this.randomId));
20437
+ }
20438
+ if (this.text !== undefined) {
20439
+ b.write(this.text.write());
20440
+ }
20441
+ return deps_js_1.Buffer.from(b.buffer);
20442
+ }
20443
+ }
20444
+ Raw.SendMessageTextDraftAction = SendMessageTextDraftAction;
20180
20445
  class InputPrivacyKeyStatusTimestamp extends index_js_1.TLObject {
20181
20446
  constructor() {
20182
20447
  super();
@@ -38666,6 +38931,9 @@ var Raw;
38666
38931
  listenersHidden;
38667
38932
  conference;
38668
38933
  creator;
38934
+ messagesEnabled;
38935
+ canChangeMessagesEnabled;
38936
+ min;
38669
38937
  id;
38670
38938
  accessHash;
38671
38939
  participantsCount;
@@ -38694,6 +38962,9 @@ var Raw;
38694
38962
  'listenersHidden',
38695
38963
  'conference',
38696
38964
  'creator',
38965
+ 'messagesEnabled',
38966
+ 'canChangeMessagesEnabled',
38967
+ 'min',
38697
38968
  'id',
38698
38969
  'accessHash',
38699
38970
  'participantsCount',
@@ -38716,6 +38987,9 @@ var Raw;
38716
38987
  this.listenersHidden = params.listenersHidden;
38717
38988
  this.conference = params.conference;
38718
38989
  this.creator = params.creator;
38990
+ this.messagesEnabled = params.messagesEnabled;
38991
+ this.canChangeMessagesEnabled = params.canChangeMessagesEnabled;
38992
+ this.min = params.min;
38719
38993
  this.id = params.id;
38720
38994
  this.accessHash = params.accessHash;
38721
38995
  this.participantsCount = params.participantsCount;
@@ -38740,6 +39014,9 @@ var Raw;
38740
39014
  let listenersHidden = flags & (1 << 13) ? true : false;
38741
39015
  let conference = flags & (1 << 14) ? true : false;
38742
39016
  let creator = flags & (1 << 15) ? true : false;
39017
+ let messagesEnabled = flags & (1 << 17) ? true : false;
39018
+ let canChangeMessagesEnabled = flags & (1 << 18) ? true : false;
39019
+ let min = flags & (1 << 19) ? true : false;
38743
39020
  let id = await index_js_1.Primitive.Long.read(_data);
38744
39021
  let accessHash = await index_js_1.Primitive.Long.read(_data);
38745
39022
  let participantsCount = await index_js_1.Primitive.Int.read(_data);
@@ -38762,6 +39039,9 @@ var Raw;
38762
39039
  listenersHidden: listenersHidden,
38763
39040
  conference: conference,
38764
39041
  creator: creator,
39042
+ messagesEnabled: messagesEnabled,
39043
+ canChangeMessagesEnabled: canChangeMessagesEnabled,
39044
+ min: min,
38765
39045
  id: id,
38766
39046
  accessHash: accessHash,
38767
39047
  participantsCount: participantsCount,
@@ -38789,6 +39069,9 @@ var Raw;
38789
39069
  flags |= this.listenersHidden ? 1 << 13 : 0;
38790
39070
  flags |= this.conference ? 1 << 14 : 0;
38791
39071
  flags |= this.creator ? 1 << 15 : 0;
39072
+ flags |= this.messagesEnabled ? 1 << 17 : 0;
39073
+ flags |= this.canChangeMessagesEnabled ? 1 << 18 : 0;
39074
+ flags |= this.min ? 1 << 19 : 0;
38792
39075
  flags |= this.title !== undefined ? 1 << 3 : 0;
38793
39076
  flags |= this.streamDcId !== undefined ? 1 << 4 : 0;
38794
39077
  flags |= this.recordStartDate !== undefined ? 1 << 5 : 0;
@@ -39535,6 +39818,62 @@ var Raw;
39535
39818
  }
39536
39819
  }
39537
39820
  Raw.BotCommandScopePeerUser = BotCommandScopePeerUser;
39821
+ class ChatTheme extends index_js_1.TLObject {
39822
+ emoticon;
39823
+ constructor(params) {
39824
+ super();
39825
+ this.classType = 'types';
39826
+ this.className = 'ChatTheme';
39827
+ this.constructorId = 0xc3dffc04;
39828
+ this.subclassOfId = 0x2ffca7f5;
39829
+ this._slots = ['emoticon'];
39830
+ this.emoticon = params.emoticon;
39831
+ }
39832
+ static async read(_data, ..._args) {
39833
+ let emoticon = await index_js_1.Primitive.String.read(_data);
39834
+ return new Raw.ChatTheme({ emoticon: emoticon });
39835
+ }
39836
+ write() {
39837
+ const b = new deps_js_1.BytesIO();
39838
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
39839
+ if (this.emoticon !== undefined) {
39840
+ b.write(index_js_1.Primitive.String.write(this.emoticon));
39841
+ }
39842
+ return deps_js_1.Buffer.from(b.buffer);
39843
+ }
39844
+ }
39845
+ Raw.ChatTheme = ChatTheme;
39846
+ class ChatThemeUniqueGift extends index_js_1.TLObject {
39847
+ gift;
39848
+ themeSettings;
39849
+ constructor(params) {
39850
+ super();
39851
+ this.classType = 'types';
39852
+ this.className = 'ChatThemeUniqueGift';
39853
+ this.constructorId = 0x3458f9c8;
39854
+ this.subclassOfId = 0x2ffca7f5;
39855
+ this._slots = ['gift', 'themeSettings'];
39856
+ this.gift = params.gift;
39857
+ this.themeSettings = params.themeSettings;
39858
+ }
39859
+ static async read(_data, ..._args) {
39860
+ let gift = await index_js_1.TLObject.read(_data);
39861
+ let themeSettings = await index_js_1.TLObject.read(_data);
39862
+ return new Raw.ChatThemeUniqueGift({ gift: gift, themeSettings: themeSettings });
39863
+ }
39864
+ write() {
39865
+ const b = new deps_js_1.BytesIO();
39866
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
39867
+ if (this.gift !== undefined) {
39868
+ b.write(this.gift.write());
39869
+ }
39870
+ if (this.themeSettings) {
39871
+ b.write(index_js_1.Primitive.Vector.write(this.themeSettings));
39872
+ }
39873
+ return deps_js_1.Buffer.from(b.buffer);
39874
+ }
39875
+ }
39876
+ Raw.ChatThemeUniqueGift = ChatThemeUniqueGift;
39538
39877
  class SponsoredMessage extends index_js_1.TLObject {
39539
39878
  recommended;
39540
39879
  canReport;
@@ -41046,6 +41385,87 @@ var Raw;
41046
41385
  }
41047
41386
  }
41048
41387
  Raw.InputInvoiceStarGiftResale = InputInvoiceStarGiftResale;
41388
+ class InputInvoiceStarGiftPrepaidUpgrade extends index_js_1.TLObject {
41389
+ peer;
41390
+ hash;
41391
+ constructor(params) {
41392
+ super();
41393
+ this.classType = 'types';
41394
+ this.className = 'InputInvoiceStarGiftPrepaidUpgrade';
41395
+ this.constructorId = 0x9a0b48b8;
41396
+ this.subclassOfId = 0x726e9bfe;
41397
+ this._slots = ['peer', 'hash'];
41398
+ this.peer = params.peer;
41399
+ this.hash = params.hash;
41400
+ }
41401
+ static async read(_data, ..._args) {
41402
+ let peer = await index_js_1.TLObject.read(_data);
41403
+ let hash = await index_js_1.Primitive.String.read(_data);
41404
+ return new Raw.InputInvoiceStarGiftPrepaidUpgrade({ peer: peer, hash: hash });
41405
+ }
41406
+ write() {
41407
+ const b = new deps_js_1.BytesIO();
41408
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41409
+ if (this.peer !== undefined) {
41410
+ b.write(this.peer.write());
41411
+ }
41412
+ if (this.hash !== undefined) {
41413
+ b.write(index_js_1.Primitive.String.write(this.hash));
41414
+ }
41415
+ return deps_js_1.Buffer.from(b.buffer);
41416
+ }
41417
+ }
41418
+ Raw.InputInvoiceStarGiftPrepaidUpgrade = InputInvoiceStarGiftPrepaidUpgrade;
41419
+ class InputInvoicePremiumAuthCode extends index_js_1.TLObject {
41420
+ purpose;
41421
+ constructor(params) {
41422
+ super();
41423
+ this.classType = 'types';
41424
+ this.className = 'InputInvoicePremiumAuthCode';
41425
+ this.constructorId = 0x3e77f614;
41426
+ this.subclassOfId = 0x726e9bfe;
41427
+ this._slots = ['purpose'];
41428
+ this.purpose = params.purpose;
41429
+ }
41430
+ static async read(_data, ..._args) {
41431
+ let purpose = await index_js_1.TLObject.read(_data);
41432
+ return new Raw.InputInvoicePremiumAuthCode({ purpose: purpose });
41433
+ }
41434
+ write() {
41435
+ const b = new deps_js_1.BytesIO();
41436
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41437
+ if (this.purpose !== undefined) {
41438
+ b.write(this.purpose.write());
41439
+ }
41440
+ return deps_js_1.Buffer.from(b.buffer);
41441
+ }
41442
+ }
41443
+ Raw.InputInvoicePremiumAuthCode = InputInvoicePremiumAuthCode;
41444
+ class InputInvoiceStarGiftDropOriginalDetails extends index_js_1.TLObject {
41445
+ stargift;
41446
+ constructor(params) {
41447
+ super();
41448
+ this.classType = 'types';
41449
+ this.className = 'InputInvoiceStarGiftDropOriginalDetails';
41450
+ this.constructorId = 0x923d8d1;
41451
+ this.subclassOfId = 0x726e9bfe;
41452
+ this._slots = ['stargift'];
41453
+ this.stargift = params.stargift;
41454
+ }
41455
+ static async read(_data, ..._args) {
41456
+ let stargift = await index_js_1.TLObject.read(_data);
41457
+ return new Raw.InputInvoiceStarGiftDropOriginalDetails({ stargift: stargift });
41458
+ }
41459
+ write() {
41460
+ const b = new deps_js_1.BytesIO();
41461
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41462
+ if (this.stargift !== undefined) {
41463
+ b.write(this.stargift.write());
41464
+ }
41465
+ return deps_js_1.Buffer.from(b.buffer);
41466
+ }
41467
+ }
41468
+ Raw.InputInvoiceStarGiftDropOriginalDetails = InputInvoiceStarGiftDropOriginalDetails;
41049
41469
  class InputStorePaymentPremiumSubscription extends index_js_1.TLObject {
41050
41470
  restore;
41051
41471
  upgrade;
@@ -41284,30 +41704,38 @@ var Raw;
41284
41704
  stars;
41285
41705
  currency;
41286
41706
  amount;
41707
+ spendPurposePeer;
41287
41708
  constructor(params) {
41288
41709
  super();
41289
41710
  this.classType = 'types';
41290
41711
  this.className = 'InputStorePaymentStarsTopup';
41291
- this.constructorId = 0xdddd0f56;
41712
+ this.constructorId = 0xf9a2a6cb;
41292
41713
  this.subclassOfId = 0xe7a4174d;
41293
- this._slots = ['stars', 'currency', 'amount'];
41714
+ this._slots = ['stars', 'currency', 'amount', 'spendPurposePeer'];
41294
41715
  this.stars = params.stars;
41295
41716
  this.currency = params.currency;
41296
41717
  this.amount = params.amount;
41718
+ this.spendPurposePeer = params.spendPurposePeer;
41297
41719
  }
41298
41720
  static async read(_data, ..._args) {
41721
+ let flags = await index_js_1.Primitive.Int.read(_data);
41299
41722
  let stars = await index_js_1.Primitive.Long.read(_data);
41300
41723
  let currency = await index_js_1.Primitive.String.read(_data);
41301
41724
  let amount = await index_js_1.Primitive.Long.read(_data);
41725
+ let spendPurposePeer = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
41302
41726
  return new Raw.InputStorePaymentStarsTopup({
41303
41727
  stars: stars,
41304
41728
  currency: currency,
41305
41729
  amount: amount,
41730
+ spendPurposePeer: spendPurposePeer,
41306
41731
  });
41307
41732
  }
41308
41733
  write() {
41309
41734
  const b = new deps_js_1.BytesIO();
41310
41735
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41736
+ let flags = 0;
41737
+ flags |= this.spendPurposePeer !== undefined ? 1 << 0 : 0;
41738
+ b.write(index_js_1.Primitive.Int.write(flags));
41311
41739
  if (this.stars !== undefined) {
41312
41740
  b.write(index_js_1.Primitive.Long.write(this.stars));
41313
41741
  }
@@ -41317,6 +41745,9 @@ var Raw;
41317
41745
  if (this.amount !== undefined) {
41318
41746
  b.write(index_js_1.Primitive.Long.write(this.amount));
41319
41747
  }
41748
+ if (this.spendPurposePeer !== undefined) {
41749
+ b.write(this.spendPurposePeer.write());
41750
+ }
41320
41751
  return deps_js_1.Buffer.from(b.buffer);
41321
41752
  }
41322
41753
  }
@@ -42370,8 +42801,10 @@ var Raw;
42370
42801
  pinned;
42371
42802
  short;
42372
42803
  hidden;
42804
+ titleMissing;
42373
42805
  id;
42374
42806
  date;
42807
+ peer;
42375
42808
  title;
42376
42809
  iconColor;
42377
42810
  iconEmojiId;
@@ -42388,7 +42821,7 @@ var Raw;
42388
42821
  super();
42389
42822
  this.classType = 'types';
42390
42823
  this.className = 'ForumTopic';
42391
- this.constructorId = 0x71701da9;
42824
+ this.constructorId = 0xcdff0eca;
42392
42825
  this.subclassOfId = 0x8d182203;
42393
42826
  this._slots = [
42394
42827
  'my',
@@ -42396,8 +42829,10 @@ var Raw;
42396
42829
  'pinned',
42397
42830
  'short',
42398
42831
  'hidden',
42832
+ 'titleMissing',
42399
42833
  'id',
42400
42834
  'date',
42835
+ 'peer',
42401
42836
  'title',
42402
42837
  'iconColor',
42403
42838
  'iconEmojiId',
@@ -42416,8 +42851,10 @@ var Raw;
42416
42851
  this.pinned = params.pinned;
42417
42852
  this.short = params.short;
42418
42853
  this.hidden = params.hidden;
42854
+ this.titleMissing = params.titleMissing;
42419
42855
  this.id = params.id;
42420
42856
  this.date = params.date;
42857
+ this.peer = params.peer;
42421
42858
  this.title = params.title;
42422
42859
  this.iconColor = params.iconColor;
42423
42860
  this.iconEmojiId = params.iconEmojiId;
@@ -42438,8 +42875,10 @@ var Raw;
42438
42875
  let pinned = flags & (1 << 3) ? true : false;
42439
42876
  let short = flags & (1 << 5) ? true : false;
42440
42877
  let hidden = flags & (1 << 6) ? true : false;
42878
+ let titleMissing = flags & (1 << 7) ? true : false;
42441
42879
  let id = await index_js_1.Primitive.Int.read(_data);
42442
42880
  let date = await index_js_1.Primitive.Int.read(_data);
42881
+ let peer = await index_js_1.TLObject.read(_data);
42443
42882
  let title = await index_js_1.Primitive.String.read(_data);
42444
42883
  let iconColor = await index_js_1.Primitive.Int.read(_data);
42445
42884
  let iconEmojiId = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
@@ -42458,8 +42897,10 @@ var Raw;
42458
42897
  pinned: pinned,
42459
42898
  short: short,
42460
42899
  hidden: hidden,
42900
+ titleMissing: titleMissing,
42461
42901
  id: id,
42462
42902
  date: date,
42903
+ peer: peer,
42463
42904
  title: title,
42464
42905
  iconColor: iconColor,
42465
42906
  iconEmojiId: iconEmojiId,
@@ -42483,6 +42924,7 @@ var Raw;
42483
42924
  flags |= this.pinned ? 1 << 3 : 0;
42484
42925
  flags |= this.short ? 1 << 5 : 0;
42485
42926
  flags |= this.hidden ? 1 << 6 : 0;
42927
+ flags |= this.titleMissing ? 1 << 7 : 0;
42486
42928
  flags |= this.iconEmojiId !== undefined ? 1 << 0 : 0;
42487
42929
  flags |= this.draft !== undefined ? 1 << 4 : 0;
42488
42930
  b.write(index_js_1.Primitive.Int.write(flags));
@@ -42492,6 +42934,9 @@ var Raw;
42492
42934
  if (this.date !== undefined) {
42493
42935
  b.write(index_js_1.Primitive.Int.write(this.date));
42494
42936
  }
42937
+ if (this.peer !== undefined) {
42938
+ b.write(this.peer.write());
42939
+ }
42495
42940
  if (this.title !== undefined) {
42496
42941
  b.write(index_js_1.Primitive.String.write(this.title));
42497
42942
  }
@@ -45181,6 +45626,113 @@ var Raw;
45181
45626
  }
45182
45627
  }
45183
45628
  Raw.PeerColor = PeerColor;
45629
+ class PeerColorCollectible extends index_js_1.TLObject {
45630
+ collectibleId;
45631
+ giftEmojiId;
45632
+ backgroundEmojiId;
45633
+ accentColor;
45634
+ colors;
45635
+ darkAccentColor;
45636
+ darkColors;
45637
+ constructor(params) {
45638
+ super();
45639
+ this.classType = 'types';
45640
+ this.className = 'PeerColorCollectible';
45641
+ this.constructorId = 0xb9c0639a;
45642
+ this.subclassOfId = 0xf281a47f;
45643
+ this._slots = [
45644
+ 'collectibleId',
45645
+ 'giftEmojiId',
45646
+ 'backgroundEmojiId',
45647
+ 'accentColor',
45648
+ 'colors',
45649
+ 'darkAccentColor',
45650
+ 'darkColors',
45651
+ ];
45652
+ this.collectibleId = params.collectibleId;
45653
+ this.giftEmojiId = params.giftEmojiId;
45654
+ this.backgroundEmojiId = params.backgroundEmojiId;
45655
+ this.accentColor = params.accentColor;
45656
+ this.colors = params.colors;
45657
+ this.darkAccentColor = params.darkAccentColor;
45658
+ this.darkColors = params.darkColors;
45659
+ }
45660
+ static async read(_data, ..._args) {
45661
+ let flags = await index_js_1.Primitive.Int.read(_data);
45662
+ let collectibleId = await index_js_1.Primitive.Long.read(_data);
45663
+ let giftEmojiId = await index_js_1.Primitive.Long.read(_data);
45664
+ let backgroundEmojiId = await index_js_1.Primitive.Long.read(_data);
45665
+ let accentColor = await index_js_1.Primitive.Int.read(_data);
45666
+ let colors = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
45667
+ let darkAccentColor = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
45668
+ let darkColors = flags & (1 << 1) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
45669
+ return new Raw.PeerColorCollectible({
45670
+ collectibleId: collectibleId,
45671
+ giftEmojiId: giftEmojiId,
45672
+ backgroundEmojiId: backgroundEmojiId,
45673
+ accentColor: accentColor,
45674
+ colors: colors,
45675
+ darkAccentColor: darkAccentColor,
45676
+ darkColors: darkColors,
45677
+ });
45678
+ }
45679
+ write() {
45680
+ const b = new deps_js_1.BytesIO();
45681
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
45682
+ let flags = 0;
45683
+ flags |= this.darkAccentColor !== undefined ? 1 << 0 : 0;
45684
+ flags |= this.darkColors ? 1 << 1 : 0;
45685
+ b.write(index_js_1.Primitive.Int.write(flags));
45686
+ if (this.collectibleId !== undefined) {
45687
+ b.write(index_js_1.Primitive.Long.write(this.collectibleId));
45688
+ }
45689
+ if (this.giftEmojiId !== undefined) {
45690
+ b.write(index_js_1.Primitive.Long.write(this.giftEmojiId));
45691
+ }
45692
+ if (this.backgroundEmojiId !== undefined) {
45693
+ b.write(index_js_1.Primitive.Long.write(this.backgroundEmojiId));
45694
+ }
45695
+ if (this.accentColor !== undefined) {
45696
+ b.write(index_js_1.Primitive.Int.write(this.accentColor));
45697
+ }
45698
+ if (this.colors) {
45699
+ b.write(index_js_1.Primitive.Vector.write(this.colors, index_js_1.Primitive.Int));
45700
+ }
45701
+ if (this.darkAccentColor !== undefined) {
45702
+ b.write(index_js_1.Primitive.Int.write(this.darkAccentColor));
45703
+ }
45704
+ if (this.darkColors) {
45705
+ b.write(index_js_1.Primitive.Vector.write(this.darkColors, index_js_1.Primitive.Int));
45706
+ }
45707
+ return deps_js_1.Buffer.from(b.buffer);
45708
+ }
45709
+ }
45710
+ Raw.PeerColorCollectible = PeerColorCollectible;
45711
+ class InputPeerColorCollectible extends index_js_1.TLObject {
45712
+ collectibleId;
45713
+ constructor(params) {
45714
+ super();
45715
+ this.classType = 'types';
45716
+ this.className = 'InputPeerColorCollectible';
45717
+ this.constructorId = 0xb8ea86a9;
45718
+ this.subclassOfId = 0xf281a47f;
45719
+ this._slots = ['collectibleId'];
45720
+ this.collectibleId = params.collectibleId;
45721
+ }
45722
+ static async read(_data, ..._args) {
45723
+ let collectibleId = await index_js_1.Primitive.Long.read(_data);
45724
+ return new Raw.InputPeerColorCollectible({ collectibleId: collectibleId });
45725
+ }
45726
+ write() {
45727
+ const b = new deps_js_1.BytesIO();
45728
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
45729
+ if (this.collectibleId !== undefined) {
45730
+ b.write(index_js_1.Primitive.Long.write(this.collectibleId));
45731
+ }
45732
+ return deps_js_1.Buffer.from(b.buffer);
45733
+ }
45734
+ }
45735
+ Raw.InputPeerColorCollectible = InputPeerColorCollectible;
45184
45736
  class StoryReaction extends index_js_1.TLObject {
45185
45737
  peerId;
45186
45738
  date;
@@ -47347,6 +47899,8 @@ var Raw;
47347
47899
  businessTransfer;
47348
47900
  stargiftResale;
47349
47901
  postsSearch;
47902
+ stargiftPrepaidUpgrade;
47903
+ stargiftDropOriginalDetails;
47350
47904
  id;
47351
47905
  amount;
47352
47906
  date;
@@ -47386,6 +47940,8 @@ var Raw;
47386
47940
  'businessTransfer',
47387
47941
  'stargiftResale',
47388
47942
  'postsSearch',
47943
+ 'stargiftPrepaidUpgrade',
47944
+ 'stargiftDropOriginalDetails',
47389
47945
  'id',
47390
47946
  'amount',
47391
47947
  'date',
@@ -47419,6 +47975,8 @@ var Raw;
47419
47975
  this.businessTransfer = params.businessTransfer;
47420
47976
  this.stargiftResale = params.stargiftResale;
47421
47977
  this.postsSearch = params.postsSearch;
47978
+ this.stargiftPrepaidUpgrade = params.stargiftPrepaidUpgrade;
47979
+ this.stargiftDropOriginalDetails = params.stargiftDropOriginalDetails;
47422
47980
  this.id = params.id;
47423
47981
  this.amount = params.amount;
47424
47982
  this.date = params.date;
@@ -47454,6 +48012,8 @@ var Raw;
47454
48012
  let businessTransfer = flags & (1 << 21) ? true : false;
47455
48013
  let stargiftResale = flags & (1 << 22) ? true : false;
47456
48014
  let postsSearch = flags & (1 << 24) ? true : false;
48015
+ let stargiftPrepaidUpgrade = flags & (1 << 25) ? true : false;
48016
+ let stargiftDropOriginalDetails = flags & (1 << 26) ? true : false;
47457
48017
  let id = await index_js_1.Primitive.String.read(_data);
47458
48018
  let amount = await index_js_1.TLObject.read(_data);
47459
48019
  let date = await index_js_1.Primitive.Int.read(_data);
@@ -47487,6 +48047,8 @@ var Raw;
47487
48047
  businessTransfer: businessTransfer,
47488
48048
  stargiftResale: stargiftResale,
47489
48049
  postsSearch: postsSearch,
48050
+ stargiftPrepaidUpgrade: stargiftPrepaidUpgrade,
48051
+ stargiftDropOriginalDetails: stargiftDropOriginalDetails,
47490
48052
  id: id,
47491
48053
  amount: amount,
47492
48054
  date: date,
@@ -47525,6 +48087,8 @@ var Raw;
47525
48087
  flags |= this.businessTransfer ? 1 << 21 : 0;
47526
48088
  flags |= this.stargiftResale ? 1 << 22 : 0;
47527
48089
  flags |= this.postsSearch ? 1 << 24 : 0;
48090
+ flags |= this.stargiftPrepaidUpgrade ? 1 << 25 : 0;
48091
+ flags |= this.stargiftDropOriginalDetails ? 1 << 26 : 0;
47528
48092
  flags |= this.title !== undefined ? 1 << 0 : 0;
47529
48093
  flags |= this.description !== undefined ? 1 << 1 : 0;
47530
48094
  flags |= this.photo !== undefined ? 1 << 2 : 0;
@@ -48219,6 +48783,7 @@ var Raw;
48219
48783
  birthday;
48220
48784
  requirePremium;
48221
48785
  limitedPerUser;
48786
+ peerColorAvailable;
48222
48787
  id;
48223
48788
  sticker;
48224
48789
  stars;
@@ -48234,11 +48799,12 @@ var Raw;
48234
48799
  releasedBy;
48235
48800
  perUserTotal;
48236
48801
  perUserRemains;
48802
+ lockedUntilDate;
48237
48803
  constructor(params) {
48238
48804
  super();
48239
48805
  this.classType = 'types';
48240
48806
  this.className = 'StarGift';
48241
- this.constructorId = 0xbcff5b;
48807
+ this.constructorId = 0x80ac53c3;
48242
48808
  this.subclassOfId = 0xc31c590b;
48243
48809
  this._slots = [
48244
48810
  'limited',
@@ -48246,6 +48812,7 @@ var Raw;
48246
48812
  'birthday',
48247
48813
  'requirePremium',
48248
48814
  'limitedPerUser',
48815
+ 'peerColorAvailable',
48249
48816
  'id',
48250
48817
  'sticker',
48251
48818
  'stars',
@@ -48261,12 +48828,14 @@ var Raw;
48261
48828
  'releasedBy',
48262
48829
  'perUserTotal',
48263
48830
  'perUserRemains',
48831
+ 'lockedUntilDate',
48264
48832
  ];
48265
48833
  this.limited = params.limited;
48266
48834
  this.soldOut = params.soldOut;
48267
48835
  this.birthday = params.birthday;
48268
48836
  this.requirePremium = params.requirePremium;
48269
48837
  this.limitedPerUser = params.limitedPerUser;
48838
+ this.peerColorAvailable = params.peerColorAvailable;
48270
48839
  this.id = params.id;
48271
48840
  this.sticker = params.sticker;
48272
48841
  this.stars = params.stars;
@@ -48282,6 +48851,7 @@ var Raw;
48282
48851
  this.releasedBy = params.releasedBy;
48283
48852
  this.perUserTotal = params.perUserTotal;
48284
48853
  this.perUserRemains = params.perUserRemains;
48854
+ this.lockedUntilDate = params.lockedUntilDate;
48285
48855
  }
48286
48856
  static async read(_data, ..._args) {
48287
48857
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -48290,6 +48860,7 @@ var Raw;
48290
48860
  let birthday = flags & (1 << 2) ? true : false;
48291
48861
  let requirePremium = flags & (1 << 7) ? true : false;
48292
48862
  let limitedPerUser = flags & (1 << 8) ? true : false;
48863
+ let peerColorAvailable = flags & (1 << 10) ? true : false;
48293
48864
  let id = await index_js_1.Primitive.Long.read(_data);
48294
48865
  let sticker = await index_js_1.TLObject.read(_data);
48295
48866
  let stars = await index_js_1.Primitive.Long.read(_data);
@@ -48305,12 +48876,14 @@ var Raw;
48305
48876
  let releasedBy = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
48306
48877
  let perUserTotal = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48307
48878
  let perUserRemains = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48879
+ let lockedUntilDate = flags & (1 << 9) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48308
48880
  return new Raw.StarGift({
48309
48881
  limited: limited,
48310
48882
  soldOut: soldOut,
48311
48883
  birthday: birthday,
48312
48884
  requirePremium: requirePremium,
48313
48885
  limitedPerUser: limitedPerUser,
48886
+ peerColorAvailable: peerColorAvailable,
48314
48887
  id: id,
48315
48888
  sticker: sticker,
48316
48889
  stars: stars,
@@ -48326,6 +48899,7 @@ var Raw;
48326
48899
  releasedBy: releasedBy,
48327
48900
  perUserTotal: perUserTotal,
48328
48901
  perUserRemains: perUserRemains,
48902
+ lockedUntilDate: lockedUntilDate,
48329
48903
  });
48330
48904
  }
48331
48905
  write() {
@@ -48337,6 +48911,7 @@ var Raw;
48337
48911
  flags |= this.birthday ? 1 << 2 : 0;
48338
48912
  flags |= this.requirePremium ? 1 << 7 : 0;
48339
48913
  flags |= this.limitedPerUser ? 1 << 8 : 0;
48914
+ flags |= this.peerColorAvailable ? 1 << 10 : 0;
48340
48915
  flags |= this.availabilityRemains !== undefined ? 1 << 0 : 0;
48341
48916
  flags |= this.availabilityTotal !== undefined ? 1 << 0 : 0;
48342
48917
  flags |= this.availabilityResale !== undefined ? 1 << 4 : 0;
@@ -48348,6 +48923,7 @@ var Raw;
48348
48923
  flags |= this.releasedBy !== undefined ? 1 << 6 : 0;
48349
48924
  flags |= this.perUserTotal !== undefined ? 1 << 8 : 0;
48350
48925
  flags |= this.perUserRemains !== undefined ? 1 << 8 : 0;
48926
+ flags |= this.lockedUntilDate !== undefined ? 1 << 9 : 0;
48351
48927
  b.write(index_js_1.Primitive.Int.write(flags));
48352
48928
  if (this.id !== undefined) {
48353
48929
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -48394,6 +48970,9 @@ var Raw;
48394
48970
  if (this.perUserRemains !== undefined) {
48395
48971
  b.write(index_js_1.Primitive.Int.write(this.perUserRemains));
48396
48972
  }
48973
+ if (this.lockedUntilDate !== undefined) {
48974
+ b.write(index_js_1.Primitive.Int.write(this.lockedUntilDate));
48975
+ }
48397
48976
  return deps_js_1.Buffer.from(b.buffer);
48398
48977
  }
48399
48978
  }
@@ -48401,7 +48980,9 @@ var Raw;
48401
48980
  class StarGiftUnique extends index_js_1.TLObject {
48402
48981
  requirePremium;
48403
48982
  resaleTonOnly;
48983
+ themeAvailable;
48404
48984
  id;
48985
+ giftId;
48405
48986
  title;
48406
48987
  slug;
48407
48988
  num;
@@ -48414,16 +48995,23 @@ var Raw;
48414
48995
  giftAddress;
48415
48996
  resellAmount;
48416
48997
  releasedBy;
48998
+ valueAmount;
48999
+ valueCurrency;
49000
+ themePeer;
49001
+ peerColor;
49002
+ hostId;
48417
49003
  constructor(params) {
48418
49004
  super();
48419
49005
  this.classType = 'types';
48420
49006
  this.className = 'StarGiftUnique';
48421
- this.constructorId = 0x3a274d50;
49007
+ this.constructorId = 0xb0bf741b;
48422
49008
  this.subclassOfId = 0xc31c590b;
48423
49009
  this._slots = [
48424
49010
  'requirePremium',
48425
49011
  'resaleTonOnly',
49012
+ 'themeAvailable',
48426
49013
  'id',
49014
+ 'giftId',
48427
49015
  'title',
48428
49016
  'slug',
48429
49017
  'num',
@@ -48436,10 +49024,17 @@ var Raw;
48436
49024
  'giftAddress',
48437
49025
  'resellAmount',
48438
49026
  'releasedBy',
49027
+ 'valueAmount',
49028
+ 'valueCurrency',
49029
+ 'themePeer',
49030
+ 'peerColor',
49031
+ 'hostId',
48439
49032
  ];
48440
49033
  this.requirePremium = params.requirePremium;
48441
49034
  this.resaleTonOnly = params.resaleTonOnly;
49035
+ this.themeAvailable = params.themeAvailable;
48442
49036
  this.id = params.id;
49037
+ this.giftId = params.giftId;
48443
49038
  this.title = params.title;
48444
49039
  this.slug = params.slug;
48445
49040
  this.num = params.num;
@@ -48452,12 +49047,19 @@ var Raw;
48452
49047
  this.giftAddress = params.giftAddress;
48453
49048
  this.resellAmount = params.resellAmount;
48454
49049
  this.releasedBy = params.releasedBy;
49050
+ this.valueAmount = params.valueAmount;
49051
+ this.valueCurrency = params.valueCurrency;
49052
+ this.themePeer = params.themePeer;
49053
+ this.peerColor = params.peerColor;
49054
+ this.hostId = params.hostId;
48455
49055
  }
48456
49056
  static async read(_data, ..._args) {
48457
49057
  let flags = await index_js_1.Primitive.Int.read(_data);
48458
49058
  let requirePremium = flags & (1 << 6) ? true : false;
48459
49059
  let resaleTonOnly = flags & (1 << 7) ? true : false;
49060
+ let themeAvailable = flags & (1 << 9) ? true : false;
48460
49061
  let id = await index_js_1.Primitive.Long.read(_data);
49062
+ let giftId = await index_js_1.Primitive.Long.read(_data);
48461
49063
  let title = await index_js_1.Primitive.String.read(_data);
48462
49064
  let slug = await index_js_1.Primitive.String.read(_data);
48463
49065
  let num = await index_js_1.Primitive.Int.read(_data);
@@ -48470,10 +49072,17 @@ var Raw;
48470
49072
  let giftAddress = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
48471
49073
  let resellAmount = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
48472
49074
  let releasedBy = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
49075
+ let valueAmount = flags & (1 << 8) ? await index_js_1.Primitive.Long.read(_data) : undefined;
49076
+ let valueCurrency = flags & (1 << 8) ? await index_js_1.Primitive.String.read(_data) : undefined;
49077
+ let themePeer = flags & (1 << 10) ? await index_js_1.TLObject.read(_data) : undefined;
49078
+ let peerColor = flags & (1 << 11) ? await index_js_1.TLObject.read(_data) : undefined;
49079
+ let hostId = flags & (1 << 12) ? await index_js_1.TLObject.read(_data) : undefined;
48473
49080
  return new Raw.StarGiftUnique({
48474
49081
  requirePremium: requirePremium,
48475
49082
  resaleTonOnly: resaleTonOnly,
49083
+ themeAvailable: themeAvailable,
48476
49084
  id: id,
49085
+ giftId: giftId,
48477
49086
  title: title,
48478
49087
  slug: slug,
48479
49088
  num: num,
@@ -48486,6 +49095,11 @@ var Raw;
48486
49095
  giftAddress: giftAddress,
48487
49096
  resellAmount: resellAmount,
48488
49097
  releasedBy: releasedBy,
49098
+ valueAmount: valueAmount,
49099
+ valueCurrency: valueCurrency,
49100
+ themePeer: themePeer,
49101
+ peerColor: peerColor,
49102
+ hostId: hostId,
48489
49103
  });
48490
49104
  }
48491
49105
  write() {
@@ -48494,16 +49108,25 @@ var Raw;
48494
49108
  let flags = 0;
48495
49109
  flags |= this.requirePremium ? 1 << 6 : 0;
48496
49110
  flags |= this.resaleTonOnly ? 1 << 7 : 0;
49111
+ flags |= this.themeAvailable ? 1 << 9 : 0;
48497
49112
  flags |= this.ownerId !== undefined ? 1 << 0 : 0;
48498
49113
  flags |= this.ownerName !== undefined ? 1 << 1 : 0;
48499
49114
  flags |= this.ownerAddress !== undefined ? 1 << 2 : 0;
48500
49115
  flags |= this.giftAddress !== undefined ? 1 << 3 : 0;
48501
49116
  flags |= this.resellAmount ? 1 << 4 : 0;
48502
49117
  flags |= this.releasedBy !== undefined ? 1 << 5 : 0;
49118
+ flags |= this.valueAmount !== undefined ? 1 << 8 : 0;
49119
+ flags |= this.valueCurrency !== undefined ? 1 << 8 : 0;
49120
+ flags |= this.themePeer !== undefined ? 1 << 10 : 0;
49121
+ flags |= this.peerColor !== undefined ? 1 << 11 : 0;
49122
+ flags |= this.hostId !== undefined ? 1 << 12 : 0;
48503
49123
  b.write(index_js_1.Primitive.Int.write(flags));
48504
49124
  if (this.id !== undefined) {
48505
49125
  b.write(index_js_1.Primitive.Long.write(this.id));
48506
49126
  }
49127
+ if (this.giftId !== undefined) {
49128
+ b.write(index_js_1.Primitive.Long.write(this.giftId));
49129
+ }
48507
49130
  if (this.title !== undefined) {
48508
49131
  b.write(index_js_1.Primitive.String.write(this.title));
48509
49132
  }
@@ -48540,6 +49163,21 @@ var Raw;
48540
49163
  if (this.releasedBy !== undefined) {
48541
49164
  b.write(this.releasedBy.write());
48542
49165
  }
49166
+ if (this.valueAmount !== undefined) {
49167
+ b.write(index_js_1.Primitive.Long.write(this.valueAmount));
49168
+ }
49169
+ if (this.valueCurrency !== undefined) {
49170
+ b.write(index_js_1.Primitive.String.write(this.valueCurrency));
49171
+ }
49172
+ if (this.themePeer !== undefined) {
49173
+ b.write(this.themePeer.write());
49174
+ }
49175
+ if (this.peerColor !== undefined) {
49176
+ b.write(this.peerColor.write());
49177
+ }
49178
+ if (this.hostId !== undefined) {
49179
+ b.write(this.hostId.write());
49180
+ }
48543
49181
  return deps_js_1.Buffer.from(b.buffer);
48544
49182
  }
48545
49183
  }
@@ -49241,6 +49879,7 @@ var Raw;
49241
49879
  refunded;
49242
49880
  canUpgrade;
49243
49881
  pinnedToTop;
49882
+ upgradeSeparate;
49244
49883
  fromId;
49245
49884
  date;
49246
49885
  gift;
@@ -49254,11 +49893,13 @@ var Raw;
49254
49893
  canTransferAt;
49255
49894
  canResellAt;
49256
49895
  collectionId;
49896
+ prepaidUpgradeHash;
49897
+ dropOriginalDetailsStars;
49257
49898
  constructor(params) {
49258
49899
  super();
49259
49900
  this.classType = 'types';
49260
49901
  this.className = 'SavedStarGift';
49261
- this.constructorId = 0x1ea646df;
49902
+ this.constructorId = 0x8983a452;
49262
49903
  this.subclassOfId = 0x8e2b3c14;
49263
49904
  this._slots = [
49264
49905
  'nameHidden',
@@ -49266,6 +49907,7 @@ var Raw;
49266
49907
  'refunded',
49267
49908
  'canUpgrade',
49268
49909
  'pinnedToTop',
49910
+ 'upgradeSeparate',
49269
49911
  'fromId',
49270
49912
  'date',
49271
49913
  'gift',
@@ -49279,12 +49921,15 @@ var Raw;
49279
49921
  'canTransferAt',
49280
49922
  'canResellAt',
49281
49923
  'collectionId',
49924
+ 'prepaidUpgradeHash',
49925
+ 'dropOriginalDetailsStars',
49282
49926
  ];
49283
49927
  this.nameHidden = params.nameHidden;
49284
49928
  this.unsaved = params.unsaved;
49285
49929
  this.refunded = params.refunded;
49286
49930
  this.canUpgrade = params.canUpgrade;
49287
49931
  this.pinnedToTop = params.pinnedToTop;
49932
+ this.upgradeSeparate = params.upgradeSeparate;
49288
49933
  this.fromId = params.fromId;
49289
49934
  this.date = params.date;
49290
49935
  this.gift = params.gift;
@@ -49298,6 +49943,8 @@ var Raw;
49298
49943
  this.canTransferAt = params.canTransferAt;
49299
49944
  this.canResellAt = params.canResellAt;
49300
49945
  this.collectionId = params.collectionId;
49946
+ this.prepaidUpgradeHash = params.prepaidUpgradeHash;
49947
+ this.dropOriginalDetailsStars = params.dropOriginalDetailsStars;
49301
49948
  }
49302
49949
  static async read(_data, ..._args) {
49303
49950
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -49306,6 +49953,7 @@ var Raw;
49306
49953
  let refunded = flags & (1 << 9) ? true : false;
49307
49954
  let canUpgrade = flags & (1 << 10) ? true : false;
49308
49955
  let pinnedToTop = flags & (1 << 12) ? true : false;
49956
+ let upgradeSeparate = flags & (1 << 17) ? true : false;
49309
49957
  let fromId = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
49310
49958
  let date = await index_js_1.Primitive.Int.read(_data);
49311
49959
  let gift = await index_js_1.TLObject.read(_data);
@@ -49319,12 +49967,15 @@ var Raw;
49319
49967
  let canTransferAt = flags & (1 << 13) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49320
49968
  let canResellAt = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49321
49969
  let collectionId = flags & (1 << 15) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
49970
+ let prepaidUpgradeHash = flags & (1 << 16) ? await index_js_1.Primitive.String.read(_data) : undefined;
49971
+ let dropOriginalDetailsStars = flags & (1 << 18) ? await index_js_1.Primitive.Long.read(_data) : undefined;
49322
49972
  return new Raw.SavedStarGift({
49323
49973
  nameHidden: nameHidden,
49324
49974
  unsaved: unsaved,
49325
49975
  refunded: refunded,
49326
49976
  canUpgrade: canUpgrade,
49327
49977
  pinnedToTop: pinnedToTop,
49978
+ upgradeSeparate: upgradeSeparate,
49328
49979
  fromId: fromId,
49329
49980
  date: date,
49330
49981
  gift: gift,
@@ -49338,6 +49989,8 @@ var Raw;
49338
49989
  canTransferAt: canTransferAt,
49339
49990
  canResellAt: canResellAt,
49340
49991
  collectionId: collectionId,
49992
+ prepaidUpgradeHash: prepaidUpgradeHash,
49993
+ dropOriginalDetailsStars: dropOriginalDetailsStars,
49341
49994
  });
49342
49995
  }
49343
49996
  write() {
@@ -49349,6 +50002,7 @@ var Raw;
49349
50002
  flags |= this.refunded ? 1 << 9 : 0;
49350
50003
  flags |= this.canUpgrade ? 1 << 10 : 0;
49351
50004
  flags |= this.pinnedToTop ? 1 << 12 : 0;
50005
+ flags |= this.upgradeSeparate ? 1 << 17 : 0;
49352
50006
  flags |= this.fromId !== undefined ? 1 << 1 : 0;
49353
50007
  flags |= this.message !== undefined ? 1 << 2 : 0;
49354
50008
  flags |= this.msgId !== undefined ? 1 << 3 : 0;
@@ -49360,6 +50014,8 @@ var Raw;
49360
50014
  flags |= this.canTransferAt !== undefined ? 1 << 13 : 0;
49361
50015
  flags |= this.canResellAt !== undefined ? 1 << 14 : 0;
49362
50016
  flags |= this.collectionId ? 1 << 15 : 0;
50017
+ flags |= this.prepaidUpgradeHash !== undefined ? 1 << 16 : 0;
50018
+ flags |= this.dropOriginalDetailsStars !== undefined ? 1 << 18 : 0;
49363
50019
  b.write(index_js_1.Primitive.Int.write(flags));
49364
50020
  if (this.fromId !== undefined) {
49365
50021
  b.write(this.fromId.write());
@@ -49400,6 +50056,12 @@ var Raw;
49400
50056
  if (this.collectionId) {
49401
50057
  b.write(index_js_1.Primitive.Vector.write(this.collectionId, index_js_1.Primitive.Int));
49402
50058
  }
50059
+ if (this.prepaidUpgradeHash !== undefined) {
50060
+ b.write(index_js_1.Primitive.String.write(this.prepaidUpgradeHash));
50061
+ }
50062
+ if (this.dropOriginalDetailsStars !== undefined) {
50063
+ b.write(index_js_1.Primitive.Long.write(this.dropOriginalDetailsStars));
50064
+ }
49403
50065
  return deps_js_1.Buffer.from(b.buffer);
49404
50066
  }
49405
50067
  }
@@ -50359,6 +51021,258 @@ var Raw;
50359
51021
  }
50360
51022
  }
50361
51023
  Raw.SearchPostsFlood = SearchPostsFlood;
51024
+ class ProfileTabPosts extends index_js_1.TLObject {
51025
+ constructor() {
51026
+ super();
51027
+ this.classType = 'types';
51028
+ this.className = 'ProfileTabPosts';
51029
+ this.constructorId = 0xb98cd696;
51030
+ this.subclassOfId = 0xae48d1b4;
51031
+ this._slots = [];
51032
+ }
51033
+ static async read(_data, ..._args) {
51034
+ return new Raw.ProfileTabPosts();
51035
+ }
51036
+ write() {
51037
+ const b = new deps_js_1.BytesIO();
51038
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51039
+ return deps_js_1.Buffer.from(b.buffer);
51040
+ }
51041
+ }
51042
+ Raw.ProfileTabPosts = ProfileTabPosts;
51043
+ class ProfileTabGifts extends index_js_1.TLObject {
51044
+ constructor() {
51045
+ super();
51046
+ this.classType = 'types';
51047
+ this.className = 'ProfileTabGifts';
51048
+ this.constructorId = 0x4d4bd46a;
51049
+ this.subclassOfId = 0xae48d1b4;
51050
+ this._slots = [];
51051
+ }
51052
+ static async read(_data, ..._args) {
51053
+ return new Raw.ProfileTabGifts();
51054
+ }
51055
+ write() {
51056
+ const b = new deps_js_1.BytesIO();
51057
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51058
+ return deps_js_1.Buffer.from(b.buffer);
51059
+ }
51060
+ }
51061
+ Raw.ProfileTabGifts = ProfileTabGifts;
51062
+ class ProfileTabMedia extends index_js_1.TLObject {
51063
+ constructor() {
51064
+ super();
51065
+ this.classType = 'types';
51066
+ this.className = 'ProfileTabMedia';
51067
+ this.constructorId = 0x72c64955;
51068
+ this.subclassOfId = 0xae48d1b4;
51069
+ this._slots = [];
51070
+ }
51071
+ static async read(_data, ..._args) {
51072
+ return new Raw.ProfileTabMedia();
51073
+ }
51074
+ write() {
51075
+ const b = new deps_js_1.BytesIO();
51076
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51077
+ return deps_js_1.Buffer.from(b.buffer);
51078
+ }
51079
+ }
51080
+ Raw.ProfileTabMedia = ProfileTabMedia;
51081
+ class ProfileTabFiles extends index_js_1.TLObject {
51082
+ constructor() {
51083
+ super();
51084
+ this.classType = 'types';
51085
+ this.className = 'ProfileTabFiles';
51086
+ this.constructorId = 0xab339c00;
51087
+ this.subclassOfId = 0xae48d1b4;
51088
+ this._slots = [];
51089
+ }
51090
+ static async read(_data, ..._args) {
51091
+ return new Raw.ProfileTabFiles();
51092
+ }
51093
+ write() {
51094
+ const b = new deps_js_1.BytesIO();
51095
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51096
+ return deps_js_1.Buffer.from(b.buffer);
51097
+ }
51098
+ }
51099
+ Raw.ProfileTabFiles = ProfileTabFiles;
51100
+ class ProfileTabMusic extends index_js_1.TLObject {
51101
+ constructor() {
51102
+ super();
51103
+ this.classType = 'types';
51104
+ this.className = 'ProfileTabMusic';
51105
+ this.constructorId = 0x9f27d26e;
51106
+ this.subclassOfId = 0xae48d1b4;
51107
+ this._slots = [];
51108
+ }
51109
+ static async read(_data, ..._args) {
51110
+ return new Raw.ProfileTabMusic();
51111
+ }
51112
+ write() {
51113
+ const b = new deps_js_1.BytesIO();
51114
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51115
+ return deps_js_1.Buffer.from(b.buffer);
51116
+ }
51117
+ }
51118
+ Raw.ProfileTabMusic = ProfileTabMusic;
51119
+ class ProfileTabVoice extends index_js_1.TLObject {
51120
+ constructor() {
51121
+ super();
51122
+ this.classType = 'types';
51123
+ this.className = 'ProfileTabVoice';
51124
+ this.constructorId = 0xe477092e;
51125
+ this.subclassOfId = 0xae48d1b4;
51126
+ this._slots = [];
51127
+ }
51128
+ static async read(_data, ..._args) {
51129
+ return new Raw.ProfileTabVoice();
51130
+ }
51131
+ write() {
51132
+ const b = new deps_js_1.BytesIO();
51133
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51134
+ return deps_js_1.Buffer.from(b.buffer);
51135
+ }
51136
+ }
51137
+ Raw.ProfileTabVoice = ProfileTabVoice;
51138
+ class ProfileTabLinks extends index_js_1.TLObject {
51139
+ constructor() {
51140
+ super();
51141
+ this.classType = 'types';
51142
+ this.className = 'ProfileTabLinks';
51143
+ this.constructorId = 0xd3656499;
51144
+ this.subclassOfId = 0xae48d1b4;
51145
+ this._slots = [];
51146
+ }
51147
+ static async read(_data, ..._args) {
51148
+ return new Raw.ProfileTabLinks();
51149
+ }
51150
+ write() {
51151
+ const b = new deps_js_1.BytesIO();
51152
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51153
+ return deps_js_1.Buffer.from(b.buffer);
51154
+ }
51155
+ }
51156
+ Raw.ProfileTabLinks = ProfileTabLinks;
51157
+ class ProfileTabGifs extends index_js_1.TLObject {
51158
+ constructor() {
51159
+ super();
51160
+ this.classType = 'types';
51161
+ this.className = 'ProfileTabGifs';
51162
+ this.constructorId = 0xa2c0f695;
51163
+ this.subclassOfId = 0xae48d1b4;
51164
+ this._slots = [];
51165
+ }
51166
+ static async read(_data, ..._args) {
51167
+ return new Raw.ProfileTabGifs();
51168
+ }
51169
+ write() {
51170
+ const b = new deps_js_1.BytesIO();
51171
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51172
+ return deps_js_1.Buffer.from(b.buffer);
51173
+ }
51174
+ }
51175
+ Raw.ProfileTabGifs = ProfileTabGifs;
51176
+ class InputChatThemeEmpty extends index_js_1.TLObject {
51177
+ constructor() {
51178
+ super();
51179
+ this.classType = 'types';
51180
+ this.className = 'InputChatThemeEmpty';
51181
+ this.constructorId = 0x83268483;
51182
+ this.subclassOfId = 0x57294e64;
51183
+ this._slots = [];
51184
+ }
51185
+ static async read(_data, ..._args) {
51186
+ return new Raw.InputChatThemeEmpty();
51187
+ }
51188
+ write() {
51189
+ const b = new deps_js_1.BytesIO();
51190
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51191
+ return deps_js_1.Buffer.from(b.buffer);
51192
+ }
51193
+ }
51194
+ Raw.InputChatThemeEmpty = InputChatThemeEmpty;
51195
+ class InputChatTheme extends index_js_1.TLObject {
51196
+ emoticon;
51197
+ constructor(params) {
51198
+ super();
51199
+ this.classType = 'types';
51200
+ this.className = 'InputChatTheme';
51201
+ this.constructorId = 0xc93de95c;
51202
+ this.subclassOfId = 0x57294e64;
51203
+ this._slots = ['emoticon'];
51204
+ this.emoticon = params.emoticon;
51205
+ }
51206
+ static async read(_data, ..._args) {
51207
+ let emoticon = await index_js_1.Primitive.String.read(_data);
51208
+ return new Raw.InputChatTheme({ emoticon: emoticon });
51209
+ }
51210
+ write() {
51211
+ const b = new deps_js_1.BytesIO();
51212
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51213
+ if (this.emoticon !== undefined) {
51214
+ b.write(index_js_1.Primitive.String.write(this.emoticon));
51215
+ }
51216
+ return deps_js_1.Buffer.from(b.buffer);
51217
+ }
51218
+ }
51219
+ Raw.InputChatTheme = InputChatTheme;
51220
+ class InputChatThemeUniqueGift extends index_js_1.TLObject {
51221
+ slug;
51222
+ constructor(params) {
51223
+ super();
51224
+ this.classType = 'types';
51225
+ this.className = 'InputChatThemeUniqueGift';
51226
+ this.constructorId = 0x87e5dfe4;
51227
+ this.subclassOfId = 0x57294e64;
51228
+ this._slots = ['slug'];
51229
+ this.slug = params.slug;
51230
+ }
51231
+ static async read(_data, ..._args) {
51232
+ let slug = await index_js_1.Primitive.String.read(_data);
51233
+ return new Raw.InputChatThemeUniqueGift({ slug: slug });
51234
+ }
51235
+ write() {
51236
+ const b = new deps_js_1.BytesIO();
51237
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51238
+ if (this.slug !== undefined) {
51239
+ b.write(index_js_1.Primitive.String.write(this.slug));
51240
+ }
51241
+ return deps_js_1.Buffer.from(b.buffer);
51242
+ }
51243
+ }
51244
+ Raw.InputChatThemeUniqueGift = InputChatThemeUniqueGift;
51245
+ class StarGiftUpgradePrice extends index_js_1.TLObject {
51246
+ date;
51247
+ upgradeStars;
51248
+ constructor(params) {
51249
+ super();
51250
+ this.classType = 'types';
51251
+ this.className = 'StarGiftUpgradePrice';
51252
+ this.constructorId = 0x99ea331d;
51253
+ this.subclassOfId = 0xf452f864;
51254
+ this._slots = ['date', 'upgradeStars'];
51255
+ this.date = params.date;
51256
+ this.upgradeStars = params.upgradeStars;
51257
+ }
51258
+ static async read(_data, ..._args) {
51259
+ let date = await index_js_1.Primitive.Int.read(_data);
51260
+ let upgradeStars = await index_js_1.Primitive.Long.read(_data);
51261
+ return new Raw.StarGiftUpgradePrice({ date: date, upgradeStars: upgradeStars });
51262
+ }
51263
+ write() {
51264
+ const b = new deps_js_1.BytesIO();
51265
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
51266
+ if (this.date !== undefined) {
51267
+ b.write(index_js_1.Primitive.Int.write(this.date));
51268
+ }
51269
+ if (this.upgradeStars !== undefined) {
51270
+ b.write(index_js_1.Primitive.Long.write(this.upgradeStars));
51271
+ }
51272
+ return deps_js_1.Buffer.from(b.buffer);
51273
+ }
51274
+ }
51275
+ Raw.StarGiftUpgradePrice = StarGiftUpgradePrice;
50362
51276
  class InvokeAfterMsg extends index_js_1.TLObject {
50363
51277
  __response__;
50364
51278
  msgId;
@@ -55262,22 +56176,45 @@ var Raw;
55262
56176
  class SentCodePaymentRequired extends index_js_1.TLObject {
55263
56177
  storeProduct;
55264
56178
  phoneCodeHash;
56179
+ supportEmailAddress;
56180
+ supportEmailSubject;
56181
+ currency;
56182
+ amount;
55265
56183
  constructor(params) {
55266
56184
  super();
55267
56185
  this.classType = 'types';
55268
56186
  this.className = 'auth.SentCodePaymentRequired';
55269
- this.constructorId = 0xd7cef980;
56187
+ this.constructorId = 0xe0955a3c;
55270
56188
  this.subclassOfId = 0x6ce87081;
55271
- this._slots = ['storeProduct', 'phoneCodeHash'];
56189
+ this._slots = [
56190
+ 'storeProduct',
56191
+ 'phoneCodeHash',
56192
+ 'supportEmailAddress',
56193
+ 'supportEmailSubject',
56194
+ 'currency',
56195
+ 'amount',
56196
+ ];
55272
56197
  this.storeProduct = params.storeProduct;
55273
56198
  this.phoneCodeHash = params.phoneCodeHash;
56199
+ this.supportEmailAddress = params.supportEmailAddress;
56200
+ this.supportEmailSubject = params.supportEmailSubject;
56201
+ this.currency = params.currency;
56202
+ this.amount = params.amount;
55274
56203
  }
55275
56204
  static async read(_data, ..._args) {
55276
56205
  let storeProduct = await index_js_1.Primitive.String.read(_data);
55277
56206
  let phoneCodeHash = await index_js_1.Primitive.String.read(_data);
56207
+ let supportEmailAddress = await index_js_1.Primitive.String.read(_data);
56208
+ let supportEmailSubject = await index_js_1.Primitive.String.read(_data);
56209
+ let currency = await index_js_1.Primitive.String.read(_data);
56210
+ let amount = await index_js_1.Primitive.Long.read(_data);
55278
56211
  return new Raw.auth.SentCodePaymentRequired({
55279
56212
  storeProduct: storeProduct,
55280
56213
  phoneCodeHash: phoneCodeHash,
56214
+ supportEmailAddress: supportEmailAddress,
56215
+ supportEmailSubject: supportEmailSubject,
56216
+ currency: currency,
56217
+ amount: amount,
55281
56218
  });
55282
56219
  }
55283
56220
  write() {
@@ -55289,6 +56226,18 @@ var Raw;
55289
56226
  if (this.phoneCodeHash !== undefined) {
55290
56227
  b.write(index_js_1.Primitive.String.write(this.phoneCodeHash));
55291
56228
  }
56229
+ if (this.supportEmailAddress !== undefined) {
56230
+ b.write(index_js_1.Primitive.String.write(this.supportEmailAddress));
56231
+ }
56232
+ if (this.supportEmailSubject !== undefined) {
56233
+ b.write(index_js_1.Primitive.String.write(this.supportEmailSubject));
56234
+ }
56235
+ if (this.currency !== undefined) {
56236
+ b.write(index_js_1.Primitive.String.write(this.currency));
56237
+ }
56238
+ if (this.amount !== undefined) {
56239
+ b.write(index_js_1.Primitive.Long.write(this.amount));
56240
+ }
55292
56241
  return deps_js_1.Buffer.from(b.buffer);
55293
56242
  }
55294
56243
  }
@@ -56909,6 +57858,48 @@ var Raw;
56909
57858
  }
56910
57859
  }
56911
57860
  auth.ReportMissingCode = ReportMissingCode;
57861
+ class CheckPaidAuth extends index_js_1.TLObject {
57862
+ __response__;
57863
+ phoneNumber;
57864
+ phoneCodeHash;
57865
+ formId;
57866
+ constructor(params) {
57867
+ super();
57868
+ this.classType = 'functions';
57869
+ this.className = 'auth.CheckPaidAuth';
57870
+ this.constructorId = 0x56e59f9c;
57871
+ this.subclassOfId = 0x6ce87081;
57872
+ this._slots = ['phoneNumber', 'phoneCodeHash', 'formId'];
57873
+ this.phoneNumber = params.phoneNumber;
57874
+ this.phoneCodeHash = params.phoneCodeHash;
57875
+ this.formId = params.formId;
57876
+ }
57877
+ static async read(_data, ..._args) {
57878
+ let phoneNumber = await index_js_1.Primitive.String.read(_data);
57879
+ let phoneCodeHash = await index_js_1.Primitive.String.read(_data);
57880
+ let formId = await index_js_1.Primitive.Long.read(_data);
57881
+ return new Raw.auth.CheckPaidAuth({
57882
+ phoneNumber: phoneNumber,
57883
+ phoneCodeHash: phoneCodeHash,
57884
+ formId: formId,
57885
+ });
57886
+ }
57887
+ write() {
57888
+ const b = new deps_js_1.BytesIO();
57889
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
57890
+ if (this.phoneNumber !== undefined) {
57891
+ b.write(index_js_1.Primitive.String.write(this.phoneNumber));
57892
+ }
57893
+ if (this.phoneCodeHash !== undefined) {
57894
+ b.write(index_js_1.Primitive.String.write(this.phoneCodeHash));
57895
+ }
57896
+ if (this.formId !== undefined) {
57897
+ b.write(index_js_1.Primitive.Long.write(this.formId));
57898
+ }
57899
+ return deps_js_1.Buffer.from(b.buffer);
57900
+ }
57901
+ }
57902
+ auth.CheckPaidAuth = CheckPaidAuth;
56912
57903
  })(auth = Raw.auth || (Raw.auth = {}));
56913
57904
  let contacts;
56914
57905
  (function (contacts_1) {
@@ -57887,18 +58878,20 @@ var Raw;
57887
58878
  firstName;
57888
58879
  lastName;
57889
58880
  phone;
58881
+ note;
57890
58882
  constructor(params) {
57891
58883
  super();
57892
58884
  this.classType = 'functions';
57893
58885
  this.className = 'contacts.AddContact';
57894
- this.constructorId = 0xe8f463d0;
58886
+ this.constructorId = 0xd9ba2e54;
57895
58887
  this.subclassOfId = 0x8af52aac;
57896
- this._slots = ['addPhonePrivacyException', 'id', 'firstName', 'lastName', 'phone'];
58888
+ this._slots = ['addPhonePrivacyException', 'id', 'firstName', 'lastName', 'phone', 'note'];
57897
58889
  this.addPhonePrivacyException = params.addPhonePrivacyException;
57898
58890
  this.id = params.id;
57899
58891
  this.firstName = params.firstName;
57900
58892
  this.lastName = params.lastName;
57901
58893
  this.phone = params.phone;
58894
+ this.note = params.note;
57902
58895
  }
57903
58896
  static async read(_data, ..._args) {
57904
58897
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -57907,12 +58900,14 @@ var Raw;
57907
58900
  let firstName = await index_js_1.Primitive.String.read(_data);
57908
58901
  let lastName = await index_js_1.Primitive.String.read(_data);
57909
58902
  let phone = await index_js_1.Primitive.String.read(_data);
58903
+ let note = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
57910
58904
  return new Raw.contacts.AddContact({
57911
58905
  addPhonePrivacyException: addPhonePrivacyException,
57912
58906
  id: id,
57913
58907
  firstName: firstName,
57914
58908
  lastName: lastName,
57915
58909
  phone: phone,
58910
+ note: note,
57916
58911
  });
57917
58912
  }
57918
58913
  write() {
@@ -57920,6 +58915,7 @@ var Raw;
57920
58915
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
57921
58916
  let flags = 0;
57922
58917
  flags |= this.addPhonePrivacyException ? 1 << 0 : 0;
58918
+ flags |= this.note !== undefined ? 1 << 1 : 0;
57923
58919
  b.write(index_js_1.Primitive.Int.write(flags));
57924
58920
  if (this.id !== undefined) {
57925
58921
  b.write(this.id.write());
@@ -57933,6 +58929,9 @@ var Raw;
57933
58929
  if (this.phone !== undefined) {
57934
58930
  b.write(index_js_1.Primitive.String.write(this.phone));
57935
58931
  }
58932
+ if (this.note !== undefined) {
58933
+ b.write(this.note.write());
58934
+ }
57936
58935
  return deps_js_1.Buffer.from(b.buffer);
57937
58936
  }
57938
58937
  }
@@ -58236,6 +59235,38 @@ var Raw;
58236
59235
  }
58237
59236
  }
58238
59237
  contacts_1.GetSponsoredPeers = GetSponsoredPeers;
59238
+ class UpdateContactNote extends index_js_1.TLObject {
59239
+ __response__;
59240
+ id;
59241
+ note;
59242
+ constructor(params) {
59243
+ super();
59244
+ this.classType = 'functions';
59245
+ this.className = 'contacts.UpdateContactNote';
59246
+ this.constructorId = 0x139f63fb;
59247
+ this.subclassOfId = 0xf5b399ac;
59248
+ this._slots = ['id', 'note'];
59249
+ this.id = params.id;
59250
+ this.note = params.note;
59251
+ }
59252
+ static async read(_data, ..._args) {
59253
+ let id = await index_js_1.TLObject.read(_data);
59254
+ let note = await index_js_1.TLObject.read(_data);
59255
+ return new Raw.contacts.UpdateContactNote({ id: id, note: note });
59256
+ }
59257
+ write() {
59258
+ const b = new deps_js_1.BytesIO();
59259
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
59260
+ if (this.id !== undefined) {
59261
+ b.write(this.id.write());
59262
+ }
59263
+ if (this.note !== undefined) {
59264
+ b.write(this.note.write());
59265
+ }
59266
+ return deps_js_1.Buffer.from(b.buffer);
59267
+ }
59268
+ }
59269
+ contacts_1.UpdateContactNote = UpdateContactNote;
58239
59270
  })(contacts = Raw.contacts || (Raw.contacts = {}));
58240
59271
  let messages;
58241
59272
  (function (messages_1) {
@@ -58369,24 +59400,32 @@ var Raw;
58369
59400
  messages_1.DialogsNotModified = DialogsNotModified;
58370
59401
  class Messages extends index_js_1.TLObject {
58371
59402
  messages;
59403
+ topics;
58372
59404
  chats;
58373
59405
  users;
58374
59406
  constructor(params) {
58375
59407
  super();
58376
59408
  this.classType = 'types';
58377
59409
  this.className = 'messages.Messages';
58378
- this.constructorId = 0x8c718e87;
59410
+ this.constructorId = 0x1d73e7ea;
58379
59411
  this.subclassOfId = 0xd4b40b5e;
58380
- this._slots = ['messages', 'chats', 'users'];
59412
+ this._slots = ['messages', 'topics', 'chats', 'users'];
58381
59413
  this.messages = params.messages;
59414
+ this.topics = params.topics;
58382
59415
  this.chats = params.chats;
58383
59416
  this.users = params.users;
58384
59417
  }
58385
59418
  static async read(_data, ..._args) {
58386
59419
  let messages = await index_js_1.TLObject.read(_data);
59420
+ let topics = await index_js_1.TLObject.read(_data);
58387
59421
  let chats = await index_js_1.TLObject.read(_data);
58388
59422
  let users = await index_js_1.TLObject.read(_data);
58389
- return new Raw.messages.Messages({ messages: messages, chats: chats, users: users });
59423
+ return new Raw.messages.Messages({
59424
+ messages: messages,
59425
+ topics: topics,
59426
+ chats: chats,
59427
+ users: users,
59428
+ });
58390
59429
  }
58391
59430
  write() {
58392
59431
  const b = new deps_js_1.BytesIO();
@@ -58394,6 +59433,9 @@ var Raw;
58394
59433
  if (this.messages) {
58395
59434
  b.write(index_js_1.Primitive.Vector.write(this.messages));
58396
59435
  }
59436
+ if (this.topics) {
59437
+ b.write(index_js_1.Primitive.Vector.write(this.topics));
59438
+ }
58397
59439
  if (this.chats) {
58398
59440
  b.write(index_js_1.Primitive.Vector.write(this.chats));
58399
59441
  }
@@ -58411,13 +59453,14 @@ var Raw;
58411
59453
  offsetIdOffset;
58412
59454
  searchFlood;
58413
59455
  messages;
59456
+ topics;
58414
59457
  chats;
58415
59458
  users;
58416
59459
  constructor(params) {
58417
59460
  super();
58418
59461
  this.classType = 'types';
58419
59462
  this.className = 'messages.MessagesSlice';
58420
- this.constructorId = 0x762b263d;
59463
+ this.constructorId = 0x5f206716;
58421
59464
  this.subclassOfId = 0xd4b40b5e;
58422
59465
  this._slots = [
58423
59466
  'inexact',
@@ -58426,6 +59469,7 @@ var Raw;
58426
59469
  'offsetIdOffset',
58427
59470
  'searchFlood',
58428
59471
  'messages',
59472
+ 'topics',
58429
59473
  'chats',
58430
59474
  'users',
58431
59475
  ];
@@ -58435,6 +59479,7 @@ var Raw;
58435
59479
  this.offsetIdOffset = params.offsetIdOffset;
58436
59480
  this.searchFlood = params.searchFlood;
58437
59481
  this.messages = params.messages;
59482
+ this.topics = params.topics;
58438
59483
  this.chats = params.chats;
58439
59484
  this.users = params.users;
58440
59485
  }
@@ -58446,6 +59491,7 @@ var Raw;
58446
59491
  let offsetIdOffset = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
58447
59492
  let searchFlood = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
58448
59493
  let messages = await index_js_1.TLObject.read(_data);
59494
+ let topics = await index_js_1.TLObject.read(_data);
58449
59495
  let chats = await index_js_1.TLObject.read(_data);
58450
59496
  let users = await index_js_1.TLObject.read(_data);
58451
59497
  return new Raw.messages.MessagesSlice({
@@ -58455,6 +59501,7 @@ var Raw;
58455
59501
  offsetIdOffset: offsetIdOffset,
58456
59502
  searchFlood: searchFlood,
58457
59503
  messages: messages,
59504
+ topics: topics,
58458
59505
  chats: chats,
58459
59506
  users: users,
58460
59507
  });
@@ -58483,6 +59530,9 @@ var Raw;
58483
59530
  if (this.messages) {
58484
59531
  b.write(index_js_1.Primitive.Vector.write(this.messages));
58485
59532
  }
59533
+ if (this.topics) {
59534
+ b.write(index_js_1.Primitive.Vector.write(this.topics));
59535
+ }
58486
59536
  if (this.chats) {
58487
59537
  b.write(index_js_1.Primitive.Vector.write(this.chats));
58488
59538
  }
@@ -61536,21 +62586,24 @@ var Raw;
61536
62586
  messages_1.FoundStickers = FoundStickers;
61537
62587
  class WebPagePreview extends index_js_1.TLObject {
61538
62588
  media;
62589
+ chats;
61539
62590
  users;
61540
62591
  constructor(params) {
61541
62592
  super();
61542
62593
  this.classType = 'types';
61543
62594
  this.className = 'messages.WebPagePreview';
61544
- this.constructorId = 0xb53e8b21;
62595
+ this.constructorId = 0x8c9a88ac;
61545
62596
  this.subclassOfId = 0xe29410c2;
61546
- this._slots = ['media', 'users'];
62597
+ this._slots = ['media', 'chats', 'users'];
61547
62598
  this.media = params.media;
62599
+ this.chats = params.chats;
61548
62600
  this.users = params.users;
61549
62601
  }
61550
62602
  static async read(_data, ..._args) {
61551
62603
  let media = await index_js_1.TLObject.read(_data);
62604
+ let chats = await index_js_1.TLObject.read(_data);
61552
62605
  let users = await index_js_1.TLObject.read(_data);
61553
- return new Raw.messages.WebPagePreview({ media: media, users: users });
62606
+ return new Raw.messages.WebPagePreview({ media: media, chats: chats, users: users });
61554
62607
  }
61555
62608
  write() {
61556
62609
  const b = new deps_js_1.BytesIO();
@@ -61558,6 +62611,9 @@ var Raw;
61558
62611
  if (this.media !== undefined) {
61559
62612
  b.write(this.media.write());
61560
62613
  }
62614
+ if (this.chats) {
62615
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
62616
+ }
61561
62617
  if (this.users) {
61562
62618
  b.write(index_js_1.Primitive.Vector.write(this.users));
61563
62619
  }
@@ -67938,21 +68994,21 @@ var Raw;
67938
68994
  class SetChatTheme extends index_js_1.TLObject {
67939
68995
  __response__;
67940
68996
  peer;
67941
- emoticon;
68997
+ theme;
67942
68998
  constructor(params) {
67943
68999
  super();
67944
69000
  this.classType = 'functions';
67945
69001
  this.className = 'messages.SetChatTheme';
67946
- this.constructorId = 0xe63be13f;
69002
+ this.constructorId = 0x81202c9;
67947
69003
  this.subclassOfId = 0x8af52aac;
67948
- this._slots = ['peer', 'emoticon'];
69004
+ this._slots = ['peer', 'theme'];
67949
69005
  this.peer = params.peer;
67950
- this.emoticon = params.emoticon;
69006
+ this.theme = params.theme;
67951
69007
  }
67952
69008
  static async read(_data, ..._args) {
67953
69009
  let peer = await index_js_1.TLObject.read(_data);
67954
- let emoticon = await index_js_1.Primitive.String.read(_data);
67955
- return new Raw.messages.SetChatTheme({ peer: peer, emoticon: emoticon });
69010
+ let theme = await index_js_1.TLObject.read(_data);
69011
+ return new Raw.messages.SetChatTheme({ peer: peer, theme: theme });
67956
69012
  }
67957
69013
  write() {
67958
69014
  const b = new deps_js_1.BytesIO();
@@ -67960,8 +69016,8 @@ var Raw;
67960
69016
  if (this.peer !== undefined) {
67961
69017
  b.write(this.peer.write());
67962
69018
  }
67963
- if (this.emoticon !== undefined) {
67964
- b.write(index_js_1.Primitive.String.write(this.emoticon));
69019
+ if (this.theme !== undefined) {
69020
+ b.write(this.theme.write());
67965
69021
  }
67966
69022
  return deps_js_1.Buffer.from(b.buffer);
67967
69023
  }
@@ -71664,6 +72720,374 @@ var Raw;
71664
72720
  }
71665
72721
  }
71666
72722
  messages_1.ToggleSuggestedPostApproval = ToggleSuggestedPostApproval;
72723
+ class GetForumTopics extends index_js_1.TLObject {
72724
+ __response__;
72725
+ peer;
72726
+ q;
72727
+ offsetDate;
72728
+ offsetId;
72729
+ offsetTopic;
72730
+ limit;
72731
+ constructor(params) {
72732
+ super();
72733
+ this.classType = 'functions';
72734
+ this.className = 'messages.GetForumTopics';
72735
+ this.constructorId = 0x3ba47bff;
72736
+ this.subclassOfId = 0x8e1d3e1e;
72737
+ this._slots = ['peer', 'q', 'offsetDate', 'offsetId', 'offsetTopic', 'limit'];
72738
+ this.peer = params.peer;
72739
+ this.q = params.q;
72740
+ this.offsetDate = params.offsetDate;
72741
+ this.offsetId = params.offsetId;
72742
+ this.offsetTopic = params.offsetTopic;
72743
+ this.limit = params.limit;
72744
+ }
72745
+ static async read(_data, ..._args) {
72746
+ let flags = await index_js_1.Primitive.Int.read(_data);
72747
+ let peer = await index_js_1.TLObject.read(_data);
72748
+ let q = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
72749
+ let offsetDate = await index_js_1.Primitive.Int.read(_data);
72750
+ let offsetId = await index_js_1.Primitive.Int.read(_data);
72751
+ let offsetTopic = await index_js_1.Primitive.Int.read(_data);
72752
+ let limit = await index_js_1.Primitive.Int.read(_data);
72753
+ return new Raw.messages.GetForumTopics({
72754
+ peer: peer,
72755
+ q: q,
72756
+ offsetDate: offsetDate,
72757
+ offsetId: offsetId,
72758
+ offsetTopic: offsetTopic,
72759
+ limit: limit,
72760
+ });
72761
+ }
72762
+ write() {
72763
+ const b = new deps_js_1.BytesIO();
72764
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72765
+ let flags = 0;
72766
+ flags |= this.q !== undefined ? 1 << 0 : 0;
72767
+ b.write(index_js_1.Primitive.Int.write(flags));
72768
+ if (this.peer !== undefined) {
72769
+ b.write(this.peer.write());
72770
+ }
72771
+ if (this.q !== undefined) {
72772
+ b.write(index_js_1.Primitive.String.write(this.q));
72773
+ }
72774
+ if (this.offsetDate !== undefined) {
72775
+ b.write(index_js_1.Primitive.Int.write(this.offsetDate));
72776
+ }
72777
+ if (this.offsetId !== undefined) {
72778
+ b.write(index_js_1.Primitive.Int.write(this.offsetId));
72779
+ }
72780
+ if (this.offsetTopic !== undefined) {
72781
+ b.write(index_js_1.Primitive.Int.write(this.offsetTopic));
72782
+ }
72783
+ if (this.limit !== undefined) {
72784
+ b.write(index_js_1.Primitive.Int.write(this.limit));
72785
+ }
72786
+ return deps_js_1.Buffer.from(b.buffer);
72787
+ }
72788
+ }
72789
+ messages_1.GetForumTopics = GetForumTopics;
72790
+ class GetForumTopicsByID extends index_js_1.TLObject {
72791
+ __response__;
72792
+ peer;
72793
+ topics;
72794
+ constructor(params) {
72795
+ super();
72796
+ this.classType = 'functions';
72797
+ this.className = 'messages.GetForumTopicsByID';
72798
+ this.constructorId = 0xaf0a4a08;
72799
+ this.subclassOfId = 0x8e1d3e1e;
72800
+ this._slots = ['peer', 'topics'];
72801
+ this.peer = params.peer;
72802
+ this.topics = params.topics;
72803
+ }
72804
+ static async read(_data, ..._args) {
72805
+ let peer = await index_js_1.TLObject.read(_data);
72806
+ let topics = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
72807
+ return new Raw.messages.GetForumTopicsByID({ peer: peer, topics: topics });
72808
+ }
72809
+ write() {
72810
+ const b = new deps_js_1.BytesIO();
72811
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72812
+ if (this.peer !== undefined) {
72813
+ b.write(this.peer.write());
72814
+ }
72815
+ if (this.topics) {
72816
+ b.write(index_js_1.Primitive.Vector.write(this.topics, index_js_1.Primitive.Int));
72817
+ }
72818
+ return deps_js_1.Buffer.from(b.buffer);
72819
+ }
72820
+ }
72821
+ messages_1.GetForumTopicsByID = GetForumTopicsByID;
72822
+ class EditForumTopic extends index_js_1.TLObject {
72823
+ __response__;
72824
+ peer;
72825
+ topicId;
72826
+ title;
72827
+ iconEmojiId;
72828
+ closed;
72829
+ hidden;
72830
+ constructor(params) {
72831
+ super();
72832
+ this.classType = 'functions';
72833
+ this.className = 'messages.EditForumTopic';
72834
+ this.constructorId = 0xcecc1134;
72835
+ this.subclassOfId = 0x8af52aac;
72836
+ this._slots = ['peer', 'topicId', 'title', 'iconEmojiId', 'closed', 'hidden'];
72837
+ this.peer = params.peer;
72838
+ this.topicId = params.topicId;
72839
+ this.title = params.title;
72840
+ this.iconEmojiId = params.iconEmojiId;
72841
+ this.closed = params.closed;
72842
+ this.hidden = params.hidden;
72843
+ }
72844
+ static async read(_data, ..._args) {
72845
+ let flags = await index_js_1.Primitive.Int.read(_data);
72846
+ let peer = await index_js_1.TLObject.read(_data);
72847
+ let topicId = await index_js_1.Primitive.Int.read(_data);
72848
+ let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
72849
+ let iconEmojiId = flags & (1 << 1) ? await index_js_1.Primitive.Long.read(_data) : undefined;
72850
+ let closed = flags & (1 << 2) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
72851
+ let hidden = flags & (1 << 3) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
72852
+ return new Raw.messages.EditForumTopic({
72853
+ peer: peer,
72854
+ topicId: topicId,
72855
+ title: title,
72856
+ iconEmojiId: iconEmojiId,
72857
+ closed: closed,
72858
+ hidden: hidden,
72859
+ });
72860
+ }
72861
+ write() {
72862
+ const b = new deps_js_1.BytesIO();
72863
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72864
+ let flags = 0;
72865
+ flags |= this.title !== undefined ? 1 << 0 : 0;
72866
+ flags |= this.iconEmojiId !== undefined ? 1 << 1 : 0;
72867
+ flags |= this.closed !== undefined ? 1 << 2 : 0;
72868
+ flags |= this.hidden !== undefined ? 1 << 3 : 0;
72869
+ b.write(index_js_1.Primitive.Int.write(flags));
72870
+ if (this.peer !== undefined) {
72871
+ b.write(this.peer.write());
72872
+ }
72873
+ if (this.topicId !== undefined) {
72874
+ b.write(index_js_1.Primitive.Int.write(this.topicId));
72875
+ }
72876
+ if (this.title !== undefined) {
72877
+ b.write(index_js_1.Primitive.String.write(this.title));
72878
+ }
72879
+ if (this.iconEmojiId !== undefined) {
72880
+ b.write(index_js_1.Primitive.Long.write(this.iconEmojiId));
72881
+ }
72882
+ if (this.closed !== undefined) {
72883
+ b.write(index_js_1.Primitive.Bool.write(this.closed));
72884
+ }
72885
+ if (this.hidden !== undefined) {
72886
+ b.write(index_js_1.Primitive.Bool.write(this.hidden));
72887
+ }
72888
+ return deps_js_1.Buffer.from(b.buffer);
72889
+ }
72890
+ }
72891
+ messages_1.EditForumTopic = EditForumTopic;
72892
+ class UpdatePinnedForumTopic extends index_js_1.TLObject {
72893
+ __response__;
72894
+ peer;
72895
+ topicId;
72896
+ pinned;
72897
+ constructor(params) {
72898
+ super();
72899
+ this.classType = 'functions';
72900
+ this.className = 'messages.UpdatePinnedForumTopic';
72901
+ this.constructorId = 0x175df251;
72902
+ this.subclassOfId = 0x8af52aac;
72903
+ this._slots = ['peer', 'topicId', 'pinned'];
72904
+ this.peer = params.peer;
72905
+ this.topicId = params.topicId;
72906
+ this.pinned = params.pinned;
72907
+ }
72908
+ static async read(_data, ..._args) {
72909
+ let peer = await index_js_1.TLObject.read(_data);
72910
+ let topicId = await index_js_1.Primitive.Int.read(_data);
72911
+ let pinned = await index_js_1.Primitive.Bool.read(_data);
72912
+ return new Raw.messages.UpdatePinnedForumTopic({
72913
+ peer: peer,
72914
+ topicId: topicId,
72915
+ pinned: pinned,
72916
+ });
72917
+ }
72918
+ write() {
72919
+ const b = new deps_js_1.BytesIO();
72920
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72921
+ if (this.peer !== undefined) {
72922
+ b.write(this.peer.write());
72923
+ }
72924
+ if (this.topicId !== undefined) {
72925
+ b.write(index_js_1.Primitive.Int.write(this.topicId));
72926
+ }
72927
+ if (this.pinned !== undefined) {
72928
+ b.write(index_js_1.Primitive.Bool.write(this.pinned));
72929
+ }
72930
+ return deps_js_1.Buffer.from(b.buffer);
72931
+ }
72932
+ }
72933
+ messages_1.UpdatePinnedForumTopic = UpdatePinnedForumTopic;
72934
+ class ReorderPinnedForumTopics extends index_js_1.TLObject {
72935
+ __response__;
72936
+ force;
72937
+ peer;
72938
+ order;
72939
+ constructor(params) {
72940
+ super();
72941
+ this.classType = 'functions';
72942
+ this.className = 'messages.ReorderPinnedForumTopics';
72943
+ this.constructorId = 0xe7841f0;
72944
+ this.subclassOfId = 0x8af52aac;
72945
+ this._slots = ['force', 'peer', 'order'];
72946
+ this.force = params.force;
72947
+ this.peer = params.peer;
72948
+ this.order = params.order;
72949
+ }
72950
+ static async read(_data, ..._args) {
72951
+ let flags = await index_js_1.Primitive.Int.read(_data);
72952
+ let force = flags & (1 << 0) ? true : false;
72953
+ let peer = await index_js_1.TLObject.read(_data);
72954
+ let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
72955
+ return new Raw.messages.ReorderPinnedForumTopics({
72956
+ force: force,
72957
+ peer: peer,
72958
+ order: order,
72959
+ });
72960
+ }
72961
+ write() {
72962
+ const b = new deps_js_1.BytesIO();
72963
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
72964
+ let flags = 0;
72965
+ flags |= this.force ? 1 << 0 : 0;
72966
+ b.write(index_js_1.Primitive.Int.write(flags));
72967
+ if (this.peer !== undefined) {
72968
+ b.write(this.peer.write());
72969
+ }
72970
+ if (this.order) {
72971
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
72972
+ }
72973
+ return deps_js_1.Buffer.from(b.buffer);
72974
+ }
72975
+ }
72976
+ messages_1.ReorderPinnedForumTopics = ReorderPinnedForumTopics;
72977
+ class CreateForumTopic extends index_js_1.TLObject {
72978
+ __response__;
72979
+ titleMissing;
72980
+ peer;
72981
+ title;
72982
+ iconColor;
72983
+ iconEmojiId;
72984
+ randomId;
72985
+ sendAs;
72986
+ constructor(params) {
72987
+ super();
72988
+ this.classType = 'functions';
72989
+ this.className = 'messages.CreateForumTopic';
72990
+ this.constructorId = 0x2f98c3d5;
72991
+ this.subclassOfId = 0x8af52aac;
72992
+ this._slots = [
72993
+ 'titleMissing',
72994
+ 'peer',
72995
+ 'title',
72996
+ 'iconColor',
72997
+ 'iconEmojiId',
72998
+ 'randomId',
72999
+ 'sendAs',
73000
+ ];
73001
+ this.titleMissing = params.titleMissing;
73002
+ this.peer = params.peer;
73003
+ this.title = params.title;
73004
+ this.iconColor = params.iconColor;
73005
+ this.iconEmojiId = params.iconEmojiId;
73006
+ this.randomId = params.randomId;
73007
+ this.sendAs = params.sendAs;
73008
+ }
73009
+ static async read(_data, ..._args) {
73010
+ let flags = await index_js_1.Primitive.Int.read(_data);
73011
+ let titleMissing = flags & (1 << 4) ? true : false;
73012
+ let peer = await index_js_1.TLObject.read(_data);
73013
+ let title = await index_js_1.Primitive.String.read(_data);
73014
+ let iconColor = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
73015
+ let iconEmojiId = flags & (1 << 3) ? await index_js_1.Primitive.Long.read(_data) : undefined;
73016
+ let randomId = await index_js_1.Primitive.Long.read(_data);
73017
+ let sendAs = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
73018
+ return new Raw.messages.CreateForumTopic({
73019
+ titleMissing: titleMissing,
73020
+ peer: peer,
73021
+ title: title,
73022
+ iconColor: iconColor,
73023
+ iconEmojiId: iconEmojiId,
73024
+ randomId: randomId,
73025
+ sendAs: sendAs,
73026
+ });
73027
+ }
73028
+ write() {
73029
+ const b = new deps_js_1.BytesIO();
73030
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
73031
+ let flags = 0;
73032
+ flags |= this.titleMissing ? 1 << 4 : 0;
73033
+ flags |= this.iconColor !== undefined ? 1 << 0 : 0;
73034
+ flags |= this.iconEmojiId !== undefined ? 1 << 3 : 0;
73035
+ flags |= this.sendAs !== undefined ? 1 << 2 : 0;
73036
+ b.write(index_js_1.Primitive.Int.write(flags));
73037
+ if (this.peer !== undefined) {
73038
+ b.write(this.peer.write());
73039
+ }
73040
+ if (this.title !== undefined) {
73041
+ b.write(index_js_1.Primitive.String.write(this.title));
73042
+ }
73043
+ if (this.iconColor !== undefined) {
73044
+ b.write(index_js_1.Primitive.Int.write(this.iconColor));
73045
+ }
73046
+ if (this.iconEmojiId !== undefined) {
73047
+ b.write(index_js_1.Primitive.Long.write(this.iconEmojiId));
73048
+ }
73049
+ if (this.randomId !== undefined) {
73050
+ b.write(index_js_1.Primitive.Long.write(this.randomId));
73051
+ }
73052
+ if (this.sendAs !== undefined) {
73053
+ b.write(this.sendAs.write());
73054
+ }
73055
+ return deps_js_1.Buffer.from(b.buffer);
73056
+ }
73057
+ }
73058
+ messages_1.CreateForumTopic = CreateForumTopic;
73059
+ class DeleteTopicHistory extends index_js_1.TLObject {
73060
+ __response__;
73061
+ peer;
73062
+ topMsgId;
73063
+ constructor(params) {
73064
+ super();
73065
+ this.classType = 'functions';
73066
+ this.className = 'messages.DeleteTopicHistory';
73067
+ this.constructorId = 0xd2816f10;
73068
+ this.subclassOfId = 0x2c49c116;
73069
+ this._slots = ['peer', 'topMsgId'];
73070
+ this.peer = params.peer;
73071
+ this.topMsgId = params.topMsgId;
73072
+ }
73073
+ static async read(_data, ..._args) {
73074
+ let peer = await index_js_1.TLObject.read(_data);
73075
+ let topMsgId = await index_js_1.Primitive.Int.read(_data);
73076
+ return new Raw.messages.DeleteTopicHistory({ peer: peer, topMsgId: topMsgId });
73077
+ }
73078
+ write() {
73079
+ const b = new deps_js_1.BytesIO();
73080
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
73081
+ if (this.peer !== undefined) {
73082
+ b.write(this.peer.write());
73083
+ }
73084
+ if (this.topMsgId !== undefined) {
73085
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
73086
+ }
73087
+ return deps_js_1.Buffer.from(b.buffer);
73088
+ }
73089
+ }
73090
+ messages_1.DeleteTopicHistory = DeleteTopicHistory;
71667
73091
  })(messages = Raw.messages || (Raw.messages = {}));
71668
73092
  let updates;
71669
73093
  (function (updates) {
@@ -73835,6 +75259,84 @@ var Raw;
73835
75259
  }
73836
75260
  }
73837
75261
  account.ResetPasswordOk = ResetPasswordOk;
75262
+ class ChatThemesNotModified extends index_js_1.TLObject {
75263
+ constructor() {
75264
+ super();
75265
+ this.classType = 'types';
75266
+ this.className = 'account.ChatThemesNotModified';
75267
+ this.constructorId = 0xe011e1c4;
75268
+ this.subclassOfId = 0x15c14aa8;
75269
+ this._slots = [];
75270
+ }
75271
+ static async read(_data, ..._args) {
75272
+ return new Raw.account.ChatThemesNotModified();
75273
+ }
75274
+ write() {
75275
+ const b = new deps_js_1.BytesIO();
75276
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75277
+ return deps_js_1.Buffer.from(b.buffer);
75278
+ }
75279
+ }
75280
+ account.ChatThemesNotModified = ChatThemesNotModified;
75281
+ class ChatThemes extends index_js_1.TLObject {
75282
+ hash;
75283
+ themes;
75284
+ chats;
75285
+ users;
75286
+ nextOffset;
75287
+ constructor(params) {
75288
+ super();
75289
+ this.classType = 'types';
75290
+ this.className = 'account.ChatThemes';
75291
+ this.constructorId = 0xbe098173;
75292
+ this.subclassOfId = 0x15c14aa8;
75293
+ this._slots = ['hash', 'themes', 'chats', 'users', 'nextOffset'];
75294
+ this.hash = params.hash;
75295
+ this.themes = params.themes;
75296
+ this.chats = params.chats;
75297
+ this.users = params.users;
75298
+ this.nextOffset = params.nextOffset;
75299
+ }
75300
+ static async read(_data, ..._args) {
75301
+ let flags = await index_js_1.Primitive.Int.read(_data);
75302
+ let hash = await index_js_1.Primitive.Long.read(_data);
75303
+ let themes = await index_js_1.TLObject.read(_data);
75304
+ let chats = await index_js_1.TLObject.read(_data);
75305
+ let users = await index_js_1.TLObject.read(_data);
75306
+ let nextOffset = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
75307
+ return new Raw.account.ChatThemes({
75308
+ hash: hash,
75309
+ themes: themes,
75310
+ chats: chats,
75311
+ users: users,
75312
+ nextOffset: nextOffset,
75313
+ });
75314
+ }
75315
+ write() {
75316
+ const b = new deps_js_1.BytesIO();
75317
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75318
+ let flags = 0;
75319
+ flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
75320
+ b.write(index_js_1.Primitive.Int.write(flags));
75321
+ if (this.hash !== undefined) {
75322
+ b.write(index_js_1.Primitive.Long.write(this.hash));
75323
+ }
75324
+ if (this.themes) {
75325
+ b.write(index_js_1.Primitive.Vector.write(this.themes));
75326
+ }
75327
+ if (this.chats) {
75328
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
75329
+ }
75330
+ if (this.users) {
75331
+ b.write(index_js_1.Primitive.Vector.write(this.users));
75332
+ }
75333
+ if (this.nextOffset !== undefined) {
75334
+ b.write(index_js_1.Primitive.String.write(this.nextOffset));
75335
+ }
75336
+ return deps_js_1.Buffer.from(b.buffer);
75337
+ }
75338
+ }
75339
+ account.ChatThemes = ChatThemes;
73838
75340
  class SavedRingtonesNotModified extends index_js_1.TLObject {
73839
75341
  constructor() {
73840
75342
  super();
@@ -74256,6 +75758,50 @@ var Raw;
74256
75758
  }
74257
75759
  }
74258
75760
  account.PaidMessagesRevenue = PaidMessagesRevenue;
75761
+ class SavedMusicIdsNotModified extends index_js_1.TLObject {
75762
+ constructor() {
75763
+ super();
75764
+ this.classType = 'types';
75765
+ this.className = 'account.SavedMusicIdsNotModified';
75766
+ this.constructorId = 0x4fc81d6e;
75767
+ this.subclassOfId = 0x4b4af692;
75768
+ this._slots = [];
75769
+ }
75770
+ static async read(_data, ..._args) {
75771
+ return new Raw.account.SavedMusicIdsNotModified();
75772
+ }
75773
+ write() {
75774
+ const b = new deps_js_1.BytesIO();
75775
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75776
+ return deps_js_1.Buffer.from(b.buffer);
75777
+ }
75778
+ }
75779
+ account.SavedMusicIdsNotModified = SavedMusicIdsNotModified;
75780
+ class SavedMusicIds extends index_js_1.TLObject {
75781
+ ids;
75782
+ constructor(params) {
75783
+ super();
75784
+ this.classType = 'types';
75785
+ this.className = 'account.SavedMusicIds';
75786
+ this.constructorId = 0x998d6636;
75787
+ this.subclassOfId = 0x4b4af692;
75788
+ this._slots = ['ids'];
75789
+ this.ids = params.ids;
75790
+ }
75791
+ static async read(_data, ..._args) {
75792
+ let ids = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Long);
75793
+ return new Raw.account.SavedMusicIds({ ids: ids });
75794
+ }
75795
+ write() {
75796
+ const b = new deps_js_1.BytesIO();
75797
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75798
+ if (this.ids) {
75799
+ b.write(index_js_1.Primitive.Vector.write(this.ids, index_js_1.Primitive.Long));
75800
+ }
75801
+ return deps_js_1.Buffer.from(b.buffer);
75802
+ }
75803
+ }
75804
+ account.SavedMusicIds = SavedMusicIds;
74259
75805
  class RegisterDevice extends index_js_1.TLObject {
74260
75806
  __response__;
74261
75807
  noMuted;
@@ -77057,28 +78603,21 @@ var Raw;
77057
78603
  __response__;
77058
78604
  forProfile;
77059
78605
  color;
77060
- backgroundEmojiId;
77061
78606
  constructor(params) {
77062
78607
  super();
77063
78608
  this.classType = 'functions';
77064
78609
  this.className = 'account.UpdateColor';
77065
- this.constructorId = 0x7cefa15d;
78610
+ this.constructorId = 0x684d214e;
77066
78611
  this.subclassOfId = 0xf5b399ac;
77067
- this._slots = ['forProfile', 'color', 'backgroundEmojiId'];
78612
+ this._slots = ['forProfile', 'color'];
77068
78613
  this.forProfile = params.forProfile;
77069
78614
  this.color = params.color;
77070
- this.backgroundEmojiId = params.backgroundEmojiId;
77071
78615
  }
77072
78616
  static async read(_data, ..._args) {
77073
78617
  let flags = await index_js_1.Primitive.Int.read(_data);
77074
78618
  let forProfile = flags & (1 << 1) ? true : false;
77075
- let color = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
77076
- let backgroundEmojiId = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
77077
- return new Raw.account.UpdateColor({
77078
- forProfile: forProfile,
77079
- color: color,
77080
- backgroundEmojiId: backgroundEmojiId,
77081
- });
78619
+ let color = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
78620
+ return new Raw.account.UpdateColor({ forProfile: forProfile, color: color });
77082
78621
  }
77083
78622
  write() {
77084
78623
  const b = new deps_js_1.BytesIO();
@@ -77086,13 +78625,9 @@ var Raw;
77086
78625
  let flags = 0;
77087
78626
  flags |= this.forProfile ? 1 << 1 : 0;
77088
78627
  flags |= this.color !== undefined ? 1 << 2 : 0;
77089
- flags |= this.backgroundEmojiId !== undefined ? 1 << 0 : 0;
77090
78628
  b.write(index_js_1.Primitive.Int.write(flags));
77091
78629
  if (this.color !== undefined) {
77092
- b.write(index_js_1.Primitive.Int.write(this.color));
77093
- }
77094
- if (this.backgroundEmojiId !== undefined) {
77095
- b.write(index_js_1.Primitive.Long.write(this.backgroundEmojiId));
78630
+ b.write(this.color.write());
77096
78631
  }
77097
78632
  return deps_js_1.Buffer.from(b.buffer);
77098
78633
  }
@@ -77857,6 +79392,140 @@ var Raw;
77857
79392
  }
77858
79393
  }
77859
79394
  account.ToggleNoPaidMessagesException = ToggleNoPaidMessagesException;
79395
+ class SetMainProfileTab extends index_js_1.TLObject {
79396
+ __response__;
79397
+ tab;
79398
+ constructor(params) {
79399
+ super();
79400
+ this.classType = 'functions';
79401
+ this.className = 'account.SetMainProfileTab';
79402
+ this.constructorId = 0x5dee78b0;
79403
+ this.subclassOfId = 0xf5b399ac;
79404
+ this._slots = ['tab'];
79405
+ this.tab = params.tab;
79406
+ }
79407
+ static async read(_data, ..._args) {
79408
+ let tab = await index_js_1.TLObject.read(_data);
79409
+ return new Raw.account.SetMainProfileTab({ tab: tab });
79410
+ }
79411
+ write() {
79412
+ const b = new deps_js_1.BytesIO();
79413
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79414
+ if (this.tab !== undefined) {
79415
+ b.write(this.tab.write());
79416
+ }
79417
+ return deps_js_1.Buffer.from(b.buffer);
79418
+ }
79419
+ }
79420
+ account.SetMainProfileTab = SetMainProfileTab;
79421
+ class SaveMusic extends index_js_1.TLObject {
79422
+ __response__;
79423
+ unsave;
79424
+ id;
79425
+ afterId;
79426
+ constructor(params) {
79427
+ super();
79428
+ this.classType = 'functions';
79429
+ this.className = 'account.SaveMusic';
79430
+ this.constructorId = 0xb26732a9;
79431
+ this.subclassOfId = 0xf5b399ac;
79432
+ this._slots = ['unsave', 'id', 'afterId'];
79433
+ this.unsave = params.unsave;
79434
+ this.id = params.id;
79435
+ this.afterId = params.afterId;
79436
+ }
79437
+ static async read(_data, ..._args) {
79438
+ let flags = await index_js_1.Primitive.Int.read(_data);
79439
+ let unsave = flags & (1 << 0) ? true : false;
79440
+ let id = await index_js_1.TLObject.read(_data);
79441
+ let afterId = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
79442
+ return new Raw.account.SaveMusic({ unsave: unsave, id: id, afterId: afterId });
79443
+ }
79444
+ write() {
79445
+ const b = new deps_js_1.BytesIO();
79446
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79447
+ let flags = 0;
79448
+ flags |= this.unsave ? 1 << 0 : 0;
79449
+ flags |= this.afterId !== undefined ? 1 << 1 : 0;
79450
+ b.write(index_js_1.Primitive.Int.write(flags));
79451
+ if (this.id !== undefined) {
79452
+ b.write(this.id.write());
79453
+ }
79454
+ if (this.afterId !== undefined) {
79455
+ b.write(this.afterId.write());
79456
+ }
79457
+ return deps_js_1.Buffer.from(b.buffer);
79458
+ }
79459
+ }
79460
+ account.SaveMusic = SaveMusic;
79461
+ class GetSavedMusicIds extends index_js_1.TLObject {
79462
+ __response__;
79463
+ hash;
79464
+ constructor(params) {
79465
+ super();
79466
+ this.classType = 'functions';
79467
+ this.className = 'account.GetSavedMusicIds';
79468
+ this.constructorId = 0xe09d5faf;
79469
+ this.subclassOfId = 0x4b4af692;
79470
+ this._slots = ['hash'];
79471
+ this.hash = params.hash;
79472
+ }
79473
+ static async read(_data, ..._args) {
79474
+ let hash = await index_js_1.Primitive.Long.read(_data);
79475
+ return new Raw.account.GetSavedMusicIds({ hash: hash });
79476
+ }
79477
+ write() {
79478
+ const b = new deps_js_1.BytesIO();
79479
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79480
+ if (this.hash !== undefined) {
79481
+ b.write(index_js_1.Primitive.Long.write(this.hash));
79482
+ }
79483
+ return deps_js_1.Buffer.from(b.buffer);
79484
+ }
79485
+ }
79486
+ account.GetSavedMusicIds = GetSavedMusicIds;
79487
+ class GetUniqueGiftChatThemes extends index_js_1.TLObject {
79488
+ __response__;
79489
+ offset;
79490
+ limit;
79491
+ hash;
79492
+ constructor(params) {
79493
+ super();
79494
+ this.classType = 'functions';
79495
+ this.className = 'account.GetUniqueGiftChatThemes';
79496
+ this.constructorId = 0xe42ce9c9;
79497
+ this.subclassOfId = 0x15c14aa8;
79498
+ this._slots = ['offset', 'limit', 'hash'];
79499
+ this.offset = params.offset;
79500
+ this.limit = params.limit;
79501
+ this.hash = params.hash;
79502
+ }
79503
+ static async read(_data, ..._args) {
79504
+ let offset = await index_js_1.Primitive.String.read(_data);
79505
+ let limit = await index_js_1.Primitive.Int.read(_data);
79506
+ let hash = await index_js_1.Primitive.Long.read(_data);
79507
+ return new Raw.account.GetUniqueGiftChatThemes({
79508
+ offset: offset,
79509
+ limit: limit,
79510
+ hash: hash,
79511
+ });
79512
+ }
79513
+ write() {
79514
+ const b = new deps_js_1.BytesIO();
79515
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79516
+ if (this.offset !== undefined) {
79517
+ b.write(index_js_1.Primitive.String.write(this.offset));
79518
+ }
79519
+ if (this.limit !== undefined) {
79520
+ b.write(index_js_1.Primitive.Int.write(this.limit));
79521
+ }
79522
+ if (this.hash !== undefined) {
79523
+ b.write(index_js_1.Primitive.Long.write(this.hash));
79524
+ }
79525
+ return deps_js_1.Buffer.from(b.buffer);
79526
+ }
79527
+ }
79528
+ account.GetUniqueGiftChatThemes = GetUniqueGiftChatThemes;
77860
79529
  })(account = Raw.account || (Raw.account = {}));
77861
79530
  let channels;
77862
79531
  (function (channels) {
@@ -79661,361 +81330,6 @@ var Raw;
79661
81330
  }
79662
81331
  }
79663
81332
  channels.ToggleForum = ToggleForum;
79664
- class CreateForumTopic extends index_js_1.TLObject {
79665
- __response__;
79666
- channel;
79667
- title;
79668
- iconColor;
79669
- iconEmojiId;
79670
- randomId;
79671
- sendAs;
79672
- constructor(params) {
79673
- super();
79674
- this.classType = 'functions';
79675
- this.className = 'channels.CreateForumTopic';
79676
- this.constructorId = 0xf40c0224;
79677
- this.subclassOfId = 0x8af52aac;
79678
- this._slots = ['channel', 'title', 'iconColor', 'iconEmojiId', 'randomId', 'sendAs'];
79679
- this.channel = params.channel;
79680
- this.title = params.title;
79681
- this.iconColor = params.iconColor;
79682
- this.iconEmojiId = params.iconEmojiId;
79683
- this.randomId = params.randomId;
79684
- this.sendAs = params.sendAs;
79685
- }
79686
- static async read(_data, ..._args) {
79687
- let flags = await index_js_1.Primitive.Int.read(_data);
79688
- let channel = await index_js_1.TLObject.read(_data);
79689
- let title = await index_js_1.Primitive.String.read(_data);
79690
- let iconColor = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
79691
- let iconEmojiId = flags & (1 << 3) ? await index_js_1.Primitive.Long.read(_data) : undefined;
79692
- let randomId = await index_js_1.Primitive.Long.read(_data);
79693
- let sendAs = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
79694
- return new Raw.channels.CreateForumTopic({
79695
- channel: channel,
79696
- title: title,
79697
- iconColor: iconColor,
79698
- iconEmojiId: iconEmojiId,
79699
- randomId: randomId,
79700
- sendAs: sendAs,
79701
- });
79702
- }
79703
- write() {
79704
- const b = new deps_js_1.BytesIO();
79705
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79706
- let flags = 0;
79707
- flags |= this.iconColor !== undefined ? 1 << 0 : 0;
79708
- flags |= this.iconEmojiId !== undefined ? 1 << 3 : 0;
79709
- flags |= this.sendAs !== undefined ? 1 << 2 : 0;
79710
- b.write(index_js_1.Primitive.Int.write(flags));
79711
- if (this.channel !== undefined) {
79712
- b.write(this.channel.write());
79713
- }
79714
- if (this.title !== undefined) {
79715
- b.write(index_js_1.Primitive.String.write(this.title));
79716
- }
79717
- if (this.iconColor !== undefined) {
79718
- b.write(index_js_1.Primitive.Int.write(this.iconColor));
79719
- }
79720
- if (this.iconEmojiId !== undefined) {
79721
- b.write(index_js_1.Primitive.Long.write(this.iconEmojiId));
79722
- }
79723
- if (this.randomId !== undefined) {
79724
- b.write(index_js_1.Primitive.Long.write(this.randomId));
79725
- }
79726
- if (this.sendAs !== undefined) {
79727
- b.write(this.sendAs.write());
79728
- }
79729
- return deps_js_1.Buffer.from(b.buffer);
79730
- }
79731
- }
79732
- channels.CreateForumTopic = CreateForumTopic;
79733
- class GetForumTopics extends index_js_1.TLObject {
79734
- __response__;
79735
- channel;
79736
- q;
79737
- offsetDate;
79738
- offsetId;
79739
- offsetTopic;
79740
- limit;
79741
- constructor(params) {
79742
- super();
79743
- this.classType = 'functions';
79744
- this.className = 'channels.GetForumTopics';
79745
- this.constructorId = 0xde560d1;
79746
- this.subclassOfId = 0x8e1d3e1e;
79747
- this._slots = ['channel', 'q', 'offsetDate', 'offsetId', 'offsetTopic', 'limit'];
79748
- this.channel = params.channel;
79749
- this.q = params.q;
79750
- this.offsetDate = params.offsetDate;
79751
- this.offsetId = params.offsetId;
79752
- this.offsetTopic = params.offsetTopic;
79753
- this.limit = params.limit;
79754
- }
79755
- static async read(_data, ..._args) {
79756
- let flags = await index_js_1.Primitive.Int.read(_data);
79757
- let channel = await index_js_1.TLObject.read(_data);
79758
- let q = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
79759
- let offsetDate = await index_js_1.Primitive.Int.read(_data);
79760
- let offsetId = await index_js_1.Primitive.Int.read(_data);
79761
- let offsetTopic = await index_js_1.Primitive.Int.read(_data);
79762
- let limit = await index_js_1.Primitive.Int.read(_data);
79763
- return new Raw.channels.GetForumTopics({
79764
- channel: channel,
79765
- q: q,
79766
- offsetDate: offsetDate,
79767
- offsetId: offsetId,
79768
- offsetTopic: offsetTopic,
79769
- limit: limit,
79770
- });
79771
- }
79772
- write() {
79773
- const b = new deps_js_1.BytesIO();
79774
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79775
- let flags = 0;
79776
- flags |= this.q !== undefined ? 1 << 0 : 0;
79777
- b.write(index_js_1.Primitive.Int.write(flags));
79778
- if (this.channel !== undefined) {
79779
- b.write(this.channel.write());
79780
- }
79781
- if (this.q !== undefined) {
79782
- b.write(index_js_1.Primitive.String.write(this.q));
79783
- }
79784
- if (this.offsetDate !== undefined) {
79785
- b.write(index_js_1.Primitive.Int.write(this.offsetDate));
79786
- }
79787
- if (this.offsetId !== undefined) {
79788
- b.write(index_js_1.Primitive.Int.write(this.offsetId));
79789
- }
79790
- if (this.offsetTopic !== undefined) {
79791
- b.write(index_js_1.Primitive.Int.write(this.offsetTopic));
79792
- }
79793
- if (this.limit !== undefined) {
79794
- b.write(index_js_1.Primitive.Int.write(this.limit));
79795
- }
79796
- return deps_js_1.Buffer.from(b.buffer);
79797
- }
79798
- }
79799
- channels.GetForumTopics = GetForumTopics;
79800
- class GetForumTopicsByID extends index_js_1.TLObject {
79801
- __response__;
79802
- channel;
79803
- topics;
79804
- constructor(params) {
79805
- super();
79806
- this.classType = 'functions';
79807
- this.className = 'channels.GetForumTopicsByID';
79808
- this.constructorId = 0xb0831eb9;
79809
- this.subclassOfId = 0x8e1d3e1e;
79810
- this._slots = ['channel', 'topics'];
79811
- this.channel = params.channel;
79812
- this.topics = params.topics;
79813
- }
79814
- static async read(_data, ..._args) {
79815
- let channel = await index_js_1.TLObject.read(_data);
79816
- let topics = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
79817
- return new Raw.channels.GetForumTopicsByID({ channel: channel, topics: topics });
79818
- }
79819
- write() {
79820
- const b = new deps_js_1.BytesIO();
79821
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79822
- if (this.channel !== undefined) {
79823
- b.write(this.channel.write());
79824
- }
79825
- if (this.topics) {
79826
- b.write(index_js_1.Primitive.Vector.write(this.topics, index_js_1.Primitive.Int));
79827
- }
79828
- return deps_js_1.Buffer.from(b.buffer);
79829
- }
79830
- }
79831
- channels.GetForumTopicsByID = GetForumTopicsByID;
79832
- class EditForumTopic extends index_js_1.TLObject {
79833
- __response__;
79834
- channel;
79835
- topicId;
79836
- title;
79837
- iconEmojiId;
79838
- closed;
79839
- hidden;
79840
- constructor(params) {
79841
- super();
79842
- this.classType = 'functions';
79843
- this.className = 'channels.EditForumTopic';
79844
- this.constructorId = 0xf4dfa185;
79845
- this.subclassOfId = 0x8af52aac;
79846
- this._slots = ['channel', 'topicId', 'title', 'iconEmojiId', 'closed', 'hidden'];
79847
- this.channel = params.channel;
79848
- this.topicId = params.topicId;
79849
- this.title = params.title;
79850
- this.iconEmojiId = params.iconEmojiId;
79851
- this.closed = params.closed;
79852
- this.hidden = params.hidden;
79853
- }
79854
- static async read(_data, ..._args) {
79855
- let flags = await index_js_1.Primitive.Int.read(_data);
79856
- let channel = await index_js_1.TLObject.read(_data);
79857
- let topicId = await index_js_1.Primitive.Int.read(_data);
79858
- let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
79859
- let iconEmojiId = flags & (1 << 1) ? await index_js_1.Primitive.Long.read(_data) : undefined;
79860
- let closed = flags & (1 << 2) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
79861
- let hidden = flags & (1 << 3) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
79862
- return new Raw.channels.EditForumTopic({
79863
- channel: channel,
79864
- topicId: topicId,
79865
- title: title,
79866
- iconEmojiId: iconEmojiId,
79867
- closed: closed,
79868
- hidden: hidden,
79869
- });
79870
- }
79871
- write() {
79872
- const b = new deps_js_1.BytesIO();
79873
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79874
- let flags = 0;
79875
- flags |= this.title !== undefined ? 1 << 0 : 0;
79876
- flags |= this.iconEmojiId !== undefined ? 1 << 1 : 0;
79877
- flags |= this.closed !== undefined ? 1 << 2 : 0;
79878
- flags |= this.hidden !== undefined ? 1 << 3 : 0;
79879
- b.write(index_js_1.Primitive.Int.write(flags));
79880
- if (this.channel !== undefined) {
79881
- b.write(this.channel.write());
79882
- }
79883
- if (this.topicId !== undefined) {
79884
- b.write(index_js_1.Primitive.Int.write(this.topicId));
79885
- }
79886
- if (this.title !== undefined) {
79887
- b.write(index_js_1.Primitive.String.write(this.title));
79888
- }
79889
- if (this.iconEmojiId !== undefined) {
79890
- b.write(index_js_1.Primitive.Long.write(this.iconEmojiId));
79891
- }
79892
- if (this.closed !== undefined) {
79893
- b.write(index_js_1.Primitive.Bool.write(this.closed));
79894
- }
79895
- if (this.hidden !== undefined) {
79896
- b.write(index_js_1.Primitive.Bool.write(this.hidden));
79897
- }
79898
- return deps_js_1.Buffer.from(b.buffer);
79899
- }
79900
- }
79901
- channels.EditForumTopic = EditForumTopic;
79902
- class UpdatePinnedForumTopic extends index_js_1.TLObject {
79903
- __response__;
79904
- channel;
79905
- topicId;
79906
- pinned;
79907
- constructor(params) {
79908
- super();
79909
- this.classType = 'functions';
79910
- this.className = 'channels.UpdatePinnedForumTopic';
79911
- this.constructorId = 0x6c2d9026;
79912
- this.subclassOfId = 0x8af52aac;
79913
- this._slots = ['channel', 'topicId', 'pinned'];
79914
- this.channel = params.channel;
79915
- this.topicId = params.topicId;
79916
- this.pinned = params.pinned;
79917
- }
79918
- static async read(_data, ..._args) {
79919
- let channel = await index_js_1.TLObject.read(_data);
79920
- let topicId = await index_js_1.Primitive.Int.read(_data);
79921
- let pinned = await index_js_1.Primitive.Bool.read(_data);
79922
- return new Raw.channels.UpdatePinnedForumTopic({
79923
- channel: channel,
79924
- topicId: topicId,
79925
- pinned: pinned,
79926
- });
79927
- }
79928
- write() {
79929
- const b = new deps_js_1.BytesIO();
79930
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79931
- if (this.channel !== undefined) {
79932
- b.write(this.channel.write());
79933
- }
79934
- if (this.topicId !== undefined) {
79935
- b.write(index_js_1.Primitive.Int.write(this.topicId));
79936
- }
79937
- if (this.pinned !== undefined) {
79938
- b.write(index_js_1.Primitive.Bool.write(this.pinned));
79939
- }
79940
- return deps_js_1.Buffer.from(b.buffer);
79941
- }
79942
- }
79943
- channels.UpdatePinnedForumTopic = UpdatePinnedForumTopic;
79944
- class DeleteTopicHistory extends index_js_1.TLObject {
79945
- __response__;
79946
- channel;
79947
- topMsgId;
79948
- constructor(params) {
79949
- super();
79950
- this.classType = 'functions';
79951
- this.className = 'channels.DeleteTopicHistory';
79952
- this.constructorId = 0x34435f2d;
79953
- this.subclassOfId = 0x2c49c116;
79954
- this._slots = ['channel', 'topMsgId'];
79955
- this.channel = params.channel;
79956
- this.topMsgId = params.topMsgId;
79957
- }
79958
- static async read(_data, ..._args) {
79959
- let channel = await index_js_1.TLObject.read(_data);
79960
- let topMsgId = await index_js_1.Primitive.Int.read(_data);
79961
- return new Raw.channels.DeleteTopicHistory({ channel: channel, topMsgId: topMsgId });
79962
- }
79963
- write() {
79964
- const b = new deps_js_1.BytesIO();
79965
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
79966
- if (this.channel !== undefined) {
79967
- b.write(this.channel.write());
79968
- }
79969
- if (this.topMsgId !== undefined) {
79970
- b.write(index_js_1.Primitive.Int.write(this.topMsgId));
79971
- }
79972
- return deps_js_1.Buffer.from(b.buffer);
79973
- }
79974
- }
79975
- channels.DeleteTopicHistory = DeleteTopicHistory;
79976
- class ReorderPinnedForumTopics extends index_js_1.TLObject {
79977
- __response__;
79978
- force;
79979
- channel;
79980
- order;
79981
- constructor(params) {
79982
- super();
79983
- this.classType = 'functions';
79984
- this.className = 'channels.ReorderPinnedForumTopics';
79985
- this.constructorId = 0x2950a18f;
79986
- this.subclassOfId = 0x8af52aac;
79987
- this._slots = ['force', 'channel', 'order'];
79988
- this.force = params.force;
79989
- this.channel = params.channel;
79990
- this.order = params.order;
79991
- }
79992
- static async read(_data, ..._args) {
79993
- let flags = await index_js_1.Primitive.Int.read(_data);
79994
- let force = flags & (1 << 0) ? true : false;
79995
- let channel = await index_js_1.TLObject.read(_data);
79996
- let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
79997
- return new Raw.channels.ReorderPinnedForumTopics({
79998
- force: force,
79999
- channel: channel,
80000
- order: order,
80001
- });
80002
- }
80003
- write() {
80004
- const b = new deps_js_1.BytesIO();
80005
- b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
80006
- let flags = 0;
80007
- flags |= this.force ? 1 << 0 : 0;
80008
- b.write(index_js_1.Primitive.Int.write(flags));
80009
- if (this.channel !== undefined) {
80010
- b.write(this.channel.write());
80011
- }
80012
- if (this.order) {
80013
- b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
80014
- }
80015
- return deps_js_1.Buffer.from(b.buffer);
80016
- }
80017
- }
80018
- channels.ReorderPinnedForumTopics = ReorderPinnedForumTopics;
80019
81333
  class ToggleAntiSpam extends index_js_1.TLObject {
80020
81334
  __response__;
80021
81335
  channel;
@@ -80581,6 +81895,38 @@ var Raw;
80581
81895
  }
80582
81896
  }
80583
81897
  channels.CheckSearchPostsFlood = CheckSearchPostsFlood;
81898
+ class SetMainProfileTab extends index_js_1.TLObject {
81899
+ __response__;
81900
+ channel;
81901
+ tab;
81902
+ constructor(params) {
81903
+ super();
81904
+ this.classType = 'functions';
81905
+ this.className = 'channels.SetMainProfileTab';
81906
+ this.constructorId = 0x3583fcb1;
81907
+ this.subclassOfId = 0xf5b399ac;
81908
+ this._slots = ['channel', 'tab'];
81909
+ this.channel = params.channel;
81910
+ this.tab = params.tab;
81911
+ }
81912
+ static async read(_data, ..._args) {
81913
+ let channel = await index_js_1.TLObject.read(_data);
81914
+ let tab = await index_js_1.TLObject.read(_data);
81915
+ return new Raw.channels.SetMainProfileTab({ channel: channel, tab: tab });
81916
+ }
81917
+ write() {
81918
+ const b = new deps_js_1.BytesIO();
81919
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81920
+ if (this.channel !== undefined) {
81921
+ b.write(this.channel.write());
81922
+ }
81923
+ if (this.tab !== undefined) {
81924
+ b.write(this.tab.write());
81925
+ }
81926
+ return deps_js_1.Buffer.from(b.buffer);
81927
+ }
81928
+ }
81929
+ channels.SetMainProfileTab = SetMainProfileTab;
80584
81930
  })(channels = Raw.channels || (Raw.channels = {}));
80585
81931
  let payments;
80586
81932
  (function (payments) {
@@ -81876,18 +83222,28 @@ var Raw;
81876
83222
  payments.SuggestedStarRefBots = SuggestedStarRefBots;
81877
83223
  class StarGiftUpgradePreview extends index_js_1.TLObject {
81878
83224
  sampleAttributes;
83225
+ prices;
83226
+ nextPrices;
81879
83227
  constructor(params) {
81880
83228
  super();
81881
83229
  this.classType = 'types';
81882
83230
  this.className = 'payments.StarGiftUpgradePreview';
81883
- this.constructorId = 0x167bd90b;
83231
+ this.constructorId = 0x3de1dfed;
81884
83232
  this.subclassOfId = 0x5e2b68c7;
81885
- this._slots = ['sampleAttributes'];
83233
+ this._slots = ['sampleAttributes', 'prices', 'nextPrices'];
81886
83234
  this.sampleAttributes = params.sampleAttributes;
83235
+ this.prices = params.prices;
83236
+ this.nextPrices = params.nextPrices;
81887
83237
  }
81888
83238
  static async read(_data, ..._args) {
81889
83239
  let sampleAttributes = await index_js_1.TLObject.read(_data);
81890
- return new Raw.payments.StarGiftUpgradePreview({ sampleAttributes: sampleAttributes });
83240
+ let prices = await index_js_1.TLObject.read(_data);
83241
+ let nextPrices = await index_js_1.TLObject.read(_data);
83242
+ return new Raw.payments.StarGiftUpgradePreview({
83243
+ sampleAttributes: sampleAttributes,
83244
+ prices: prices,
83245
+ nextPrices: nextPrices,
83246
+ });
81891
83247
  }
81892
83248
  write() {
81893
83249
  const b = new deps_js_1.BytesIO();
@@ -81895,27 +83251,36 @@ var Raw;
81895
83251
  if (this.sampleAttributes) {
81896
83252
  b.write(index_js_1.Primitive.Vector.write(this.sampleAttributes));
81897
83253
  }
83254
+ if (this.prices) {
83255
+ b.write(index_js_1.Primitive.Vector.write(this.prices));
83256
+ }
83257
+ if (this.nextPrices) {
83258
+ b.write(index_js_1.Primitive.Vector.write(this.nextPrices));
83259
+ }
81898
83260
  return deps_js_1.Buffer.from(b.buffer);
81899
83261
  }
81900
83262
  }
81901
83263
  payments.StarGiftUpgradePreview = StarGiftUpgradePreview;
81902
83264
  class UniqueStarGift extends index_js_1.TLObject {
81903
83265
  gift;
83266
+ chats;
81904
83267
  users;
81905
83268
  constructor(params) {
81906
83269
  super();
81907
83270
  this.classType = 'types';
81908
83271
  this.className = 'payments.UniqueStarGift';
81909
- this.constructorId = 0xcaa2f60b;
83272
+ this.constructorId = 0x416c56e8;
81910
83273
  this.subclassOfId = 0x78b0c5fb;
81911
- this._slots = ['gift', 'users'];
83274
+ this._slots = ['gift', 'chats', 'users'];
81912
83275
  this.gift = params.gift;
83276
+ this.chats = params.chats;
81913
83277
  this.users = params.users;
81914
83278
  }
81915
83279
  static async read(_data, ..._args) {
81916
83280
  let gift = await index_js_1.TLObject.read(_data);
83281
+ let chats = await index_js_1.TLObject.read(_data);
81917
83282
  let users = await index_js_1.TLObject.read(_data);
81918
- return new Raw.payments.UniqueStarGift({ gift: gift, users: users });
83283
+ return new Raw.payments.UniqueStarGift({ gift: gift, chats: chats, users: users });
81919
83284
  }
81920
83285
  write() {
81921
83286
  const b = new deps_js_1.BytesIO();
@@ -81923,6 +83288,9 @@ var Raw;
81923
83288
  if (this.gift !== undefined) {
81924
83289
  b.write(this.gift.write());
81925
83290
  }
83291
+ if (this.chats) {
83292
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
83293
+ }
81926
83294
  if (this.users) {
81927
83295
  b.write(index_js_1.Primitive.Vector.write(this.users));
81928
83296
  }
@@ -82165,6 +83533,189 @@ var Raw;
82165
83533
  }
82166
83534
  }
82167
83535
  payments.StarGiftCollections = StarGiftCollections;
83536
+ class UniqueStarGiftValueInfo extends index_js_1.TLObject {
83537
+ lastSaleOnFragment;
83538
+ valueIsAverage;
83539
+ currency;
83540
+ value;
83541
+ initialSaleDate;
83542
+ initialSaleStars;
83543
+ initialSalePrice;
83544
+ lastSaleDate;
83545
+ lastSalePrice;
83546
+ floorPrice;
83547
+ averagePrice;
83548
+ listedCount;
83549
+ fragmentListedCount;
83550
+ fragmentListedUrl;
83551
+ constructor(params) {
83552
+ super();
83553
+ this.classType = 'types';
83554
+ this.className = 'payments.UniqueStarGiftValueInfo';
83555
+ this.constructorId = 0x512fe446;
83556
+ this.subclassOfId = 0x16355bc4;
83557
+ this._slots = [
83558
+ 'lastSaleOnFragment',
83559
+ 'valueIsAverage',
83560
+ 'currency',
83561
+ 'value',
83562
+ 'initialSaleDate',
83563
+ 'initialSaleStars',
83564
+ 'initialSalePrice',
83565
+ 'lastSaleDate',
83566
+ 'lastSalePrice',
83567
+ 'floorPrice',
83568
+ 'averagePrice',
83569
+ 'listedCount',
83570
+ 'fragmentListedCount',
83571
+ 'fragmentListedUrl',
83572
+ ];
83573
+ this.lastSaleOnFragment = params.lastSaleOnFragment;
83574
+ this.valueIsAverage = params.valueIsAverage;
83575
+ this.currency = params.currency;
83576
+ this.value = params.value;
83577
+ this.initialSaleDate = params.initialSaleDate;
83578
+ this.initialSaleStars = params.initialSaleStars;
83579
+ this.initialSalePrice = params.initialSalePrice;
83580
+ this.lastSaleDate = params.lastSaleDate;
83581
+ this.lastSalePrice = params.lastSalePrice;
83582
+ this.floorPrice = params.floorPrice;
83583
+ this.averagePrice = params.averagePrice;
83584
+ this.listedCount = params.listedCount;
83585
+ this.fragmentListedCount = params.fragmentListedCount;
83586
+ this.fragmentListedUrl = params.fragmentListedUrl;
83587
+ }
83588
+ static async read(_data, ..._args) {
83589
+ let flags = await index_js_1.Primitive.Int.read(_data);
83590
+ let lastSaleOnFragment = flags & (1 << 1) ? true : false;
83591
+ let valueIsAverage = flags & (1 << 6) ? true : false;
83592
+ let currency = await index_js_1.Primitive.String.read(_data);
83593
+ let value = await index_js_1.Primitive.Long.read(_data);
83594
+ let initialSaleDate = await index_js_1.Primitive.Int.read(_data);
83595
+ let initialSaleStars = await index_js_1.Primitive.Long.read(_data);
83596
+ let initialSalePrice = await index_js_1.Primitive.Long.read(_data);
83597
+ let lastSaleDate = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83598
+ let lastSalePrice = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83599
+ let floorPrice = flags & (1 << 2) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83600
+ let averagePrice = flags & (1 << 3) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83601
+ let listedCount = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83602
+ let fragmentListedCount = flags & (1 << 5) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83603
+ let fragmentListedUrl = flags & (1 << 5) ? await index_js_1.Primitive.String.read(_data) : undefined;
83604
+ return new Raw.payments.UniqueStarGiftValueInfo({
83605
+ lastSaleOnFragment: lastSaleOnFragment,
83606
+ valueIsAverage: valueIsAverage,
83607
+ currency: currency,
83608
+ value: value,
83609
+ initialSaleDate: initialSaleDate,
83610
+ initialSaleStars: initialSaleStars,
83611
+ initialSalePrice: initialSalePrice,
83612
+ lastSaleDate: lastSaleDate,
83613
+ lastSalePrice: lastSalePrice,
83614
+ floorPrice: floorPrice,
83615
+ averagePrice: averagePrice,
83616
+ listedCount: listedCount,
83617
+ fragmentListedCount: fragmentListedCount,
83618
+ fragmentListedUrl: fragmentListedUrl,
83619
+ });
83620
+ }
83621
+ write() {
83622
+ const b = new deps_js_1.BytesIO();
83623
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83624
+ let flags = 0;
83625
+ flags |= this.lastSaleOnFragment ? 1 << 1 : 0;
83626
+ flags |= this.valueIsAverage ? 1 << 6 : 0;
83627
+ flags |= this.lastSaleDate !== undefined ? 1 << 0 : 0;
83628
+ flags |= this.lastSalePrice !== undefined ? 1 << 0 : 0;
83629
+ flags |= this.floorPrice !== undefined ? 1 << 2 : 0;
83630
+ flags |= this.averagePrice !== undefined ? 1 << 3 : 0;
83631
+ flags |= this.listedCount !== undefined ? 1 << 4 : 0;
83632
+ flags |= this.fragmentListedCount !== undefined ? 1 << 5 : 0;
83633
+ flags |= this.fragmentListedUrl !== undefined ? 1 << 5 : 0;
83634
+ b.write(index_js_1.Primitive.Int.write(flags));
83635
+ if (this.currency !== undefined) {
83636
+ b.write(index_js_1.Primitive.String.write(this.currency));
83637
+ }
83638
+ if (this.value !== undefined) {
83639
+ b.write(index_js_1.Primitive.Long.write(this.value));
83640
+ }
83641
+ if (this.initialSaleDate !== undefined) {
83642
+ b.write(index_js_1.Primitive.Int.write(this.initialSaleDate));
83643
+ }
83644
+ if (this.initialSaleStars !== undefined) {
83645
+ b.write(index_js_1.Primitive.Long.write(this.initialSaleStars));
83646
+ }
83647
+ if (this.initialSalePrice !== undefined) {
83648
+ b.write(index_js_1.Primitive.Long.write(this.initialSalePrice));
83649
+ }
83650
+ if (this.lastSaleDate !== undefined) {
83651
+ b.write(index_js_1.Primitive.Int.write(this.lastSaleDate));
83652
+ }
83653
+ if (this.lastSalePrice !== undefined) {
83654
+ b.write(index_js_1.Primitive.Long.write(this.lastSalePrice));
83655
+ }
83656
+ if (this.floorPrice !== undefined) {
83657
+ b.write(index_js_1.Primitive.Long.write(this.floorPrice));
83658
+ }
83659
+ if (this.averagePrice !== undefined) {
83660
+ b.write(index_js_1.Primitive.Long.write(this.averagePrice));
83661
+ }
83662
+ if (this.listedCount !== undefined) {
83663
+ b.write(index_js_1.Primitive.Int.write(this.listedCount));
83664
+ }
83665
+ if (this.fragmentListedCount !== undefined) {
83666
+ b.write(index_js_1.Primitive.Int.write(this.fragmentListedCount));
83667
+ }
83668
+ if (this.fragmentListedUrl !== undefined) {
83669
+ b.write(index_js_1.Primitive.String.write(this.fragmentListedUrl));
83670
+ }
83671
+ return deps_js_1.Buffer.from(b.buffer);
83672
+ }
83673
+ }
83674
+ payments.UniqueStarGiftValueInfo = UniqueStarGiftValueInfo;
83675
+ class CheckCanSendGiftResultOk extends index_js_1.TLObject {
83676
+ constructor() {
83677
+ super();
83678
+ this.classType = 'types';
83679
+ this.className = 'payments.CheckCanSendGiftResultOk';
83680
+ this.constructorId = 0x374fa7ad;
83681
+ this.subclassOfId = 0x632efa30;
83682
+ this._slots = [];
83683
+ }
83684
+ static async read(_data, ..._args) {
83685
+ return new Raw.payments.CheckCanSendGiftResultOk();
83686
+ }
83687
+ write() {
83688
+ const b = new deps_js_1.BytesIO();
83689
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83690
+ return deps_js_1.Buffer.from(b.buffer);
83691
+ }
83692
+ }
83693
+ payments.CheckCanSendGiftResultOk = CheckCanSendGiftResultOk;
83694
+ class CheckCanSendGiftResultFail extends index_js_1.TLObject {
83695
+ reason;
83696
+ constructor(params) {
83697
+ super();
83698
+ this.classType = 'types';
83699
+ this.className = 'payments.CheckCanSendGiftResultFail';
83700
+ this.constructorId = 0xd5e58274;
83701
+ this.subclassOfId = 0x632efa30;
83702
+ this._slots = ['reason'];
83703
+ this.reason = params.reason;
83704
+ }
83705
+ static async read(_data, ..._args) {
83706
+ let reason = await index_js_1.TLObject.read(_data);
83707
+ return new Raw.payments.CheckCanSendGiftResultFail({ reason: reason });
83708
+ }
83709
+ write() {
83710
+ const b = new deps_js_1.BytesIO();
83711
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83712
+ if (this.reason !== undefined) {
83713
+ b.write(this.reason.write());
83714
+ }
83715
+ return deps_js_1.Buffer.from(b.buffer);
83716
+ }
83717
+ }
83718
+ payments.CheckCanSendGiftResultFail = CheckCanSendGiftResultFail;
82168
83719
  class GetPaymentForm extends index_js_1.TLObject {
82169
83720
  __response__;
82170
83721
  invoice;
@@ -83666,9 +85217,12 @@ var Raw;
83666
85217
  excludeUnsaved;
83667
85218
  excludeSaved;
83668
85219
  excludeUnlimited;
83669
- excludeLimited;
83670
85220
  excludeUnique;
83671
85221
  sortByValue;
85222
+ excludeUpgradable;
85223
+ excludeUnupgradable;
85224
+ peerColorAvailable;
85225
+ excludeHosted;
83672
85226
  peer;
83673
85227
  collectionId;
83674
85228
  offset;
@@ -83683,9 +85237,12 @@ var Raw;
83683
85237
  'excludeUnsaved',
83684
85238
  'excludeSaved',
83685
85239
  'excludeUnlimited',
83686
- 'excludeLimited',
83687
85240
  'excludeUnique',
83688
85241
  'sortByValue',
85242
+ 'excludeUpgradable',
85243
+ 'excludeUnupgradable',
85244
+ 'peerColorAvailable',
85245
+ 'excludeHosted',
83689
85246
  'peer',
83690
85247
  'collectionId',
83691
85248
  'offset',
@@ -83694,9 +85251,12 @@ var Raw;
83694
85251
  this.excludeUnsaved = params.excludeUnsaved;
83695
85252
  this.excludeSaved = params.excludeSaved;
83696
85253
  this.excludeUnlimited = params.excludeUnlimited;
83697
- this.excludeLimited = params.excludeLimited;
83698
85254
  this.excludeUnique = params.excludeUnique;
83699
85255
  this.sortByValue = params.sortByValue;
85256
+ this.excludeUpgradable = params.excludeUpgradable;
85257
+ this.excludeUnupgradable = params.excludeUnupgradable;
85258
+ this.peerColorAvailable = params.peerColorAvailable;
85259
+ this.excludeHosted = params.excludeHosted;
83700
85260
  this.peer = params.peer;
83701
85261
  this.collectionId = params.collectionId;
83702
85262
  this.offset = params.offset;
@@ -83707,9 +85267,12 @@ var Raw;
83707
85267
  let excludeUnsaved = flags & (1 << 0) ? true : false;
83708
85268
  let excludeSaved = flags & (1 << 1) ? true : false;
83709
85269
  let excludeUnlimited = flags & (1 << 2) ? true : false;
83710
- let excludeLimited = flags & (1 << 3) ? true : false;
83711
85270
  let excludeUnique = flags & (1 << 4) ? true : false;
83712
85271
  let sortByValue = flags & (1 << 5) ? true : false;
85272
+ let excludeUpgradable = flags & (1 << 7) ? true : false;
85273
+ let excludeUnupgradable = flags & (1 << 8) ? true : false;
85274
+ let peerColorAvailable = flags & (1 << 9) ? true : false;
85275
+ let excludeHosted = flags & (1 << 10) ? true : false;
83713
85276
  let peer = await index_js_1.TLObject.read(_data);
83714
85277
  let collectionId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83715
85278
  let offset = await index_js_1.Primitive.String.read(_data);
@@ -83718,9 +85281,12 @@ var Raw;
83718
85281
  excludeUnsaved: excludeUnsaved,
83719
85282
  excludeSaved: excludeSaved,
83720
85283
  excludeUnlimited: excludeUnlimited,
83721
- excludeLimited: excludeLimited,
83722
85284
  excludeUnique: excludeUnique,
83723
85285
  sortByValue: sortByValue,
85286
+ excludeUpgradable: excludeUpgradable,
85287
+ excludeUnupgradable: excludeUnupgradable,
85288
+ peerColorAvailable: peerColorAvailable,
85289
+ excludeHosted: excludeHosted,
83724
85290
  peer: peer,
83725
85291
  collectionId: collectionId,
83726
85292
  offset: offset,
@@ -83734,9 +85300,12 @@ var Raw;
83734
85300
  flags |= this.excludeUnsaved ? 1 << 0 : 0;
83735
85301
  flags |= this.excludeSaved ? 1 << 1 : 0;
83736
85302
  flags |= this.excludeUnlimited ? 1 << 2 : 0;
83737
- flags |= this.excludeLimited ? 1 << 3 : 0;
83738
85303
  flags |= this.excludeUnique ? 1 << 4 : 0;
83739
85304
  flags |= this.sortByValue ? 1 << 5 : 0;
85305
+ flags |= this.excludeUpgradable ? 1 << 7 : 0;
85306
+ flags |= this.excludeUnupgradable ? 1 << 8 : 0;
85307
+ flags |= this.peerColorAvailable ? 1 << 9 : 0;
85308
+ flags |= this.excludeHosted ? 1 << 10 : 0;
83740
85309
  flags |= this.collectionId !== undefined ? 1 << 6 : 0;
83741
85310
  b.write(index_js_1.Primitive.Int.write(flags));
83742
85311
  if (this.peer !== undefined) {
@@ -84232,6 +85801,58 @@ var Raw;
84232
85801
  }
84233
85802
  }
84234
85803
  payments.GetStarGiftCollections = GetStarGiftCollections;
85804
+ class GetUniqueStarGiftValueInfo extends index_js_1.TLObject {
85805
+ __response__;
85806
+ slug;
85807
+ constructor(params) {
85808
+ super();
85809
+ this.classType = 'functions';
85810
+ this.className = 'payments.GetUniqueStarGiftValueInfo';
85811
+ this.constructorId = 0x4365af6b;
85812
+ this.subclassOfId = 0x16355bc4;
85813
+ this._slots = ['slug'];
85814
+ this.slug = params.slug;
85815
+ }
85816
+ static async read(_data, ..._args) {
85817
+ let slug = await index_js_1.Primitive.String.read(_data);
85818
+ return new Raw.payments.GetUniqueStarGiftValueInfo({ slug: slug });
85819
+ }
85820
+ write() {
85821
+ const b = new deps_js_1.BytesIO();
85822
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
85823
+ if (this.slug !== undefined) {
85824
+ b.write(index_js_1.Primitive.String.write(this.slug));
85825
+ }
85826
+ return deps_js_1.Buffer.from(b.buffer);
85827
+ }
85828
+ }
85829
+ payments.GetUniqueStarGiftValueInfo = GetUniqueStarGiftValueInfo;
85830
+ class CheckCanSendGift extends index_js_1.TLObject {
85831
+ __response__;
85832
+ giftId;
85833
+ constructor(params) {
85834
+ super();
85835
+ this.classType = 'functions';
85836
+ this.className = 'payments.CheckCanSendGift';
85837
+ this.constructorId = 0xc0c4edc9;
85838
+ this.subclassOfId = 0x632efa30;
85839
+ this._slots = ['giftId'];
85840
+ this.giftId = params.giftId;
85841
+ }
85842
+ static async read(_data, ..._args) {
85843
+ let giftId = await index_js_1.Primitive.Long.read(_data);
85844
+ return new Raw.payments.CheckCanSendGift({ giftId: giftId });
85845
+ }
85846
+ write() {
85847
+ const b = new deps_js_1.BytesIO();
85848
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
85849
+ if (this.giftId !== undefined) {
85850
+ b.write(index_js_1.Primitive.Long.write(this.giftId));
85851
+ }
85852
+ return deps_js_1.Buffer.from(b.buffer);
85853
+ }
85854
+ }
85855
+ payments.CheckCanSendGift = CheckCanSendGift;
84235
85856
  })(payments = Raw.payments || (Raw.payments = {}));
84236
85857
  let phone;
84237
85858
  (function (phone) {
@@ -85104,26 +86725,30 @@ var Raw;
85104
86725
  resetInviteHash;
85105
86726
  call;
85106
86727
  joinMuted;
86728
+ messagesEnabled;
85107
86729
  constructor(params) {
85108
86730
  super();
85109
86731
  this.classType = 'functions';
85110
86732
  this.className = 'phone.ToggleGroupCallSettings';
85111
- this.constructorId = 0x74bbb43d;
86733
+ this.constructorId = 0xe9723804;
85112
86734
  this.subclassOfId = 0x8af52aac;
85113
- this._slots = ['resetInviteHash', 'call', 'joinMuted'];
86735
+ this._slots = ['resetInviteHash', 'call', 'joinMuted', 'messagesEnabled'];
85114
86736
  this.resetInviteHash = params.resetInviteHash;
85115
86737
  this.call = params.call;
85116
86738
  this.joinMuted = params.joinMuted;
86739
+ this.messagesEnabled = params.messagesEnabled;
85117
86740
  }
85118
86741
  static async read(_data, ..._args) {
85119
86742
  let flags = await index_js_1.Primitive.Int.read(_data);
85120
86743
  let resetInviteHash = flags & (1 << 1) ? true : false;
85121
86744
  let call = await index_js_1.TLObject.read(_data);
85122
86745
  let joinMuted = flags & (1 << 0) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
86746
+ let messagesEnabled = flags & (1 << 2) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
85123
86747
  return new Raw.phone.ToggleGroupCallSettings({
85124
86748
  resetInviteHash: resetInviteHash,
85125
86749
  call: call,
85126
86750
  joinMuted: joinMuted,
86751
+ messagesEnabled: messagesEnabled,
85127
86752
  });
85128
86753
  }
85129
86754
  write() {
@@ -85132,6 +86757,7 @@ var Raw;
85132
86757
  let flags = 0;
85133
86758
  flags |= this.resetInviteHash ? 1 << 1 : 0;
85134
86759
  flags |= this.joinMuted !== undefined ? 1 << 0 : 0;
86760
+ flags |= this.messagesEnabled !== undefined ? 1 << 2 : 0;
85135
86761
  b.write(index_js_1.Primitive.Int.write(flags));
85136
86762
  if (this.call !== undefined) {
85137
86763
  b.write(this.call.write());
@@ -85139,6 +86765,9 @@ var Raw;
85139
86765
  if (this.joinMuted !== undefined) {
85140
86766
  b.write(index_js_1.Primitive.Bool.write(this.joinMuted));
85141
86767
  }
86768
+ if (this.messagesEnabled !== undefined) {
86769
+ b.write(index_js_1.Primitive.Bool.write(this.messagesEnabled));
86770
+ }
85142
86771
  return deps_js_1.Buffer.from(b.buffer);
85143
86772
  }
85144
86773
  }
@@ -86022,6 +87651,83 @@ var Raw;
86022
87651
  }
86023
87652
  }
86024
87653
  phone.GetGroupCallChainBlocks = GetGroupCallChainBlocks;
87654
+ class SendGroupCallMessage extends index_js_1.TLObject {
87655
+ __response__;
87656
+ call;
87657
+ randomId;
87658
+ message;
87659
+ constructor(params) {
87660
+ super();
87661
+ this.classType = 'functions';
87662
+ this.className = 'phone.SendGroupCallMessage';
87663
+ this.constructorId = 0x87893014;
87664
+ this.subclassOfId = 0xf5b399ac;
87665
+ this._slots = ['call', 'randomId', 'message'];
87666
+ this.call = params.call;
87667
+ this.randomId = params.randomId;
87668
+ this.message = params.message;
87669
+ }
87670
+ static async read(_data, ..._args) {
87671
+ let call = await index_js_1.TLObject.read(_data);
87672
+ let randomId = await index_js_1.Primitive.Long.read(_data);
87673
+ let message = await index_js_1.TLObject.read(_data);
87674
+ return new Raw.phone.SendGroupCallMessage({
87675
+ call: call,
87676
+ randomId: randomId,
87677
+ message: message,
87678
+ });
87679
+ }
87680
+ write() {
87681
+ const b = new deps_js_1.BytesIO();
87682
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
87683
+ if (this.call !== undefined) {
87684
+ b.write(this.call.write());
87685
+ }
87686
+ if (this.randomId !== undefined) {
87687
+ b.write(index_js_1.Primitive.Long.write(this.randomId));
87688
+ }
87689
+ if (this.message !== undefined) {
87690
+ b.write(this.message.write());
87691
+ }
87692
+ return deps_js_1.Buffer.from(b.buffer);
87693
+ }
87694
+ }
87695
+ phone.SendGroupCallMessage = SendGroupCallMessage;
87696
+ class SendGroupCallEncryptedMessage extends index_js_1.TLObject {
87697
+ __response__;
87698
+ call;
87699
+ encryptedMessage;
87700
+ constructor(params) {
87701
+ super();
87702
+ this.classType = 'functions';
87703
+ this.className = 'phone.SendGroupCallEncryptedMessage';
87704
+ this.constructorId = 0xe5afa56d;
87705
+ this.subclassOfId = 0xf5b399ac;
87706
+ this._slots = ['call', 'encryptedMessage'];
87707
+ this.call = params.call;
87708
+ this.encryptedMessage = params.encryptedMessage;
87709
+ }
87710
+ static async read(_data, ..._args) {
87711
+ let call = await index_js_1.TLObject.read(_data);
87712
+ let encryptedMessage = await index_js_1.Primitive.Bytes.read(_data);
87713
+ return new Raw.phone.SendGroupCallEncryptedMessage({
87714
+ call: call,
87715
+ encryptedMessage: encryptedMessage,
87716
+ });
87717
+ }
87718
+ write() {
87719
+ const b = new deps_js_1.BytesIO();
87720
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
87721
+ if (this.call !== undefined) {
87722
+ b.write(this.call.write());
87723
+ }
87724
+ if (this.encryptedMessage !== undefined) {
87725
+ b.write(index_js_1.Primitive.Bytes.write(this.encryptedMessage));
87726
+ }
87727
+ return deps_js_1.Buffer.from(b.buffer);
87728
+ }
87729
+ }
87730
+ phone.SendGroupCallEncryptedMessage = SendGroupCallEncryptedMessage;
86025
87731
  })(phone = Raw.phone || (Raw.phone = {}));
86026
87732
  let stats;
86027
87733
  (function (stats) {
@@ -87335,6 +89041,62 @@ var Raw;
87335
89041
  }
87336
89042
  }
87337
89043
  users_1.UsersSlice = UsersSlice;
89044
+ class SavedMusicNotModified extends index_js_1.TLObject {
89045
+ count;
89046
+ constructor(params) {
89047
+ super();
89048
+ this.classType = 'types';
89049
+ this.className = 'users.SavedMusicNotModified';
89050
+ this.constructorId = 0xe3878aa4;
89051
+ this.subclassOfId = 0xf813ae37;
89052
+ this._slots = ['count'];
89053
+ this.count = params.count;
89054
+ }
89055
+ static async read(_data, ..._args) {
89056
+ let count = await index_js_1.Primitive.Int.read(_data);
89057
+ return new Raw.users.SavedMusicNotModified({ count: count });
89058
+ }
89059
+ write() {
89060
+ const b = new deps_js_1.BytesIO();
89061
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89062
+ if (this.count !== undefined) {
89063
+ b.write(index_js_1.Primitive.Int.write(this.count));
89064
+ }
89065
+ return deps_js_1.Buffer.from(b.buffer);
89066
+ }
89067
+ }
89068
+ users_1.SavedMusicNotModified = SavedMusicNotModified;
89069
+ class SavedMusic extends index_js_1.TLObject {
89070
+ count;
89071
+ documents;
89072
+ constructor(params) {
89073
+ super();
89074
+ this.classType = 'types';
89075
+ this.className = 'users.SavedMusic';
89076
+ this.constructorId = 0x34a2f297;
89077
+ this.subclassOfId = 0xf813ae37;
89078
+ this._slots = ['count', 'documents'];
89079
+ this.count = params.count;
89080
+ this.documents = params.documents;
89081
+ }
89082
+ static async read(_data, ..._args) {
89083
+ let count = await index_js_1.Primitive.Int.read(_data);
89084
+ let documents = await index_js_1.TLObject.read(_data);
89085
+ return new Raw.users.SavedMusic({ count: count, documents: documents });
89086
+ }
89087
+ write() {
89088
+ const b = new deps_js_1.BytesIO();
89089
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89090
+ if (this.count !== undefined) {
89091
+ b.write(index_js_1.Primitive.Int.write(this.count));
89092
+ }
89093
+ if (this.documents) {
89094
+ b.write(index_js_1.Primitive.Vector.write(this.documents));
89095
+ }
89096
+ return deps_js_1.Buffer.from(b.buffer);
89097
+ }
89098
+ }
89099
+ users_1.SavedMusic = SavedMusic;
87338
89100
  class GetUsers extends index_js_1.TLObject {
87339
89101
  __response__;
87340
89102
  id;
@@ -87445,6 +89207,114 @@ var Raw;
87445
89207
  }
87446
89208
  }
87447
89209
  users_1.GetRequirementsToContact = GetRequirementsToContact;
89210
+ class GetSavedMusic extends index_js_1.TLObject {
89211
+ __response__;
89212
+ id;
89213
+ offset;
89214
+ limit;
89215
+ hash;
89216
+ constructor(params) {
89217
+ super();
89218
+ this.classType = 'functions';
89219
+ this.className = 'users.GetSavedMusic';
89220
+ this.constructorId = 0x788d7fe3;
89221
+ this.subclassOfId = 0xf813ae37;
89222
+ this._slots = ['id', 'offset', 'limit', 'hash'];
89223
+ this.id = params.id;
89224
+ this.offset = params.offset;
89225
+ this.limit = params.limit;
89226
+ this.hash = params.hash;
89227
+ }
89228
+ static async read(_data, ..._args) {
89229
+ let id = await index_js_1.TLObject.read(_data);
89230
+ let offset = await index_js_1.Primitive.Int.read(_data);
89231
+ let limit = await index_js_1.Primitive.Int.read(_data);
89232
+ let hash = await index_js_1.Primitive.Long.read(_data);
89233
+ return new Raw.users.GetSavedMusic({ id: id, offset: offset, limit: limit, hash: hash });
89234
+ }
89235
+ write() {
89236
+ const b = new deps_js_1.BytesIO();
89237
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89238
+ if (this.id !== undefined) {
89239
+ b.write(this.id.write());
89240
+ }
89241
+ if (this.offset !== undefined) {
89242
+ b.write(index_js_1.Primitive.Int.write(this.offset));
89243
+ }
89244
+ if (this.limit !== undefined) {
89245
+ b.write(index_js_1.Primitive.Int.write(this.limit));
89246
+ }
89247
+ if (this.hash !== undefined) {
89248
+ b.write(index_js_1.Primitive.Long.write(this.hash));
89249
+ }
89250
+ return deps_js_1.Buffer.from(b.buffer);
89251
+ }
89252
+ }
89253
+ users_1.GetSavedMusic = GetSavedMusic;
89254
+ class GetSavedMusicByID extends index_js_1.TLObject {
89255
+ __response__;
89256
+ id;
89257
+ documents;
89258
+ constructor(params) {
89259
+ super();
89260
+ this.classType = 'functions';
89261
+ this.className = 'users.GetSavedMusicByID';
89262
+ this.constructorId = 0x7573a4e9;
89263
+ this.subclassOfId = 0xf813ae37;
89264
+ this._slots = ['id', 'documents'];
89265
+ this.id = params.id;
89266
+ this.documents = params.documents;
89267
+ }
89268
+ static async read(_data, ..._args) {
89269
+ let id = await index_js_1.TLObject.read(_data);
89270
+ let documents = await index_js_1.TLObject.read(_data);
89271
+ return new Raw.users.GetSavedMusicByID({ id: id, documents: documents });
89272
+ }
89273
+ write() {
89274
+ const b = new deps_js_1.BytesIO();
89275
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89276
+ if (this.id !== undefined) {
89277
+ b.write(this.id.write());
89278
+ }
89279
+ if (this.documents) {
89280
+ b.write(index_js_1.Primitive.Vector.write(this.documents));
89281
+ }
89282
+ return deps_js_1.Buffer.from(b.buffer);
89283
+ }
89284
+ }
89285
+ users_1.GetSavedMusicByID = GetSavedMusicByID;
89286
+ class SuggestBirthday extends index_js_1.TLObject {
89287
+ __response__;
89288
+ id;
89289
+ birthday;
89290
+ constructor(params) {
89291
+ super();
89292
+ this.classType = 'functions';
89293
+ this.className = 'users.SuggestBirthday';
89294
+ this.constructorId = 0xfc533372;
89295
+ this.subclassOfId = 0x8af52aac;
89296
+ this._slots = ['id', 'birthday'];
89297
+ this.id = params.id;
89298
+ this.birthday = params.birthday;
89299
+ }
89300
+ static async read(_data, ..._args) {
89301
+ let id = await index_js_1.TLObject.read(_data);
89302
+ let birthday = await index_js_1.TLObject.read(_data);
89303
+ return new Raw.users.SuggestBirthday({ id: id, birthday: birthday });
89304
+ }
89305
+ write() {
89306
+ const b = new deps_js_1.BytesIO();
89307
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89308
+ if (this.id !== undefined) {
89309
+ b.write(this.id.write());
89310
+ }
89311
+ if (this.birthday !== undefined) {
89312
+ b.write(this.birthday.write());
89313
+ }
89314
+ return deps_js_1.Buffer.from(b.buffer);
89315
+ }
89316
+ }
89317
+ users_1.SuggestBirthday = SuggestBirthday;
87448
89318
  })(users = Raw.users || (Raw.users = {}));
87449
89319
  let chatlists;
87450
89320
  (function (chatlists) {