@tgsnake/skema 1.2.0 → 1.4.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 = 210;
8
+ Raw.Layer = 214;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -5450,11 +5450,12 @@ var Raw;
5450
5450
  botVerification;
5451
5451
  stargiftsCount;
5452
5452
  sendPaidMessagesStars;
5453
+ mainTab;
5453
5454
  constructor(params) {
5454
5455
  super();
5455
5456
  this.classType = 'types';
5456
5457
  this.className = 'ChannelFull';
5457
- this.constructorId = 0xe07429de;
5458
+ this.constructorId = 0xe4e0b29d;
5458
5459
  this.subclassOfId = 0xd49a2697;
5459
5460
  this._slots = [
5460
5461
  'canViewParticipants',
@@ -5522,6 +5523,7 @@ var Raw;
5522
5523
  'botVerification',
5523
5524
  'stargiftsCount',
5524
5525
  'sendPaidMessagesStars',
5526
+ 'mainTab',
5525
5527
  ];
5526
5528
  this.canViewParticipants = params.canViewParticipants;
5527
5529
  this.canSetUsername = params.canSetUsername;
@@ -5588,6 +5590,7 @@ var Raw;
5588
5590
  this.botVerification = params.botVerification;
5589
5591
  this.stargiftsCount = params.stargiftsCount;
5590
5592
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
5593
+ this.mainTab = params.mainTab;
5591
5594
  }
5592
5595
  static async read(_data, ..._args) {
5593
5596
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -5657,6 +5660,7 @@ var Raw;
5657
5660
  let botVerification = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
5658
5661
  let stargiftsCount = flags2 & (1 << 18) ? await index_js_1.Primitive.Int.read(_data) : undefined;
5659
5662
  let sendPaidMessagesStars = flags2 & (1 << 21) ? await index_js_1.Primitive.Long.read(_data) : undefined;
5663
+ let mainTab = flags2 & (1 << 22) ? await index_js_1.TLObject.read(_data) : undefined;
5660
5664
  return new Raw.ChannelFull({
5661
5665
  canViewParticipants: canViewParticipants,
5662
5666
  canSetUsername: canSetUsername,
@@ -5723,6 +5727,7 @@ var Raw;
5723
5727
  botVerification: botVerification,
5724
5728
  stargiftsCount: stargiftsCount,
5725
5729
  sendPaidMessagesStars: sendPaidMessagesStars,
5730
+ mainTab: mainTab,
5726
5731
  });
5727
5732
  }
5728
5733
  write() {
@@ -5787,6 +5792,7 @@ var Raw;
5787
5792
  flags2 |= this.botVerification !== undefined ? 1 << 17 : 0;
5788
5793
  flags2 |= this.stargiftsCount !== undefined ? 1 << 18 : 0;
5789
5794
  flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 21 : 0;
5795
+ flags2 |= this.mainTab !== undefined ? 1 << 22 : 0;
5790
5796
  b.write(index_js_1.Primitive.Int.write(flags2));
5791
5797
  if (this.id !== undefined) {
5792
5798
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -5920,6 +5926,9 @@ var Raw;
5920
5926
  if (this.sendPaidMessagesStars !== undefined) {
5921
5927
  b.write(index_js_1.Primitive.Long.write(this.sendPaidMessagesStars));
5922
5928
  }
5929
+ if (this.mainTab !== undefined) {
5930
+ b.write(this.mainTab.write());
5931
+ }
5923
5932
  return deps_js_1.Buffer.from(b.buffer);
5924
5933
  }
5925
5934
  }
@@ -8575,25 +8584,25 @@ var Raw;
8575
8584
  }
8576
8585
  Raw.MessageActionGroupCallScheduled = MessageActionGroupCallScheduled;
8577
8586
  class MessageActionSetChatTheme extends index_js_1.TLObject {
8578
- emoticon;
8587
+ theme;
8579
8588
  constructor(params) {
8580
8589
  super();
8581
8590
  this.classType = 'types';
8582
8591
  this.className = 'MessageActionSetChatTheme';
8583
- this.constructorId = 0xaa786345;
8592
+ this.constructorId = 0xb91bbd3a;
8584
8593
  this.subclassOfId = 0x8680d126;
8585
- this._slots = ['emoticon'];
8586
- this.emoticon = params.emoticon;
8594
+ this._slots = ['theme'];
8595
+ this.theme = params.theme;
8587
8596
  }
8588
8597
  static async read(_data, ..._args) {
8589
- let emoticon = await index_js_1.Primitive.String.read(_data);
8590
- return new Raw.MessageActionSetChatTheme({ emoticon: emoticon });
8598
+ let theme = await index_js_1.TLObject.read(_data);
8599
+ return new Raw.MessageActionSetChatTheme({ theme: theme });
8591
8600
  }
8592
8601
  write() {
8593
8602
  const b = new deps_js_1.BytesIO();
8594
8603
  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));
8604
+ if (this.theme !== undefined) {
8605
+ b.write(this.theme.write());
8597
8606
  }
8598
8607
  return deps_js_1.Buffer.from(b.buffer);
8599
8608
  }
@@ -9368,6 +9377,8 @@ var Raw;
9368
9377
  upgraded;
9369
9378
  refunded;
9370
9379
  canUpgrade;
9380
+ prepaidUpgrade;
9381
+ upgradeSeparate;
9371
9382
  gift;
9372
9383
  message;
9373
9384
  convertStars;
@@ -9376,11 +9387,13 @@ var Raw;
9376
9387
  fromId;
9377
9388
  peer;
9378
9389
  savedId;
9390
+ prepaidUpgradeHash;
9391
+ giftMsgId;
9379
9392
  constructor(params) {
9380
9393
  super();
9381
9394
  this.classType = 'types';
9382
9395
  this.className = 'MessageActionStarGift';
9383
- this.constructorId = 0x4717e8a4;
9396
+ this.constructorId = 0xf24de7fa;
9384
9397
  this.subclassOfId = 0x8680d126;
9385
9398
  this._slots = [
9386
9399
  'nameHidden',
@@ -9389,6 +9402,8 @@ var Raw;
9389
9402
  'upgraded',
9390
9403
  'refunded',
9391
9404
  'canUpgrade',
9405
+ 'prepaidUpgrade',
9406
+ 'upgradeSeparate',
9392
9407
  'gift',
9393
9408
  'message',
9394
9409
  'convertStars',
@@ -9397,6 +9412,8 @@ var Raw;
9397
9412
  'fromId',
9398
9413
  'peer',
9399
9414
  'savedId',
9415
+ 'prepaidUpgradeHash',
9416
+ 'giftMsgId',
9400
9417
  ];
9401
9418
  this.nameHidden = params.nameHidden;
9402
9419
  this.saved = params.saved;
@@ -9404,6 +9421,8 @@ var Raw;
9404
9421
  this.upgraded = params.upgraded;
9405
9422
  this.refunded = params.refunded;
9406
9423
  this.canUpgrade = params.canUpgrade;
9424
+ this.prepaidUpgrade = params.prepaidUpgrade;
9425
+ this.upgradeSeparate = params.upgradeSeparate;
9407
9426
  this.gift = params.gift;
9408
9427
  this.message = params.message;
9409
9428
  this.convertStars = params.convertStars;
@@ -9412,6 +9431,8 @@ var Raw;
9412
9431
  this.fromId = params.fromId;
9413
9432
  this.peer = params.peer;
9414
9433
  this.savedId = params.savedId;
9434
+ this.prepaidUpgradeHash = params.prepaidUpgradeHash;
9435
+ this.giftMsgId = params.giftMsgId;
9415
9436
  }
9416
9437
  static async read(_data, ..._args) {
9417
9438
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -9421,6 +9442,8 @@ var Raw;
9421
9442
  let upgraded = flags & (1 << 5) ? true : false;
9422
9443
  let refunded = flags & (1 << 9) ? true : false;
9423
9444
  let canUpgrade = flags & (1 << 10) ? true : false;
9445
+ let prepaidUpgrade = flags & (1 << 13) ? true : false;
9446
+ let upgradeSeparate = flags & (1 << 16) ? true : false;
9424
9447
  let gift = await index_js_1.TLObject.read(_data);
9425
9448
  let message = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
9426
9449
  let convertStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
@@ -9429,6 +9452,8 @@ var Raw;
9429
9452
  let fromId = flags & (1 << 11) ? await index_js_1.TLObject.read(_data) : undefined;
9430
9453
  let peer = flags & (1 << 12) ? await index_js_1.TLObject.read(_data) : undefined;
9431
9454
  let savedId = flags & (1 << 12) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9455
+ let prepaidUpgradeHash = flags & (1 << 14) ? await index_js_1.Primitive.String.read(_data) : undefined;
9456
+ let giftMsgId = flags & (1 << 15) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9432
9457
  return new Raw.MessageActionStarGift({
9433
9458
  nameHidden: nameHidden,
9434
9459
  saved: saved,
@@ -9436,6 +9461,8 @@ var Raw;
9436
9461
  upgraded: upgraded,
9437
9462
  refunded: refunded,
9438
9463
  canUpgrade: canUpgrade,
9464
+ prepaidUpgrade: prepaidUpgrade,
9465
+ upgradeSeparate: upgradeSeparate,
9439
9466
  gift: gift,
9440
9467
  message: message,
9441
9468
  convertStars: convertStars,
@@ -9444,6 +9471,8 @@ var Raw;
9444
9471
  fromId: fromId,
9445
9472
  peer: peer,
9446
9473
  savedId: savedId,
9474
+ prepaidUpgradeHash: prepaidUpgradeHash,
9475
+ giftMsgId: giftMsgId,
9447
9476
  });
9448
9477
  }
9449
9478
  write() {
@@ -9456,6 +9485,8 @@ var Raw;
9456
9485
  flags |= this.upgraded ? 1 << 5 : 0;
9457
9486
  flags |= this.refunded ? 1 << 9 : 0;
9458
9487
  flags |= this.canUpgrade ? 1 << 10 : 0;
9488
+ flags |= this.prepaidUpgrade ? 1 << 13 : 0;
9489
+ flags |= this.upgradeSeparate ? 1 << 16 : 0;
9459
9490
  flags |= this.message !== undefined ? 1 << 1 : 0;
9460
9491
  flags |= this.convertStars !== undefined ? 1 << 4 : 0;
9461
9492
  flags |= this.upgradeMsgId !== undefined ? 1 << 5 : 0;
@@ -9463,6 +9494,8 @@ var Raw;
9463
9494
  flags |= this.fromId !== undefined ? 1 << 11 : 0;
9464
9495
  flags |= this.peer !== undefined ? 1 << 12 : 0;
9465
9496
  flags |= this.savedId !== undefined ? 1 << 12 : 0;
9497
+ flags |= this.prepaidUpgradeHash !== undefined ? 1 << 14 : 0;
9498
+ flags |= this.giftMsgId !== undefined ? 1 << 15 : 0;
9466
9499
  b.write(index_js_1.Primitive.Int.write(flags));
9467
9500
  if (this.gift !== undefined) {
9468
9501
  b.write(this.gift.write());
@@ -9488,6 +9521,12 @@ var Raw;
9488
9521
  if (this.savedId !== undefined) {
9489
9522
  b.write(index_js_1.Primitive.Long.write(this.savedId));
9490
9523
  }
9524
+ if (this.prepaidUpgradeHash !== undefined) {
9525
+ b.write(index_js_1.Primitive.String.write(this.prepaidUpgradeHash));
9526
+ }
9527
+ if (this.giftMsgId !== undefined) {
9528
+ b.write(index_js_1.Primitive.Int.write(this.giftMsgId));
9529
+ }
9491
9530
  return deps_js_1.Buffer.from(b.buffer);
9492
9531
  }
9493
9532
  }
@@ -9497,33 +9536,35 @@ var Raw;
9497
9536
  transferred;
9498
9537
  saved;
9499
9538
  refunded;
9539
+ prepaidUpgrade;
9500
9540
  gift;
9501
9541
  canExportAt;
9502
9542
  transferStars;
9503
9543
  fromId;
9504
9544
  peer;
9505
9545
  savedId;
9506
- resaleStars;
9546
+ resaleAmount;
9507
9547
  canTransferAt;
9508
9548
  canResellAt;
9509
9549
  constructor(params) {
9510
9550
  super();
9511
9551
  this.classType = 'types';
9512
9552
  this.className = 'MessageActionStarGiftUnique';
9513
- this.constructorId = 0x2e3ae60e;
9553
+ this.constructorId = 0x34f762f3;
9514
9554
  this.subclassOfId = 0x8680d126;
9515
9555
  this._slots = [
9516
9556
  'upgrade',
9517
9557
  'transferred',
9518
9558
  'saved',
9519
9559
  'refunded',
9560
+ 'prepaidUpgrade',
9520
9561
  'gift',
9521
9562
  'canExportAt',
9522
9563
  'transferStars',
9523
9564
  'fromId',
9524
9565
  'peer',
9525
9566
  'savedId',
9526
- 'resaleStars',
9567
+ 'resaleAmount',
9527
9568
  'canTransferAt',
9528
9569
  'canResellAt',
9529
9570
  ];
@@ -9531,13 +9572,14 @@ var Raw;
9531
9572
  this.transferred = params.transferred;
9532
9573
  this.saved = params.saved;
9533
9574
  this.refunded = params.refunded;
9575
+ this.prepaidUpgrade = params.prepaidUpgrade;
9534
9576
  this.gift = params.gift;
9535
9577
  this.canExportAt = params.canExportAt;
9536
9578
  this.transferStars = params.transferStars;
9537
9579
  this.fromId = params.fromId;
9538
9580
  this.peer = params.peer;
9539
9581
  this.savedId = params.savedId;
9540
- this.resaleStars = params.resaleStars;
9582
+ this.resaleAmount = params.resaleAmount;
9541
9583
  this.canTransferAt = params.canTransferAt;
9542
9584
  this.canResellAt = params.canResellAt;
9543
9585
  }
@@ -9547,13 +9589,14 @@ var Raw;
9547
9589
  let transferred = flags & (1 << 1) ? true : false;
9548
9590
  let saved = flags & (1 << 2) ? true : false;
9549
9591
  let refunded = flags & (1 << 5) ? true : false;
9592
+ let prepaidUpgrade = flags & (1 << 11) ? true : false;
9550
9593
  let gift = await index_js_1.TLObject.read(_data);
9551
9594
  let canExportAt = flags & (1 << 3) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9552
9595
  let transferStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9553
9596
  let fromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
9554
9597
  let peer = flags & (1 << 7) ? await index_js_1.TLObject.read(_data) : undefined;
9555
9598
  let savedId = flags & (1 << 7) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9556
- let resaleStars = flags & (1 << 8) ? await index_js_1.Primitive.Long.read(_data) : undefined;
9599
+ let resaleAmount = flags & (1 << 8) ? await index_js_1.TLObject.read(_data) : undefined;
9557
9600
  let canTransferAt = flags & (1 << 9) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9558
9601
  let canResellAt = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9559
9602
  return new Raw.MessageActionStarGiftUnique({
@@ -9561,13 +9604,14 @@ var Raw;
9561
9604
  transferred: transferred,
9562
9605
  saved: saved,
9563
9606
  refunded: refunded,
9607
+ prepaidUpgrade: prepaidUpgrade,
9564
9608
  gift: gift,
9565
9609
  canExportAt: canExportAt,
9566
9610
  transferStars: transferStars,
9567
9611
  fromId: fromId,
9568
9612
  peer: peer,
9569
9613
  savedId: savedId,
9570
- resaleStars: resaleStars,
9614
+ resaleAmount: resaleAmount,
9571
9615
  canTransferAt: canTransferAt,
9572
9616
  canResellAt: canResellAt,
9573
9617
  });
@@ -9580,12 +9624,13 @@ var Raw;
9580
9624
  flags |= this.transferred ? 1 << 1 : 0;
9581
9625
  flags |= this.saved ? 1 << 2 : 0;
9582
9626
  flags |= this.refunded ? 1 << 5 : 0;
9627
+ flags |= this.prepaidUpgrade ? 1 << 11 : 0;
9583
9628
  flags |= this.canExportAt !== undefined ? 1 << 3 : 0;
9584
9629
  flags |= this.transferStars !== undefined ? 1 << 4 : 0;
9585
9630
  flags |= this.fromId !== undefined ? 1 << 6 : 0;
9586
9631
  flags |= this.peer !== undefined ? 1 << 7 : 0;
9587
9632
  flags |= this.savedId !== undefined ? 1 << 7 : 0;
9588
- flags |= this.resaleStars !== undefined ? 1 << 8 : 0;
9633
+ flags |= this.resaleAmount !== undefined ? 1 << 8 : 0;
9589
9634
  flags |= this.canTransferAt !== undefined ? 1 << 9 : 0;
9590
9635
  flags |= this.canResellAt !== undefined ? 1 << 10 : 0;
9591
9636
  b.write(index_js_1.Primitive.Int.write(flags));
@@ -9607,8 +9652,8 @@ var Raw;
9607
9652
  if (this.savedId !== undefined) {
9608
9653
  b.write(index_js_1.Primitive.Long.write(this.savedId));
9609
9654
  }
9610
- if (this.resaleStars !== undefined) {
9611
- b.write(index_js_1.Primitive.Long.write(this.resaleStars));
9655
+ if (this.resaleAmount !== undefined) {
9656
+ b.write(this.resaleAmount.write());
9612
9657
  }
9613
9658
  if (this.canTransferAt !== undefined) {
9614
9659
  b.write(index_js_1.Primitive.Int.write(this.canTransferAt));
@@ -11455,7 +11500,7 @@ var Raw;
11455
11500
  commonChatsCount;
11456
11501
  folderId;
11457
11502
  ttlPeriod;
11458
- themeEmoticon;
11503
+ theme;
11459
11504
  privateForwardName;
11460
11505
  botGroupAdminRights;
11461
11506
  botBroadcastAdminRights;
@@ -11475,11 +11520,15 @@ var Raw;
11475
11520
  sendPaidMessagesStars;
11476
11521
  disallowedGifts;
11477
11522
  starsRating;
11523
+ starsMyPendingRating;
11524
+ starsMyPendingRatingDate;
11525
+ mainTab;
11526
+ savedMusic;
11478
11527
  constructor(params) {
11479
11528
  super();
11480
11529
  this.classType = 'types';
11481
11530
  this.className = 'UserFull';
11482
- this.constructorId = 0x29de80be;
11531
+ this.constructorId = 0xc577b5ad;
11483
11532
  this.subclassOfId = 0x1f4661b9;
11484
11533
  this._slots = [
11485
11534
  'blocked',
@@ -11511,7 +11560,7 @@ var Raw;
11511
11560
  'commonChatsCount',
11512
11561
  'folderId',
11513
11562
  'ttlPeriod',
11514
- 'themeEmoticon',
11563
+ 'theme',
11515
11564
  'privateForwardName',
11516
11565
  'botGroupAdminRights',
11517
11566
  'botBroadcastAdminRights',
@@ -11531,6 +11580,10 @@ var Raw;
11531
11580
  'sendPaidMessagesStars',
11532
11581
  'disallowedGifts',
11533
11582
  'starsRating',
11583
+ 'starsMyPendingRating',
11584
+ 'starsMyPendingRatingDate',
11585
+ 'mainTab',
11586
+ 'savedMusic',
11534
11587
  ];
11535
11588
  this.blocked = params.blocked;
11536
11589
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -11561,7 +11614,7 @@ var Raw;
11561
11614
  this.commonChatsCount = params.commonChatsCount;
11562
11615
  this.folderId = params.folderId;
11563
11616
  this.ttlPeriod = params.ttlPeriod;
11564
- this.themeEmoticon = params.themeEmoticon;
11617
+ this.theme = params.theme;
11565
11618
  this.privateForwardName = params.privateForwardName;
11566
11619
  this.botGroupAdminRights = params.botGroupAdminRights;
11567
11620
  this.botBroadcastAdminRights = params.botBroadcastAdminRights;
@@ -11581,6 +11634,10 @@ var Raw;
11581
11634
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
11582
11635
  this.disallowedGifts = params.disallowedGifts;
11583
11636
  this.starsRating = params.starsRating;
11637
+ this.starsMyPendingRating = params.starsMyPendingRating;
11638
+ this.starsMyPendingRatingDate = params.starsMyPendingRatingDate;
11639
+ this.mainTab = params.mainTab;
11640
+ this.savedMusic = params.savedMusic;
11584
11641
  }
11585
11642
  static async read(_data, ..._args) {
11586
11643
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -11614,7 +11671,7 @@ var Raw;
11614
11671
  let commonChatsCount = await index_js_1.Primitive.Int.read(_data);
11615
11672
  let folderId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11616
11673
  let ttlPeriod = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11617
- let themeEmoticon = flags & (1 << 15) ? await index_js_1.Primitive.String.read(_data) : undefined;
11674
+ let theme = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11618
11675
  let privateForwardName = flags & (1 << 16) ? await index_js_1.Primitive.String.read(_data) : undefined;
11619
11676
  let botGroupAdminRights = flags & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11620
11677
  let botBroadcastAdminRights = flags & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -11634,6 +11691,10 @@ var Raw;
11634
11691
  let sendPaidMessagesStars = flags2 & (1 << 14) ? await index_js_1.Primitive.Long.read(_data) : undefined;
11635
11692
  let disallowedGifts = flags2 & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11636
11693
  let starsRating = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11694
+ let starsMyPendingRating = flags2 & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
11695
+ let starsMyPendingRatingDate = flags2 & (1 << 18) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11696
+ let mainTab = flags2 & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
11697
+ let savedMusic = flags2 & (1 << 21) ? await index_js_1.TLObject.read(_data) : undefined;
11637
11698
  return new Raw.UserFull({
11638
11699
  blocked: blocked,
11639
11700
  phoneCallsAvailable: phoneCallsAvailable,
@@ -11664,7 +11725,7 @@ var Raw;
11664
11725
  commonChatsCount: commonChatsCount,
11665
11726
  folderId: folderId,
11666
11727
  ttlPeriod: ttlPeriod,
11667
- themeEmoticon: themeEmoticon,
11728
+ theme: theme,
11668
11729
  privateForwardName: privateForwardName,
11669
11730
  botGroupAdminRights: botGroupAdminRights,
11670
11731
  botBroadcastAdminRights: botBroadcastAdminRights,
@@ -11684,6 +11745,10 @@ var Raw;
11684
11745
  sendPaidMessagesStars: sendPaidMessagesStars,
11685
11746
  disallowedGifts: disallowedGifts,
11686
11747
  starsRating: starsRating,
11748
+ starsMyPendingRating: starsMyPendingRating,
11749
+ starsMyPendingRatingDate: starsMyPendingRatingDate,
11750
+ mainTab: mainTab,
11751
+ savedMusic: savedMusic,
11687
11752
  });
11688
11753
  }
11689
11754
  write() {
@@ -11711,7 +11776,7 @@ var Raw;
11711
11776
  flags |= this.pinnedMsgId !== undefined ? 1 << 6 : 0;
11712
11777
  flags |= this.folderId !== undefined ? 1 << 11 : 0;
11713
11778
  flags |= this.ttlPeriod !== undefined ? 1 << 14 : 0;
11714
- flags |= this.themeEmoticon !== undefined ? 1 << 15 : 0;
11779
+ flags |= this.theme !== undefined ? 1 << 15 : 0;
11715
11780
  flags |= this.privateForwardName !== undefined ? 1 << 16 : 0;
11716
11781
  flags |= this.botGroupAdminRights !== undefined ? 1 << 17 : 0;
11717
11782
  flags |= this.botBroadcastAdminRights !== undefined ? 1 << 18 : 0;
@@ -11737,6 +11802,10 @@ var Raw;
11737
11802
  flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 14 : 0;
11738
11803
  flags2 |= this.disallowedGifts !== undefined ? 1 << 15 : 0;
11739
11804
  flags2 |= this.starsRating !== undefined ? 1 << 17 : 0;
11805
+ flags2 |= this.starsMyPendingRating !== undefined ? 1 << 18 : 0;
11806
+ flags2 |= this.starsMyPendingRatingDate !== undefined ? 1 << 18 : 0;
11807
+ flags2 |= this.mainTab !== undefined ? 1 << 20 : 0;
11808
+ flags2 |= this.savedMusic !== undefined ? 1 << 21 : 0;
11740
11809
  b.write(index_js_1.Primitive.Int.write(flags2));
11741
11810
  if (this.id !== undefined) {
11742
11811
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -11774,8 +11843,8 @@ var Raw;
11774
11843
  if (this.ttlPeriod !== undefined) {
11775
11844
  b.write(index_js_1.Primitive.Int.write(this.ttlPeriod));
11776
11845
  }
11777
- if (this.themeEmoticon !== undefined) {
11778
- b.write(index_js_1.Primitive.String.write(this.themeEmoticon));
11846
+ if (this.theme !== undefined) {
11847
+ b.write(this.theme.write());
11779
11848
  }
11780
11849
  if (this.privateForwardName !== undefined) {
11781
11850
  b.write(index_js_1.Primitive.String.write(this.privateForwardName));
@@ -11834,6 +11903,18 @@ var Raw;
11834
11903
  if (this.starsRating !== undefined) {
11835
11904
  b.write(this.starsRating.write());
11836
11905
  }
11906
+ if (this.starsMyPendingRating !== undefined) {
11907
+ b.write(this.starsMyPendingRating.write());
11908
+ }
11909
+ if (this.starsMyPendingRatingDate !== undefined) {
11910
+ b.write(index_js_1.Primitive.Int.write(this.starsMyPendingRatingDate));
11911
+ }
11912
+ if (this.mainTab !== undefined) {
11913
+ b.write(this.mainTab.write());
11914
+ }
11915
+ if (this.savedMusic !== undefined) {
11916
+ b.write(this.savedMusic.write());
11917
+ }
11837
11918
  return deps_js_1.Buffer.from(b.buffer);
11838
11919
  }
11839
11920
  }
@@ -37461,6 +37542,31 @@ var Raw;
37461
37542
  }
37462
37543
  }
37463
37544
  Raw.WebPageAttributeUniqueStarGift = WebPageAttributeUniqueStarGift;
37545
+ class WebPageAttributeStarGiftCollection extends index_js_1.TLObject {
37546
+ icons;
37547
+ constructor(params) {
37548
+ super();
37549
+ this.classType = 'types';
37550
+ this.className = 'WebPageAttributeStarGiftCollection';
37551
+ this.constructorId = 0x31cad303;
37552
+ this.subclassOfId = 0xafcfe9c7;
37553
+ this._slots = ['icons'];
37554
+ this.icons = params.icons;
37555
+ }
37556
+ static async read(_data, ..._args) {
37557
+ let icons = await index_js_1.TLObject.read(_data);
37558
+ return new Raw.WebPageAttributeStarGiftCollection({ icons: icons });
37559
+ }
37560
+ write() {
37561
+ const b = new deps_js_1.BytesIO();
37562
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
37563
+ if (this.icons) {
37564
+ b.write(index_js_1.Primitive.Vector.write(this.icons));
37565
+ }
37566
+ return deps_js_1.Buffer.from(b.buffer);
37567
+ }
37568
+ }
37569
+ Raw.WebPageAttributeStarGiftCollection = WebPageAttributeStarGiftCollection;
37464
37570
  class BankCardOpenUrl extends index_js_1.TLObject {
37465
37571
  url;
37466
37572
  name;
@@ -39492,6 +39598,62 @@ var Raw;
39492
39598
  }
39493
39599
  }
39494
39600
  Raw.BotCommandScopePeerUser = BotCommandScopePeerUser;
39601
+ class ChatTheme extends index_js_1.TLObject {
39602
+ emoticon;
39603
+ constructor(params) {
39604
+ super();
39605
+ this.classType = 'types';
39606
+ this.className = 'ChatTheme';
39607
+ this.constructorId = 0xc3dffc04;
39608
+ this.subclassOfId = 0x2ffca7f5;
39609
+ this._slots = ['emoticon'];
39610
+ this.emoticon = params.emoticon;
39611
+ }
39612
+ static async read(_data, ..._args) {
39613
+ let emoticon = await index_js_1.Primitive.String.read(_data);
39614
+ return new Raw.ChatTheme({ emoticon: emoticon });
39615
+ }
39616
+ write() {
39617
+ const b = new deps_js_1.BytesIO();
39618
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
39619
+ if (this.emoticon !== undefined) {
39620
+ b.write(index_js_1.Primitive.String.write(this.emoticon));
39621
+ }
39622
+ return deps_js_1.Buffer.from(b.buffer);
39623
+ }
39624
+ }
39625
+ Raw.ChatTheme = ChatTheme;
39626
+ class ChatThemeUniqueGift extends index_js_1.TLObject {
39627
+ gift;
39628
+ themeSettings;
39629
+ constructor(params) {
39630
+ super();
39631
+ this.classType = 'types';
39632
+ this.className = 'ChatThemeUniqueGift';
39633
+ this.constructorId = 0x3458f9c8;
39634
+ this.subclassOfId = 0x2ffca7f5;
39635
+ this._slots = ['gift', 'themeSettings'];
39636
+ this.gift = params.gift;
39637
+ this.themeSettings = params.themeSettings;
39638
+ }
39639
+ static async read(_data, ..._args) {
39640
+ let gift = await index_js_1.TLObject.read(_data);
39641
+ let themeSettings = await index_js_1.TLObject.read(_data);
39642
+ return new Raw.ChatThemeUniqueGift({ gift: gift, themeSettings: themeSettings });
39643
+ }
39644
+ write() {
39645
+ const b = new deps_js_1.BytesIO();
39646
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
39647
+ if (this.gift !== undefined) {
39648
+ b.write(this.gift.write());
39649
+ }
39650
+ if (this.themeSettings) {
39651
+ b.write(index_js_1.Primitive.Vector.write(this.themeSettings));
39652
+ }
39653
+ return deps_js_1.Buffer.from(b.buffer);
39654
+ }
39655
+ }
39656
+ Raw.ChatThemeUniqueGift = ChatThemeUniqueGift;
39495
39657
  class SponsoredMessage extends index_js_1.TLObject {
39496
39658
  recommended;
39497
39659
  canReport;
@@ -40966,26 +41128,33 @@ var Raw;
40966
41128
  }
40967
41129
  Raw.InputInvoiceBusinessBotTransferStars = InputInvoiceBusinessBotTransferStars;
40968
41130
  class InputInvoiceStarGiftResale extends index_js_1.TLObject {
41131
+ ton;
40969
41132
  slug;
40970
41133
  toId;
40971
41134
  constructor(params) {
40972
41135
  super();
40973
41136
  this.classType = 'types';
40974
41137
  this.className = 'InputInvoiceStarGiftResale';
40975
- this.constructorId = 0x63cbc38c;
41138
+ this.constructorId = 0xc39f5324;
40976
41139
  this.subclassOfId = 0x726e9bfe;
40977
- this._slots = ['slug', 'toId'];
41140
+ this._slots = ['ton', 'slug', 'toId'];
41141
+ this.ton = params.ton;
40978
41142
  this.slug = params.slug;
40979
41143
  this.toId = params.toId;
40980
41144
  }
40981
41145
  static async read(_data, ..._args) {
41146
+ let flags = await index_js_1.Primitive.Int.read(_data);
41147
+ let ton = flags & (1 << 0) ? true : false;
40982
41148
  let slug = await index_js_1.Primitive.String.read(_data);
40983
41149
  let toId = await index_js_1.TLObject.read(_data);
40984
- return new Raw.InputInvoiceStarGiftResale({ slug: slug, toId: toId });
41150
+ return new Raw.InputInvoiceStarGiftResale({ ton: ton, slug: slug, toId: toId });
40985
41151
  }
40986
41152
  write() {
40987
41153
  const b = new deps_js_1.BytesIO();
40988
41154
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41155
+ let flags = 0;
41156
+ flags |= this.ton ? 1 << 0 : 0;
41157
+ b.write(index_js_1.Primitive.Int.write(flags));
40989
41158
  if (this.slug !== undefined) {
40990
41159
  b.write(index_js_1.Primitive.String.write(this.slug));
40991
41160
  }
@@ -40996,6 +41165,37 @@ var Raw;
40996
41165
  }
40997
41166
  }
40998
41167
  Raw.InputInvoiceStarGiftResale = InputInvoiceStarGiftResale;
41168
+ class InputInvoiceStarGiftPrepaidUpgrade extends index_js_1.TLObject {
41169
+ peer;
41170
+ hash;
41171
+ constructor(params) {
41172
+ super();
41173
+ this.classType = 'types';
41174
+ this.className = 'InputInvoiceStarGiftPrepaidUpgrade';
41175
+ this.constructorId = 0x9a0b48b8;
41176
+ this.subclassOfId = 0x726e9bfe;
41177
+ this._slots = ['peer', 'hash'];
41178
+ this.peer = params.peer;
41179
+ this.hash = params.hash;
41180
+ }
41181
+ static async read(_data, ..._args) {
41182
+ let peer = await index_js_1.TLObject.read(_data);
41183
+ let hash = await index_js_1.Primitive.String.read(_data);
41184
+ return new Raw.InputInvoiceStarGiftPrepaidUpgrade({ peer: peer, hash: hash });
41185
+ }
41186
+ write() {
41187
+ const b = new deps_js_1.BytesIO();
41188
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41189
+ if (this.peer !== undefined) {
41190
+ b.write(this.peer.write());
41191
+ }
41192
+ if (this.hash !== undefined) {
41193
+ b.write(index_js_1.Primitive.String.write(this.hash));
41194
+ }
41195
+ return deps_js_1.Buffer.from(b.buffer);
41196
+ }
41197
+ }
41198
+ Raw.InputInvoiceStarGiftPrepaidUpgrade = InputInvoiceStarGiftPrepaidUpgrade;
40999
41199
  class InputStorePaymentPremiumSubscription extends index_js_1.TLObject {
41000
41200
  restore;
41001
41201
  upgrade;
@@ -41234,30 +41434,38 @@ var Raw;
41234
41434
  stars;
41235
41435
  currency;
41236
41436
  amount;
41437
+ spendPurposePeer;
41237
41438
  constructor(params) {
41238
41439
  super();
41239
41440
  this.classType = 'types';
41240
41441
  this.className = 'InputStorePaymentStarsTopup';
41241
- this.constructorId = 0xdddd0f56;
41442
+ this.constructorId = 0xf9a2a6cb;
41242
41443
  this.subclassOfId = 0xe7a4174d;
41243
- this._slots = ['stars', 'currency', 'amount'];
41444
+ this._slots = ['stars', 'currency', 'amount', 'spendPurposePeer'];
41244
41445
  this.stars = params.stars;
41245
41446
  this.currency = params.currency;
41246
41447
  this.amount = params.amount;
41448
+ this.spendPurposePeer = params.spendPurposePeer;
41247
41449
  }
41248
41450
  static async read(_data, ..._args) {
41451
+ let flags = await index_js_1.Primitive.Int.read(_data);
41249
41452
  let stars = await index_js_1.Primitive.Long.read(_data);
41250
41453
  let currency = await index_js_1.Primitive.String.read(_data);
41251
41454
  let amount = await index_js_1.Primitive.Long.read(_data);
41455
+ let spendPurposePeer = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
41252
41456
  return new Raw.InputStorePaymentStarsTopup({
41253
41457
  stars: stars,
41254
41458
  currency: currency,
41255
41459
  amount: amount,
41460
+ spendPurposePeer: spendPurposePeer,
41256
41461
  });
41257
41462
  }
41258
41463
  write() {
41259
41464
  const b = new deps_js_1.BytesIO();
41260
41465
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41466
+ let flags = 0;
41467
+ flags |= this.spendPurposePeer !== undefined ? 1 << 0 : 0;
41468
+ b.write(index_js_1.Primitive.Int.write(flags));
41261
41469
  if (this.stars !== undefined) {
41262
41470
  b.write(index_js_1.Primitive.Long.write(this.stars));
41263
41471
  }
@@ -41267,6 +41475,9 @@ var Raw;
41267
41475
  if (this.amount !== undefined) {
41268
41476
  b.write(index_js_1.Primitive.Long.write(this.amount));
41269
41477
  }
41478
+ if (this.spendPurposePeer !== undefined) {
41479
+ b.write(this.spendPurposePeer.write());
41480
+ }
41270
41481
  return deps_js_1.Buffer.from(b.buffer);
41271
41482
  }
41272
41483
  }
@@ -43532,11 +43743,12 @@ var Raw;
43532
43743
  privacy;
43533
43744
  views;
43534
43745
  sentReaction;
43746
+ albums;
43535
43747
  constructor(params) {
43536
43748
  super();
43537
43749
  this.classType = 'types';
43538
43750
  this.className = 'StoryItem';
43539
- this.constructorId = 0x79b26a24;
43751
+ this.constructorId = 0xedf164f1;
43540
43752
  this.subclassOfId = 0xd477b133;
43541
43753
  this._slots = [
43542
43754
  'pinned',
@@ -43560,6 +43772,7 @@ var Raw;
43560
43772
  'privacy',
43561
43773
  'views',
43562
43774
  'sentReaction',
43775
+ 'albums',
43563
43776
  ];
43564
43777
  this.pinned = params.pinned;
43565
43778
  this.public = params.public;
@@ -43582,6 +43795,7 @@ var Raw;
43582
43795
  this.privacy = params.privacy;
43583
43796
  this.views = params.views;
43584
43797
  this.sentReaction = params.sentReaction;
43798
+ this.albums = params.albums;
43585
43799
  }
43586
43800
  static async read(_data, ..._args) {
43587
43801
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -43606,6 +43820,7 @@ var Raw;
43606
43820
  let privacy = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
43607
43821
  let views = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
43608
43822
  let sentReaction = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
43823
+ let albums = flags & (1 << 19) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
43609
43824
  return new Raw.StoryItem({
43610
43825
  pinned: pinned,
43611
43826
  public: _public,
@@ -43628,6 +43843,7 @@ var Raw;
43628
43843
  privacy: privacy,
43629
43844
  views: views,
43630
43845
  sentReaction: sentReaction,
43846
+ albums: albums,
43631
43847
  });
43632
43848
  }
43633
43849
  write() {
@@ -43651,6 +43867,7 @@ var Raw;
43651
43867
  flags |= this.privacy ? 1 << 2 : 0;
43652
43868
  flags |= this.views !== undefined ? 1 << 3 : 0;
43653
43869
  flags |= this.sentReaction !== undefined ? 1 << 15 : 0;
43870
+ flags |= this.albums ? 1 << 19 : 0;
43654
43871
  b.write(index_js_1.Primitive.Int.write(flags));
43655
43872
  if (this.id !== undefined) {
43656
43873
  b.write(index_js_1.Primitive.Int.write(this.id));
@@ -43688,6 +43905,9 @@ var Raw;
43688
43905
  if (this.sentReaction !== undefined) {
43689
43906
  b.write(this.sentReaction.write());
43690
43907
  }
43908
+ if (this.albums) {
43909
+ b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
43910
+ }
43691
43911
  return deps_js_1.Buffer.from(b.buffer);
43692
43912
  }
43693
43913
  }
@@ -47287,6 +47507,8 @@ var Raw;
47287
47507
  stargiftUpgrade;
47288
47508
  businessTransfer;
47289
47509
  stargiftResale;
47510
+ postsSearch;
47511
+ stargiftPrepaidUpgrade;
47290
47512
  id;
47291
47513
  amount;
47292
47514
  date;
@@ -47325,6 +47547,8 @@ var Raw;
47325
47547
  'stargiftUpgrade',
47326
47548
  'businessTransfer',
47327
47549
  'stargiftResale',
47550
+ 'postsSearch',
47551
+ 'stargiftPrepaidUpgrade',
47328
47552
  'id',
47329
47553
  'amount',
47330
47554
  'date',
@@ -47357,6 +47581,8 @@ var Raw;
47357
47581
  this.stargiftUpgrade = params.stargiftUpgrade;
47358
47582
  this.businessTransfer = params.businessTransfer;
47359
47583
  this.stargiftResale = params.stargiftResale;
47584
+ this.postsSearch = params.postsSearch;
47585
+ this.stargiftPrepaidUpgrade = params.stargiftPrepaidUpgrade;
47360
47586
  this.id = params.id;
47361
47587
  this.amount = params.amount;
47362
47588
  this.date = params.date;
@@ -47391,6 +47617,8 @@ var Raw;
47391
47617
  let stargiftUpgrade = flags & (1 << 18) ? true : false;
47392
47618
  let businessTransfer = flags & (1 << 21) ? true : false;
47393
47619
  let stargiftResale = flags & (1 << 22) ? true : false;
47620
+ let postsSearch = flags & (1 << 24) ? true : false;
47621
+ let stargiftPrepaidUpgrade = flags & (1 << 25) ? true : false;
47394
47622
  let id = await index_js_1.Primitive.String.read(_data);
47395
47623
  let amount = await index_js_1.TLObject.read(_data);
47396
47624
  let date = await index_js_1.Primitive.Int.read(_data);
@@ -47423,6 +47651,8 @@ var Raw;
47423
47651
  stargiftUpgrade: stargiftUpgrade,
47424
47652
  businessTransfer: businessTransfer,
47425
47653
  stargiftResale: stargiftResale,
47654
+ postsSearch: postsSearch,
47655
+ stargiftPrepaidUpgrade: stargiftPrepaidUpgrade,
47426
47656
  id: id,
47427
47657
  amount: amount,
47428
47658
  date: date,
@@ -47460,6 +47690,8 @@ var Raw;
47460
47690
  flags |= this.stargiftUpgrade ? 1 << 18 : 0;
47461
47691
  flags |= this.businessTransfer ? 1 << 21 : 0;
47462
47692
  flags |= this.stargiftResale ? 1 << 22 : 0;
47693
+ flags |= this.postsSearch ? 1 << 24 : 0;
47694
+ flags |= this.stargiftPrepaidUpgrade ? 1 << 25 : 0;
47463
47695
  flags |= this.title !== undefined ? 1 << 0 : 0;
47464
47696
  flags |= this.description !== undefined ? 1 << 1 : 0;
47465
47697
  flags |= this.photo !== undefined ? 1 << 2 : 0;
@@ -48169,11 +48401,12 @@ var Raw;
48169
48401
  releasedBy;
48170
48402
  perUserTotal;
48171
48403
  perUserRemains;
48404
+ lockedUntilDate;
48172
48405
  constructor(params) {
48173
48406
  super();
48174
48407
  this.classType = 'types';
48175
48408
  this.className = 'StarGift';
48176
- this.constructorId = 0xbcff5b;
48409
+ this.constructorId = 0x80ac53c3;
48177
48410
  this.subclassOfId = 0xc31c590b;
48178
48411
  this._slots = [
48179
48412
  'limited',
@@ -48196,6 +48429,7 @@ var Raw;
48196
48429
  'releasedBy',
48197
48430
  'perUserTotal',
48198
48431
  'perUserRemains',
48432
+ 'lockedUntilDate',
48199
48433
  ];
48200
48434
  this.limited = params.limited;
48201
48435
  this.soldOut = params.soldOut;
@@ -48217,6 +48451,7 @@ var Raw;
48217
48451
  this.releasedBy = params.releasedBy;
48218
48452
  this.perUserTotal = params.perUserTotal;
48219
48453
  this.perUserRemains = params.perUserRemains;
48454
+ this.lockedUntilDate = params.lockedUntilDate;
48220
48455
  }
48221
48456
  static async read(_data, ..._args) {
48222
48457
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -48240,6 +48475,7 @@ var Raw;
48240
48475
  let releasedBy = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
48241
48476
  let perUserTotal = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48242
48477
  let perUserRemains = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48478
+ let lockedUntilDate = flags & (1 << 9) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48243
48479
  return new Raw.StarGift({
48244
48480
  limited: limited,
48245
48481
  soldOut: soldOut,
@@ -48261,6 +48497,7 @@ var Raw;
48261
48497
  releasedBy: releasedBy,
48262
48498
  perUserTotal: perUserTotal,
48263
48499
  perUserRemains: perUserRemains,
48500
+ lockedUntilDate: lockedUntilDate,
48264
48501
  });
48265
48502
  }
48266
48503
  write() {
@@ -48283,6 +48520,7 @@ var Raw;
48283
48520
  flags |= this.releasedBy !== undefined ? 1 << 6 : 0;
48284
48521
  flags |= this.perUserTotal !== undefined ? 1 << 8 : 0;
48285
48522
  flags |= this.perUserRemains !== undefined ? 1 << 8 : 0;
48523
+ flags |= this.lockedUntilDate !== undefined ? 1 << 9 : 0;
48286
48524
  b.write(index_js_1.Primitive.Int.write(flags));
48287
48525
  if (this.id !== undefined) {
48288
48526
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -48329,13 +48567,19 @@ var Raw;
48329
48567
  if (this.perUserRemains !== undefined) {
48330
48568
  b.write(index_js_1.Primitive.Int.write(this.perUserRemains));
48331
48569
  }
48570
+ if (this.lockedUntilDate !== undefined) {
48571
+ b.write(index_js_1.Primitive.Int.write(this.lockedUntilDate));
48572
+ }
48332
48573
  return deps_js_1.Buffer.from(b.buffer);
48333
48574
  }
48334
48575
  }
48335
48576
  Raw.StarGift = StarGift;
48336
48577
  class StarGiftUnique extends index_js_1.TLObject {
48337
48578
  requirePremium;
48579
+ resaleTonOnly;
48580
+ themeAvailable;
48338
48581
  id;
48582
+ giftId;
48339
48583
  title;
48340
48584
  slug;
48341
48585
  num;
@@ -48346,17 +48590,23 @@ var Raw;
48346
48590
  availabilityIssued;
48347
48591
  availabilityTotal;
48348
48592
  giftAddress;
48349
- resellStars;
48593
+ resellAmount;
48350
48594
  releasedBy;
48595
+ valueAmount;
48596
+ valueCurrency;
48597
+ themePeer;
48351
48598
  constructor(params) {
48352
48599
  super();
48353
48600
  this.classType = 'types';
48354
48601
  this.className = 'StarGiftUnique';
48355
- this.constructorId = 0xf63778ae;
48602
+ this.constructorId = 0x1befe865;
48356
48603
  this.subclassOfId = 0xc31c590b;
48357
48604
  this._slots = [
48358
48605
  'requirePremium',
48606
+ 'resaleTonOnly',
48607
+ 'themeAvailable',
48359
48608
  'id',
48609
+ 'giftId',
48360
48610
  'title',
48361
48611
  'slug',
48362
48612
  'num',
@@ -48367,11 +48617,17 @@ var Raw;
48367
48617
  'availabilityIssued',
48368
48618
  'availabilityTotal',
48369
48619
  'giftAddress',
48370
- 'resellStars',
48620
+ 'resellAmount',
48371
48621
  'releasedBy',
48622
+ 'valueAmount',
48623
+ 'valueCurrency',
48624
+ 'themePeer',
48372
48625
  ];
48373
48626
  this.requirePremium = params.requirePremium;
48627
+ this.resaleTonOnly = params.resaleTonOnly;
48628
+ this.themeAvailable = params.themeAvailable;
48374
48629
  this.id = params.id;
48630
+ this.giftId = params.giftId;
48375
48631
  this.title = params.title;
48376
48632
  this.slug = params.slug;
48377
48633
  this.num = params.num;
@@ -48382,13 +48638,19 @@ var Raw;
48382
48638
  this.availabilityIssued = params.availabilityIssued;
48383
48639
  this.availabilityTotal = params.availabilityTotal;
48384
48640
  this.giftAddress = params.giftAddress;
48385
- this.resellStars = params.resellStars;
48641
+ this.resellAmount = params.resellAmount;
48386
48642
  this.releasedBy = params.releasedBy;
48643
+ this.valueAmount = params.valueAmount;
48644
+ this.valueCurrency = params.valueCurrency;
48645
+ this.themePeer = params.themePeer;
48387
48646
  }
48388
48647
  static async read(_data, ..._args) {
48389
48648
  let flags = await index_js_1.Primitive.Int.read(_data);
48390
48649
  let requirePremium = flags & (1 << 6) ? true : false;
48650
+ let resaleTonOnly = flags & (1 << 7) ? true : false;
48651
+ let themeAvailable = flags & (1 << 9) ? true : false;
48391
48652
  let id = await index_js_1.Primitive.Long.read(_data);
48653
+ let giftId = await index_js_1.Primitive.Long.read(_data);
48392
48654
  let title = await index_js_1.Primitive.String.read(_data);
48393
48655
  let slug = await index_js_1.Primitive.String.read(_data);
48394
48656
  let num = await index_js_1.Primitive.Int.read(_data);
@@ -48399,11 +48661,17 @@ var Raw;
48399
48661
  let availabilityIssued = await index_js_1.Primitive.Int.read(_data);
48400
48662
  let availabilityTotal = await index_js_1.Primitive.Int.read(_data);
48401
48663
  let giftAddress = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
48402
- let resellStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48664
+ let resellAmount = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
48403
48665
  let releasedBy = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
48666
+ let valueAmount = flags & (1 << 8) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48667
+ let valueCurrency = flags & (1 << 8) ? await index_js_1.Primitive.String.read(_data) : undefined;
48668
+ let themePeer = flags & (1 << 10) ? await index_js_1.TLObject.read(_data) : undefined;
48404
48669
  return new Raw.StarGiftUnique({
48405
48670
  requirePremium: requirePremium,
48671
+ resaleTonOnly: resaleTonOnly,
48672
+ themeAvailable: themeAvailable,
48406
48673
  id: id,
48674
+ giftId: giftId,
48407
48675
  title: title,
48408
48676
  slug: slug,
48409
48677
  num: num,
@@ -48414,8 +48682,11 @@ var Raw;
48414
48682
  availabilityIssued: availabilityIssued,
48415
48683
  availabilityTotal: availabilityTotal,
48416
48684
  giftAddress: giftAddress,
48417
- resellStars: resellStars,
48685
+ resellAmount: resellAmount,
48418
48686
  releasedBy: releasedBy,
48687
+ valueAmount: valueAmount,
48688
+ valueCurrency: valueCurrency,
48689
+ themePeer: themePeer,
48419
48690
  });
48420
48691
  }
48421
48692
  write() {
@@ -48423,16 +48694,24 @@ var Raw;
48423
48694
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
48424
48695
  let flags = 0;
48425
48696
  flags |= this.requirePremium ? 1 << 6 : 0;
48697
+ flags |= this.resaleTonOnly ? 1 << 7 : 0;
48698
+ flags |= this.themeAvailable ? 1 << 9 : 0;
48426
48699
  flags |= this.ownerId !== undefined ? 1 << 0 : 0;
48427
48700
  flags |= this.ownerName !== undefined ? 1 << 1 : 0;
48428
48701
  flags |= this.ownerAddress !== undefined ? 1 << 2 : 0;
48429
48702
  flags |= this.giftAddress !== undefined ? 1 << 3 : 0;
48430
- flags |= this.resellStars !== undefined ? 1 << 4 : 0;
48703
+ flags |= this.resellAmount ? 1 << 4 : 0;
48431
48704
  flags |= this.releasedBy !== undefined ? 1 << 5 : 0;
48705
+ flags |= this.valueAmount !== undefined ? 1 << 8 : 0;
48706
+ flags |= this.valueCurrency !== undefined ? 1 << 8 : 0;
48707
+ flags |= this.themePeer !== undefined ? 1 << 10 : 0;
48432
48708
  b.write(index_js_1.Primitive.Int.write(flags));
48433
48709
  if (this.id !== undefined) {
48434
48710
  b.write(index_js_1.Primitive.Long.write(this.id));
48435
48711
  }
48712
+ if (this.giftId !== undefined) {
48713
+ b.write(index_js_1.Primitive.Long.write(this.giftId));
48714
+ }
48436
48715
  if (this.title !== undefined) {
48437
48716
  b.write(index_js_1.Primitive.String.write(this.title));
48438
48717
  }
@@ -48463,12 +48742,21 @@ var Raw;
48463
48742
  if (this.giftAddress !== undefined) {
48464
48743
  b.write(index_js_1.Primitive.String.write(this.giftAddress));
48465
48744
  }
48466
- if (this.resellStars !== undefined) {
48467
- b.write(index_js_1.Primitive.Long.write(this.resellStars));
48745
+ if (this.resellAmount) {
48746
+ b.write(index_js_1.Primitive.Vector.write(this.resellAmount));
48468
48747
  }
48469
48748
  if (this.releasedBy !== undefined) {
48470
48749
  b.write(this.releasedBy.write());
48471
48750
  }
48751
+ if (this.valueAmount !== undefined) {
48752
+ b.write(index_js_1.Primitive.Long.write(this.valueAmount));
48753
+ }
48754
+ if (this.valueCurrency !== undefined) {
48755
+ b.write(index_js_1.Primitive.String.write(this.valueCurrency));
48756
+ }
48757
+ if (this.themePeer !== undefined) {
48758
+ b.write(this.themePeer.write());
48759
+ }
48472
48760
  return deps_js_1.Buffer.from(b.buffer);
48473
48761
  }
48474
48762
  }
@@ -49170,6 +49458,7 @@ var Raw;
49170
49458
  refunded;
49171
49459
  canUpgrade;
49172
49460
  pinnedToTop;
49461
+ upgradeSeparate;
49173
49462
  fromId;
49174
49463
  date;
49175
49464
  gift;
@@ -49183,11 +49472,12 @@ var Raw;
49183
49472
  canTransferAt;
49184
49473
  canResellAt;
49185
49474
  collectionId;
49475
+ prepaidUpgradeHash;
49186
49476
  constructor(params) {
49187
49477
  super();
49188
49478
  this.classType = 'types';
49189
49479
  this.className = 'SavedStarGift';
49190
- this.constructorId = 0x1ea646df;
49480
+ this.constructorId = 0x19a9b572;
49191
49481
  this.subclassOfId = 0x8e2b3c14;
49192
49482
  this._slots = [
49193
49483
  'nameHidden',
@@ -49195,6 +49485,7 @@ var Raw;
49195
49485
  'refunded',
49196
49486
  'canUpgrade',
49197
49487
  'pinnedToTop',
49488
+ 'upgradeSeparate',
49198
49489
  'fromId',
49199
49490
  'date',
49200
49491
  'gift',
@@ -49208,12 +49499,14 @@ var Raw;
49208
49499
  'canTransferAt',
49209
49500
  'canResellAt',
49210
49501
  'collectionId',
49502
+ 'prepaidUpgradeHash',
49211
49503
  ];
49212
49504
  this.nameHidden = params.nameHidden;
49213
49505
  this.unsaved = params.unsaved;
49214
49506
  this.refunded = params.refunded;
49215
49507
  this.canUpgrade = params.canUpgrade;
49216
49508
  this.pinnedToTop = params.pinnedToTop;
49509
+ this.upgradeSeparate = params.upgradeSeparate;
49217
49510
  this.fromId = params.fromId;
49218
49511
  this.date = params.date;
49219
49512
  this.gift = params.gift;
@@ -49227,6 +49520,7 @@ var Raw;
49227
49520
  this.canTransferAt = params.canTransferAt;
49228
49521
  this.canResellAt = params.canResellAt;
49229
49522
  this.collectionId = params.collectionId;
49523
+ this.prepaidUpgradeHash = params.prepaidUpgradeHash;
49230
49524
  }
49231
49525
  static async read(_data, ..._args) {
49232
49526
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -49235,6 +49529,7 @@ var Raw;
49235
49529
  let refunded = flags & (1 << 9) ? true : false;
49236
49530
  let canUpgrade = flags & (1 << 10) ? true : false;
49237
49531
  let pinnedToTop = flags & (1 << 12) ? true : false;
49532
+ let upgradeSeparate = flags & (1 << 17) ? true : false;
49238
49533
  let fromId = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
49239
49534
  let date = await index_js_1.Primitive.Int.read(_data);
49240
49535
  let gift = await index_js_1.TLObject.read(_data);
@@ -49248,12 +49543,14 @@ var Raw;
49248
49543
  let canTransferAt = flags & (1 << 13) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49249
49544
  let canResellAt = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49250
49545
  let collectionId = flags & (1 << 15) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
49546
+ let prepaidUpgradeHash = flags & (1 << 16) ? await index_js_1.Primitive.String.read(_data) : undefined;
49251
49547
  return new Raw.SavedStarGift({
49252
49548
  nameHidden: nameHidden,
49253
49549
  unsaved: unsaved,
49254
49550
  refunded: refunded,
49255
49551
  canUpgrade: canUpgrade,
49256
49552
  pinnedToTop: pinnedToTop,
49553
+ upgradeSeparate: upgradeSeparate,
49257
49554
  fromId: fromId,
49258
49555
  date: date,
49259
49556
  gift: gift,
@@ -49267,6 +49564,7 @@ var Raw;
49267
49564
  canTransferAt: canTransferAt,
49268
49565
  canResellAt: canResellAt,
49269
49566
  collectionId: collectionId,
49567
+ prepaidUpgradeHash: prepaidUpgradeHash,
49270
49568
  });
49271
49569
  }
49272
49570
  write() {
@@ -49278,6 +49576,7 @@ var Raw;
49278
49576
  flags |= this.refunded ? 1 << 9 : 0;
49279
49577
  flags |= this.canUpgrade ? 1 << 10 : 0;
49280
49578
  flags |= this.pinnedToTop ? 1 << 12 : 0;
49579
+ flags |= this.upgradeSeparate ? 1 << 17 : 0;
49281
49580
  flags |= this.fromId !== undefined ? 1 << 1 : 0;
49282
49581
  flags |= this.message !== undefined ? 1 << 2 : 0;
49283
49582
  flags |= this.msgId !== undefined ? 1 << 3 : 0;
@@ -49289,6 +49588,7 @@ var Raw;
49289
49588
  flags |= this.canTransferAt !== undefined ? 1 << 13 : 0;
49290
49589
  flags |= this.canResellAt !== undefined ? 1 << 14 : 0;
49291
49590
  flags |= this.collectionId ? 1 << 15 : 0;
49591
+ flags |= this.prepaidUpgradeHash !== undefined ? 1 << 16 : 0;
49292
49592
  b.write(index_js_1.Primitive.Int.write(flags));
49293
49593
  if (this.fromId !== undefined) {
49294
49594
  b.write(this.fromId.write());
@@ -49329,6 +49629,9 @@ var Raw;
49329
49629
  if (this.collectionId) {
49330
49630
  b.write(index_js_1.Primitive.Vector.write(this.collectionId, index_js_1.Primitive.Int));
49331
49631
  }
49632
+ if (this.prepaidUpgradeHash !== undefined) {
49633
+ b.write(index_js_1.Primitive.String.write(this.prepaidUpgradeHash));
49634
+ }
49332
49635
  return deps_js_1.Buffer.from(b.buffer);
49333
49636
  }
49334
49637
  }
@@ -50178,6 +50481,337 @@ var Raw;
50178
50481
  }
50179
50482
  }
50180
50483
  Raw.StarGiftCollection = StarGiftCollection;
50484
+ class StoryAlbum extends index_js_1.TLObject {
50485
+ albumId;
50486
+ title;
50487
+ iconPhoto;
50488
+ iconVideo;
50489
+ constructor(params) {
50490
+ super();
50491
+ this.classType = 'types';
50492
+ this.className = 'StoryAlbum';
50493
+ this.constructorId = 0x9325705a;
50494
+ this.subclassOfId = 0x7c8c5ea2;
50495
+ this._slots = ['albumId', 'title', 'iconPhoto', 'iconVideo'];
50496
+ this.albumId = params.albumId;
50497
+ this.title = params.title;
50498
+ this.iconPhoto = params.iconPhoto;
50499
+ this.iconVideo = params.iconVideo;
50500
+ }
50501
+ static async read(_data, ..._args) {
50502
+ let flags = await index_js_1.Primitive.Int.read(_data);
50503
+ let albumId = await index_js_1.Primitive.Int.read(_data);
50504
+ let title = await index_js_1.Primitive.String.read(_data);
50505
+ let iconPhoto = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
50506
+ let iconVideo = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
50507
+ return new Raw.StoryAlbum({
50508
+ albumId: albumId,
50509
+ title: title,
50510
+ iconPhoto: iconPhoto,
50511
+ iconVideo: iconVideo,
50512
+ });
50513
+ }
50514
+ write() {
50515
+ const b = new deps_js_1.BytesIO();
50516
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50517
+ let flags = 0;
50518
+ flags |= this.iconPhoto !== undefined ? 1 << 0 : 0;
50519
+ flags |= this.iconVideo !== undefined ? 1 << 1 : 0;
50520
+ b.write(index_js_1.Primitive.Int.write(flags));
50521
+ if (this.albumId !== undefined) {
50522
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
50523
+ }
50524
+ if (this.title !== undefined) {
50525
+ b.write(index_js_1.Primitive.String.write(this.title));
50526
+ }
50527
+ if (this.iconPhoto !== undefined) {
50528
+ b.write(this.iconPhoto.write());
50529
+ }
50530
+ if (this.iconVideo !== undefined) {
50531
+ b.write(this.iconVideo.write());
50532
+ }
50533
+ return deps_js_1.Buffer.from(b.buffer);
50534
+ }
50535
+ }
50536
+ Raw.StoryAlbum = StoryAlbum;
50537
+ class SearchPostsFlood extends index_js_1.TLObject {
50538
+ queryIsFree;
50539
+ totalDaily;
50540
+ remains;
50541
+ waitTill;
50542
+ starsAmount;
50543
+ constructor(params) {
50544
+ super();
50545
+ this.classType = 'types';
50546
+ this.className = 'SearchPostsFlood';
50547
+ this.constructorId = 0x3e0b5b6a;
50548
+ this.subclassOfId = 0xc2c0ccc1;
50549
+ this._slots = ['queryIsFree', 'totalDaily', 'remains', 'waitTill', 'starsAmount'];
50550
+ this.queryIsFree = params.queryIsFree;
50551
+ this.totalDaily = params.totalDaily;
50552
+ this.remains = params.remains;
50553
+ this.waitTill = params.waitTill;
50554
+ this.starsAmount = params.starsAmount;
50555
+ }
50556
+ static async read(_data, ..._args) {
50557
+ let flags = await index_js_1.Primitive.Int.read(_data);
50558
+ let queryIsFree = flags & (1 << 0) ? true : false;
50559
+ let totalDaily = await index_js_1.Primitive.Int.read(_data);
50560
+ let remains = await index_js_1.Primitive.Int.read(_data);
50561
+ let waitTill = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
50562
+ let starsAmount = await index_js_1.Primitive.Long.read(_data);
50563
+ return new Raw.SearchPostsFlood({
50564
+ queryIsFree: queryIsFree,
50565
+ totalDaily: totalDaily,
50566
+ remains: remains,
50567
+ waitTill: waitTill,
50568
+ starsAmount: starsAmount,
50569
+ });
50570
+ }
50571
+ write() {
50572
+ const b = new deps_js_1.BytesIO();
50573
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50574
+ let flags = 0;
50575
+ flags |= this.queryIsFree ? 1 << 0 : 0;
50576
+ flags |= this.waitTill !== undefined ? 1 << 1 : 0;
50577
+ b.write(index_js_1.Primitive.Int.write(flags));
50578
+ if (this.totalDaily !== undefined) {
50579
+ b.write(index_js_1.Primitive.Int.write(this.totalDaily));
50580
+ }
50581
+ if (this.remains !== undefined) {
50582
+ b.write(index_js_1.Primitive.Int.write(this.remains));
50583
+ }
50584
+ if (this.waitTill !== undefined) {
50585
+ b.write(index_js_1.Primitive.Int.write(this.waitTill));
50586
+ }
50587
+ if (this.starsAmount !== undefined) {
50588
+ b.write(index_js_1.Primitive.Long.write(this.starsAmount));
50589
+ }
50590
+ return deps_js_1.Buffer.from(b.buffer);
50591
+ }
50592
+ }
50593
+ Raw.SearchPostsFlood = SearchPostsFlood;
50594
+ class ProfileTabPosts extends index_js_1.TLObject {
50595
+ constructor() {
50596
+ super();
50597
+ this.classType = 'types';
50598
+ this.className = 'ProfileTabPosts';
50599
+ this.constructorId = 0xb98cd696;
50600
+ this.subclassOfId = 0xae48d1b4;
50601
+ this._slots = [];
50602
+ }
50603
+ static async read(_data, ..._args) {
50604
+ return new Raw.ProfileTabPosts();
50605
+ }
50606
+ write() {
50607
+ const b = new deps_js_1.BytesIO();
50608
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50609
+ return deps_js_1.Buffer.from(b.buffer);
50610
+ }
50611
+ }
50612
+ Raw.ProfileTabPosts = ProfileTabPosts;
50613
+ class ProfileTabGifts extends index_js_1.TLObject {
50614
+ constructor() {
50615
+ super();
50616
+ this.classType = 'types';
50617
+ this.className = 'ProfileTabGifts';
50618
+ this.constructorId = 0x4d4bd46a;
50619
+ this.subclassOfId = 0xae48d1b4;
50620
+ this._slots = [];
50621
+ }
50622
+ static async read(_data, ..._args) {
50623
+ return new Raw.ProfileTabGifts();
50624
+ }
50625
+ write() {
50626
+ const b = new deps_js_1.BytesIO();
50627
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50628
+ return deps_js_1.Buffer.from(b.buffer);
50629
+ }
50630
+ }
50631
+ Raw.ProfileTabGifts = ProfileTabGifts;
50632
+ class ProfileTabMedia extends index_js_1.TLObject {
50633
+ constructor() {
50634
+ super();
50635
+ this.classType = 'types';
50636
+ this.className = 'ProfileTabMedia';
50637
+ this.constructorId = 0x72c64955;
50638
+ this.subclassOfId = 0xae48d1b4;
50639
+ this._slots = [];
50640
+ }
50641
+ static async read(_data, ..._args) {
50642
+ return new Raw.ProfileTabMedia();
50643
+ }
50644
+ write() {
50645
+ const b = new deps_js_1.BytesIO();
50646
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50647
+ return deps_js_1.Buffer.from(b.buffer);
50648
+ }
50649
+ }
50650
+ Raw.ProfileTabMedia = ProfileTabMedia;
50651
+ class ProfileTabFiles extends index_js_1.TLObject {
50652
+ constructor() {
50653
+ super();
50654
+ this.classType = 'types';
50655
+ this.className = 'ProfileTabFiles';
50656
+ this.constructorId = 0xab339c00;
50657
+ this.subclassOfId = 0xae48d1b4;
50658
+ this._slots = [];
50659
+ }
50660
+ static async read(_data, ..._args) {
50661
+ return new Raw.ProfileTabFiles();
50662
+ }
50663
+ write() {
50664
+ const b = new deps_js_1.BytesIO();
50665
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50666
+ return deps_js_1.Buffer.from(b.buffer);
50667
+ }
50668
+ }
50669
+ Raw.ProfileTabFiles = ProfileTabFiles;
50670
+ class ProfileTabMusic extends index_js_1.TLObject {
50671
+ constructor() {
50672
+ super();
50673
+ this.classType = 'types';
50674
+ this.className = 'ProfileTabMusic';
50675
+ this.constructorId = 0x9f27d26e;
50676
+ this.subclassOfId = 0xae48d1b4;
50677
+ this._slots = [];
50678
+ }
50679
+ static async read(_data, ..._args) {
50680
+ return new Raw.ProfileTabMusic();
50681
+ }
50682
+ write() {
50683
+ const b = new deps_js_1.BytesIO();
50684
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50685
+ return deps_js_1.Buffer.from(b.buffer);
50686
+ }
50687
+ }
50688
+ Raw.ProfileTabMusic = ProfileTabMusic;
50689
+ class ProfileTabVoice extends index_js_1.TLObject {
50690
+ constructor() {
50691
+ super();
50692
+ this.classType = 'types';
50693
+ this.className = 'ProfileTabVoice';
50694
+ this.constructorId = 0xe477092e;
50695
+ this.subclassOfId = 0xae48d1b4;
50696
+ this._slots = [];
50697
+ }
50698
+ static async read(_data, ..._args) {
50699
+ return new Raw.ProfileTabVoice();
50700
+ }
50701
+ write() {
50702
+ const b = new deps_js_1.BytesIO();
50703
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50704
+ return deps_js_1.Buffer.from(b.buffer);
50705
+ }
50706
+ }
50707
+ Raw.ProfileTabVoice = ProfileTabVoice;
50708
+ class ProfileTabLinks extends index_js_1.TLObject {
50709
+ constructor() {
50710
+ super();
50711
+ this.classType = 'types';
50712
+ this.className = 'ProfileTabLinks';
50713
+ this.constructorId = 0xd3656499;
50714
+ this.subclassOfId = 0xae48d1b4;
50715
+ this._slots = [];
50716
+ }
50717
+ static async read(_data, ..._args) {
50718
+ return new Raw.ProfileTabLinks();
50719
+ }
50720
+ write() {
50721
+ const b = new deps_js_1.BytesIO();
50722
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50723
+ return deps_js_1.Buffer.from(b.buffer);
50724
+ }
50725
+ }
50726
+ Raw.ProfileTabLinks = ProfileTabLinks;
50727
+ class ProfileTabGifs extends index_js_1.TLObject {
50728
+ constructor() {
50729
+ super();
50730
+ this.classType = 'types';
50731
+ this.className = 'ProfileTabGifs';
50732
+ this.constructorId = 0xa2c0f695;
50733
+ this.subclassOfId = 0xae48d1b4;
50734
+ this._slots = [];
50735
+ }
50736
+ static async read(_data, ..._args) {
50737
+ return new Raw.ProfileTabGifs();
50738
+ }
50739
+ write() {
50740
+ const b = new deps_js_1.BytesIO();
50741
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50742
+ return deps_js_1.Buffer.from(b.buffer);
50743
+ }
50744
+ }
50745
+ Raw.ProfileTabGifs = ProfileTabGifs;
50746
+ class InputChatThemeEmpty extends index_js_1.TLObject {
50747
+ constructor() {
50748
+ super();
50749
+ this.classType = 'types';
50750
+ this.className = 'InputChatThemeEmpty';
50751
+ this.constructorId = 0x83268483;
50752
+ this.subclassOfId = 0x57294e64;
50753
+ this._slots = [];
50754
+ }
50755
+ static async read(_data, ..._args) {
50756
+ return new Raw.InputChatThemeEmpty();
50757
+ }
50758
+ write() {
50759
+ const b = new deps_js_1.BytesIO();
50760
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50761
+ return deps_js_1.Buffer.from(b.buffer);
50762
+ }
50763
+ }
50764
+ Raw.InputChatThemeEmpty = InputChatThemeEmpty;
50765
+ class InputChatTheme extends index_js_1.TLObject {
50766
+ emoticon;
50767
+ constructor(params) {
50768
+ super();
50769
+ this.classType = 'types';
50770
+ this.className = 'InputChatTheme';
50771
+ this.constructorId = 0xc93de95c;
50772
+ this.subclassOfId = 0x57294e64;
50773
+ this._slots = ['emoticon'];
50774
+ this.emoticon = params.emoticon;
50775
+ }
50776
+ static async read(_data, ..._args) {
50777
+ let emoticon = await index_js_1.Primitive.String.read(_data);
50778
+ return new Raw.InputChatTheme({ emoticon: emoticon });
50779
+ }
50780
+ write() {
50781
+ const b = new deps_js_1.BytesIO();
50782
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50783
+ if (this.emoticon !== undefined) {
50784
+ b.write(index_js_1.Primitive.String.write(this.emoticon));
50785
+ }
50786
+ return deps_js_1.Buffer.from(b.buffer);
50787
+ }
50788
+ }
50789
+ Raw.InputChatTheme = InputChatTheme;
50790
+ class InputChatThemeUniqueGift extends index_js_1.TLObject {
50791
+ slug;
50792
+ constructor(params) {
50793
+ super();
50794
+ this.classType = 'types';
50795
+ this.className = 'InputChatThemeUniqueGift';
50796
+ this.constructorId = 0x87e5dfe4;
50797
+ this.subclassOfId = 0x57294e64;
50798
+ this._slots = ['slug'];
50799
+ this.slug = params.slug;
50800
+ }
50801
+ static async read(_data, ..._args) {
50802
+ let slug = await index_js_1.Primitive.String.read(_data);
50803
+ return new Raw.InputChatThemeUniqueGift({ slug: slug });
50804
+ }
50805
+ write() {
50806
+ const b = new deps_js_1.BytesIO();
50807
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50808
+ if (this.slug !== undefined) {
50809
+ b.write(index_js_1.Primitive.String.write(this.slug));
50810
+ }
50811
+ return deps_js_1.Buffer.from(b.buffer);
50812
+ }
50813
+ }
50814
+ Raw.InputChatThemeUniqueGift = InputChatThemeUniqueGift;
50181
50815
  class InvokeAfterMsg extends index_js_1.TLObject {
50182
50816
  __response__;
50183
50817
  msgId;
@@ -55081,22 +55715,35 @@ var Raw;
55081
55715
  class SentCodePaymentRequired extends index_js_1.TLObject {
55082
55716
  storeProduct;
55083
55717
  phoneCodeHash;
55718
+ supportEmailAddress;
55719
+ supportEmailSubject;
55084
55720
  constructor(params) {
55085
55721
  super();
55086
55722
  this.classType = 'types';
55087
55723
  this.className = 'auth.SentCodePaymentRequired';
55088
- this.constructorId = 0xd7cef980;
55724
+ this.constructorId = 0xd7a2fcf9;
55089
55725
  this.subclassOfId = 0x6ce87081;
55090
- this._slots = ['storeProduct', 'phoneCodeHash'];
55726
+ this._slots = [
55727
+ 'storeProduct',
55728
+ 'phoneCodeHash',
55729
+ 'supportEmailAddress',
55730
+ 'supportEmailSubject',
55731
+ ];
55091
55732
  this.storeProduct = params.storeProduct;
55092
55733
  this.phoneCodeHash = params.phoneCodeHash;
55734
+ this.supportEmailAddress = params.supportEmailAddress;
55735
+ this.supportEmailSubject = params.supportEmailSubject;
55093
55736
  }
55094
55737
  static async read(_data, ..._args) {
55095
55738
  let storeProduct = await index_js_1.Primitive.String.read(_data);
55096
55739
  let phoneCodeHash = await index_js_1.Primitive.String.read(_data);
55740
+ let supportEmailAddress = await index_js_1.Primitive.String.read(_data);
55741
+ let supportEmailSubject = await index_js_1.Primitive.String.read(_data);
55097
55742
  return new Raw.auth.SentCodePaymentRequired({
55098
55743
  storeProduct: storeProduct,
55099
55744
  phoneCodeHash: phoneCodeHash,
55745
+ supportEmailAddress: supportEmailAddress,
55746
+ supportEmailSubject: supportEmailSubject,
55100
55747
  });
55101
55748
  }
55102
55749
  write() {
@@ -55108,6 +55755,12 @@ var Raw;
55108
55755
  if (this.phoneCodeHash !== undefined) {
55109
55756
  b.write(index_js_1.Primitive.String.write(this.phoneCodeHash));
55110
55757
  }
55758
+ if (this.supportEmailAddress !== undefined) {
55759
+ b.write(index_js_1.Primitive.String.write(this.supportEmailAddress));
55760
+ }
55761
+ if (this.supportEmailSubject !== undefined) {
55762
+ b.write(index_js_1.Primitive.String.write(this.supportEmailSubject));
55763
+ }
55111
55764
  return deps_js_1.Buffer.from(b.buffer);
55112
55765
  }
55113
55766
  }
@@ -58228,6 +58881,7 @@ var Raw;
58228
58881
  count;
58229
58882
  nextRate;
58230
58883
  offsetIdOffset;
58884
+ searchFlood;
58231
58885
  messages;
58232
58886
  chats;
58233
58887
  users;
@@ -58235,13 +58889,14 @@ var Raw;
58235
58889
  super();
58236
58890
  this.classType = 'types';
58237
58891
  this.className = 'messages.MessagesSlice';
58238
- this.constructorId = 0x3a54685e;
58892
+ this.constructorId = 0x762b263d;
58239
58893
  this.subclassOfId = 0xd4b40b5e;
58240
58894
  this._slots = [
58241
58895
  'inexact',
58242
58896
  'count',
58243
58897
  'nextRate',
58244
58898
  'offsetIdOffset',
58899
+ 'searchFlood',
58245
58900
  'messages',
58246
58901
  'chats',
58247
58902
  'users',
@@ -58250,6 +58905,7 @@ var Raw;
58250
58905
  this.count = params.count;
58251
58906
  this.nextRate = params.nextRate;
58252
58907
  this.offsetIdOffset = params.offsetIdOffset;
58908
+ this.searchFlood = params.searchFlood;
58253
58909
  this.messages = params.messages;
58254
58910
  this.chats = params.chats;
58255
58911
  this.users = params.users;
@@ -58260,6 +58916,7 @@ var Raw;
58260
58916
  let count = await index_js_1.Primitive.Int.read(_data);
58261
58917
  let nextRate = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
58262
58918
  let offsetIdOffset = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
58919
+ let searchFlood = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
58263
58920
  let messages = await index_js_1.TLObject.read(_data);
58264
58921
  let chats = await index_js_1.TLObject.read(_data);
58265
58922
  let users = await index_js_1.TLObject.read(_data);
@@ -58268,6 +58925,7 @@ var Raw;
58268
58925
  count: count,
58269
58926
  nextRate: nextRate,
58270
58927
  offsetIdOffset: offsetIdOffset,
58928
+ searchFlood: searchFlood,
58271
58929
  messages: messages,
58272
58930
  chats: chats,
58273
58931
  users: users,
@@ -58280,6 +58938,7 @@ var Raw;
58280
58938
  flags |= this.inexact ? 1 << 1 : 0;
58281
58939
  flags |= this.nextRate !== undefined ? 1 << 0 : 0;
58282
58940
  flags |= this.offsetIdOffset !== undefined ? 1 << 2 : 0;
58941
+ flags |= this.searchFlood !== undefined ? 1 << 3 : 0;
58283
58942
  b.write(index_js_1.Primitive.Int.write(flags));
58284
58943
  if (this.count !== undefined) {
58285
58944
  b.write(index_js_1.Primitive.Int.write(this.count));
@@ -58290,6 +58949,9 @@ var Raw;
58290
58949
  if (this.offsetIdOffset !== undefined) {
58291
58950
  b.write(index_js_1.Primitive.Int.write(this.offsetIdOffset));
58292
58951
  }
58952
+ if (this.searchFlood !== undefined) {
58953
+ b.write(this.searchFlood.write());
58954
+ }
58293
58955
  if (this.messages) {
58294
58956
  b.write(index_js_1.Primitive.Vector.write(this.messages));
58295
58957
  }
@@ -61346,21 +62008,24 @@ var Raw;
61346
62008
  messages_1.FoundStickers = FoundStickers;
61347
62009
  class WebPagePreview extends index_js_1.TLObject {
61348
62010
  media;
62011
+ chats;
61349
62012
  users;
61350
62013
  constructor(params) {
61351
62014
  super();
61352
62015
  this.classType = 'types';
61353
62016
  this.className = 'messages.WebPagePreview';
61354
- this.constructorId = 0xb53e8b21;
62017
+ this.constructorId = 0x8c9a88ac;
61355
62018
  this.subclassOfId = 0xe29410c2;
61356
- this._slots = ['media', 'users'];
62019
+ this._slots = ['media', 'chats', 'users'];
61357
62020
  this.media = params.media;
62021
+ this.chats = params.chats;
61358
62022
  this.users = params.users;
61359
62023
  }
61360
62024
  static async read(_data, ..._args) {
61361
62025
  let media = await index_js_1.TLObject.read(_data);
62026
+ let chats = await index_js_1.TLObject.read(_data);
61362
62027
  let users = await index_js_1.TLObject.read(_data);
61363
- return new Raw.messages.WebPagePreview({ media: media, users: users });
62028
+ return new Raw.messages.WebPagePreview({ media: media, chats: chats, users: users });
61364
62029
  }
61365
62030
  write() {
61366
62031
  const b = new deps_js_1.BytesIO();
@@ -61368,6 +62033,9 @@ var Raw;
61368
62033
  if (this.media !== undefined) {
61369
62034
  b.write(this.media.write());
61370
62035
  }
62036
+ if (this.chats) {
62037
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
62038
+ }
61371
62039
  if (this.users) {
61372
62040
  b.write(index_js_1.Primitive.Vector.write(this.users));
61373
62041
  }
@@ -67748,21 +68416,21 @@ var Raw;
67748
68416
  class SetChatTheme extends index_js_1.TLObject {
67749
68417
  __response__;
67750
68418
  peer;
67751
- emoticon;
68419
+ theme;
67752
68420
  constructor(params) {
67753
68421
  super();
67754
68422
  this.classType = 'functions';
67755
68423
  this.className = 'messages.SetChatTheme';
67756
- this.constructorId = 0xe63be13f;
68424
+ this.constructorId = 0x81202c9;
67757
68425
  this.subclassOfId = 0x8af52aac;
67758
- this._slots = ['peer', 'emoticon'];
68426
+ this._slots = ['peer', 'theme'];
67759
68427
  this.peer = params.peer;
67760
- this.emoticon = params.emoticon;
68428
+ this.theme = params.theme;
67761
68429
  }
67762
68430
  static async read(_data, ..._args) {
67763
68431
  let peer = await index_js_1.TLObject.read(_data);
67764
- let emoticon = await index_js_1.Primitive.String.read(_data);
67765
- return new Raw.messages.SetChatTheme({ peer: peer, emoticon: emoticon });
68432
+ let theme = await index_js_1.TLObject.read(_data);
68433
+ return new Raw.messages.SetChatTheme({ peer: peer, theme: theme });
67766
68434
  }
67767
68435
  write() {
67768
68436
  const b = new deps_js_1.BytesIO();
@@ -67770,8 +68438,8 @@ var Raw;
67770
68438
  if (this.peer !== undefined) {
67771
68439
  b.write(this.peer.write());
67772
68440
  }
67773
- if (this.emoticon !== undefined) {
67774
- b.write(index_js_1.Primitive.String.write(this.emoticon));
68441
+ if (this.theme !== undefined) {
68442
+ b.write(this.theme.write());
67775
68443
  }
67776
68444
  return deps_js_1.Buffer.from(b.buffer);
67777
68445
  }
@@ -73645,6 +74313,84 @@ var Raw;
73645
74313
  }
73646
74314
  }
73647
74315
  account.ResetPasswordOk = ResetPasswordOk;
74316
+ class ChatThemesNotModified extends index_js_1.TLObject {
74317
+ constructor() {
74318
+ super();
74319
+ this.classType = 'types';
74320
+ this.className = 'account.ChatThemesNotModified';
74321
+ this.constructorId = 0xe011e1c4;
74322
+ this.subclassOfId = 0x15c14aa8;
74323
+ this._slots = [];
74324
+ }
74325
+ static async read(_data, ..._args) {
74326
+ return new Raw.account.ChatThemesNotModified();
74327
+ }
74328
+ write() {
74329
+ const b = new deps_js_1.BytesIO();
74330
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
74331
+ return deps_js_1.Buffer.from(b.buffer);
74332
+ }
74333
+ }
74334
+ account.ChatThemesNotModified = ChatThemesNotModified;
74335
+ class ChatThemes extends index_js_1.TLObject {
74336
+ hash;
74337
+ themes;
74338
+ chats;
74339
+ users;
74340
+ nextOffset;
74341
+ constructor(params) {
74342
+ super();
74343
+ this.classType = 'types';
74344
+ this.className = 'account.ChatThemes';
74345
+ this.constructorId = 0x16484857;
74346
+ this.subclassOfId = 0x15c14aa8;
74347
+ this._slots = ['hash', 'themes', 'chats', 'users', 'nextOffset'];
74348
+ this.hash = params.hash;
74349
+ this.themes = params.themes;
74350
+ this.chats = params.chats;
74351
+ this.users = params.users;
74352
+ this.nextOffset = params.nextOffset;
74353
+ }
74354
+ static async read(_data, ..._args) {
74355
+ let flags = await index_js_1.Primitive.Int.read(_data);
74356
+ let hash = await index_js_1.Primitive.Long.read(_data);
74357
+ let themes = await index_js_1.TLObject.read(_data);
74358
+ let chats = await index_js_1.TLObject.read(_data);
74359
+ let users = await index_js_1.TLObject.read(_data);
74360
+ let nextOffset = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
74361
+ return new Raw.account.ChatThemes({
74362
+ hash: hash,
74363
+ themes: themes,
74364
+ chats: chats,
74365
+ users: users,
74366
+ nextOffset: nextOffset,
74367
+ });
74368
+ }
74369
+ write() {
74370
+ const b = new deps_js_1.BytesIO();
74371
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
74372
+ let flags = 0;
74373
+ flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
74374
+ b.write(index_js_1.Primitive.Int.write(flags));
74375
+ if (this.hash !== undefined) {
74376
+ b.write(index_js_1.Primitive.Long.write(this.hash));
74377
+ }
74378
+ if (this.themes) {
74379
+ b.write(index_js_1.Primitive.Vector.write(this.themes));
74380
+ }
74381
+ if (this.chats) {
74382
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
74383
+ }
74384
+ if (this.users) {
74385
+ b.write(index_js_1.Primitive.Vector.write(this.users));
74386
+ }
74387
+ if (this.nextOffset !== undefined) {
74388
+ b.write(index_js_1.Primitive.Int.write(this.nextOffset));
74389
+ }
74390
+ return deps_js_1.Buffer.from(b.buffer);
74391
+ }
74392
+ }
74393
+ account.ChatThemes = ChatThemes;
73648
74394
  class SavedRingtonesNotModified extends index_js_1.TLObject {
73649
74395
  constructor() {
73650
74396
  super();
@@ -74066,6 +74812,50 @@ var Raw;
74066
74812
  }
74067
74813
  }
74068
74814
  account.PaidMessagesRevenue = PaidMessagesRevenue;
74815
+ class SavedMusicIdsNotModified extends index_js_1.TLObject {
74816
+ constructor() {
74817
+ super();
74818
+ this.classType = 'types';
74819
+ this.className = 'account.SavedMusicIdsNotModified';
74820
+ this.constructorId = 0x4fc81d6e;
74821
+ this.subclassOfId = 0x4b4af692;
74822
+ this._slots = [];
74823
+ }
74824
+ static async read(_data, ..._args) {
74825
+ return new Raw.account.SavedMusicIdsNotModified();
74826
+ }
74827
+ write() {
74828
+ const b = new deps_js_1.BytesIO();
74829
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
74830
+ return deps_js_1.Buffer.from(b.buffer);
74831
+ }
74832
+ }
74833
+ account.SavedMusicIdsNotModified = SavedMusicIdsNotModified;
74834
+ class SavedMusicIds extends index_js_1.TLObject {
74835
+ ids;
74836
+ constructor(params) {
74837
+ super();
74838
+ this.classType = 'types';
74839
+ this.className = 'account.SavedMusicIds';
74840
+ this.constructorId = 0x998d6636;
74841
+ this.subclassOfId = 0x4b4af692;
74842
+ this._slots = ['ids'];
74843
+ this.ids = params.ids;
74844
+ }
74845
+ static async read(_data, ..._args) {
74846
+ let ids = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Long);
74847
+ return new Raw.account.SavedMusicIds({ ids: ids });
74848
+ }
74849
+ write() {
74850
+ const b = new deps_js_1.BytesIO();
74851
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
74852
+ if (this.ids) {
74853
+ b.write(index_js_1.Primitive.Vector.write(this.ids, index_js_1.Primitive.Long));
74854
+ }
74855
+ return deps_js_1.Buffer.from(b.buffer);
74856
+ }
74857
+ }
74858
+ account.SavedMusicIds = SavedMusicIds;
74069
74859
  class RegisterDevice extends index_js_1.TLObject {
74070
74860
  __response__;
74071
74861
  noMuted;
@@ -77667,6 +78457,140 @@ var Raw;
77667
78457
  }
77668
78458
  }
77669
78459
  account.ToggleNoPaidMessagesException = ToggleNoPaidMessagesException;
78460
+ class SetMainProfileTab extends index_js_1.TLObject {
78461
+ __response__;
78462
+ tab;
78463
+ constructor(params) {
78464
+ super();
78465
+ this.classType = 'functions';
78466
+ this.className = 'account.SetMainProfileTab';
78467
+ this.constructorId = 0x5dee78b0;
78468
+ this.subclassOfId = 0xf5b399ac;
78469
+ this._slots = ['tab'];
78470
+ this.tab = params.tab;
78471
+ }
78472
+ static async read(_data, ..._args) {
78473
+ let tab = await index_js_1.TLObject.read(_data);
78474
+ return new Raw.account.SetMainProfileTab({ tab: tab });
78475
+ }
78476
+ write() {
78477
+ const b = new deps_js_1.BytesIO();
78478
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
78479
+ if (this.tab !== undefined) {
78480
+ b.write(this.tab.write());
78481
+ }
78482
+ return deps_js_1.Buffer.from(b.buffer);
78483
+ }
78484
+ }
78485
+ account.SetMainProfileTab = SetMainProfileTab;
78486
+ class SaveMusic extends index_js_1.TLObject {
78487
+ __response__;
78488
+ unsave;
78489
+ id;
78490
+ afterId;
78491
+ constructor(params) {
78492
+ super();
78493
+ this.classType = 'functions';
78494
+ this.className = 'account.SaveMusic';
78495
+ this.constructorId = 0xb26732a9;
78496
+ this.subclassOfId = 0xf5b399ac;
78497
+ this._slots = ['unsave', 'id', 'afterId'];
78498
+ this.unsave = params.unsave;
78499
+ this.id = params.id;
78500
+ this.afterId = params.afterId;
78501
+ }
78502
+ static async read(_data, ..._args) {
78503
+ let flags = await index_js_1.Primitive.Int.read(_data);
78504
+ let unsave = flags & (1 << 0) ? true : false;
78505
+ let id = await index_js_1.TLObject.read(_data);
78506
+ let afterId = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
78507
+ return new Raw.account.SaveMusic({ unsave: unsave, id: id, afterId: afterId });
78508
+ }
78509
+ write() {
78510
+ const b = new deps_js_1.BytesIO();
78511
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
78512
+ let flags = 0;
78513
+ flags |= this.unsave ? 1 << 0 : 0;
78514
+ flags |= this.afterId !== undefined ? 1 << 1 : 0;
78515
+ b.write(index_js_1.Primitive.Int.write(flags));
78516
+ if (this.id !== undefined) {
78517
+ b.write(this.id.write());
78518
+ }
78519
+ if (this.afterId !== undefined) {
78520
+ b.write(this.afterId.write());
78521
+ }
78522
+ return deps_js_1.Buffer.from(b.buffer);
78523
+ }
78524
+ }
78525
+ account.SaveMusic = SaveMusic;
78526
+ class GetSavedMusicIds extends index_js_1.TLObject {
78527
+ __response__;
78528
+ hash;
78529
+ constructor(params) {
78530
+ super();
78531
+ this.classType = 'functions';
78532
+ this.className = 'account.GetSavedMusicIds';
78533
+ this.constructorId = 0xe09d5faf;
78534
+ this.subclassOfId = 0x4b4af692;
78535
+ this._slots = ['hash'];
78536
+ this.hash = params.hash;
78537
+ }
78538
+ static async read(_data, ..._args) {
78539
+ let hash = await index_js_1.Primitive.Long.read(_data);
78540
+ return new Raw.account.GetSavedMusicIds({ hash: hash });
78541
+ }
78542
+ write() {
78543
+ const b = new deps_js_1.BytesIO();
78544
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
78545
+ if (this.hash !== undefined) {
78546
+ b.write(index_js_1.Primitive.Long.write(this.hash));
78547
+ }
78548
+ return deps_js_1.Buffer.from(b.buffer);
78549
+ }
78550
+ }
78551
+ account.GetSavedMusicIds = GetSavedMusicIds;
78552
+ class GetUniqueGiftChatThemes extends index_js_1.TLObject {
78553
+ __response__;
78554
+ offset;
78555
+ limit;
78556
+ hash;
78557
+ constructor(params) {
78558
+ super();
78559
+ this.classType = 'functions';
78560
+ this.className = 'account.GetUniqueGiftChatThemes';
78561
+ this.constructorId = 0xfe74ef9f;
78562
+ this.subclassOfId = 0x15c14aa8;
78563
+ this._slots = ['offset', 'limit', 'hash'];
78564
+ this.offset = params.offset;
78565
+ this.limit = params.limit;
78566
+ this.hash = params.hash;
78567
+ }
78568
+ static async read(_data, ..._args) {
78569
+ let offset = await index_js_1.Primitive.Int.read(_data);
78570
+ let limit = await index_js_1.Primitive.Int.read(_data);
78571
+ let hash = await index_js_1.Primitive.Long.read(_data);
78572
+ return new Raw.account.GetUniqueGiftChatThemes({
78573
+ offset: offset,
78574
+ limit: limit,
78575
+ hash: hash,
78576
+ });
78577
+ }
78578
+ write() {
78579
+ const b = new deps_js_1.BytesIO();
78580
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
78581
+ if (this.offset !== undefined) {
78582
+ b.write(index_js_1.Primitive.Int.write(this.offset));
78583
+ }
78584
+ if (this.limit !== undefined) {
78585
+ b.write(index_js_1.Primitive.Int.write(this.limit));
78586
+ }
78587
+ if (this.hash !== undefined) {
78588
+ b.write(index_js_1.Primitive.Long.write(this.hash));
78589
+ }
78590
+ return deps_js_1.Buffer.from(b.buffer);
78591
+ }
78592
+ }
78593
+ account.GetUniqueGiftChatThemes = GetUniqueGiftChatThemes;
77670
78594
  })(account = Raw.account || (Raw.account = {}));
77671
78595
  let channels;
77672
78596
  (function (channels) {
@@ -80173,43 +81097,68 @@ var Raw;
80173
81097
  class SearchPosts extends index_js_1.TLObject {
80174
81098
  __response__;
80175
81099
  hashtag;
81100
+ query;
80176
81101
  offsetRate;
80177
81102
  offsetPeer;
80178
81103
  offsetId;
80179
81104
  limit;
81105
+ allowPaidStars;
80180
81106
  constructor(params) {
80181
81107
  super();
80182
81108
  this.classType = 'functions';
80183
81109
  this.className = 'channels.SearchPosts';
80184
- this.constructorId = 0xd19f987b;
81110
+ this.constructorId = 0xf2c4f24d;
80185
81111
  this.subclassOfId = 0xd4b40b5e;
80186
- this._slots = ['hashtag', 'offsetRate', 'offsetPeer', 'offsetId', 'limit'];
81112
+ this._slots = [
81113
+ 'hashtag',
81114
+ 'query',
81115
+ 'offsetRate',
81116
+ 'offsetPeer',
81117
+ 'offsetId',
81118
+ 'limit',
81119
+ 'allowPaidStars',
81120
+ ];
80187
81121
  this.hashtag = params.hashtag;
81122
+ this.query = params.query;
80188
81123
  this.offsetRate = params.offsetRate;
80189
81124
  this.offsetPeer = params.offsetPeer;
80190
81125
  this.offsetId = params.offsetId;
80191
81126
  this.limit = params.limit;
81127
+ this.allowPaidStars = params.allowPaidStars;
80192
81128
  }
80193
81129
  static async read(_data, ..._args) {
80194
- let hashtag = await index_js_1.Primitive.String.read(_data);
81130
+ let flags = await index_js_1.Primitive.Int.read(_data);
81131
+ let hashtag = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
81132
+ let query = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
80195
81133
  let offsetRate = await index_js_1.Primitive.Int.read(_data);
80196
81134
  let offsetPeer = await index_js_1.TLObject.read(_data);
80197
81135
  let offsetId = await index_js_1.Primitive.Int.read(_data);
80198
81136
  let limit = await index_js_1.Primitive.Int.read(_data);
81137
+ let allowPaidStars = flags & (1 << 2) ? await index_js_1.Primitive.Long.read(_data) : undefined;
80199
81138
  return new Raw.channels.SearchPosts({
80200
81139
  hashtag: hashtag,
81140
+ query: query,
80201
81141
  offsetRate: offsetRate,
80202
81142
  offsetPeer: offsetPeer,
80203
81143
  offsetId: offsetId,
80204
81144
  limit: limit,
81145
+ allowPaidStars: allowPaidStars,
80205
81146
  });
80206
81147
  }
80207
81148
  write() {
80208
81149
  const b = new deps_js_1.BytesIO();
80209
81150
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81151
+ let flags = 0;
81152
+ flags |= this.hashtag !== undefined ? 1 << 0 : 0;
81153
+ flags |= this.query !== undefined ? 1 << 1 : 0;
81154
+ flags |= this.allowPaidStars !== undefined ? 1 << 2 : 0;
81155
+ b.write(index_js_1.Primitive.Int.write(flags));
80210
81156
  if (this.hashtag !== undefined) {
80211
81157
  b.write(index_js_1.Primitive.String.write(this.hashtag));
80212
81158
  }
81159
+ if (this.query !== undefined) {
81160
+ b.write(index_js_1.Primitive.String.write(this.query));
81161
+ }
80213
81162
  if (this.offsetRate !== undefined) {
80214
81163
  b.write(index_js_1.Primitive.Int.write(this.offsetRate));
80215
81164
  }
@@ -80222,6 +81171,9 @@ var Raw;
80222
81171
  if (this.limit !== undefined) {
80223
81172
  b.write(index_js_1.Primitive.Int.write(this.limit));
80224
81173
  }
81174
+ if (this.allowPaidStars !== undefined) {
81175
+ b.write(index_js_1.Primitive.Long.write(this.allowPaidStars));
81176
+ }
80225
81177
  return deps_js_1.Buffer.from(b.buffer);
80226
81178
  }
80227
81179
  }
@@ -80333,6 +81285,68 @@ var Raw;
80333
81285
  }
80334
81286
  }
80335
81287
  channels.GetMessageAuthor = GetMessageAuthor;
81288
+ class CheckSearchPostsFlood extends index_js_1.TLObject {
81289
+ __response__;
81290
+ query;
81291
+ constructor(params) {
81292
+ super();
81293
+ this.classType = 'functions';
81294
+ this.className = 'channels.CheckSearchPostsFlood';
81295
+ this.constructorId = 0x22567115;
81296
+ this.subclassOfId = 0xc2c0ccc1;
81297
+ this._slots = ['query'];
81298
+ this.query = params.query;
81299
+ }
81300
+ static async read(_data, ..._args) {
81301
+ let flags = await index_js_1.Primitive.Int.read(_data);
81302
+ let query = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
81303
+ return new Raw.channels.CheckSearchPostsFlood({ query: query });
81304
+ }
81305
+ write() {
81306
+ const b = new deps_js_1.BytesIO();
81307
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81308
+ let flags = 0;
81309
+ flags |= this.query !== undefined ? 1 << 0 : 0;
81310
+ b.write(index_js_1.Primitive.Int.write(flags));
81311
+ if (this.query !== undefined) {
81312
+ b.write(index_js_1.Primitive.String.write(this.query));
81313
+ }
81314
+ return deps_js_1.Buffer.from(b.buffer);
81315
+ }
81316
+ }
81317
+ channels.CheckSearchPostsFlood = CheckSearchPostsFlood;
81318
+ class SetMainProfileTab extends index_js_1.TLObject {
81319
+ __response__;
81320
+ channel;
81321
+ tab;
81322
+ constructor(params) {
81323
+ super();
81324
+ this.classType = 'functions';
81325
+ this.className = 'channels.SetMainProfileTab';
81326
+ this.constructorId = 0x3583fcb1;
81327
+ this.subclassOfId = 0xf5b399ac;
81328
+ this._slots = ['channel', 'tab'];
81329
+ this.channel = params.channel;
81330
+ this.tab = params.tab;
81331
+ }
81332
+ static async read(_data, ..._args) {
81333
+ let channel = await index_js_1.TLObject.read(_data);
81334
+ let tab = await index_js_1.TLObject.read(_data);
81335
+ return new Raw.channels.SetMainProfileTab({ channel: channel, tab: tab });
81336
+ }
81337
+ write() {
81338
+ const b = new deps_js_1.BytesIO();
81339
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81340
+ if (this.channel !== undefined) {
81341
+ b.write(this.channel.write());
81342
+ }
81343
+ if (this.tab !== undefined) {
81344
+ b.write(this.tab.write());
81345
+ }
81346
+ return deps_js_1.Buffer.from(b.buffer);
81347
+ }
81348
+ }
81349
+ channels.SetMainProfileTab = SetMainProfileTab;
80336
81350
  })(channels = Raw.channels || (Raw.channels = {}));
80337
81351
  let payments;
80338
81352
  (function (payments) {
@@ -81653,21 +82667,24 @@ var Raw;
81653
82667
  payments.StarGiftUpgradePreview = StarGiftUpgradePreview;
81654
82668
  class UniqueStarGift extends index_js_1.TLObject {
81655
82669
  gift;
82670
+ chats;
81656
82671
  users;
81657
82672
  constructor(params) {
81658
82673
  super();
81659
82674
  this.classType = 'types';
81660
82675
  this.className = 'payments.UniqueStarGift';
81661
- this.constructorId = 0xcaa2f60b;
82676
+ this.constructorId = 0x416c56e8;
81662
82677
  this.subclassOfId = 0x78b0c5fb;
81663
- this._slots = ['gift', 'users'];
82678
+ this._slots = ['gift', 'chats', 'users'];
81664
82679
  this.gift = params.gift;
82680
+ this.chats = params.chats;
81665
82681
  this.users = params.users;
81666
82682
  }
81667
82683
  static async read(_data, ..._args) {
81668
82684
  let gift = await index_js_1.TLObject.read(_data);
82685
+ let chats = await index_js_1.TLObject.read(_data);
81669
82686
  let users = await index_js_1.TLObject.read(_data);
81670
- return new Raw.payments.UniqueStarGift({ gift: gift, users: users });
82687
+ return new Raw.payments.UniqueStarGift({ gift: gift, chats: chats, users: users });
81671
82688
  }
81672
82689
  write() {
81673
82690
  const b = new deps_js_1.BytesIO();
@@ -81675,6 +82692,9 @@ var Raw;
81675
82692
  if (this.gift !== undefined) {
81676
82693
  b.write(this.gift.write());
81677
82694
  }
82695
+ if (this.chats) {
82696
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
82697
+ }
81678
82698
  if (this.users) {
81679
82699
  b.write(index_js_1.Primitive.Vector.write(this.users));
81680
82700
  }
@@ -81917,6 +82937,189 @@ var Raw;
81917
82937
  }
81918
82938
  }
81919
82939
  payments.StarGiftCollections = StarGiftCollections;
82940
+ class UniqueStarGiftValueInfo extends index_js_1.TLObject {
82941
+ lastSaleOnFragment;
82942
+ valueIsAverage;
82943
+ currency;
82944
+ value;
82945
+ initialSaleDate;
82946
+ initialSaleStars;
82947
+ initialSalePrice;
82948
+ lastSaleDate;
82949
+ lastSalePrice;
82950
+ floorPrice;
82951
+ averagePrice;
82952
+ listedCount;
82953
+ fragmentListedCount;
82954
+ fragmentListedUrl;
82955
+ constructor(params) {
82956
+ super();
82957
+ this.classType = 'types';
82958
+ this.className = 'payments.UniqueStarGiftValueInfo';
82959
+ this.constructorId = 0x512fe446;
82960
+ this.subclassOfId = 0x16355bc4;
82961
+ this._slots = [
82962
+ 'lastSaleOnFragment',
82963
+ 'valueIsAverage',
82964
+ 'currency',
82965
+ 'value',
82966
+ 'initialSaleDate',
82967
+ 'initialSaleStars',
82968
+ 'initialSalePrice',
82969
+ 'lastSaleDate',
82970
+ 'lastSalePrice',
82971
+ 'floorPrice',
82972
+ 'averagePrice',
82973
+ 'listedCount',
82974
+ 'fragmentListedCount',
82975
+ 'fragmentListedUrl',
82976
+ ];
82977
+ this.lastSaleOnFragment = params.lastSaleOnFragment;
82978
+ this.valueIsAverage = params.valueIsAverage;
82979
+ this.currency = params.currency;
82980
+ this.value = params.value;
82981
+ this.initialSaleDate = params.initialSaleDate;
82982
+ this.initialSaleStars = params.initialSaleStars;
82983
+ this.initialSalePrice = params.initialSalePrice;
82984
+ this.lastSaleDate = params.lastSaleDate;
82985
+ this.lastSalePrice = params.lastSalePrice;
82986
+ this.floorPrice = params.floorPrice;
82987
+ this.averagePrice = params.averagePrice;
82988
+ this.listedCount = params.listedCount;
82989
+ this.fragmentListedCount = params.fragmentListedCount;
82990
+ this.fragmentListedUrl = params.fragmentListedUrl;
82991
+ }
82992
+ static async read(_data, ..._args) {
82993
+ let flags = await index_js_1.Primitive.Int.read(_data);
82994
+ let lastSaleOnFragment = flags & (1 << 1) ? true : false;
82995
+ let valueIsAverage = flags & (1 << 6) ? true : false;
82996
+ let currency = await index_js_1.Primitive.String.read(_data);
82997
+ let value = await index_js_1.Primitive.Long.read(_data);
82998
+ let initialSaleDate = await index_js_1.Primitive.Int.read(_data);
82999
+ let initialSaleStars = await index_js_1.Primitive.Long.read(_data);
83000
+ let initialSalePrice = await index_js_1.Primitive.Long.read(_data);
83001
+ let lastSaleDate = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83002
+ let lastSalePrice = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83003
+ let floorPrice = flags & (1 << 2) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83004
+ let averagePrice = flags & (1 << 3) ? await index_js_1.Primitive.Long.read(_data) : undefined;
83005
+ let listedCount = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83006
+ let fragmentListedCount = flags & (1 << 5) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83007
+ let fragmentListedUrl = flags & (1 << 5) ? await index_js_1.Primitive.String.read(_data) : undefined;
83008
+ return new Raw.payments.UniqueStarGiftValueInfo({
83009
+ lastSaleOnFragment: lastSaleOnFragment,
83010
+ valueIsAverage: valueIsAverage,
83011
+ currency: currency,
83012
+ value: value,
83013
+ initialSaleDate: initialSaleDate,
83014
+ initialSaleStars: initialSaleStars,
83015
+ initialSalePrice: initialSalePrice,
83016
+ lastSaleDate: lastSaleDate,
83017
+ lastSalePrice: lastSalePrice,
83018
+ floorPrice: floorPrice,
83019
+ averagePrice: averagePrice,
83020
+ listedCount: listedCount,
83021
+ fragmentListedCount: fragmentListedCount,
83022
+ fragmentListedUrl: fragmentListedUrl,
83023
+ });
83024
+ }
83025
+ write() {
83026
+ const b = new deps_js_1.BytesIO();
83027
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83028
+ let flags = 0;
83029
+ flags |= this.lastSaleOnFragment ? 1 << 1 : 0;
83030
+ flags |= this.valueIsAverage ? 1 << 6 : 0;
83031
+ flags |= this.lastSaleDate !== undefined ? 1 << 0 : 0;
83032
+ flags |= this.lastSalePrice !== undefined ? 1 << 0 : 0;
83033
+ flags |= this.floorPrice !== undefined ? 1 << 2 : 0;
83034
+ flags |= this.averagePrice !== undefined ? 1 << 3 : 0;
83035
+ flags |= this.listedCount !== undefined ? 1 << 4 : 0;
83036
+ flags |= this.fragmentListedCount !== undefined ? 1 << 5 : 0;
83037
+ flags |= this.fragmentListedUrl !== undefined ? 1 << 5 : 0;
83038
+ b.write(index_js_1.Primitive.Int.write(flags));
83039
+ if (this.currency !== undefined) {
83040
+ b.write(index_js_1.Primitive.String.write(this.currency));
83041
+ }
83042
+ if (this.value !== undefined) {
83043
+ b.write(index_js_1.Primitive.Long.write(this.value));
83044
+ }
83045
+ if (this.initialSaleDate !== undefined) {
83046
+ b.write(index_js_1.Primitive.Int.write(this.initialSaleDate));
83047
+ }
83048
+ if (this.initialSaleStars !== undefined) {
83049
+ b.write(index_js_1.Primitive.Long.write(this.initialSaleStars));
83050
+ }
83051
+ if (this.initialSalePrice !== undefined) {
83052
+ b.write(index_js_1.Primitive.Long.write(this.initialSalePrice));
83053
+ }
83054
+ if (this.lastSaleDate !== undefined) {
83055
+ b.write(index_js_1.Primitive.Int.write(this.lastSaleDate));
83056
+ }
83057
+ if (this.lastSalePrice !== undefined) {
83058
+ b.write(index_js_1.Primitive.Long.write(this.lastSalePrice));
83059
+ }
83060
+ if (this.floorPrice !== undefined) {
83061
+ b.write(index_js_1.Primitive.Long.write(this.floorPrice));
83062
+ }
83063
+ if (this.averagePrice !== undefined) {
83064
+ b.write(index_js_1.Primitive.Long.write(this.averagePrice));
83065
+ }
83066
+ if (this.listedCount !== undefined) {
83067
+ b.write(index_js_1.Primitive.Int.write(this.listedCount));
83068
+ }
83069
+ if (this.fragmentListedCount !== undefined) {
83070
+ b.write(index_js_1.Primitive.Int.write(this.fragmentListedCount));
83071
+ }
83072
+ if (this.fragmentListedUrl !== undefined) {
83073
+ b.write(index_js_1.Primitive.String.write(this.fragmentListedUrl));
83074
+ }
83075
+ return deps_js_1.Buffer.from(b.buffer);
83076
+ }
83077
+ }
83078
+ payments.UniqueStarGiftValueInfo = UniqueStarGiftValueInfo;
83079
+ class CheckCanSendGiftResultOk extends index_js_1.TLObject {
83080
+ constructor() {
83081
+ super();
83082
+ this.classType = 'types';
83083
+ this.className = 'payments.CheckCanSendGiftResultOk';
83084
+ this.constructorId = 0x374fa7ad;
83085
+ this.subclassOfId = 0x632efa30;
83086
+ this._slots = [];
83087
+ }
83088
+ static async read(_data, ..._args) {
83089
+ return new Raw.payments.CheckCanSendGiftResultOk();
83090
+ }
83091
+ write() {
83092
+ const b = new deps_js_1.BytesIO();
83093
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83094
+ return deps_js_1.Buffer.from(b.buffer);
83095
+ }
83096
+ }
83097
+ payments.CheckCanSendGiftResultOk = CheckCanSendGiftResultOk;
83098
+ class CheckCanSendGiftResultFail extends index_js_1.TLObject {
83099
+ reason;
83100
+ constructor(params) {
83101
+ super();
83102
+ this.classType = 'types';
83103
+ this.className = 'payments.CheckCanSendGiftResultFail';
83104
+ this.constructorId = 0xd5e58274;
83105
+ this.subclassOfId = 0x632efa30;
83106
+ this._slots = ['reason'];
83107
+ this.reason = params.reason;
83108
+ }
83109
+ static async read(_data, ..._args) {
83110
+ let reason = await index_js_1.TLObject.read(_data);
83111
+ return new Raw.payments.CheckCanSendGiftResultFail({ reason: reason });
83112
+ }
83113
+ write() {
83114
+ const b = new deps_js_1.BytesIO();
83115
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83116
+ if (this.reason !== undefined) {
83117
+ b.write(this.reason.write());
83118
+ }
83119
+ return deps_js_1.Buffer.from(b.buffer);
83120
+ }
83121
+ }
83122
+ payments.CheckCanSendGiftResultFail = CheckCanSendGiftResultFail;
81920
83123
  class GetPaymentForm extends index_js_1.TLObject {
81921
83124
  __response__;
81922
83125
  invoice;
@@ -83418,9 +84621,10 @@ var Raw;
83418
84621
  excludeUnsaved;
83419
84622
  excludeSaved;
83420
84623
  excludeUnlimited;
83421
- excludeLimited;
83422
84624
  excludeUnique;
83423
84625
  sortByValue;
84626
+ excludeUpgradable;
84627
+ excludeUnupgradable;
83424
84628
  peer;
83425
84629
  collectionId;
83426
84630
  offset;
@@ -83435,9 +84639,10 @@ var Raw;
83435
84639
  'excludeUnsaved',
83436
84640
  'excludeSaved',
83437
84641
  'excludeUnlimited',
83438
- 'excludeLimited',
83439
84642
  'excludeUnique',
83440
84643
  'sortByValue',
84644
+ 'excludeUpgradable',
84645
+ 'excludeUnupgradable',
83441
84646
  'peer',
83442
84647
  'collectionId',
83443
84648
  'offset',
@@ -83446,9 +84651,10 @@ var Raw;
83446
84651
  this.excludeUnsaved = params.excludeUnsaved;
83447
84652
  this.excludeSaved = params.excludeSaved;
83448
84653
  this.excludeUnlimited = params.excludeUnlimited;
83449
- this.excludeLimited = params.excludeLimited;
83450
84654
  this.excludeUnique = params.excludeUnique;
83451
84655
  this.sortByValue = params.sortByValue;
84656
+ this.excludeUpgradable = params.excludeUpgradable;
84657
+ this.excludeUnupgradable = params.excludeUnupgradable;
83452
84658
  this.peer = params.peer;
83453
84659
  this.collectionId = params.collectionId;
83454
84660
  this.offset = params.offset;
@@ -83459,9 +84665,10 @@ var Raw;
83459
84665
  let excludeUnsaved = flags & (1 << 0) ? true : false;
83460
84666
  let excludeSaved = flags & (1 << 1) ? true : false;
83461
84667
  let excludeUnlimited = flags & (1 << 2) ? true : false;
83462
- let excludeLimited = flags & (1 << 3) ? true : false;
83463
84668
  let excludeUnique = flags & (1 << 4) ? true : false;
83464
84669
  let sortByValue = flags & (1 << 5) ? true : false;
84670
+ let excludeUpgradable = flags & (1 << 7) ? true : false;
84671
+ let excludeUnupgradable = flags & (1 << 8) ? true : false;
83465
84672
  let peer = await index_js_1.TLObject.read(_data);
83466
84673
  let collectionId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83467
84674
  let offset = await index_js_1.Primitive.String.read(_data);
@@ -83470,9 +84677,10 @@ var Raw;
83470
84677
  excludeUnsaved: excludeUnsaved,
83471
84678
  excludeSaved: excludeSaved,
83472
84679
  excludeUnlimited: excludeUnlimited,
83473
- excludeLimited: excludeLimited,
83474
84680
  excludeUnique: excludeUnique,
83475
84681
  sortByValue: sortByValue,
84682
+ excludeUpgradable: excludeUpgradable,
84683
+ excludeUnupgradable: excludeUnupgradable,
83476
84684
  peer: peer,
83477
84685
  collectionId: collectionId,
83478
84686
  offset: offset,
@@ -83486,9 +84694,10 @@ var Raw;
83486
84694
  flags |= this.excludeUnsaved ? 1 << 0 : 0;
83487
84695
  flags |= this.excludeSaved ? 1 << 1 : 0;
83488
84696
  flags |= this.excludeUnlimited ? 1 << 2 : 0;
83489
- flags |= this.excludeLimited ? 1 << 3 : 0;
83490
84697
  flags |= this.excludeUnique ? 1 << 4 : 0;
83491
84698
  flags |= this.sortByValue ? 1 << 5 : 0;
84699
+ flags |= this.excludeUpgradable ? 1 << 7 : 0;
84700
+ flags |= this.excludeUnupgradable ? 1 << 8 : 0;
83492
84701
  flags |= this.collectionId !== undefined ? 1 << 6 : 0;
83493
84702
  b.write(index_js_1.Primitive.Int.write(flags));
83494
84703
  if (this.peer !== undefined) {
@@ -83741,23 +84950,23 @@ var Raw;
83741
84950
  class UpdateStarGiftPrice extends index_js_1.TLObject {
83742
84951
  __response__;
83743
84952
  stargift;
83744
- resellStars;
84953
+ resellAmount;
83745
84954
  constructor(params) {
83746
84955
  super();
83747
84956
  this.classType = 'functions';
83748
84957
  this.className = 'payments.UpdateStarGiftPrice';
83749
- this.constructorId = 0x3baea4e1;
84958
+ this.constructorId = 0xedbe6ccb;
83750
84959
  this.subclassOfId = 0x8af52aac;
83751
- this._slots = ['stargift', 'resellStars'];
84960
+ this._slots = ['stargift', 'resellAmount'];
83752
84961
  this.stargift = params.stargift;
83753
- this.resellStars = params.resellStars;
84962
+ this.resellAmount = params.resellAmount;
83754
84963
  }
83755
84964
  static async read(_data, ..._args) {
83756
84965
  let stargift = await index_js_1.TLObject.read(_data);
83757
- let resellStars = await index_js_1.Primitive.Long.read(_data);
84966
+ let resellAmount = await index_js_1.TLObject.read(_data);
83758
84967
  return new Raw.payments.UpdateStarGiftPrice({
83759
84968
  stargift: stargift,
83760
- resellStars: resellStars,
84969
+ resellAmount: resellAmount,
83761
84970
  });
83762
84971
  }
83763
84972
  write() {
@@ -83766,8 +84975,8 @@ var Raw;
83766
84975
  if (this.stargift !== undefined) {
83767
84976
  b.write(this.stargift.write());
83768
84977
  }
83769
- if (this.resellStars !== undefined) {
83770
- b.write(index_js_1.Primitive.Long.write(this.resellStars));
84978
+ if (this.resellAmount !== undefined) {
84979
+ b.write(this.resellAmount.write());
83771
84980
  }
83772
84981
  return deps_js_1.Buffer.from(b.buffer);
83773
84982
  }
@@ -83984,6 +85193,58 @@ var Raw;
83984
85193
  }
83985
85194
  }
83986
85195
  payments.GetStarGiftCollections = GetStarGiftCollections;
85196
+ class GetUniqueStarGiftValueInfo extends index_js_1.TLObject {
85197
+ __response__;
85198
+ slug;
85199
+ constructor(params) {
85200
+ super();
85201
+ this.classType = 'functions';
85202
+ this.className = 'payments.GetUniqueStarGiftValueInfo';
85203
+ this.constructorId = 0x4365af6b;
85204
+ this.subclassOfId = 0x16355bc4;
85205
+ this._slots = ['slug'];
85206
+ this.slug = params.slug;
85207
+ }
85208
+ static async read(_data, ..._args) {
85209
+ let slug = await index_js_1.Primitive.String.read(_data);
85210
+ return new Raw.payments.GetUniqueStarGiftValueInfo({ slug: slug });
85211
+ }
85212
+ write() {
85213
+ const b = new deps_js_1.BytesIO();
85214
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
85215
+ if (this.slug !== undefined) {
85216
+ b.write(index_js_1.Primitive.String.write(this.slug));
85217
+ }
85218
+ return deps_js_1.Buffer.from(b.buffer);
85219
+ }
85220
+ }
85221
+ payments.GetUniqueStarGiftValueInfo = GetUniqueStarGiftValueInfo;
85222
+ class CheckCanSendGift extends index_js_1.TLObject {
85223
+ __response__;
85224
+ giftId;
85225
+ constructor(params) {
85226
+ super();
85227
+ this.classType = 'functions';
85228
+ this.className = 'payments.CheckCanSendGift';
85229
+ this.constructorId = 0xc0c4edc9;
85230
+ this.subclassOfId = 0x632efa30;
85231
+ this._slots = ['giftId'];
85232
+ this.giftId = params.giftId;
85233
+ }
85234
+ static async read(_data, ..._args) {
85235
+ let giftId = await index_js_1.Primitive.Long.read(_data);
85236
+ return new Raw.payments.CheckCanSendGift({ giftId: giftId });
85237
+ }
85238
+ write() {
85239
+ const b = new deps_js_1.BytesIO();
85240
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
85241
+ if (this.giftId !== undefined) {
85242
+ b.write(index_js_1.Primitive.Long.write(this.giftId));
85243
+ }
85244
+ return deps_js_1.Buffer.from(b.buffer);
85245
+ }
85246
+ }
85247
+ payments.CheckCanSendGift = CheckCanSendGift;
83987
85248
  })(payments = Raw.payments || (Raw.payments = {}));
83988
85249
  let phone;
83989
85250
  (function (phone) {
@@ -87087,6 +88348,62 @@ var Raw;
87087
88348
  }
87088
88349
  }
87089
88350
  users_1.UsersSlice = UsersSlice;
88351
+ class SavedMusicNotModified extends index_js_1.TLObject {
88352
+ count;
88353
+ constructor(params) {
88354
+ super();
88355
+ this.classType = 'types';
88356
+ this.className = 'users.SavedMusicNotModified';
88357
+ this.constructorId = 0xe3878aa4;
88358
+ this.subclassOfId = 0xf813ae37;
88359
+ this._slots = ['count'];
88360
+ this.count = params.count;
88361
+ }
88362
+ static async read(_data, ..._args) {
88363
+ let count = await index_js_1.Primitive.Int.read(_data);
88364
+ return new Raw.users.SavedMusicNotModified({ count: count });
88365
+ }
88366
+ write() {
88367
+ const b = new deps_js_1.BytesIO();
88368
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
88369
+ if (this.count !== undefined) {
88370
+ b.write(index_js_1.Primitive.Int.write(this.count));
88371
+ }
88372
+ return deps_js_1.Buffer.from(b.buffer);
88373
+ }
88374
+ }
88375
+ users_1.SavedMusicNotModified = SavedMusicNotModified;
88376
+ class SavedMusic extends index_js_1.TLObject {
88377
+ count;
88378
+ documents;
88379
+ constructor(params) {
88380
+ super();
88381
+ this.classType = 'types';
88382
+ this.className = 'users.SavedMusic';
88383
+ this.constructorId = 0x34a2f297;
88384
+ this.subclassOfId = 0xf813ae37;
88385
+ this._slots = ['count', 'documents'];
88386
+ this.count = params.count;
88387
+ this.documents = params.documents;
88388
+ }
88389
+ static async read(_data, ..._args) {
88390
+ let count = await index_js_1.Primitive.Int.read(_data);
88391
+ let documents = await index_js_1.TLObject.read(_data);
88392
+ return new Raw.users.SavedMusic({ count: count, documents: documents });
88393
+ }
88394
+ write() {
88395
+ const b = new deps_js_1.BytesIO();
88396
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
88397
+ if (this.count !== undefined) {
88398
+ b.write(index_js_1.Primitive.Int.write(this.count));
88399
+ }
88400
+ if (this.documents) {
88401
+ b.write(index_js_1.Primitive.Vector.write(this.documents));
88402
+ }
88403
+ return deps_js_1.Buffer.from(b.buffer);
88404
+ }
88405
+ }
88406
+ users_1.SavedMusic = SavedMusic;
87090
88407
  class GetUsers extends index_js_1.TLObject {
87091
88408
  __response__;
87092
88409
  id;
@@ -87197,6 +88514,82 @@ var Raw;
87197
88514
  }
87198
88515
  }
87199
88516
  users_1.GetRequirementsToContact = GetRequirementsToContact;
88517
+ class GetSavedMusic extends index_js_1.TLObject {
88518
+ __response__;
88519
+ id;
88520
+ offset;
88521
+ limit;
88522
+ hash;
88523
+ constructor(params) {
88524
+ super();
88525
+ this.classType = 'functions';
88526
+ this.className = 'users.GetSavedMusic';
88527
+ this.constructorId = 0x788d7fe3;
88528
+ this.subclassOfId = 0xf813ae37;
88529
+ this._slots = ['id', 'offset', 'limit', 'hash'];
88530
+ this.id = params.id;
88531
+ this.offset = params.offset;
88532
+ this.limit = params.limit;
88533
+ this.hash = params.hash;
88534
+ }
88535
+ static async read(_data, ..._args) {
88536
+ let id = await index_js_1.TLObject.read(_data);
88537
+ let offset = await index_js_1.Primitive.Int.read(_data);
88538
+ let limit = await index_js_1.Primitive.Int.read(_data);
88539
+ let hash = await index_js_1.Primitive.Long.read(_data);
88540
+ return new Raw.users.GetSavedMusic({ id: id, offset: offset, limit: limit, hash: hash });
88541
+ }
88542
+ write() {
88543
+ const b = new deps_js_1.BytesIO();
88544
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
88545
+ if (this.id !== undefined) {
88546
+ b.write(this.id.write());
88547
+ }
88548
+ if (this.offset !== undefined) {
88549
+ b.write(index_js_1.Primitive.Int.write(this.offset));
88550
+ }
88551
+ if (this.limit !== undefined) {
88552
+ b.write(index_js_1.Primitive.Int.write(this.limit));
88553
+ }
88554
+ if (this.hash !== undefined) {
88555
+ b.write(index_js_1.Primitive.Long.write(this.hash));
88556
+ }
88557
+ return deps_js_1.Buffer.from(b.buffer);
88558
+ }
88559
+ }
88560
+ users_1.GetSavedMusic = GetSavedMusic;
88561
+ class GetSavedMusicByID extends index_js_1.TLObject {
88562
+ __response__;
88563
+ id;
88564
+ documents;
88565
+ constructor(params) {
88566
+ super();
88567
+ this.classType = 'functions';
88568
+ this.className = 'users.GetSavedMusicByID';
88569
+ this.constructorId = 0x7573a4e9;
88570
+ this.subclassOfId = 0xf813ae37;
88571
+ this._slots = ['id', 'documents'];
88572
+ this.id = params.id;
88573
+ this.documents = params.documents;
88574
+ }
88575
+ static async read(_data, ..._args) {
88576
+ let id = await index_js_1.TLObject.read(_data);
88577
+ let documents = await index_js_1.TLObject.read(_data);
88578
+ return new Raw.users.GetSavedMusicByID({ id: id, documents: documents });
88579
+ }
88580
+ write() {
88581
+ const b = new deps_js_1.BytesIO();
88582
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
88583
+ if (this.id !== undefined) {
88584
+ b.write(this.id.write());
88585
+ }
88586
+ if (this.documents) {
88587
+ b.write(index_js_1.Primitive.Vector.write(this.documents));
88588
+ }
88589
+ return deps_js_1.Buffer.from(b.buffer);
88590
+ }
88591
+ }
88592
+ users_1.GetSavedMusicByID = GetSavedMusicByID;
87200
88593
  })(users = Raw.users || (Raw.users = {}));
87201
88594
  let chatlists;
87202
88595
  (function (chatlists) {
@@ -89396,6 +90789,56 @@ var Raw;
89396
90789
  }
89397
90790
  }
89398
90791
  stories_1.CanSendStoryCount = CanSendStoryCount;
90792
+ class AlbumsNotModified extends index_js_1.TLObject {
90793
+ constructor() {
90794
+ super();
90795
+ this.classType = 'types';
90796
+ this.className = 'stories.AlbumsNotModified';
90797
+ this.constructorId = 0x564edaeb;
90798
+ this.subclassOfId = 0x5a73d39;
90799
+ this._slots = [];
90800
+ }
90801
+ static async read(_data, ..._args) {
90802
+ return new Raw.stories.AlbumsNotModified();
90803
+ }
90804
+ write() {
90805
+ const b = new deps_js_1.BytesIO();
90806
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90807
+ return deps_js_1.Buffer.from(b.buffer);
90808
+ }
90809
+ }
90810
+ stories_1.AlbumsNotModified = AlbumsNotModified;
90811
+ class Albums extends index_js_1.TLObject {
90812
+ hash;
90813
+ albums;
90814
+ constructor(params) {
90815
+ super();
90816
+ this.classType = 'types';
90817
+ this.className = 'stories.Albums';
90818
+ this.constructorId = 0xc3987a3a;
90819
+ this.subclassOfId = 0x5a73d39;
90820
+ this._slots = ['hash', 'albums'];
90821
+ this.hash = params.hash;
90822
+ this.albums = params.albums;
90823
+ }
90824
+ static async read(_data, ..._args) {
90825
+ let hash = await index_js_1.Primitive.Long.read(_data);
90826
+ let albums = await index_js_1.TLObject.read(_data);
90827
+ return new Raw.stories.Albums({ hash: hash, albums: albums });
90828
+ }
90829
+ write() {
90830
+ const b = new deps_js_1.BytesIO();
90831
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90832
+ if (this.hash !== undefined) {
90833
+ b.write(index_js_1.Primitive.Long.write(this.hash));
90834
+ }
90835
+ if (this.albums) {
90836
+ b.write(index_js_1.Primitive.Vector.write(this.albums));
90837
+ }
90838
+ return deps_js_1.Buffer.from(b.buffer);
90839
+ }
90840
+ }
90841
+ stories_1.Albums = Albums;
89399
90842
  class CanSendStory extends index_js_1.TLObject {
89400
90843
  __response__;
89401
90844
  peer;
@@ -89437,11 +90880,12 @@ var Raw;
89437
90880
  period;
89438
90881
  fwdFromId;
89439
90882
  fwdFromStory;
90883
+ albums;
89440
90884
  constructor(params) {
89441
90885
  super();
89442
90886
  this.classType = 'functions';
89443
90887
  this.className = 'stories.SendStory';
89444
- this.constructorId = 0xe4e6694b;
90888
+ this.constructorId = 0x737fc2ec;
89445
90889
  this.subclassOfId = 0x8af52aac;
89446
90890
  this._slots = [
89447
90891
  'pinned',
@@ -89457,6 +90901,7 @@ var Raw;
89457
90901
  'period',
89458
90902
  'fwdFromId',
89459
90903
  'fwdFromStory',
90904
+ 'albums',
89460
90905
  ];
89461
90906
  this.pinned = params.pinned;
89462
90907
  this.noforwards = params.noforwards;
@@ -89471,6 +90916,7 @@ var Raw;
89471
90916
  this.period = params.period;
89472
90917
  this.fwdFromId = params.fwdFromId;
89473
90918
  this.fwdFromStory = params.fwdFromStory;
90919
+ this.albums = params.albums;
89474
90920
  }
89475
90921
  static async read(_data, ..._args) {
89476
90922
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -89487,6 +90933,7 @@ var Raw;
89487
90933
  let period = flags & (1 << 3) ? await index_js_1.Primitive.Int.read(_data) : undefined;
89488
90934
  let fwdFromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
89489
90935
  let fwdFromStory = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
90936
+ let albums = flags & (1 << 8) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
89490
90937
  return new Raw.stories.SendStory({
89491
90938
  pinned: pinned,
89492
90939
  noforwards: noforwards,
@@ -89501,6 +90948,7 @@ var Raw;
89501
90948
  period: period,
89502
90949
  fwdFromId: fwdFromId,
89503
90950
  fwdFromStory: fwdFromStory,
90951
+ albums: albums,
89504
90952
  });
89505
90953
  }
89506
90954
  write() {
@@ -89516,6 +90964,7 @@ var Raw;
89516
90964
  flags |= this.period !== undefined ? 1 << 3 : 0;
89517
90965
  flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
89518
90966
  flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
90967
+ flags |= this.albums ? 1 << 8 : 0;
89519
90968
  b.write(index_js_1.Primitive.Int.write(flags));
89520
90969
  if (this.peer !== undefined) {
89521
90970
  b.write(this.peer.write());
@@ -89547,6 +90996,9 @@ var Raw;
89547
90996
  if (this.fwdFromStory !== undefined) {
89548
90997
  b.write(index_js_1.Primitive.Int.write(this.fwdFromStory));
89549
90998
  }
90999
+ if (this.albums) {
91000
+ b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
91001
+ }
89550
91002
  return deps_js_1.Buffer.from(b.buffer);
89551
91003
  }
89552
91004
  }
@@ -90492,6 +91944,259 @@ var Raw;
90492
91944
  }
90493
91945
  }
90494
91946
  stories_1.SearchPosts = SearchPosts;
91947
+ class CreateAlbum extends index_js_1.TLObject {
91948
+ __response__;
91949
+ peer;
91950
+ title;
91951
+ stories;
91952
+ constructor(params) {
91953
+ super();
91954
+ this.classType = 'functions';
91955
+ this.className = 'stories.CreateAlbum';
91956
+ this.constructorId = 0xa36396e5;
91957
+ this.subclassOfId = 0x7c8c5ea2;
91958
+ this._slots = ['peer', 'title', 'stories'];
91959
+ this.peer = params.peer;
91960
+ this.title = params.title;
91961
+ this.stories = params.stories;
91962
+ }
91963
+ static async read(_data, ..._args) {
91964
+ let peer = await index_js_1.TLObject.read(_data);
91965
+ let title = await index_js_1.Primitive.String.read(_data);
91966
+ let stories = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
91967
+ return new Raw.stories.CreateAlbum({ peer: peer, title: title, stories: stories });
91968
+ }
91969
+ write() {
91970
+ const b = new deps_js_1.BytesIO();
91971
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
91972
+ if (this.peer !== undefined) {
91973
+ b.write(this.peer.write());
91974
+ }
91975
+ if (this.title !== undefined) {
91976
+ b.write(index_js_1.Primitive.String.write(this.title));
91977
+ }
91978
+ if (this.stories) {
91979
+ b.write(index_js_1.Primitive.Vector.write(this.stories, index_js_1.Primitive.Int));
91980
+ }
91981
+ return deps_js_1.Buffer.from(b.buffer);
91982
+ }
91983
+ }
91984
+ stories_1.CreateAlbum = CreateAlbum;
91985
+ class UpdateAlbum extends index_js_1.TLObject {
91986
+ __response__;
91987
+ peer;
91988
+ albumId;
91989
+ title;
91990
+ deleteStories;
91991
+ addStories;
91992
+ order;
91993
+ constructor(params) {
91994
+ super();
91995
+ this.classType = 'functions';
91996
+ this.className = 'stories.UpdateAlbum';
91997
+ this.constructorId = 0x5e5259b6;
91998
+ this.subclassOfId = 0x7c8c5ea2;
91999
+ this._slots = ['peer', 'albumId', 'title', 'deleteStories', 'addStories', 'order'];
92000
+ this.peer = params.peer;
92001
+ this.albumId = params.albumId;
92002
+ this.title = params.title;
92003
+ this.deleteStories = params.deleteStories;
92004
+ this.addStories = params.addStories;
92005
+ this.order = params.order;
92006
+ }
92007
+ static async read(_data, ..._args) {
92008
+ let flags = await index_js_1.Primitive.Int.read(_data);
92009
+ let peer = await index_js_1.TLObject.read(_data);
92010
+ let albumId = await index_js_1.Primitive.Int.read(_data);
92011
+ let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
92012
+ let deleteStories = flags & (1 << 1) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
92013
+ let addStories = flags & (1 << 2) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
92014
+ let order = flags & (1 << 3) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
92015
+ return new Raw.stories.UpdateAlbum({
92016
+ peer: peer,
92017
+ albumId: albumId,
92018
+ title: title,
92019
+ deleteStories: deleteStories,
92020
+ addStories: addStories,
92021
+ order: order,
92022
+ });
92023
+ }
92024
+ write() {
92025
+ const b = new deps_js_1.BytesIO();
92026
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
92027
+ let flags = 0;
92028
+ flags |= this.title !== undefined ? 1 << 0 : 0;
92029
+ flags |= this.deleteStories ? 1 << 1 : 0;
92030
+ flags |= this.addStories ? 1 << 2 : 0;
92031
+ flags |= this.order ? 1 << 3 : 0;
92032
+ b.write(index_js_1.Primitive.Int.write(flags));
92033
+ if (this.peer !== undefined) {
92034
+ b.write(this.peer.write());
92035
+ }
92036
+ if (this.albumId !== undefined) {
92037
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
92038
+ }
92039
+ if (this.title !== undefined) {
92040
+ b.write(index_js_1.Primitive.String.write(this.title));
92041
+ }
92042
+ if (this.deleteStories) {
92043
+ b.write(index_js_1.Primitive.Vector.write(this.deleteStories, index_js_1.Primitive.Int));
92044
+ }
92045
+ if (this.addStories) {
92046
+ b.write(index_js_1.Primitive.Vector.write(this.addStories, index_js_1.Primitive.Int));
92047
+ }
92048
+ if (this.order) {
92049
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
92050
+ }
92051
+ return deps_js_1.Buffer.from(b.buffer);
92052
+ }
92053
+ }
92054
+ stories_1.UpdateAlbum = UpdateAlbum;
92055
+ class ReorderAlbums extends index_js_1.TLObject {
92056
+ __response__;
92057
+ peer;
92058
+ order;
92059
+ constructor(params) {
92060
+ super();
92061
+ this.classType = 'functions';
92062
+ this.className = 'stories.ReorderAlbums';
92063
+ this.constructorId = 0x8535fbd9;
92064
+ this.subclassOfId = 0xf5b399ac;
92065
+ this._slots = ['peer', 'order'];
92066
+ this.peer = params.peer;
92067
+ this.order = params.order;
92068
+ }
92069
+ static async read(_data, ..._args) {
92070
+ let peer = await index_js_1.TLObject.read(_data);
92071
+ let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
92072
+ return new Raw.stories.ReorderAlbums({ peer: peer, order: order });
92073
+ }
92074
+ write() {
92075
+ const b = new deps_js_1.BytesIO();
92076
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
92077
+ if (this.peer !== undefined) {
92078
+ b.write(this.peer.write());
92079
+ }
92080
+ if (this.order) {
92081
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
92082
+ }
92083
+ return deps_js_1.Buffer.from(b.buffer);
92084
+ }
92085
+ }
92086
+ stories_1.ReorderAlbums = ReorderAlbums;
92087
+ class DeleteAlbum extends index_js_1.TLObject {
92088
+ __response__;
92089
+ peer;
92090
+ albumId;
92091
+ constructor(params) {
92092
+ super();
92093
+ this.classType = 'functions';
92094
+ this.className = 'stories.DeleteAlbum';
92095
+ this.constructorId = 0x8d3456d0;
92096
+ this.subclassOfId = 0xf5b399ac;
92097
+ this._slots = ['peer', 'albumId'];
92098
+ this.peer = params.peer;
92099
+ this.albumId = params.albumId;
92100
+ }
92101
+ static async read(_data, ..._args) {
92102
+ let peer = await index_js_1.TLObject.read(_data);
92103
+ let albumId = await index_js_1.Primitive.Int.read(_data);
92104
+ return new Raw.stories.DeleteAlbum({ peer: peer, albumId: albumId });
92105
+ }
92106
+ write() {
92107
+ const b = new deps_js_1.BytesIO();
92108
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
92109
+ if (this.peer !== undefined) {
92110
+ b.write(this.peer.write());
92111
+ }
92112
+ if (this.albumId !== undefined) {
92113
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
92114
+ }
92115
+ return deps_js_1.Buffer.from(b.buffer);
92116
+ }
92117
+ }
92118
+ stories_1.DeleteAlbum = DeleteAlbum;
92119
+ class GetAlbums extends index_js_1.TLObject {
92120
+ __response__;
92121
+ peer;
92122
+ hash;
92123
+ constructor(params) {
92124
+ super();
92125
+ this.classType = 'functions';
92126
+ this.className = 'stories.GetAlbums';
92127
+ this.constructorId = 0x25b3eac7;
92128
+ this.subclassOfId = 0x5a73d39;
92129
+ this._slots = ['peer', 'hash'];
92130
+ this.peer = params.peer;
92131
+ this.hash = params.hash;
92132
+ }
92133
+ static async read(_data, ..._args) {
92134
+ let peer = await index_js_1.TLObject.read(_data);
92135
+ let hash = await index_js_1.Primitive.Long.read(_data);
92136
+ return new Raw.stories.GetAlbums({ peer: peer, hash: hash });
92137
+ }
92138
+ write() {
92139
+ const b = new deps_js_1.BytesIO();
92140
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
92141
+ if (this.peer !== undefined) {
92142
+ b.write(this.peer.write());
92143
+ }
92144
+ if (this.hash !== undefined) {
92145
+ b.write(index_js_1.Primitive.Long.write(this.hash));
92146
+ }
92147
+ return deps_js_1.Buffer.from(b.buffer);
92148
+ }
92149
+ }
92150
+ stories_1.GetAlbums = GetAlbums;
92151
+ class GetAlbumStories extends index_js_1.TLObject {
92152
+ __response__;
92153
+ peer;
92154
+ albumId;
92155
+ offset;
92156
+ limit;
92157
+ constructor(params) {
92158
+ super();
92159
+ this.classType = 'functions';
92160
+ this.className = 'stories.GetAlbumStories';
92161
+ this.constructorId = 0xac806d61;
92162
+ this.subclassOfId = 0x251c0c2c;
92163
+ this._slots = ['peer', 'albumId', 'offset', 'limit'];
92164
+ this.peer = params.peer;
92165
+ this.albumId = params.albumId;
92166
+ this.offset = params.offset;
92167
+ this.limit = params.limit;
92168
+ }
92169
+ static async read(_data, ..._args) {
92170
+ let peer = await index_js_1.TLObject.read(_data);
92171
+ let albumId = await index_js_1.Primitive.Int.read(_data);
92172
+ let offset = await index_js_1.Primitive.Int.read(_data);
92173
+ let limit = await index_js_1.Primitive.Int.read(_data);
92174
+ return new Raw.stories.GetAlbumStories({
92175
+ peer: peer,
92176
+ albumId: albumId,
92177
+ offset: offset,
92178
+ limit: limit,
92179
+ });
92180
+ }
92181
+ write() {
92182
+ const b = new deps_js_1.BytesIO();
92183
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
92184
+ if (this.peer !== undefined) {
92185
+ b.write(this.peer.write());
92186
+ }
92187
+ if (this.albumId !== undefined) {
92188
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
92189
+ }
92190
+ if (this.offset !== undefined) {
92191
+ b.write(index_js_1.Primitive.Int.write(this.offset));
92192
+ }
92193
+ if (this.limit !== undefined) {
92194
+ b.write(index_js_1.Primitive.Int.write(this.limit));
92195
+ }
92196
+ return deps_js_1.Buffer.from(b.buffer);
92197
+ }
92198
+ }
92199
+ stories_1.GetAlbumStories = GetAlbumStories;
90495
92200
  })(stories = Raw.stories || (Raw.stories = {}));
90496
92201
  let premium;
90497
92202
  (function (premium) {