@tgsnake/skema 1.3.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 = 211;
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,6 +9536,7 @@ var Raw;
9497
9536
  transferred;
9498
9537
  saved;
9499
9538
  refunded;
9539
+ prepaidUpgrade;
9500
9540
  gift;
9501
9541
  canExportAt;
9502
9542
  transferStars;
@@ -9517,6 +9557,7 @@ var Raw;
9517
9557
  'transferred',
9518
9558
  'saved',
9519
9559
  'refunded',
9560
+ 'prepaidUpgrade',
9520
9561
  'gift',
9521
9562
  'canExportAt',
9522
9563
  'transferStars',
@@ -9531,6 +9572,7 @@ 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;
@@ -9547,6 +9589,7 @@ 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;
@@ -9561,6 +9604,7 @@ 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,
@@ -9580,6 +9624,7 @@ 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;
@@ -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;
@@ -11477,11 +11522,13 @@ var Raw;
11477
11522
  starsRating;
11478
11523
  starsMyPendingRating;
11479
11524
  starsMyPendingRatingDate;
11525
+ mainTab;
11526
+ savedMusic;
11480
11527
  constructor(params) {
11481
11528
  super();
11482
11529
  this.classType = 'types';
11483
11530
  this.className = 'UserFull';
11484
- this.constructorId = 0x7e63ce1f;
11531
+ this.constructorId = 0xc577b5ad;
11485
11532
  this.subclassOfId = 0x1f4661b9;
11486
11533
  this._slots = [
11487
11534
  'blocked',
@@ -11513,7 +11560,7 @@ var Raw;
11513
11560
  'commonChatsCount',
11514
11561
  'folderId',
11515
11562
  'ttlPeriod',
11516
- 'themeEmoticon',
11563
+ 'theme',
11517
11564
  'privateForwardName',
11518
11565
  'botGroupAdminRights',
11519
11566
  'botBroadcastAdminRights',
@@ -11535,6 +11582,8 @@ var Raw;
11535
11582
  'starsRating',
11536
11583
  'starsMyPendingRating',
11537
11584
  'starsMyPendingRatingDate',
11585
+ 'mainTab',
11586
+ 'savedMusic',
11538
11587
  ];
11539
11588
  this.blocked = params.blocked;
11540
11589
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -11565,7 +11614,7 @@ var Raw;
11565
11614
  this.commonChatsCount = params.commonChatsCount;
11566
11615
  this.folderId = params.folderId;
11567
11616
  this.ttlPeriod = params.ttlPeriod;
11568
- this.themeEmoticon = params.themeEmoticon;
11617
+ this.theme = params.theme;
11569
11618
  this.privateForwardName = params.privateForwardName;
11570
11619
  this.botGroupAdminRights = params.botGroupAdminRights;
11571
11620
  this.botBroadcastAdminRights = params.botBroadcastAdminRights;
@@ -11587,6 +11636,8 @@ var Raw;
11587
11636
  this.starsRating = params.starsRating;
11588
11637
  this.starsMyPendingRating = params.starsMyPendingRating;
11589
11638
  this.starsMyPendingRatingDate = params.starsMyPendingRatingDate;
11639
+ this.mainTab = params.mainTab;
11640
+ this.savedMusic = params.savedMusic;
11590
11641
  }
11591
11642
  static async read(_data, ..._args) {
11592
11643
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -11620,7 +11671,7 @@ var Raw;
11620
11671
  let commonChatsCount = await index_js_1.Primitive.Int.read(_data);
11621
11672
  let folderId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11622
11673
  let ttlPeriod = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11623
- let themeEmoticon = flags & (1 << 15) ? await index_js_1.Primitive.String.read(_data) : undefined;
11674
+ let theme = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11624
11675
  let privateForwardName = flags & (1 << 16) ? await index_js_1.Primitive.String.read(_data) : undefined;
11625
11676
  let botGroupAdminRights = flags & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11626
11677
  let botBroadcastAdminRights = flags & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -11642,6 +11693,8 @@ var Raw;
11642
11693
  let starsRating = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11643
11694
  let starsMyPendingRating = flags2 & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
11644
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;
11645
11698
  return new Raw.UserFull({
11646
11699
  blocked: blocked,
11647
11700
  phoneCallsAvailable: phoneCallsAvailable,
@@ -11672,7 +11725,7 @@ var Raw;
11672
11725
  commonChatsCount: commonChatsCount,
11673
11726
  folderId: folderId,
11674
11727
  ttlPeriod: ttlPeriod,
11675
- themeEmoticon: themeEmoticon,
11728
+ theme: theme,
11676
11729
  privateForwardName: privateForwardName,
11677
11730
  botGroupAdminRights: botGroupAdminRights,
11678
11731
  botBroadcastAdminRights: botBroadcastAdminRights,
@@ -11694,6 +11747,8 @@ var Raw;
11694
11747
  starsRating: starsRating,
11695
11748
  starsMyPendingRating: starsMyPendingRating,
11696
11749
  starsMyPendingRatingDate: starsMyPendingRatingDate,
11750
+ mainTab: mainTab,
11751
+ savedMusic: savedMusic,
11697
11752
  });
11698
11753
  }
11699
11754
  write() {
@@ -11721,7 +11776,7 @@ var Raw;
11721
11776
  flags |= this.pinnedMsgId !== undefined ? 1 << 6 : 0;
11722
11777
  flags |= this.folderId !== undefined ? 1 << 11 : 0;
11723
11778
  flags |= this.ttlPeriod !== undefined ? 1 << 14 : 0;
11724
- flags |= this.themeEmoticon !== undefined ? 1 << 15 : 0;
11779
+ flags |= this.theme !== undefined ? 1 << 15 : 0;
11725
11780
  flags |= this.privateForwardName !== undefined ? 1 << 16 : 0;
11726
11781
  flags |= this.botGroupAdminRights !== undefined ? 1 << 17 : 0;
11727
11782
  flags |= this.botBroadcastAdminRights !== undefined ? 1 << 18 : 0;
@@ -11749,6 +11804,8 @@ var Raw;
11749
11804
  flags2 |= this.starsRating !== undefined ? 1 << 17 : 0;
11750
11805
  flags2 |= this.starsMyPendingRating !== undefined ? 1 << 18 : 0;
11751
11806
  flags2 |= this.starsMyPendingRatingDate !== undefined ? 1 << 18 : 0;
11807
+ flags2 |= this.mainTab !== undefined ? 1 << 20 : 0;
11808
+ flags2 |= this.savedMusic !== undefined ? 1 << 21 : 0;
11752
11809
  b.write(index_js_1.Primitive.Int.write(flags2));
11753
11810
  if (this.id !== undefined) {
11754
11811
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -11786,8 +11843,8 @@ var Raw;
11786
11843
  if (this.ttlPeriod !== undefined) {
11787
11844
  b.write(index_js_1.Primitive.Int.write(this.ttlPeriod));
11788
11845
  }
11789
- if (this.themeEmoticon !== undefined) {
11790
- b.write(index_js_1.Primitive.String.write(this.themeEmoticon));
11846
+ if (this.theme !== undefined) {
11847
+ b.write(this.theme.write());
11791
11848
  }
11792
11849
  if (this.privateForwardName !== undefined) {
11793
11850
  b.write(index_js_1.Primitive.String.write(this.privateForwardName));
@@ -11852,6 +11909,12 @@ var Raw;
11852
11909
  if (this.starsMyPendingRatingDate !== undefined) {
11853
11910
  b.write(index_js_1.Primitive.Int.write(this.starsMyPendingRatingDate));
11854
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
+ }
11855
11918
  return deps_js_1.Buffer.from(b.buffer);
11856
11919
  }
11857
11920
  }
@@ -39535,6 +39598,62 @@ var Raw;
39535
39598
  }
39536
39599
  }
39537
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;
39538
39657
  class SponsoredMessage extends index_js_1.TLObject {
39539
39658
  recommended;
39540
39659
  canReport;
@@ -41046,6 +41165,37 @@ var Raw;
41046
41165
  }
41047
41166
  }
41048
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;
41049
41199
  class InputStorePaymentPremiumSubscription extends index_js_1.TLObject {
41050
41200
  restore;
41051
41201
  upgrade;
@@ -41284,30 +41434,38 @@ var Raw;
41284
41434
  stars;
41285
41435
  currency;
41286
41436
  amount;
41437
+ spendPurposePeer;
41287
41438
  constructor(params) {
41288
41439
  super();
41289
41440
  this.classType = 'types';
41290
41441
  this.className = 'InputStorePaymentStarsTopup';
41291
- this.constructorId = 0xdddd0f56;
41442
+ this.constructorId = 0xf9a2a6cb;
41292
41443
  this.subclassOfId = 0xe7a4174d;
41293
- this._slots = ['stars', 'currency', 'amount'];
41444
+ this._slots = ['stars', 'currency', 'amount', 'spendPurposePeer'];
41294
41445
  this.stars = params.stars;
41295
41446
  this.currency = params.currency;
41296
41447
  this.amount = params.amount;
41448
+ this.spendPurposePeer = params.spendPurposePeer;
41297
41449
  }
41298
41450
  static async read(_data, ..._args) {
41451
+ let flags = await index_js_1.Primitive.Int.read(_data);
41299
41452
  let stars = await index_js_1.Primitive.Long.read(_data);
41300
41453
  let currency = await index_js_1.Primitive.String.read(_data);
41301
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;
41302
41456
  return new Raw.InputStorePaymentStarsTopup({
41303
41457
  stars: stars,
41304
41458
  currency: currency,
41305
41459
  amount: amount,
41460
+ spendPurposePeer: spendPurposePeer,
41306
41461
  });
41307
41462
  }
41308
41463
  write() {
41309
41464
  const b = new deps_js_1.BytesIO();
41310
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));
41311
41469
  if (this.stars !== undefined) {
41312
41470
  b.write(index_js_1.Primitive.Long.write(this.stars));
41313
41471
  }
@@ -41317,6 +41475,9 @@ var Raw;
41317
41475
  if (this.amount !== undefined) {
41318
41476
  b.write(index_js_1.Primitive.Long.write(this.amount));
41319
41477
  }
41478
+ if (this.spendPurposePeer !== undefined) {
41479
+ b.write(this.spendPurposePeer.write());
41480
+ }
41320
41481
  return deps_js_1.Buffer.from(b.buffer);
41321
41482
  }
41322
41483
  }
@@ -47347,6 +47508,7 @@ var Raw;
47347
47508
  businessTransfer;
47348
47509
  stargiftResale;
47349
47510
  postsSearch;
47511
+ stargiftPrepaidUpgrade;
47350
47512
  id;
47351
47513
  amount;
47352
47514
  date;
@@ -47386,6 +47548,7 @@ var Raw;
47386
47548
  'businessTransfer',
47387
47549
  'stargiftResale',
47388
47550
  'postsSearch',
47551
+ 'stargiftPrepaidUpgrade',
47389
47552
  'id',
47390
47553
  'amount',
47391
47554
  'date',
@@ -47419,6 +47582,7 @@ var Raw;
47419
47582
  this.businessTransfer = params.businessTransfer;
47420
47583
  this.stargiftResale = params.stargiftResale;
47421
47584
  this.postsSearch = params.postsSearch;
47585
+ this.stargiftPrepaidUpgrade = params.stargiftPrepaidUpgrade;
47422
47586
  this.id = params.id;
47423
47587
  this.amount = params.amount;
47424
47588
  this.date = params.date;
@@ -47454,6 +47618,7 @@ var Raw;
47454
47618
  let businessTransfer = flags & (1 << 21) ? true : false;
47455
47619
  let stargiftResale = flags & (1 << 22) ? true : false;
47456
47620
  let postsSearch = flags & (1 << 24) ? true : false;
47621
+ let stargiftPrepaidUpgrade = flags & (1 << 25) ? true : false;
47457
47622
  let id = await index_js_1.Primitive.String.read(_data);
47458
47623
  let amount = await index_js_1.TLObject.read(_data);
47459
47624
  let date = await index_js_1.Primitive.Int.read(_data);
@@ -47487,6 +47652,7 @@ var Raw;
47487
47652
  businessTransfer: businessTransfer,
47488
47653
  stargiftResale: stargiftResale,
47489
47654
  postsSearch: postsSearch,
47655
+ stargiftPrepaidUpgrade: stargiftPrepaidUpgrade,
47490
47656
  id: id,
47491
47657
  amount: amount,
47492
47658
  date: date,
@@ -47525,6 +47691,7 @@ var Raw;
47525
47691
  flags |= this.businessTransfer ? 1 << 21 : 0;
47526
47692
  flags |= this.stargiftResale ? 1 << 22 : 0;
47527
47693
  flags |= this.postsSearch ? 1 << 24 : 0;
47694
+ flags |= this.stargiftPrepaidUpgrade ? 1 << 25 : 0;
47528
47695
  flags |= this.title !== undefined ? 1 << 0 : 0;
47529
47696
  flags |= this.description !== undefined ? 1 << 1 : 0;
47530
47697
  flags |= this.photo !== undefined ? 1 << 2 : 0;
@@ -48234,11 +48401,12 @@ var Raw;
48234
48401
  releasedBy;
48235
48402
  perUserTotal;
48236
48403
  perUserRemains;
48404
+ lockedUntilDate;
48237
48405
  constructor(params) {
48238
48406
  super();
48239
48407
  this.classType = 'types';
48240
48408
  this.className = 'StarGift';
48241
- this.constructorId = 0xbcff5b;
48409
+ this.constructorId = 0x80ac53c3;
48242
48410
  this.subclassOfId = 0xc31c590b;
48243
48411
  this._slots = [
48244
48412
  'limited',
@@ -48261,6 +48429,7 @@ var Raw;
48261
48429
  'releasedBy',
48262
48430
  'perUserTotal',
48263
48431
  'perUserRemains',
48432
+ 'lockedUntilDate',
48264
48433
  ];
48265
48434
  this.limited = params.limited;
48266
48435
  this.soldOut = params.soldOut;
@@ -48282,6 +48451,7 @@ var Raw;
48282
48451
  this.releasedBy = params.releasedBy;
48283
48452
  this.perUserTotal = params.perUserTotal;
48284
48453
  this.perUserRemains = params.perUserRemains;
48454
+ this.lockedUntilDate = params.lockedUntilDate;
48285
48455
  }
48286
48456
  static async read(_data, ..._args) {
48287
48457
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -48305,6 +48475,7 @@ var Raw;
48305
48475
  let releasedBy = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
48306
48476
  let perUserTotal = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48307
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;
48308
48479
  return new Raw.StarGift({
48309
48480
  limited: limited,
48310
48481
  soldOut: soldOut,
@@ -48326,6 +48497,7 @@ var Raw;
48326
48497
  releasedBy: releasedBy,
48327
48498
  perUserTotal: perUserTotal,
48328
48499
  perUserRemains: perUserRemains,
48500
+ lockedUntilDate: lockedUntilDate,
48329
48501
  });
48330
48502
  }
48331
48503
  write() {
@@ -48348,6 +48520,7 @@ var Raw;
48348
48520
  flags |= this.releasedBy !== undefined ? 1 << 6 : 0;
48349
48521
  flags |= this.perUserTotal !== undefined ? 1 << 8 : 0;
48350
48522
  flags |= this.perUserRemains !== undefined ? 1 << 8 : 0;
48523
+ flags |= this.lockedUntilDate !== undefined ? 1 << 9 : 0;
48351
48524
  b.write(index_js_1.Primitive.Int.write(flags));
48352
48525
  if (this.id !== undefined) {
48353
48526
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -48394,6 +48567,9 @@ var Raw;
48394
48567
  if (this.perUserRemains !== undefined) {
48395
48568
  b.write(index_js_1.Primitive.Int.write(this.perUserRemains));
48396
48569
  }
48570
+ if (this.lockedUntilDate !== undefined) {
48571
+ b.write(index_js_1.Primitive.Int.write(this.lockedUntilDate));
48572
+ }
48397
48573
  return deps_js_1.Buffer.from(b.buffer);
48398
48574
  }
48399
48575
  }
@@ -48401,7 +48577,9 @@ var Raw;
48401
48577
  class StarGiftUnique extends index_js_1.TLObject {
48402
48578
  requirePremium;
48403
48579
  resaleTonOnly;
48580
+ themeAvailable;
48404
48581
  id;
48582
+ giftId;
48405
48583
  title;
48406
48584
  slug;
48407
48585
  num;
@@ -48414,16 +48592,21 @@ var Raw;
48414
48592
  giftAddress;
48415
48593
  resellAmount;
48416
48594
  releasedBy;
48595
+ valueAmount;
48596
+ valueCurrency;
48597
+ themePeer;
48417
48598
  constructor(params) {
48418
48599
  super();
48419
48600
  this.classType = 'types';
48420
48601
  this.className = 'StarGiftUnique';
48421
- this.constructorId = 0x3a274d50;
48602
+ this.constructorId = 0x1befe865;
48422
48603
  this.subclassOfId = 0xc31c590b;
48423
48604
  this._slots = [
48424
48605
  'requirePremium',
48425
48606
  'resaleTonOnly',
48607
+ 'themeAvailable',
48426
48608
  'id',
48609
+ 'giftId',
48427
48610
  'title',
48428
48611
  'slug',
48429
48612
  'num',
@@ -48436,10 +48619,15 @@ var Raw;
48436
48619
  'giftAddress',
48437
48620
  'resellAmount',
48438
48621
  'releasedBy',
48622
+ 'valueAmount',
48623
+ 'valueCurrency',
48624
+ 'themePeer',
48439
48625
  ];
48440
48626
  this.requirePremium = params.requirePremium;
48441
48627
  this.resaleTonOnly = params.resaleTonOnly;
48628
+ this.themeAvailable = params.themeAvailable;
48442
48629
  this.id = params.id;
48630
+ this.giftId = params.giftId;
48443
48631
  this.title = params.title;
48444
48632
  this.slug = params.slug;
48445
48633
  this.num = params.num;
@@ -48452,12 +48640,17 @@ var Raw;
48452
48640
  this.giftAddress = params.giftAddress;
48453
48641
  this.resellAmount = params.resellAmount;
48454
48642
  this.releasedBy = params.releasedBy;
48643
+ this.valueAmount = params.valueAmount;
48644
+ this.valueCurrency = params.valueCurrency;
48645
+ this.themePeer = params.themePeer;
48455
48646
  }
48456
48647
  static async read(_data, ..._args) {
48457
48648
  let flags = await index_js_1.Primitive.Int.read(_data);
48458
48649
  let requirePremium = flags & (1 << 6) ? true : false;
48459
48650
  let resaleTonOnly = flags & (1 << 7) ? true : false;
48651
+ let themeAvailable = flags & (1 << 9) ? true : false;
48460
48652
  let id = await index_js_1.Primitive.Long.read(_data);
48653
+ let giftId = await index_js_1.Primitive.Long.read(_data);
48461
48654
  let title = await index_js_1.Primitive.String.read(_data);
48462
48655
  let slug = await index_js_1.Primitive.String.read(_data);
48463
48656
  let num = await index_js_1.Primitive.Int.read(_data);
@@ -48470,10 +48663,15 @@ var Raw;
48470
48663
  let giftAddress = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
48471
48664
  let resellAmount = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
48472
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;
48473
48669
  return new Raw.StarGiftUnique({
48474
48670
  requirePremium: requirePremium,
48475
48671
  resaleTonOnly: resaleTonOnly,
48672
+ themeAvailable: themeAvailable,
48476
48673
  id: id,
48674
+ giftId: giftId,
48477
48675
  title: title,
48478
48676
  slug: slug,
48479
48677
  num: num,
@@ -48486,6 +48684,9 @@ var Raw;
48486
48684
  giftAddress: giftAddress,
48487
48685
  resellAmount: resellAmount,
48488
48686
  releasedBy: releasedBy,
48687
+ valueAmount: valueAmount,
48688
+ valueCurrency: valueCurrency,
48689
+ themePeer: themePeer,
48489
48690
  });
48490
48691
  }
48491
48692
  write() {
@@ -48494,16 +48695,23 @@ var Raw;
48494
48695
  let flags = 0;
48495
48696
  flags |= this.requirePremium ? 1 << 6 : 0;
48496
48697
  flags |= this.resaleTonOnly ? 1 << 7 : 0;
48698
+ flags |= this.themeAvailable ? 1 << 9 : 0;
48497
48699
  flags |= this.ownerId !== undefined ? 1 << 0 : 0;
48498
48700
  flags |= this.ownerName !== undefined ? 1 << 1 : 0;
48499
48701
  flags |= this.ownerAddress !== undefined ? 1 << 2 : 0;
48500
48702
  flags |= this.giftAddress !== undefined ? 1 << 3 : 0;
48501
48703
  flags |= this.resellAmount ? 1 << 4 : 0;
48502
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;
48503
48708
  b.write(index_js_1.Primitive.Int.write(flags));
48504
48709
  if (this.id !== undefined) {
48505
48710
  b.write(index_js_1.Primitive.Long.write(this.id));
48506
48711
  }
48712
+ if (this.giftId !== undefined) {
48713
+ b.write(index_js_1.Primitive.Long.write(this.giftId));
48714
+ }
48507
48715
  if (this.title !== undefined) {
48508
48716
  b.write(index_js_1.Primitive.String.write(this.title));
48509
48717
  }
@@ -48540,6 +48748,15 @@ var Raw;
48540
48748
  if (this.releasedBy !== undefined) {
48541
48749
  b.write(this.releasedBy.write());
48542
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
+ }
48543
48760
  return deps_js_1.Buffer.from(b.buffer);
48544
48761
  }
48545
48762
  }
@@ -49241,6 +49458,7 @@ var Raw;
49241
49458
  refunded;
49242
49459
  canUpgrade;
49243
49460
  pinnedToTop;
49461
+ upgradeSeparate;
49244
49462
  fromId;
49245
49463
  date;
49246
49464
  gift;
@@ -49254,11 +49472,12 @@ var Raw;
49254
49472
  canTransferAt;
49255
49473
  canResellAt;
49256
49474
  collectionId;
49475
+ prepaidUpgradeHash;
49257
49476
  constructor(params) {
49258
49477
  super();
49259
49478
  this.classType = 'types';
49260
49479
  this.className = 'SavedStarGift';
49261
- this.constructorId = 0x1ea646df;
49480
+ this.constructorId = 0x19a9b572;
49262
49481
  this.subclassOfId = 0x8e2b3c14;
49263
49482
  this._slots = [
49264
49483
  'nameHidden',
@@ -49266,6 +49485,7 @@ var Raw;
49266
49485
  'refunded',
49267
49486
  'canUpgrade',
49268
49487
  'pinnedToTop',
49488
+ 'upgradeSeparate',
49269
49489
  'fromId',
49270
49490
  'date',
49271
49491
  'gift',
@@ -49279,12 +49499,14 @@ var Raw;
49279
49499
  'canTransferAt',
49280
49500
  'canResellAt',
49281
49501
  'collectionId',
49502
+ 'prepaidUpgradeHash',
49282
49503
  ];
49283
49504
  this.nameHidden = params.nameHidden;
49284
49505
  this.unsaved = params.unsaved;
49285
49506
  this.refunded = params.refunded;
49286
49507
  this.canUpgrade = params.canUpgrade;
49287
49508
  this.pinnedToTop = params.pinnedToTop;
49509
+ this.upgradeSeparate = params.upgradeSeparate;
49288
49510
  this.fromId = params.fromId;
49289
49511
  this.date = params.date;
49290
49512
  this.gift = params.gift;
@@ -49298,6 +49520,7 @@ var Raw;
49298
49520
  this.canTransferAt = params.canTransferAt;
49299
49521
  this.canResellAt = params.canResellAt;
49300
49522
  this.collectionId = params.collectionId;
49523
+ this.prepaidUpgradeHash = params.prepaidUpgradeHash;
49301
49524
  }
49302
49525
  static async read(_data, ..._args) {
49303
49526
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -49306,6 +49529,7 @@ var Raw;
49306
49529
  let refunded = flags & (1 << 9) ? true : false;
49307
49530
  let canUpgrade = flags & (1 << 10) ? true : false;
49308
49531
  let pinnedToTop = flags & (1 << 12) ? true : false;
49532
+ let upgradeSeparate = flags & (1 << 17) ? true : false;
49309
49533
  let fromId = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
49310
49534
  let date = await index_js_1.Primitive.Int.read(_data);
49311
49535
  let gift = await index_js_1.TLObject.read(_data);
@@ -49319,12 +49543,14 @@ var Raw;
49319
49543
  let canTransferAt = flags & (1 << 13) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49320
49544
  let canResellAt = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49321
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;
49322
49547
  return new Raw.SavedStarGift({
49323
49548
  nameHidden: nameHidden,
49324
49549
  unsaved: unsaved,
49325
49550
  refunded: refunded,
49326
49551
  canUpgrade: canUpgrade,
49327
49552
  pinnedToTop: pinnedToTop,
49553
+ upgradeSeparate: upgradeSeparate,
49328
49554
  fromId: fromId,
49329
49555
  date: date,
49330
49556
  gift: gift,
@@ -49338,6 +49564,7 @@ var Raw;
49338
49564
  canTransferAt: canTransferAt,
49339
49565
  canResellAt: canResellAt,
49340
49566
  collectionId: collectionId,
49567
+ prepaidUpgradeHash: prepaidUpgradeHash,
49341
49568
  });
49342
49569
  }
49343
49570
  write() {
@@ -49349,6 +49576,7 @@ var Raw;
49349
49576
  flags |= this.refunded ? 1 << 9 : 0;
49350
49577
  flags |= this.canUpgrade ? 1 << 10 : 0;
49351
49578
  flags |= this.pinnedToTop ? 1 << 12 : 0;
49579
+ flags |= this.upgradeSeparate ? 1 << 17 : 0;
49352
49580
  flags |= this.fromId !== undefined ? 1 << 1 : 0;
49353
49581
  flags |= this.message !== undefined ? 1 << 2 : 0;
49354
49582
  flags |= this.msgId !== undefined ? 1 << 3 : 0;
@@ -49360,6 +49588,7 @@ var Raw;
49360
49588
  flags |= this.canTransferAt !== undefined ? 1 << 13 : 0;
49361
49589
  flags |= this.canResellAt !== undefined ? 1 << 14 : 0;
49362
49590
  flags |= this.collectionId ? 1 << 15 : 0;
49591
+ flags |= this.prepaidUpgradeHash !== undefined ? 1 << 16 : 0;
49363
49592
  b.write(index_js_1.Primitive.Int.write(flags));
49364
49593
  if (this.fromId !== undefined) {
49365
49594
  b.write(this.fromId.write());
@@ -49400,6 +49629,9 @@ var Raw;
49400
49629
  if (this.collectionId) {
49401
49630
  b.write(index_js_1.Primitive.Vector.write(this.collectionId, index_js_1.Primitive.Int));
49402
49631
  }
49632
+ if (this.prepaidUpgradeHash !== undefined) {
49633
+ b.write(index_js_1.Primitive.String.write(this.prepaidUpgradeHash));
49634
+ }
49403
49635
  return deps_js_1.Buffer.from(b.buffer);
49404
49636
  }
49405
49637
  }
@@ -50359,6 +50591,227 @@ var Raw;
50359
50591
  }
50360
50592
  }
50361
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;
50362
50815
  class InvokeAfterMsg extends index_js_1.TLObject {
50363
50816
  __response__;
50364
50817
  msgId;
@@ -55262,22 +55715,35 @@ var Raw;
55262
55715
  class SentCodePaymentRequired extends index_js_1.TLObject {
55263
55716
  storeProduct;
55264
55717
  phoneCodeHash;
55718
+ supportEmailAddress;
55719
+ supportEmailSubject;
55265
55720
  constructor(params) {
55266
55721
  super();
55267
55722
  this.classType = 'types';
55268
55723
  this.className = 'auth.SentCodePaymentRequired';
55269
- this.constructorId = 0xd7cef980;
55724
+ this.constructorId = 0xd7a2fcf9;
55270
55725
  this.subclassOfId = 0x6ce87081;
55271
- this._slots = ['storeProduct', 'phoneCodeHash'];
55726
+ this._slots = [
55727
+ 'storeProduct',
55728
+ 'phoneCodeHash',
55729
+ 'supportEmailAddress',
55730
+ 'supportEmailSubject',
55731
+ ];
55272
55732
  this.storeProduct = params.storeProduct;
55273
55733
  this.phoneCodeHash = params.phoneCodeHash;
55734
+ this.supportEmailAddress = params.supportEmailAddress;
55735
+ this.supportEmailSubject = params.supportEmailSubject;
55274
55736
  }
55275
55737
  static async read(_data, ..._args) {
55276
55738
  let storeProduct = await index_js_1.Primitive.String.read(_data);
55277
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);
55278
55742
  return new Raw.auth.SentCodePaymentRequired({
55279
55743
  storeProduct: storeProduct,
55280
55744
  phoneCodeHash: phoneCodeHash,
55745
+ supportEmailAddress: supportEmailAddress,
55746
+ supportEmailSubject: supportEmailSubject,
55281
55747
  });
55282
55748
  }
55283
55749
  write() {
@@ -55289,6 +55755,12 @@ var Raw;
55289
55755
  if (this.phoneCodeHash !== undefined) {
55290
55756
  b.write(index_js_1.Primitive.String.write(this.phoneCodeHash));
55291
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
+ }
55292
55764
  return deps_js_1.Buffer.from(b.buffer);
55293
55765
  }
55294
55766
  }
@@ -61536,21 +62008,24 @@ var Raw;
61536
62008
  messages_1.FoundStickers = FoundStickers;
61537
62009
  class WebPagePreview extends index_js_1.TLObject {
61538
62010
  media;
62011
+ chats;
61539
62012
  users;
61540
62013
  constructor(params) {
61541
62014
  super();
61542
62015
  this.classType = 'types';
61543
62016
  this.className = 'messages.WebPagePreview';
61544
- this.constructorId = 0xb53e8b21;
62017
+ this.constructorId = 0x8c9a88ac;
61545
62018
  this.subclassOfId = 0xe29410c2;
61546
- this._slots = ['media', 'users'];
62019
+ this._slots = ['media', 'chats', 'users'];
61547
62020
  this.media = params.media;
62021
+ this.chats = params.chats;
61548
62022
  this.users = params.users;
61549
62023
  }
61550
62024
  static async read(_data, ..._args) {
61551
62025
  let media = await index_js_1.TLObject.read(_data);
62026
+ let chats = await index_js_1.TLObject.read(_data);
61552
62027
  let users = await index_js_1.TLObject.read(_data);
61553
- return new Raw.messages.WebPagePreview({ media: media, users: users });
62028
+ return new Raw.messages.WebPagePreview({ media: media, chats: chats, users: users });
61554
62029
  }
61555
62030
  write() {
61556
62031
  const b = new deps_js_1.BytesIO();
@@ -61558,6 +62033,9 @@ var Raw;
61558
62033
  if (this.media !== undefined) {
61559
62034
  b.write(this.media.write());
61560
62035
  }
62036
+ if (this.chats) {
62037
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
62038
+ }
61561
62039
  if (this.users) {
61562
62040
  b.write(index_js_1.Primitive.Vector.write(this.users));
61563
62041
  }
@@ -67938,21 +68416,21 @@ var Raw;
67938
68416
  class SetChatTheme extends index_js_1.TLObject {
67939
68417
  __response__;
67940
68418
  peer;
67941
- emoticon;
68419
+ theme;
67942
68420
  constructor(params) {
67943
68421
  super();
67944
68422
  this.classType = 'functions';
67945
68423
  this.className = 'messages.SetChatTheme';
67946
- this.constructorId = 0xe63be13f;
68424
+ this.constructorId = 0x81202c9;
67947
68425
  this.subclassOfId = 0x8af52aac;
67948
- this._slots = ['peer', 'emoticon'];
68426
+ this._slots = ['peer', 'theme'];
67949
68427
  this.peer = params.peer;
67950
- this.emoticon = params.emoticon;
68428
+ this.theme = params.theme;
67951
68429
  }
67952
68430
  static async read(_data, ..._args) {
67953
68431
  let peer = await index_js_1.TLObject.read(_data);
67954
- let emoticon = await index_js_1.Primitive.String.read(_data);
67955
- return new Raw.messages.SetChatTheme({ peer: peer, emoticon: emoticon });
68432
+ let theme = await index_js_1.TLObject.read(_data);
68433
+ return new Raw.messages.SetChatTheme({ peer: peer, theme: theme });
67956
68434
  }
67957
68435
  write() {
67958
68436
  const b = new deps_js_1.BytesIO();
@@ -67960,8 +68438,8 @@ var Raw;
67960
68438
  if (this.peer !== undefined) {
67961
68439
  b.write(this.peer.write());
67962
68440
  }
67963
- if (this.emoticon !== undefined) {
67964
- b.write(index_js_1.Primitive.String.write(this.emoticon));
68441
+ if (this.theme !== undefined) {
68442
+ b.write(this.theme.write());
67965
68443
  }
67966
68444
  return deps_js_1.Buffer.from(b.buffer);
67967
68445
  }
@@ -73835,6 +74313,84 @@ var Raw;
73835
74313
  }
73836
74314
  }
73837
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;
73838
74394
  class SavedRingtonesNotModified extends index_js_1.TLObject {
73839
74395
  constructor() {
73840
74396
  super();
@@ -74256,6 +74812,50 @@ var Raw;
74256
74812
  }
74257
74813
  }
74258
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;
74259
74859
  class RegisterDevice extends index_js_1.TLObject {
74260
74860
  __response__;
74261
74861
  noMuted;
@@ -77857,6 +78457,140 @@ var Raw;
77857
78457
  }
77858
78458
  }
77859
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;
77860
78594
  })(account = Raw.account || (Raw.account = {}));
77861
78595
  let channels;
77862
78596
  (function (channels) {
@@ -80581,6 +81315,38 @@ var Raw;
80581
81315
  }
80582
81316
  }
80583
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;
80584
81350
  })(channels = Raw.channels || (Raw.channels = {}));
80585
81351
  let payments;
80586
81352
  (function (payments) {
@@ -81901,21 +82667,24 @@ var Raw;
81901
82667
  payments.StarGiftUpgradePreview = StarGiftUpgradePreview;
81902
82668
  class UniqueStarGift extends index_js_1.TLObject {
81903
82669
  gift;
82670
+ chats;
81904
82671
  users;
81905
82672
  constructor(params) {
81906
82673
  super();
81907
82674
  this.classType = 'types';
81908
82675
  this.className = 'payments.UniqueStarGift';
81909
- this.constructorId = 0xcaa2f60b;
82676
+ this.constructorId = 0x416c56e8;
81910
82677
  this.subclassOfId = 0x78b0c5fb;
81911
- this._slots = ['gift', 'users'];
82678
+ this._slots = ['gift', 'chats', 'users'];
81912
82679
  this.gift = params.gift;
82680
+ this.chats = params.chats;
81913
82681
  this.users = params.users;
81914
82682
  }
81915
82683
  static async read(_data, ..._args) {
81916
82684
  let gift = await index_js_1.TLObject.read(_data);
82685
+ let chats = await index_js_1.TLObject.read(_data);
81917
82686
  let users = await index_js_1.TLObject.read(_data);
81918
- return new Raw.payments.UniqueStarGift({ gift: gift, users: users });
82687
+ return new Raw.payments.UniqueStarGift({ gift: gift, chats: chats, users: users });
81919
82688
  }
81920
82689
  write() {
81921
82690
  const b = new deps_js_1.BytesIO();
@@ -81923,6 +82692,9 @@ var Raw;
81923
82692
  if (this.gift !== undefined) {
81924
82693
  b.write(this.gift.write());
81925
82694
  }
82695
+ if (this.chats) {
82696
+ b.write(index_js_1.Primitive.Vector.write(this.chats));
82697
+ }
81926
82698
  if (this.users) {
81927
82699
  b.write(index_js_1.Primitive.Vector.write(this.users));
81928
82700
  }
@@ -82165,6 +82937,189 @@ var Raw;
82165
82937
  }
82166
82938
  }
82167
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;
82168
83123
  class GetPaymentForm extends index_js_1.TLObject {
82169
83124
  __response__;
82170
83125
  invoice;
@@ -83666,9 +84621,10 @@ var Raw;
83666
84621
  excludeUnsaved;
83667
84622
  excludeSaved;
83668
84623
  excludeUnlimited;
83669
- excludeLimited;
83670
84624
  excludeUnique;
83671
84625
  sortByValue;
84626
+ excludeUpgradable;
84627
+ excludeUnupgradable;
83672
84628
  peer;
83673
84629
  collectionId;
83674
84630
  offset;
@@ -83683,9 +84639,10 @@ var Raw;
83683
84639
  'excludeUnsaved',
83684
84640
  'excludeSaved',
83685
84641
  'excludeUnlimited',
83686
- 'excludeLimited',
83687
84642
  'excludeUnique',
83688
84643
  'sortByValue',
84644
+ 'excludeUpgradable',
84645
+ 'excludeUnupgradable',
83689
84646
  'peer',
83690
84647
  'collectionId',
83691
84648
  'offset',
@@ -83694,9 +84651,10 @@ var Raw;
83694
84651
  this.excludeUnsaved = params.excludeUnsaved;
83695
84652
  this.excludeSaved = params.excludeSaved;
83696
84653
  this.excludeUnlimited = params.excludeUnlimited;
83697
- this.excludeLimited = params.excludeLimited;
83698
84654
  this.excludeUnique = params.excludeUnique;
83699
84655
  this.sortByValue = params.sortByValue;
84656
+ this.excludeUpgradable = params.excludeUpgradable;
84657
+ this.excludeUnupgradable = params.excludeUnupgradable;
83700
84658
  this.peer = params.peer;
83701
84659
  this.collectionId = params.collectionId;
83702
84660
  this.offset = params.offset;
@@ -83707,9 +84665,10 @@ var Raw;
83707
84665
  let excludeUnsaved = flags & (1 << 0) ? true : false;
83708
84666
  let excludeSaved = flags & (1 << 1) ? true : false;
83709
84667
  let excludeUnlimited = flags & (1 << 2) ? true : false;
83710
- let excludeLimited = flags & (1 << 3) ? true : false;
83711
84668
  let excludeUnique = flags & (1 << 4) ? true : false;
83712
84669
  let sortByValue = flags & (1 << 5) ? true : false;
84670
+ let excludeUpgradable = flags & (1 << 7) ? true : false;
84671
+ let excludeUnupgradable = flags & (1 << 8) ? true : false;
83713
84672
  let peer = await index_js_1.TLObject.read(_data);
83714
84673
  let collectionId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83715
84674
  let offset = await index_js_1.Primitive.String.read(_data);
@@ -83718,9 +84677,10 @@ var Raw;
83718
84677
  excludeUnsaved: excludeUnsaved,
83719
84678
  excludeSaved: excludeSaved,
83720
84679
  excludeUnlimited: excludeUnlimited,
83721
- excludeLimited: excludeLimited,
83722
84680
  excludeUnique: excludeUnique,
83723
84681
  sortByValue: sortByValue,
84682
+ excludeUpgradable: excludeUpgradable,
84683
+ excludeUnupgradable: excludeUnupgradable,
83724
84684
  peer: peer,
83725
84685
  collectionId: collectionId,
83726
84686
  offset: offset,
@@ -83734,9 +84694,10 @@ var Raw;
83734
84694
  flags |= this.excludeUnsaved ? 1 << 0 : 0;
83735
84695
  flags |= this.excludeSaved ? 1 << 1 : 0;
83736
84696
  flags |= this.excludeUnlimited ? 1 << 2 : 0;
83737
- flags |= this.excludeLimited ? 1 << 3 : 0;
83738
84697
  flags |= this.excludeUnique ? 1 << 4 : 0;
83739
84698
  flags |= this.sortByValue ? 1 << 5 : 0;
84699
+ flags |= this.excludeUpgradable ? 1 << 7 : 0;
84700
+ flags |= this.excludeUnupgradable ? 1 << 8 : 0;
83740
84701
  flags |= this.collectionId !== undefined ? 1 << 6 : 0;
83741
84702
  b.write(index_js_1.Primitive.Int.write(flags));
83742
84703
  if (this.peer !== undefined) {
@@ -84232,6 +85193,58 @@ var Raw;
84232
85193
  }
84233
85194
  }
84234
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;
84235
85248
  })(payments = Raw.payments || (Raw.payments = {}));
84236
85249
  let phone;
84237
85250
  (function (phone) {
@@ -87335,6 +88348,62 @@ var Raw;
87335
88348
  }
87336
88349
  }
87337
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;
87338
88407
  class GetUsers extends index_js_1.TLObject {
87339
88408
  __response__;
87340
88409
  id;
@@ -87445,6 +88514,82 @@ var Raw;
87445
88514
  }
87446
88515
  }
87447
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;
87448
88593
  })(users = Raw.users || (Raw.users = {}));
87449
88594
  let chatlists;
87450
88595
  (function (chatlists) {