@tgsnake/skema 1.1.0 → 1.3.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 = 209;
8
+ Raw.Layer = 211;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -9503,14 +9503,14 @@ var Raw;
9503
9503
  fromId;
9504
9504
  peer;
9505
9505
  savedId;
9506
- resaleStars;
9506
+ resaleAmount;
9507
9507
  canTransferAt;
9508
9508
  canResellAt;
9509
9509
  constructor(params) {
9510
9510
  super();
9511
9511
  this.classType = 'types';
9512
9512
  this.className = 'MessageActionStarGiftUnique';
9513
- this.constructorId = 0x2e3ae60e;
9513
+ this.constructorId = 0x34f762f3;
9514
9514
  this.subclassOfId = 0x8680d126;
9515
9515
  this._slots = [
9516
9516
  'upgrade',
@@ -9523,7 +9523,7 @@ var Raw;
9523
9523
  'fromId',
9524
9524
  'peer',
9525
9525
  'savedId',
9526
- 'resaleStars',
9526
+ 'resaleAmount',
9527
9527
  'canTransferAt',
9528
9528
  'canResellAt',
9529
9529
  ];
@@ -9537,7 +9537,7 @@ var Raw;
9537
9537
  this.fromId = params.fromId;
9538
9538
  this.peer = params.peer;
9539
9539
  this.savedId = params.savedId;
9540
- this.resaleStars = params.resaleStars;
9540
+ this.resaleAmount = params.resaleAmount;
9541
9541
  this.canTransferAt = params.canTransferAt;
9542
9542
  this.canResellAt = params.canResellAt;
9543
9543
  }
@@ -9553,7 +9553,7 @@ var Raw;
9553
9553
  let fromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
9554
9554
  let peer = flags & (1 << 7) ? await index_js_1.TLObject.read(_data) : undefined;
9555
9555
  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;
9556
+ let resaleAmount = flags & (1 << 8) ? await index_js_1.TLObject.read(_data) : undefined;
9557
9557
  let canTransferAt = flags & (1 << 9) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9558
9558
  let canResellAt = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
9559
9559
  return new Raw.MessageActionStarGiftUnique({
@@ -9567,7 +9567,7 @@ var Raw;
9567
9567
  fromId: fromId,
9568
9568
  peer: peer,
9569
9569
  savedId: savedId,
9570
- resaleStars: resaleStars,
9570
+ resaleAmount: resaleAmount,
9571
9571
  canTransferAt: canTransferAt,
9572
9572
  canResellAt: canResellAt,
9573
9573
  });
@@ -9585,7 +9585,7 @@ var Raw;
9585
9585
  flags |= this.fromId !== undefined ? 1 << 6 : 0;
9586
9586
  flags |= this.peer !== undefined ? 1 << 7 : 0;
9587
9587
  flags |= this.savedId !== undefined ? 1 << 7 : 0;
9588
- flags |= this.resaleStars !== undefined ? 1 << 8 : 0;
9588
+ flags |= this.resaleAmount !== undefined ? 1 << 8 : 0;
9589
9589
  flags |= this.canTransferAt !== undefined ? 1 << 9 : 0;
9590
9590
  flags |= this.canResellAt !== undefined ? 1 << 10 : 0;
9591
9591
  b.write(index_js_1.Primitive.Int.write(flags));
@@ -9607,8 +9607,8 @@ var Raw;
9607
9607
  if (this.savedId !== undefined) {
9608
9608
  b.write(index_js_1.Primitive.Long.write(this.savedId));
9609
9609
  }
9610
- if (this.resaleStars !== undefined) {
9611
- b.write(index_js_1.Primitive.Long.write(this.resaleStars));
9610
+ if (this.resaleAmount !== undefined) {
9611
+ b.write(this.resaleAmount.write());
9612
9612
  }
9613
9613
  if (this.canTransferAt !== undefined) {
9614
9614
  b.write(index_js_1.Primitive.Int.write(this.canTransferAt));
@@ -11474,11 +11474,14 @@ var Raw;
11474
11474
  botVerification;
11475
11475
  sendPaidMessagesStars;
11476
11476
  disallowedGifts;
11477
+ starsRating;
11478
+ starsMyPendingRating;
11479
+ starsMyPendingRatingDate;
11477
11480
  constructor(params) {
11478
11481
  super();
11479
11482
  this.classType = 'types';
11480
11483
  this.className = 'UserFull';
11481
- this.constructorId = 0x99e78045;
11484
+ this.constructorId = 0x7e63ce1f;
11482
11485
  this.subclassOfId = 0x1f4661b9;
11483
11486
  this._slots = [
11484
11487
  'blocked',
@@ -11529,6 +11532,9 @@ var Raw;
11529
11532
  'botVerification',
11530
11533
  'sendPaidMessagesStars',
11531
11534
  'disallowedGifts',
11535
+ 'starsRating',
11536
+ 'starsMyPendingRating',
11537
+ 'starsMyPendingRatingDate',
11532
11538
  ];
11533
11539
  this.blocked = params.blocked;
11534
11540
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -11578,6 +11584,9 @@ var Raw;
11578
11584
  this.botVerification = params.botVerification;
11579
11585
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
11580
11586
  this.disallowedGifts = params.disallowedGifts;
11587
+ this.starsRating = params.starsRating;
11588
+ this.starsMyPendingRating = params.starsMyPendingRating;
11589
+ this.starsMyPendingRatingDate = params.starsMyPendingRatingDate;
11581
11590
  }
11582
11591
  static async read(_data, ..._args) {
11583
11592
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -11630,6 +11639,9 @@ var Raw;
11630
11639
  let botVerification = flags2 & (1 << 12) ? await index_js_1.TLObject.read(_data) : undefined;
11631
11640
  let sendPaidMessagesStars = flags2 & (1 << 14) ? await index_js_1.Primitive.Long.read(_data) : undefined;
11632
11641
  let disallowedGifts = flags2 & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11642
+ let starsRating = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11643
+ let starsMyPendingRating = flags2 & (1 << 18) ? await index_js_1.TLObject.read(_data) : undefined;
11644
+ let starsMyPendingRatingDate = flags2 & (1 << 18) ? await index_js_1.Primitive.Int.read(_data) : undefined;
11633
11645
  return new Raw.UserFull({
11634
11646
  blocked: blocked,
11635
11647
  phoneCallsAvailable: phoneCallsAvailable,
@@ -11679,6 +11691,9 @@ var Raw;
11679
11691
  botVerification: botVerification,
11680
11692
  sendPaidMessagesStars: sendPaidMessagesStars,
11681
11693
  disallowedGifts: disallowedGifts,
11694
+ starsRating: starsRating,
11695
+ starsMyPendingRating: starsMyPendingRating,
11696
+ starsMyPendingRatingDate: starsMyPendingRatingDate,
11682
11697
  });
11683
11698
  }
11684
11699
  write() {
@@ -11731,6 +11746,9 @@ var Raw;
11731
11746
  flags2 |= this.botVerification !== undefined ? 1 << 12 : 0;
11732
11747
  flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 14 : 0;
11733
11748
  flags2 |= this.disallowedGifts !== undefined ? 1 << 15 : 0;
11749
+ flags2 |= this.starsRating !== undefined ? 1 << 17 : 0;
11750
+ flags2 |= this.starsMyPendingRating !== undefined ? 1 << 18 : 0;
11751
+ flags2 |= this.starsMyPendingRatingDate !== undefined ? 1 << 18 : 0;
11734
11752
  b.write(index_js_1.Primitive.Int.write(flags2));
11735
11753
  if (this.id !== undefined) {
11736
11754
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -11825,6 +11843,15 @@ var Raw;
11825
11843
  if (this.disallowedGifts !== undefined) {
11826
11844
  b.write(this.disallowedGifts.write());
11827
11845
  }
11846
+ if (this.starsRating !== undefined) {
11847
+ b.write(this.starsRating.write());
11848
+ }
11849
+ if (this.starsMyPendingRating !== undefined) {
11850
+ b.write(this.starsMyPendingRating.write());
11851
+ }
11852
+ if (this.starsMyPendingRatingDate !== undefined) {
11853
+ b.write(index_js_1.Primitive.Int.write(this.starsMyPendingRatingDate));
11854
+ }
11828
11855
  return deps_js_1.Buffer.from(b.buffer);
11829
11856
  }
11830
11857
  }
@@ -37452,6 +37479,31 @@ var Raw;
37452
37479
  }
37453
37480
  }
37454
37481
  Raw.WebPageAttributeUniqueStarGift = WebPageAttributeUniqueStarGift;
37482
+ class WebPageAttributeStarGiftCollection extends index_js_1.TLObject {
37483
+ icons;
37484
+ constructor(params) {
37485
+ super();
37486
+ this.classType = 'types';
37487
+ this.className = 'WebPageAttributeStarGiftCollection';
37488
+ this.constructorId = 0x31cad303;
37489
+ this.subclassOfId = 0xafcfe9c7;
37490
+ this._slots = ['icons'];
37491
+ this.icons = params.icons;
37492
+ }
37493
+ static async read(_data, ..._args) {
37494
+ let icons = await index_js_1.TLObject.read(_data);
37495
+ return new Raw.WebPageAttributeStarGiftCollection({ icons: icons });
37496
+ }
37497
+ write() {
37498
+ const b = new deps_js_1.BytesIO();
37499
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
37500
+ if (this.icons) {
37501
+ b.write(index_js_1.Primitive.Vector.write(this.icons));
37502
+ }
37503
+ return deps_js_1.Buffer.from(b.buffer);
37504
+ }
37505
+ }
37506
+ Raw.WebPageAttributeStarGiftCollection = WebPageAttributeStarGiftCollection;
37455
37507
  class BankCardOpenUrl extends index_js_1.TLObject {
37456
37508
  url;
37457
37509
  name;
@@ -40957,26 +41009,33 @@ var Raw;
40957
41009
  }
40958
41010
  Raw.InputInvoiceBusinessBotTransferStars = InputInvoiceBusinessBotTransferStars;
40959
41011
  class InputInvoiceStarGiftResale extends index_js_1.TLObject {
41012
+ ton;
40960
41013
  slug;
40961
41014
  toId;
40962
41015
  constructor(params) {
40963
41016
  super();
40964
41017
  this.classType = 'types';
40965
41018
  this.className = 'InputInvoiceStarGiftResale';
40966
- this.constructorId = 0x63cbc38c;
41019
+ this.constructorId = 0xc39f5324;
40967
41020
  this.subclassOfId = 0x726e9bfe;
40968
- this._slots = ['slug', 'toId'];
41021
+ this._slots = ['ton', 'slug', 'toId'];
41022
+ this.ton = params.ton;
40969
41023
  this.slug = params.slug;
40970
41024
  this.toId = params.toId;
40971
41025
  }
40972
41026
  static async read(_data, ..._args) {
41027
+ let flags = await index_js_1.Primitive.Int.read(_data);
41028
+ let ton = flags & (1 << 0) ? true : false;
40973
41029
  let slug = await index_js_1.Primitive.String.read(_data);
40974
41030
  let toId = await index_js_1.TLObject.read(_data);
40975
- return new Raw.InputInvoiceStarGiftResale({ slug: slug, toId: toId });
41031
+ return new Raw.InputInvoiceStarGiftResale({ ton: ton, slug: slug, toId: toId });
40976
41032
  }
40977
41033
  write() {
40978
41034
  const b = new deps_js_1.BytesIO();
40979
41035
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
41036
+ let flags = 0;
41037
+ flags |= this.ton ? 1 << 0 : 0;
41038
+ b.write(index_js_1.Primitive.Int.write(flags));
40980
41039
  if (this.slug !== undefined) {
40981
41040
  b.write(index_js_1.Primitive.String.write(this.slug));
40982
41041
  }
@@ -43523,11 +43582,12 @@ var Raw;
43523
43582
  privacy;
43524
43583
  views;
43525
43584
  sentReaction;
43585
+ albums;
43526
43586
  constructor(params) {
43527
43587
  super();
43528
43588
  this.classType = 'types';
43529
43589
  this.className = 'StoryItem';
43530
- this.constructorId = 0x79b26a24;
43590
+ this.constructorId = 0xedf164f1;
43531
43591
  this.subclassOfId = 0xd477b133;
43532
43592
  this._slots = [
43533
43593
  'pinned',
@@ -43551,6 +43611,7 @@ var Raw;
43551
43611
  'privacy',
43552
43612
  'views',
43553
43613
  'sentReaction',
43614
+ 'albums',
43554
43615
  ];
43555
43616
  this.pinned = params.pinned;
43556
43617
  this.public = params.public;
@@ -43573,6 +43634,7 @@ var Raw;
43573
43634
  this.privacy = params.privacy;
43574
43635
  this.views = params.views;
43575
43636
  this.sentReaction = params.sentReaction;
43637
+ this.albums = params.albums;
43576
43638
  }
43577
43639
  static async read(_data, ..._args) {
43578
43640
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -43597,6 +43659,7 @@ var Raw;
43597
43659
  let privacy = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
43598
43660
  let views = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
43599
43661
  let sentReaction = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
43662
+ let albums = flags & (1 << 19) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
43600
43663
  return new Raw.StoryItem({
43601
43664
  pinned: pinned,
43602
43665
  public: _public,
@@ -43619,6 +43682,7 @@ var Raw;
43619
43682
  privacy: privacy,
43620
43683
  views: views,
43621
43684
  sentReaction: sentReaction,
43685
+ albums: albums,
43622
43686
  });
43623
43687
  }
43624
43688
  write() {
@@ -43642,6 +43706,7 @@ var Raw;
43642
43706
  flags |= this.privacy ? 1 << 2 : 0;
43643
43707
  flags |= this.views !== undefined ? 1 << 3 : 0;
43644
43708
  flags |= this.sentReaction !== undefined ? 1 << 15 : 0;
43709
+ flags |= this.albums ? 1 << 19 : 0;
43645
43710
  b.write(index_js_1.Primitive.Int.write(flags));
43646
43711
  if (this.id !== undefined) {
43647
43712
  b.write(index_js_1.Primitive.Int.write(this.id));
@@ -43679,6 +43744,9 @@ var Raw;
43679
43744
  if (this.sentReaction !== undefined) {
43680
43745
  b.write(this.sentReaction.write());
43681
43746
  }
43747
+ if (this.albums) {
43748
+ b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
43749
+ }
43682
43750
  return deps_js_1.Buffer.from(b.buffer);
43683
43751
  }
43684
43752
  }
@@ -47278,6 +47346,7 @@ var Raw;
47278
47346
  stargiftUpgrade;
47279
47347
  businessTransfer;
47280
47348
  stargiftResale;
47349
+ postsSearch;
47281
47350
  id;
47282
47351
  amount;
47283
47352
  date;
@@ -47316,6 +47385,7 @@ var Raw;
47316
47385
  'stargiftUpgrade',
47317
47386
  'businessTransfer',
47318
47387
  'stargiftResale',
47388
+ 'postsSearch',
47319
47389
  'id',
47320
47390
  'amount',
47321
47391
  'date',
@@ -47348,6 +47418,7 @@ var Raw;
47348
47418
  this.stargiftUpgrade = params.stargiftUpgrade;
47349
47419
  this.businessTransfer = params.businessTransfer;
47350
47420
  this.stargiftResale = params.stargiftResale;
47421
+ this.postsSearch = params.postsSearch;
47351
47422
  this.id = params.id;
47352
47423
  this.amount = params.amount;
47353
47424
  this.date = params.date;
@@ -47382,6 +47453,7 @@ var Raw;
47382
47453
  let stargiftUpgrade = flags & (1 << 18) ? true : false;
47383
47454
  let businessTransfer = flags & (1 << 21) ? true : false;
47384
47455
  let stargiftResale = flags & (1 << 22) ? true : false;
47456
+ let postsSearch = flags & (1 << 24) ? true : false;
47385
47457
  let id = await index_js_1.Primitive.String.read(_data);
47386
47458
  let amount = await index_js_1.TLObject.read(_data);
47387
47459
  let date = await index_js_1.Primitive.Int.read(_data);
@@ -47414,6 +47486,7 @@ var Raw;
47414
47486
  stargiftUpgrade: stargiftUpgrade,
47415
47487
  businessTransfer: businessTransfer,
47416
47488
  stargiftResale: stargiftResale,
47489
+ postsSearch: postsSearch,
47417
47490
  id: id,
47418
47491
  amount: amount,
47419
47492
  date: date,
@@ -47451,6 +47524,7 @@ var Raw;
47451
47524
  flags |= this.stargiftUpgrade ? 1 << 18 : 0;
47452
47525
  flags |= this.businessTransfer ? 1 << 21 : 0;
47453
47526
  flags |= this.stargiftResale ? 1 << 22 : 0;
47527
+ flags |= this.postsSearch ? 1 << 24 : 0;
47454
47528
  flags |= this.title !== undefined ? 1 << 0 : 0;
47455
47529
  flags |= this.description !== undefined ? 1 << 1 : 0;
47456
47530
  flags |= this.photo !== undefined ? 1 << 2 : 0;
@@ -48143,6 +48217,8 @@ var Raw;
48143
48217
  limited;
48144
48218
  soldOut;
48145
48219
  birthday;
48220
+ requirePremium;
48221
+ limitedPerUser;
48146
48222
  id;
48147
48223
  sticker;
48148
48224
  stars;
@@ -48156,16 +48232,20 @@ var Raw;
48156
48232
  resellMinStars;
48157
48233
  title;
48158
48234
  releasedBy;
48235
+ perUserTotal;
48236
+ perUserRemains;
48159
48237
  constructor(params) {
48160
48238
  super();
48161
48239
  this.classType = 'types';
48162
48240
  this.className = 'StarGift';
48163
- this.constructorId = 0x7f853c12;
48241
+ this.constructorId = 0xbcff5b;
48164
48242
  this.subclassOfId = 0xc31c590b;
48165
48243
  this._slots = [
48166
48244
  'limited',
48167
48245
  'soldOut',
48168
48246
  'birthday',
48247
+ 'requirePremium',
48248
+ 'limitedPerUser',
48169
48249
  'id',
48170
48250
  'sticker',
48171
48251
  'stars',
@@ -48179,10 +48259,14 @@ var Raw;
48179
48259
  'resellMinStars',
48180
48260
  'title',
48181
48261
  'releasedBy',
48262
+ 'perUserTotal',
48263
+ 'perUserRemains',
48182
48264
  ];
48183
48265
  this.limited = params.limited;
48184
48266
  this.soldOut = params.soldOut;
48185
48267
  this.birthday = params.birthday;
48268
+ this.requirePremium = params.requirePremium;
48269
+ this.limitedPerUser = params.limitedPerUser;
48186
48270
  this.id = params.id;
48187
48271
  this.sticker = params.sticker;
48188
48272
  this.stars = params.stars;
@@ -48196,12 +48280,16 @@ var Raw;
48196
48280
  this.resellMinStars = params.resellMinStars;
48197
48281
  this.title = params.title;
48198
48282
  this.releasedBy = params.releasedBy;
48283
+ this.perUserTotal = params.perUserTotal;
48284
+ this.perUserRemains = params.perUserRemains;
48199
48285
  }
48200
48286
  static async read(_data, ..._args) {
48201
48287
  let flags = await index_js_1.Primitive.Int.read(_data);
48202
48288
  let limited = flags & (1 << 0) ? true : false;
48203
48289
  let soldOut = flags & (1 << 1) ? true : false;
48204
48290
  let birthday = flags & (1 << 2) ? true : false;
48291
+ let requirePremium = flags & (1 << 7) ? true : false;
48292
+ let limitedPerUser = flags & (1 << 8) ? true : false;
48205
48293
  let id = await index_js_1.Primitive.Long.read(_data);
48206
48294
  let sticker = await index_js_1.TLObject.read(_data);
48207
48295
  let stars = await index_js_1.Primitive.Long.read(_data);
@@ -48215,10 +48303,14 @@ var Raw;
48215
48303
  let resellMinStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48216
48304
  let title = flags & (1 << 5) ? await index_js_1.Primitive.String.read(_data) : undefined;
48217
48305
  let releasedBy = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
48306
+ let perUserTotal = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48307
+ let perUserRemains = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48218
48308
  return new Raw.StarGift({
48219
48309
  limited: limited,
48220
48310
  soldOut: soldOut,
48221
48311
  birthday: birthday,
48312
+ requirePremium: requirePremium,
48313
+ limitedPerUser: limitedPerUser,
48222
48314
  id: id,
48223
48315
  sticker: sticker,
48224
48316
  stars: stars,
@@ -48232,6 +48324,8 @@ var Raw;
48232
48324
  resellMinStars: resellMinStars,
48233
48325
  title: title,
48234
48326
  releasedBy: releasedBy,
48327
+ perUserTotal: perUserTotal,
48328
+ perUserRemains: perUserRemains,
48235
48329
  });
48236
48330
  }
48237
48331
  write() {
@@ -48241,6 +48335,8 @@ var Raw;
48241
48335
  flags |= this.limited ? 1 << 0 : 0;
48242
48336
  flags |= this.soldOut ? 1 << 1 : 0;
48243
48337
  flags |= this.birthday ? 1 << 2 : 0;
48338
+ flags |= this.requirePremium ? 1 << 7 : 0;
48339
+ flags |= this.limitedPerUser ? 1 << 8 : 0;
48244
48340
  flags |= this.availabilityRemains !== undefined ? 1 << 0 : 0;
48245
48341
  flags |= this.availabilityTotal !== undefined ? 1 << 0 : 0;
48246
48342
  flags |= this.availabilityResale !== undefined ? 1 << 4 : 0;
@@ -48250,6 +48346,8 @@ var Raw;
48250
48346
  flags |= this.resellMinStars !== undefined ? 1 << 4 : 0;
48251
48347
  flags |= this.title !== undefined ? 1 << 5 : 0;
48252
48348
  flags |= this.releasedBy !== undefined ? 1 << 6 : 0;
48349
+ flags |= this.perUserTotal !== undefined ? 1 << 8 : 0;
48350
+ flags |= this.perUserRemains !== undefined ? 1 << 8 : 0;
48253
48351
  b.write(index_js_1.Primitive.Int.write(flags));
48254
48352
  if (this.id !== undefined) {
48255
48353
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -48290,11 +48388,19 @@ var Raw;
48290
48388
  if (this.releasedBy !== undefined) {
48291
48389
  b.write(this.releasedBy.write());
48292
48390
  }
48391
+ if (this.perUserTotal !== undefined) {
48392
+ b.write(index_js_1.Primitive.Int.write(this.perUserTotal));
48393
+ }
48394
+ if (this.perUserRemains !== undefined) {
48395
+ b.write(index_js_1.Primitive.Int.write(this.perUserRemains));
48396
+ }
48293
48397
  return deps_js_1.Buffer.from(b.buffer);
48294
48398
  }
48295
48399
  }
48296
48400
  Raw.StarGift = StarGift;
48297
48401
  class StarGiftUnique extends index_js_1.TLObject {
48402
+ requirePremium;
48403
+ resaleTonOnly;
48298
48404
  id;
48299
48405
  title;
48300
48406
  slug;
@@ -48306,15 +48412,17 @@ var Raw;
48306
48412
  availabilityIssued;
48307
48413
  availabilityTotal;
48308
48414
  giftAddress;
48309
- resellStars;
48415
+ resellAmount;
48310
48416
  releasedBy;
48311
48417
  constructor(params) {
48312
48418
  super();
48313
48419
  this.classType = 'types';
48314
48420
  this.className = 'StarGiftUnique';
48315
- this.constructorId = 0xf63778ae;
48421
+ this.constructorId = 0x3a274d50;
48316
48422
  this.subclassOfId = 0xc31c590b;
48317
48423
  this._slots = [
48424
+ 'requirePremium',
48425
+ 'resaleTonOnly',
48318
48426
  'id',
48319
48427
  'title',
48320
48428
  'slug',
@@ -48326,9 +48434,11 @@ var Raw;
48326
48434
  'availabilityIssued',
48327
48435
  'availabilityTotal',
48328
48436
  'giftAddress',
48329
- 'resellStars',
48437
+ 'resellAmount',
48330
48438
  'releasedBy',
48331
48439
  ];
48440
+ this.requirePremium = params.requirePremium;
48441
+ this.resaleTonOnly = params.resaleTonOnly;
48332
48442
  this.id = params.id;
48333
48443
  this.title = params.title;
48334
48444
  this.slug = params.slug;
@@ -48340,11 +48450,13 @@ var Raw;
48340
48450
  this.availabilityIssued = params.availabilityIssued;
48341
48451
  this.availabilityTotal = params.availabilityTotal;
48342
48452
  this.giftAddress = params.giftAddress;
48343
- this.resellStars = params.resellStars;
48453
+ this.resellAmount = params.resellAmount;
48344
48454
  this.releasedBy = params.releasedBy;
48345
48455
  }
48346
48456
  static async read(_data, ..._args) {
48347
48457
  let flags = await index_js_1.Primitive.Int.read(_data);
48458
+ let requirePremium = flags & (1 << 6) ? true : false;
48459
+ let resaleTonOnly = flags & (1 << 7) ? true : false;
48348
48460
  let id = await index_js_1.Primitive.Long.read(_data);
48349
48461
  let title = await index_js_1.Primitive.String.read(_data);
48350
48462
  let slug = await index_js_1.Primitive.String.read(_data);
@@ -48356,9 +48468,11 @@ var Raw;
48356
48468
  let availabilityIssued = await index_js_1.Primitive.Int.read(_data);
48357
48469
  let availabilityTotal = await index_js_1.Primitive.Int.read(_data);
48358
48470
  let giftAddress = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
48359
- let resellStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48471
+ let resellAmount = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
48360
48472
  let releasedBy = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
48361
48473
  return new Raw.StarGiftUnique({
48474
+ requirePremium: requirePremium,
48475
+ resaleTonOnly: resaleTonOnly,
48362
48476
  id: id,
48363
48477
  title: title,
48364
48478
  slug: slug,
@@ -48370,7 +48484,7 @@ var Raw;
48370
48484
  availabilityIssued: availabilityIssued,
48371
48485
  availabilityTotal: availabilityTotal,
48372
48486
  giftAddress: giftAddress,
48373
- resellStars: resellStars,
48487
+ resellAmount: resellAmount,
48374
48488
  releasedBy: releasedBy,
48375
48489
  });
48376
48490
  }
@@ -48378,11 +48492,13 @@ var Raw;
48378
48492
  const b = new deps_js_1.BytesIO();
48379
48493
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
48380
48494
  let flags = 0;
48495
+ flags |= this.requirePremium ? 1 << 6 : 0;
48496
+ flags |= this.resaleTonOnly ? 1 << 7 : 0;
48381
48497
  flags |= this.ownerId !== undefined ? 1 << 0 : 0;
48382
48498
  flags |= this.ownerName !== undefined ? 1 << 1 : 0;
48383
48499
  flags |= this.ownerAddress !== undefined ? 1 << 2 : 0;
48384
48500
  flags |= this.giftAddress !== undefined ? 1 << 3 : 0;
48385
- flags |= this.resellStars !== undefined ? 1 << 4 : 0;
48501
+ flags |= this.resellAmount ? 1 << 4 : 0;
48386
48502
  flags |= this.releasedBy !== undefined ? 1 << 5 : 0;
48387
48503
  b.write(index_js_1.Primitive.Int.write(flags));
48388
48504
  if (this.id !== undefined) {
@@ -48418,8 +48534,8 @@ var Raw;
48418
48534
  if (this.giftAddress !== undefined) {
48419
48535
  b.write(index_js_1.Primitive.String.write(this.giftAddress));
48420
48536
  }
48421
- if (this.resellStars !== undefined) {
48422
- b.write(index_js_1.Primitive.Long.write(this.resellStars));
48537
+ if (this.resellAmount) {
48538
+ b.write(index_js_1.Primitive.Vector.write(this.resellAmount));
48423
48539
  }
48424
48540
  if (this.releasedBy !== undefined) {
48425
48541
  b.write(this.releasedBy.write());
@@ -49137,11 +49253,12 @@ var Raw;
49137
49253
  transferStars;
49138
49254
  canTransferAt;
49139
49255
  canResellAt;
49256
+ collectionId;
49140
49257
  constructor(params) {
49141
49258
  super();
49142
49259
  this.classType = 'types';
49143
49260
  this.className = 'SavedStarGift';
49144
- this.constructorId = 0xdfda0499;
49261
+ this.constructorId = 0x1ea646df;
49145
49262
  this.subclassOfId = 0x8e2b3c14;
49146
49263
  this._slots = [
49147
49264
  'nameHidden',
@@ -49161,6 +49278,7 @@ var Raw;
49161
49278
  'transferStars',
49162
49279
  'canTransferAt',
49163
49280
  'canResellAt',
49281
+ 'collectionId',
49164
49282
  ];
49165
49283
  this.nameHidden = params.nameHidden;
49166
49284
  this.unsaved = params.unsaved;
@@ -49179,6 +49297,7 @@ var Raw;
49179
49297
  this.transferStars = params.transferStars;
49180
49298
  this.canTransferAt = params.canTransferAt;
49181
49299
  this.canResellAt = params.canResellAt;
49300
+ this.collectionId = params.collectionId;
49182
49301
  }
49183
49302
  static async read(_data, ..._args) {
49184
49303
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -49199,6 +49318,7 @@ var Raw;
49199
49318
  let transferStars = flags & (1 << 8) ? await index_js_1.Primitive.Long.read(_data) : undefined;
49200
49319
  let canTransferAt = flags & (1 << 13) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49201
49320
  let canResellAt = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49321
+ let collectionId = flags & (1 << 15) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
49202
49322
  return new Raw.SavedStarGift({
49203
49323
  nameHidden: nameHidden,
49204
49324
  unsaved: unsaved,
@@ -49217,6 +49337,7 @@ var Raw;
49217
49337
  transferStars: transferStars,
49218
49338
  canTransferAt: canTransferAt,
49219
49339
  canResellAt: canResellAt,
49340
+ collectionId: collectionId,
49220
49341
  });
49221
49342
  }
49222
49343
  write() {
@@ -49238,6 +49359,7 @@ var Raw;
49238
49359
  flags |= this.transferStars !== undefined ? 1 << 8 : 0;
49239
49360
  flags |= this.canTransferAt !== undefined ? 1 << 13 : 0;
49240
49361
  flags |= this.canResellAt !== undefined ? 1 << 14 : 0;
49362
+ flags |= this.collectionId ? 1 << 15 : 0;
49241
49363
  b.write(index_js_1.Primitive.Int.write(flags));
49242
49364
  if (this.fromId !== undefined) {
49243
49365
  b.write(this.fromId.write());
@@ -49275,6 +49397,9 @@ var Raw;
49275
49397
  if (this.canResellAt !== undefined) {
49276
49398
  b.write(index_js_1.Primitive.Int.write(this.canResellAt));
49277
49399
  }
49400
+ if (this.collectionId) {
49401
+ b.write(index_js_1.Primitive.Vector.write(this.collectionId, index_js_1.Primitive.Int));
49402
+ }
49278
49403
  return deps_js_1.Buffer.from(b.buffer);
49279
49404
  }
49280
49405
  }
@@ -50013,6 +50138,227 @@ var Raw;
50013
50138
  }
50014
50139
  }
50015
50140
  Raw.SuggestedPost = SuggestedPost;
50141
+ class StarsRating extends index_js_1.TLObject {
50142
+ level;
50143
+ currentLevelStars;
50144
+ stars;
50145
+ nextLevelStars;
50146
+ constructor(params) {
50147
+ super();
50148
+ this.classType = 'types';
50149
+ this.className = 'StarsRating';
50150
+ this.constructorId = 0x1b0e4f07;
50151
+ this.subclassOfId = 0x63736420;
50152
+ this._slots = ['level', 'currentLevelStars', 'stars', 'nextLevelStars'];
50153
+ this.level = params.level;
50154
+ this.currentLevelStars = params.currentLevelStars;
50155
+ this.stars = params.stars;
50156
+ this.nextLevelStars = params.nextLevelStars;
50157
+ }
50158
+ static async read(_data, ..._args) {
50159
+ let flags = await index_js_1.Primitive.Int.read(_data);
50160
+ let level = await index_js_1.Primitive.Int.read(_data);
50161
+ let currentLevelStars = await index_js_1.Primitive.Long.read(_data);
50162
+ let stars = await index_js_1.Primitive.Long.read(_data);
50163
+ let nextLevelStars = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
50164
+ return new Raw.StarsRating({
50165
+ level: level,
50166
+ currentLevelStars: currentLevelStars,
50167
+ stars: stars,
50168
+ nextLevelStars: nextLevelStars,
50169
+ });
50170
+ }
50171
+ write() {
50172
+ const b = new deps_js_1.BytesIO();
50173
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50174
+ let flags = 0;
50175
+ flags |= this.nextLevelStars !== undefined ? 1 << 0 : 0;
50176
+ b.write(index_js_1.Primitive.Int.write(flags));
50177
+ if (this.level !== undefined) {
50178
+ b.write(index_js_1.Primitive.Int.write(this.level));
50179
+ }
50180
+ if (this.currentLevelStars !== undefined) {
50181
+ b.write(index_js_1.Primitive.Long.write(this.currentLevelStars));
50182
+ }
50183
+ if (this.stars !== undefined) {
50184
+ b.write(index_js_1.Primitive.Long.write(this.stars));
50185
+ }
50186
+ if (this.nextLevelStars !== undefined) {
50187
+ b.write(index_js_1.Primitive.Long.write(this.nextLevelStars));
50188
+ }
50189
+ return deps_js_1.Buffer.from(b.buffer);
50190
+ }
50191
+ }
50192
+ Raw.StarsRating = StarsRating;
50193
+ class StarGiftCollection extends index_js_1.TLObject {
50194
+ collectionId;
50195
+ title;
50196
+ icon;
50197
+ giftsCount;
50198
+ hash;
50199
+ constructor(params) {
50200
+ super();
50201
+ this.classType = 'types';
50202
+ this.className = 'StarGiftCollection';
50203
+ this.constructorId = 0x9d6b13b0;
50204
+ this.subclassOfId = 0x43e0cb4a;
50205
+ this._slots = ['collectionId', 'title', 'icon', 'giftsCount', 'hash'];
50206
+ this.collectionId = params.collectionId;
50207
+ this.title = params.title;
50208
+ this.icon = params.icon;
50209
+ this.giftsCount = params.giftsCount;
50210
+ this.hash = params.hash;
50211
+ }
50212
+ static async read(_data, ..._args) {
50213
+ let flags = await index_js_1.Primitive.Int.read(_data);
50214
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
50215
+ let title = await index_js_1.Primitive.String.read(_data);
50216
+ let icon = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
50217
+ let giftsCount = await index_js_1.Primitive.Int.read(_data);
50218
+ let hash = await index_js_1.Primitive.Long.read(_data);
50219
+ return new Raw.StarGiftCollection({
50220
+ collectionId: collectionId,
50221
+ title: title,
50222
+ icon: icon,
50223
+ giftsCount: giftsCount,
50224
+ hash: hash,
50225
+ });
50226
+ }
50227
+ write() {
50228
+ const b = new deps_js_1.BytesIO();
50229
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50230
+ let flags = 0;
50231
+ flags |= this.icon !== undefined ? 1 << 0 : 0;
50232
+ b.write(index_js_1.Primitive.Int.write(flags));
50233
+ if (this.collectionId !== undefined) {
50234
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
50235
+ }
50236
+ if (this.title !== undefined) {
50237
+ b.write(index_js_1.Primitive.String.write(this.title));
50238
+ }
50239
+ if (this.icon !== undefined) {
50240
+ b.write(this.icon.write());
50241
+ }
50242
+ if (this.giftsCount !== undefined) {
50243
+ b.write(index_js_1.Primitive.Int.write(this.giftsCount));
50244
+ }
50245
+ if (this.hash !== undefined) {
50246
+ b.write(index_js_1.Primitive.Long.write(this.hash));
50247
+ }
50248
+ return deps_js_1.Buffer.from(b.buffer);
50249
+ }
50250
+ }
50251
+ Raw.StarGiftCollection = StarGiftCollection;
50252
+ class StoryAlbum extends index_js_1.TLObject {
50253
+ albumId;
50254
+ title;
50255
+ iconPhoto;
50256
+ iconVideo;
50257
+ constructor(params) {
50258
+ super();
50259
+ this.classType = 'types';
50260
+ this.className = 'StoryAlbum';
50261
+ this.constructorId = 0x9325705a;
50262
+ this.subclassOfId = 0x7c8c5ea2;
50263
+ this._slots = ['albumId', 'title', 'iconPhoto', 'iconVideo'];
50264
+ this.albumId = params.albumId;
50265
+ this.title = params.title;
50266
+ this.iconPhoto = params.iconPhoto;
50267
+ this.iconVideo = params.iconVideo;
50268
+ }
50269
+ static async read(_data, ..._args) {
50270
+ let flags = await index_js_1.Primitive.Int.read(_data);
50271
+ let albumId = await index_js_1.Primitive.Int.read(_data);
50272
+ let title = await index_js_1.Primitive.String.read(_data);
50273
+ let iconPhoto = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
50274
+ let iconVideo = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
50275
+ return new Raw.StoryAlbum({
50276
+ albumId: albumId,
50277
+ title: title,
50278
+ iconPhoto: iconPhoto,
50279
+ iconVideo: iconVideo,
50280
+ });
50281
+ }
50282
+ write() {
50283
+ const b = new deps_js_1.BytesIO();
50284
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50285
+ let flags = 0;
50286
+ flags |= this.iconPhoto !== undefined ? 1 << 0 : 0;
50287
+ flags |= this.iconVideo !== undefined ? 1 << 1 : 0;
50288
+ b.write(index_js_1.Primitive.Int.write(flags));
50289
+ if (this.albumId !== undefined) {
50290
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
50291
+ }
50292
+ if (this.title !== undefined) {
50293
+ b.write(index_js_1.Primitive.String.write(this.title));
50294
+ }
50295
+ if (this.iconPhoto !== undefined) {
50296
+ b.write(this.iconPhoto.write());
50297
+ }
50298
+ if (this.iconVideo !== undefined) {
50299
+ b.write(this.iconVideo.write());
50300
+ }
50301
+ return deps_js_1.Buffer.from(b.buffer);
50302
+ }
50303
+ }
50304
+ Raw.StoryAlbum = StoryAlbum;
50305
+ class SearchPostsFlood extends index_js_1.TLObject {
50306
+ queryIsFree;
50307
+ totalDaily;
50308
+ remains;
50309
+ waitTill;
50310
+ starsAmount;
50311
+ constructor(params) {
50312
+ super();
50313
+ this.classType = 'types';
50314
+ this.className = 'SearchPostsFlood';
50315
+ this.constructorId = 0x3e0b5b6a;
50316
+ this.subclassOfId = 0xc2c0ccc1;
50317
+ this._slots = ['queryIsFree', 'totalDaily', 'remains', 'waitTill', 'starsAmount'];
50318
+ this.queryIsFree = params.queryIsFree;
50319
+ this.totalDaily = params.totalDaily;
50320
+ this.remains = params.remains;
50321
+ this.waitTill = params.waitTill;
50322
+ this.starsAmount = params.starsAmount;
50323
+ }
50324
+ static async read(_data, ..._args) {
50325
+ let flags = await index_js_1.Primitive.Int.read(_data);
50326
+ let queryIsFree = flags & (1 << 0) ? true : false;
50327
+ let totalDaily = await index_js_1.Primitive.Int.read(_data);
50328
+ let remains = await index_js_1.Primitive.Int.read(_data);
50329
+ let waitTill = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
50330
+ let starsAmount = await index_js_1.Primitive.Long.read(_data);
50331
+ return new Raw.SearchPostsFlood({
50332
+ queryIsFree: queryIsFree,
50333
+ totalDaily: totalDaily,
50334
+ remains: remains,
50335
+ waitTill: waitTill,
50336
+ starsAmount: starsAmount,
50337
+ });
50338
+ }
50339
+ write() {
50340
+ const b = new deps_js_1.BytesIO();
50341
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50342
+ let flags = 0;
50343
+ flags |= this.queryIsFree ? 1 << 0 : 0;
50344
+ flags |= this.waitTill !== undefined ? 1 << 1 : 0;
50345
+ b.write(index_js_1.Primitive.Int.write(flags));
50346
+ if (this.totalDaily !== undefined) {
50347
+ b.write(index_js_1.Primitive.Int.write(this.totalDaily));
50348
+ }
50349
+ if (this.remains !== undefined) {
50350
+ b.write(index_js_1.Primitive.Int.write(this.remains));
50351
+ }
50352
+ if (this.waitTill !== undefined) {
50353
+ b.write(index_js_1.Primitive.Int.write(this.waitTill));
50354
+ }
50355
+ if (this.starsAmount !== undefined) {
50356
+ b.write(index_js_1.Primitive.Long.write(this.starsAmount));
50357
+ }
50358
+ return deps_js_1.Buffer.from(b.buffer);
50359
+ }
50360
+ }
50361
+ Raw.SearchPostsFlood = SearchPostsFlood;
50016
50362
  class InvokeAfterMsg extends index_js_1.TLObject {
50017
50363
  __response__;
50018
50364
  msgId;
@@ -58063,6 +58409,7 @@ var Raw;
58063
58409
  count;
58064
58410
  nextRate;
58065
58411
  offsetIdOffset;
58412
+ searchFlood;
58066
58413
  messages;
58067
58414
  chats;
58068
58415
  users;
@@ -58070,13 +58417,14 @@ var Raw;
58070
58417
  super();
58071
58418
  this.classType = 'types';
58072
58419
  this.className = 'messages.MessagesSlice';
58073
- this.constructorId = 0x3a54685e;
58420
+ this.constructorId = 0x762b263d;
58074
58421
  this.subclassOfId = 0xd4b40b5e;
58075
58422
  this._slots = [
58076
58423
  'inexact',
58077
58424
  'count',
58078
58425
  'nextRate',
58079
58426
  'offsetIdOffset',
58427
+ 'searchFlood',
58080
58428
  'messages',
58081
58429
  'chats',
58082
58430
  'users',
@@ -58085,6 +58433,7 @@ var Raw;
58085
58433
  this.count = params.count;
58086
58434
  this.nextRate = params.nextRate;
58087
58435
  this.offsetIdOffset = params.offsetIdOffset;
58436
+ this.searchFlood = params.searchFlood;
58088
58437
  this.messages = params.messages;
58089
58438
  this.chats = params.chats;
58090
58439
  this.users = params.users;
@@ -58095,6 +58444,7 @@ var Raw;
58095
58444
  let count = await index_js_1.Primitive.Int.read(_data);
58096
58445
  let nextRate = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
58097
58446
  let offsetIdOffset = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
58447
+ let searchFlood = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
58098
58448
  let messages = await index_js_1.TLObject.read(_data);
58099
58449
  let chats = await index_js_1.TLObject.read(_data);
58100
58450
  let users = await index_js_1.TLObject.read(_data);
@@ -58103,6 +58453,7 @@ var Raw;
58103
58453
  count: count,
58104
58454
  nextRate: nextRate,
58105
58455
  offsetIdOffset: offsetIdOffset,
58456
+ searchFlood: searchFlood,
58106
58457
  messages: messages,
58107
58458
  chats: chats,
58108
58459
  users: users,
@@ -58115,6 +58466,7 @@ var Raw;
58115
58466
  flags |= this.inexact ? 1 << 1 : 0;
58116
58467
  flags |= this.nextRate !== undefined ? 1 << 0 : 0;
58117
58468
  flags |= this.offsetIdOffset !== undefined ? 1 << 2 : 0;
58469
+ flags |= this.searchFlood !== undefined ? 1 << 3 : 0;
58118
58470
  b.write(index_js_1.Primitive.Int.write(flags));
58119
58471
  if (this.count !== undefined) {
58120
58472
  b.write(index_js_1.Primitive.Int.write(this.count));
@@ -58125,6 +58477,9 @@ var Raw;
58125
58477
  if (this.offsetIdOffset !== undefined) {
58126
58478
  b.write(index_js_1.Primitive.Int.write(this.offsetIdOffset));
58127
58479
  }
58480
+ if (this.searchFlood !== undefined) {
58481
+ b.write(this.searchFlood.write());
58482
+ }
58128
58483
  if (this.messages) {
58129
58484
  b.write(index_js_1.Primitive.Vector.write(this.messages));
58130
58485
  }
@@ -80008,43 +80363,68 @@ var Raw;
80008
80363
  class SearchPosts extends index_js_1.TLObject {
80009
80364
  __response__;
80010
80365
  hashtag;
80366
+ query;
80011
80367
  offsetRate;
80012
80368
  offsetPeer;
80013
80369
  offsetId;
80014
80370
  limit;
80371
+ allowPaidStars;
80015
80372
  constructor(params) {
80016
80373
  super();
80017
80374
  this.classType = 'functions';
80018
80375
  this.className = 'channels.SearchPosts';
80019
- this.constructorId = 0xd19f987b;
80376
+ this.constructorId = 0xf2c4f24d;
80020
80377
  this.subclassOfId = 0xd4b40b5e;
80021
- this._slots = ['hashtag', 'offsetRate', 'offsetPeer', 'offsetId', 'limit'];
80378
+ this._slots = [
80379
+ 'hashtag',
80380
+ 'query',
80381
+ 'offsetRate',
80382
+ 'offsetPeer',
80383
+ 'offsetId',
80384
+ 'limit',
80385
+ 'allowPaidStars',
80386
+ ];
80022
80387
  this.hashtag = params.hashtag;
80388
+ this.query = params.query;
80023
80389
  this.offsetRate = params.offsetRate;
80024
80390
  this.offsetPeer = params.offsetPeer;
80025
80391
  this.offsetId = params.offsetId;
80026
80392
  this.limit = params.limit;
80393
+ this.allowPaidStars = params.allowPaidStars;
80027
80394
  }
80028
80395
  static async read(_data, ..._args) {
80029
- let hashtag = await index_js_1.Primitive.String.read(_data);
80396
+ let flags = await index_js_1.Primitive.Int.read(_data);
80397
+ let hashtag = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
80398
+ let query = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
80030
80399
  let offsetRate = await index_js_1.Primitive.Int.read(_data);
80031
80400
  let offsetPeer = await index_js_1.TLObject.read(_data);
80032
80401
  let offsetId = await index_js_1.Primitive.Int.read(_data);
80033
80402
  let limit = await index_js_1.Primitive.Int.read(_data);
80403
+ let allowPaidStars = flags & (1 << 2) ? await index_js_1.Primitive.Long.read(_data) : undefined;
80034
80404
  return new Raw.channels.SearchPosts({
80035
80405
  hashtag: hashtag,
80406
+ query: query,
80036
80407
  offsetRate: offsetRate,
80037
80408
  offsetPeer: offsetPeer,
80038
80409
  offsetId: offsetId,
80039
80410
  limit: limit,
80411
+ allowPaidStars: allowPaidStars,
80040
80412
  });
80041
80413
  }
80042
80414
  write() {
80043
80415
  const b = new deps_js_1.BytesIO();
80044
80416
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
80417
+ let flags = 0;
80418
+ flags |= this.hashtag !== undefined ? 1 << 0 : 0;
80419
+ flags |= this.query !== undefined ? 1 << 1 : 0;
80420
+ flags |= this.allowPaidStars !== undefined ? 1 << 2 : 0;
80421
+ b.write(index_js_1.Primitive.Int.write(flags));
80045
80422
  if (this.hashtag !== undefined) {
80046
80423
  b.write(index_js_1.Primitive.String.write(this.hashtag));
80047
80424
  }
80425
+ if (this.query !== undefined) {
80426
+ b.write(index_js_1.Primitive.String.write(this.query));
80427
+ }
80048
80428
  if (this.offsetRate !== undefined) {
80049
80429
  b.write(index_js_1.Primitive.Int.write(this.offsetRate));
80050
80430
  }
@@ -80057,6 +80437,9 @@ var Raw;
80057
80437
  if (this.limit !== undefined) {
80058
80438
  b.write(index_js_1.Primitive.Int.write(this.limit));
80059
80439
  }
80440
+ if (this.allowPaidStars !== undefined) {
80441
+ b.write(index_js_1.Primitive.Long.write(this.allowPaidStars));
80442
+ }
80060
80443
  return deps_js_1.Buffer.from(b.buffer);
80061
80444
  }
80062
80445
  }
@@ -80168,6 +80551,36 @@ var Raw;
80168
80551
  }
80169
80552
  }
80170
80553
  channels.GetMessageAuthor = GetMessageAuthor;
80554
+ class CheckSearchPostsFlood extends index_js_1.TLObject {
80555
+ __response__;
80556
+ query;
80557
+ constructor(params) {
80558
+ super();
80559
+ this.classType = 'functions';
80560
+ this.className = 'channels.CheckSearchPostsFlood';
80561
+ this.constructorId = 0x22567115;
80562
+ this.subclassOfId = 0xc2c0ccc1;
80563
+ this._slots = ['query'];
80564
+ this.query = params.query;
80565
+ }
80566
+ static async read(_data, ..._args) {
80567
+ let flags = await index_js_1.Primitive.Int.read(_data);
80568
+ let query = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
80569
+ return new Raw.channels.CheckSearchPostsFlood({ query: query });
80570
+ }
80571
+ write() {
80572
+ const b = new deps_js_1.BytesIO();
80573
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
80574
+ let flags = 0;
80575
+ flags |= this.query !== undefined ? 1 << 0 : 0;
80576
+ b.write(index_js_1.Primitive.Int.write(flags));
80577
+ if (this.query !== undefined) {
80578
+ b.write(index_js_1.Primitive.String.write(this.query));
80579
+ }
80580
+ return deps_js_1.Buffer.from(b.buffer);
80581
+ }
80582
+ }
80583
+ channels.CheckSearchPostsFlood = CheckSearchPostsFlood;
80171
80584
  })(channels = Raw.channels || (Raw.channels = {}));
80172
80585
  let payments;
80173
80586
  (function (payments) {
@@ -81708,6 +82121,50 @@ var Raw;
81708
82121
  }
81709
82122
  }
81710
82123
  payments.ResaleStarGifts = ResaleStarGifts;
82124
+ class StarGiftCollectionsNotModified extends index_js_1.TLObject {
82125
+ constructor() {
82126
+ super();
82127
+ this.classType = 'types';
82128
+ this.className = 'payments.StarGiftCollectionsNotModified';
82129
+ this.constructorId = 0xa0ba4f17;
82130
+ this.subclassOfId = 0xf01721ec;
82131
+ this._slots = [];
82132
+ }
82133
+ static async read(_data, ..._args) {
82134
+ return new Raw.payments.StarGiftCollectionsNotModified();
82135
+ }
82136
+ write() {
82137
+ const b = new deps_js_1.BytesIO();
82138
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
82139
+ return deps_js_1.Buffer.from(b.buffer);
82140
+ }
82141
+ }
82142
+ payments.StarGiftCollectionsNotModified = StarGiftCollectionsNotModified;
82143
+ class StarGiftCollections extends index_js_1.TLObject {
82144
+ collections;
82145
+ constructor(params) {
82146
+ super();
82147
+ this.classType = 'types';
82148
+ this.className = 'payments.StarGiftCollections';
82149
+ this.constructorId = 0x8a2932f3;
82150
+ this.subclassOfId = 0xf01721ec;
82151
+ this._slots = ['collections'];
82152
+ this.collections = params.collections;
82153
+ }
82154
+ static async read(_data, ..._args) {
82155
+ let collections = await index_js_1.TLObject.read(_data);
82156
+ return new Raw.payments.StarGiftCollections({ collections: collections });
82157
+ }
82158
+ write() {
82159
+ const b = new deps_js_1.BytesIO();
82160
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
82161
+ if (this.collections) {
82162
+ b.write(index_js_1.Primitive.Vector.write(this.collections));
82163
+ }
82164
+ return deps_js_1.Buffer.from(b.buffer);
82165
+ }
82166
+ }
82167
+ payments.StarGiftCollections = StarGiftCollections;
81711
82168
  class GetPaymentForm extends index_js_1.TLObject {
81712
82169
  __response__;
81713
82170
  invoice;
@@ -83213,13 +83670,14 @@ var Raw;
83213
83670
  excludeUnique;
83214
83671
  sortByValue;
83215
83672
  peer;
83673
+ collectionId;
83216
83674
  offset;
83217
83675
  limit;
83218
83676
  constructor(params) {
83219
83677
  super();
83220
83678
  this.classType = 'functions';
83221
83679
  this.className = 'payments.GetSavedStarGifts';
83222
- this.constructorId = 0x23830de9;
83680
+ this.constructorId = 0xa319e569;
83223
83681
  this.subclassOfId = 0xd5112897;
83224
83682
  this._slots = [
83225
83683
  'excludeUnsaved',
@@ -83229,6 +83687,7 @@ var Raw;
83229
83687
  'excludeUnique',
83230
83688
  'sortByValue',
83231
83689
  'peer',
83690
+ 'collectionId',
83232
83691
  'offset',
83233
83692
  'limit',
83234
83693
  ];
@@ -83239,6 +83698,7 @@ var Raw;
83239
83698
  this.excludeUnique = params.excludeUnique;
83240
83699
  this.sortByValue = params.sortByValue;
83241
83700
  this.peer = params.peer;
83701
+ this.collectionId = params.collectionId;
83242
83702
  this.offset = params.offset;
83243
83703
  this.limit = params.limit;
83244
83704
  }
@@ -83251,6 +83711,7 @@ var Raw;
83251
83711
  let excludeUnique = flags & (1 << 4) ? true : false;
83252
83712
  let sortByValue = flags & (1 << 5) ? true : false;
83253
83713
  let peer = await index_js_1.TLObject.read(_data);
83714
+ let collectionId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83254
83715
  let offset = await index_js_1.Primitive.String.read(_data);
83255
83716
  let limit = await index_js_1.Primitive.Int.read(_data);
83256
83717
  return new Raw.payments.GetSavedStarGifts({
@@ -83261,6 +83722,7 @@ var Raw;
83261
83722
  excludeUnique: excludeUnique,
83262
83723
  sortByValue: sortByValue,
83263
83724
  peer: peer,
83725
+ collectionId: collectionId,
83264
83726
  offset: offset,
83265
83727
  limit: limit,
83266
83728
  });
@@ -83275,10 +83737,14 @@ var Raw;
83275
83737
  flags |= this.excludeLimited ? 1 << 3 : 0;
83276
83738
  flags |= this.excludeUnique ? 1 << 4 : 0;
83277
83739
  flags |= this.sortByValue ? 1 << 5 : 0;
83740
+ flags |= this.collectionId !== undefined ? 1 << 6 : 0;
83278
83741
  b.write(index_js_1.Primitive.Int.write(flags));
83279
83742
  if (this.peer !== undefined) {
83280
83743
  b.write(this.peer.write());
83281
83744
  }
83745
+ if (this.collectionId !== undefined) {
83746
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
83747
+ }
83282
83748
  if (this.offset !== undefined) {
83283
83749
  b.write(index_js_1.Primitive.String.write(this.offset));
83284
83750
  }
@@ -83523,23 +83989,23 @@ var Raw;
83523
83989
  class UpdateStarGiftPrice extends index_js_1.TLObject {
83524
83990
  __response__;
83525
83991
  stargift;
83526
- resellStars;
83992
+ resellAmount;
83527
83993
  constructor(params) {
83528
83994
  super();
83529
83995
  this.classType = 'functions';
83530
83996
  this.className = 'payments.UpdateStarGiftPrice';
83531
- this.constructorId = 0x3baea4e1;
83997
+ this.constructorId = 0xedbe6ccb;
83532
83998
  this.subclassOfId = 0x8af52aac;
83533
- this._slots = ['stargift', 'resellStars'];
83999
+ this._slots = ['stargift', 'resellAmount'];
83534
84000
  this.stargift = params.stargift;
83535
- this.resellStars = params.resellStars;
84001
+ this.resellAmount = params.resellAmount;
83536
84002
  }
83537
84003
  static async read(_data, ..._args) {
83538
84004
  let stargift = await index_js_1.TLObject.read(_data);
83539
- let resellStars = await index_js_1.Primitive.Long.read(_data);
84005
+ let resellAmount = await index_js_1.TLObject.read(_data);
83540
84006
  return new Raw.payments.UpdateStarGiftPrice({
83541
84007
  stargift: stargift,
83542
- resellStars: resellStars,
84008
+ resellAmount: resellAmount,
83543
84009
  });
83544
84010
  }
83545
84011
  write() {
@@ -83548,13 +84014,224 @@ var Raw;
83548
84014
  if (this.stargift !== undefined) {
83549
84015
  b.write(this.stargift.write());
83550
84016
  }
83551
- if (this.resellStars !== undefined) {
83552
- b.write(index_js_1.Primitive.Long.write(this.resellStars));
84017
+ if (this.resellAmount !== undefined) {
84018
+ b.write(this.resellAmount.write());
83553
84019
  }
83554
84020
  return deps_js_1.Buffer.from(b.buffer);
83555
84021
  }
83556
84022
  }
83557
84023
  payments.UpdateStarGiftPrice = UpdateStarGiftPrice;
84024
+ class CreateStarGiftCollection extends index_js_1.TLObject {
84025
+ __response__;
84026
+ peer;
84027
+ title;
84028
+ stargift;
84029
+ constructor(params) {
84030
+ super();
84031
+ this.classType = 'functions';
84032
+ this.className = 'payments.CreateStarGiftCollection';
84033
+ this.constructorId = 0x1f4a0e87;
84034
+ this.subclassOfId = 0x43e0cb4a;
84035
+ this._slots = ['peer', 'title', 'stargift'];
84036
+ this.peer = params.peer;
84037
+ this.title = params.title;
84038
+ this.stargift = params.stargift;
84039
+ }
84040
+ static async read(_data, ..._args) {
84041
+ let peer = await index_js_1.TLObject.read(_data);
84042
+ let title = await index_js_1.Primitive.String.read(_data);
84043
+ let stargift = await index_js_1.TLObject.read(_data);
84044
+ return new Raw.payments.CreateStarGiftCollection({
84045
+ peer: peer,
84046
+ title: title,
84047
+ stargift: stargift,
84048
+ });
84049
+ }
84050
+ write() {
84051
+ const b = new deps_js_1.BytesIO();
84052
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84053
+ if (this.peer !== undefined) {
84054
+ b.write(this.peer.write());
84055
+ }
84056
+ if (this.title !== undefined) {
84057
+ b.write(index_js_1.Primitive.String.write(this.title));
84058
+ }
84059
+ if (this.stargift) {
84060
+ b.write(index_js_1.Primitive.Vector.write(this.stargift));
84061
+ }
84062
+ return deps_js_1.Buffer.from(b.buffer);
84063
+ }
84064
+ }
84065
+ payments.CreateStarGiftCollection = CreateStarGiftCollection;
84066
+ class UpdateStarGiftCollection extends index_js_1.TLObject {
84067
+ __response__;
84068
+ peer;
84069
+ collectionId;
84070
+ title;
84071
+ deleteStargift;
84072
+ addStargift;
84073
+ order;
84074
+ constructor(params) {
84075
+ super();
84076
+ this.classType = 'functions';
84077
+ this.className = 'payments.UpdateStarGiftCollection';
84078
+ this.constructorId = 0x4fddbee7;
84079
+ this.subclassOfId = 0x43e0cb4a;
84080
+ this._slots = ['peer', 'collectionId', 'title', 'deleteStargift', 'addStargift', 'order'];
84081
+ this.peer = params.peer;
84082
+ this.collectionId = params.collectionId;
84083
+ this.title = params.title;
84084
+ this.deleteStargift = params.deleteStargift;
84085
+ this.addStargift = params.addStargift;
84086
+ this.order = params.order;
84087
+ }
84088
+ static async read(_data, ..._args) {
84089
+ let flags = await index_js_1.Primitive.Int.read(_data);
84090
+ let peer = await index_js_1.TLObject.read(_data);
84091
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
84092
+ let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
84093
+ let deleteStargift = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
84094
+ let addStargift = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
84095
+ let order = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
84096
+ return new Raw.payments.UpdateStarGiftCollection({
84097
+ peer: peer,
84098
+ collectionId: collectionId,
84099
+ title: title,
84100
+ deleteStargift: deleteStargift,
84101
+ addStargift: addStargift,
84102
+ order: order,
84103
+ });
84104
+ }
84105
+ write() {
84106
+ const b = new deps_js_1.BytesIO();
84107
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84108
+ let flags = 0;
84109
+ flags |= this.title !== undefined ? 1 << 0 : 0;
84110
+ flags |= this.deleteStargift ? 1 << 1 : 0;
84111
+ flags |= this.addStargift ? 1 << 2 : 0;
84112
+ flags |= this.order ? 1 << 3 : 0;
84113
+ b.write(index_js_1.Primitive.Int.write(flags));
84114
+ if (this.peer !== undefined) {
84115
+ b.write(this.peer.write());
84116
+ }
84117
+ if (this.collectionId !== undefined) {
84118
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
84119
+ }
84120
+ if (this.title !== undefined) {
84121
+ b.write(index_js_1.Primitive.String.write(this.title));
84122
+ }
84123
+ if (this.deleteStargift) {
84124
+ b.write(index_js_1.Primitive.Vector.write(this.deleteStargift));
84125
+ }
84126
+ if (this.addStargift) {
84127
+ b.write(index_js_1.Primitive.Vector.write(this.addStargift));
84128
+ }
84129
+ if (this.order) {
84130
+ b.write(index_js_1.Primitive.Vector.write(this.order));
84131
+ }
84132
+ return deps_js_1.Buffer.from(b.buffer);
84133
+ }
84134
+ }
84135
+ payments.UpdateStarGiftCollection = UpdateStarGiftCollection;
84136
+ class ReorderStarGiftCollections extends index_js_1.TLObject {
84137
+ __response__;
84138
+ peer;
84139
+ order;
84140
+ constructor(params) {
84141
+ super();
84142
+ this.classType = 'functions';
84143
+ this.className = 'payments.ReorderStarGiftCollections';
84144
+ this.constructorId = 0xc32af4cc;
84145
+ this.subclassOfId = 0xf5b399ac;
84146
+ this._slots = ['peer', 'order'];
84147
+ this.peer = params.peer;
84148
+ this.order = params.order;
84149
+ }
84150
+ static async read(_data, ..._args) {
84151
+ let peer = await index_js_1.TLObject.read(_data);
84152
+ let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
84153
+ return new Raw.payments.ReorderStarGiftCollections({ peer: peer, order: order });
84154
+ }
84155
+ write() {
84156
+ const b = new deps_js_1.BytesIO();
84157
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84158
+ if (this.peer !== undefined) {
84159
+ b.write(this.peer.write());
84160
+ }
84161
+ if (this.order) {
84162
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
84163
+ }
84164
+ return deps_js_1.Buffer.from(b.buffer);
84165
+ }
84166
+ }
84167
+ payments.ReorderStarGiftCollections = ReorderStarGiftCollections;
84168
+ class DeleteStarGiftCollection extends index_js_1.TLObject {
84169
+ __response__;
84170
+ peer;
84171
+ collectionId;
84172
+ constructor(params) {
84173
+ super();
84174
+ this.classType = 'functions';
84175
+ this.className = 'payments.DeleteStarGiftCollection';
84176
+ this.constructorId = 0xad5648e8;
84177
+ this.subclassOfId = 0xf5b399ac;
84178
+ this._slots = ['peer', 'collectionId'];
84179
+ this.peer = params.peer;
84180
+ this.collectionId = params.collectionId;
84181
+ }
84182
+ static async read(_data, ..._args) {
84183
+ let peer = await index_js_1.TLObject.read(_data);
84184
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
84185
+ return new Raw.payments.DeleteStarGiftCollection({
84186
+ peer: peer,
84187
+ collectionId: collectionId,
84188
+ });
84189
+ }
84190
+ write() {
84191
+ const b = new deps_js_1.BytesIO();
84192
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84193
+ if (this.peer !== undefined) {
84194
+ b.write(this.peer.write());
84195
+ }
84196
+ if (this.collectionId !== undefined) {
84197
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
84198
+ }
84199
+ return deps_js_1.Buffer.from(b.buffer);
84200
+ }
84201
+ }
84202
+ payments.DeleteStarGiftCollection = DeleteStarGiftCollection;
84203
+ class GetStarGiftCollections extends index_js_1.TLObject {
84204
+ __response__;
84205
+ peer;
84206
+ hash;
84207
+ constructor(params) {
84208
+ super();
84209
+ this.classType = 'functions';
84210
+ this.className = 'payments.GetStarGiftCollections';
84211
+ this.constructorId = 0x981b91dd;
84212
+ this.subclassOfId = 0xf01721ec;
84213
+ this._slots = ['peer', 'hash'];
84214
+ this.peer = params.peer;
84215
+ this.hash = params.hash;
84216
+ }
84217
+ static async read(_data, ..._args) {
84218
+ let peer = await index_js_1.TLObject.read(_data);
84219
+ let hash = await index_js_1.Primitive.Long.read(_data);
84220
+ return new Raw.payments.GetStarGiftCollections({ peer: peer, hash: hash });
84221
+ }
84222
+ write() {
84223
+ const b = new deps_js_1.BytesIO();
84224
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
84225
+ if (this.peer !== undefined) {
84226
+ b.write(this.peer.write());
84227
+ }
84228
+ if (this.hash !== undefined) {
84229
+ b.write(index_js_1.Primitive.Long.write(this.hash));
84230
+ }
84231
+ return deps_js_1.Buffer.from(b.buffer);
84232
+ }
84233
+ }
84234
+ payments.GetStarGiftCollections = GetStarGiftCollections;
83558
84235
  })(payments = Raw.payments || (Raw.payments = {}));
83559
84236
  let phone;
83560
84237
  (function (phone) {
@@ -88967,6 +89644,56 @@ var Raw;
88967
89644
  }
88968
89645
  }
88969
89646
  stories_1.CanSendStoryCount = CanSendStoryCount;
89647
+ class AlbumsNotModified extends index_js_1.TLObject {
89648
+ constructor() {
89649
+ super();
89650
+ this.classType = 'types';
89651
+ this.className = 'stories.AlbumsNotModified';
89652
+ this.constructorId = 0x564edaeb;
89653
+ this.subclassOfId = 0x5a73d39;
89654
+ this._slots = [];
89655
+ }
89656
+ static async read(_data, ..._args) {
89657
+ return new Raw.stories.AlbumsNotModified();
89658
+ }
89659
+ write() {
89660
+ const b = new deps_js_1.BytesIO();
89661
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89662
+ return deps_js_1.Buffer.from(b.buffer);
89663
+ }
89664
+ }
89665
+ stories_1.AlbumsNotModified = AlbumsNotModified;
89666
+ class Albums extends index_js_1.TLObject {
89667
+ hash;
89668
+ albums;
89669
+ constructor(params) {
89670
+ super();
89671
+ this.classType = 'types';
89672
+ this.className = 'stories.Albums';
89673
+ this.constructorId = 0xc3987a3a;
89674
+ this.subclassOfId = 0x5a73d39;
89675
+ this._slots = ['hash', 'albums'];
89676
+ this.hash = params.hash;
89677
+ this.albums = params.albums;
89678
+ }
89679
+ static async read(_data, ..._args) {
89680
+ let hash = await index_js_1.Primitive.Long.read(_data);
89681
+ let albums = await index_js_1.TLObject.read(_data);
89682
+ return new Raw.stories.Albums({ hash: hash, albums: albums });
89683
+ }
89684
+ write() {
89685
+ const b = new deps_js_1.BytesIO();
89686
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
89687
+ if (this.hash !== undefined) {
89688
+ b.write(index_js_1.Primitive.Long.write(this.hash));
89689
+ }
89690
+ if (this.albums) {
89691
+ b.write(index_js_1.Primitive.Vector.write(this.albums));
89692
+ }
89693
+ return deps_js_1.Buffer.from(b.buffer);
89694
+ }
89695
+ }
89696
+ stories_1.Albums = Albums;
88970
89697
  class CanSendStory extends index_js_1.TLObject {
88971
89698
  __response__;
88972
89699
  peer;
@@ -89008,11 +89735,12 @@ var Raw;
89008
89735
  period;
89009
89736
  fwdFromId;
89010
89737
  fwdFromStory;
89738
+ albums;
89011
89739
  constructor(params) {
89012
89740
  super();
89013
89741
  this.classType = 'functions';
89014
89742
  this.className = 'stories.SendStory';
89015
- this.constructorId = 0xe4e6694b;
89743
+ this.constructorId = 0x737fc2ec;
89016
89744
  this.subclassOfId = 0x8af52aac;
89017
89745
  this._slots = [
89018
89746
  'pinned',
@@ -89028,6 +89756,7 @@ var Raw;
89028
89756
  'period',
89029
89757
  'fwdFromId',
89030
89758
  'fwdFromStory',
89759
+ 'albums',
89031
89760
  ];
89032
89761
  this.pinned = params.pinned;
89033
89762
  this.noforwards = params.noforwards;
@@ -89042,6 +89771,7 @@ var Raw;
89042
89771
  this.period = params.period;
89043
89772
  this.fwdFromId = params.fwdFromId;
89044
89773
  this.fwdFromStory = params.fwdFromStory;
89774
+ this.albums = params.albums;
89045
89775
  }
89046
89776
  static async read(_data, ..._args) {
89047
89777
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -89058,6 +89788,7 @@ var Raw;
89058
89788
  let period = flags & (1 << 3) ? await index_js_1.Primitive.Int.read(_data) : undefined;
89059
89789
  let fwdFromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
89060
89790
  let fwdFromStory = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
89791
+ let albums = flags & (1 << 8) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
89061
89792
  return new Raw.stories.SendStory({
89062
89793
  pinned: pinned,
89063
89794
  noforwards: noforwards,
@@ -89072,6 +89803,7 @@ var Raw;
89072
89803
  period: period,
89073
89804
  fwdFromId: fwdFromId,
89074
89805
  fwdFromStory: fwdFromStory,
89806
+ albums: albums,
89075
89807
  });
89076
89808
  }
89077
89809
  write() {
@@ -89087,6 +89819,7 @@ var Raw;
89087
89819
  flags |= this.period !== undefined ? 1 << 3 : 0;
89088
89820
  flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
89089
89821
  flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
89822
+ flags |= this.albums ? 1 << 8 : 0;
89090
89823
  b.write(index_js_1.Primitive.Int.write(flags));
89091
89824
  if (this.peer !== undefined) {
89092
89825
  b.write(this.peer.write());
@@ -89118,6 +89851,9 @@ var Raw;
89118
89851
  if (this.fwdFromStory !== undefined) {
89119
89852
  b.write(index_js_1.Primitive.Int.write(this.fwdFromStory));
89120
89853
  }
89854
+ if (this.albums) {
89855
+ b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
89856
+ }
89121
89857
  return deps_js_1.Buffer.from(b.buffer);
89122
89858
  }
89123
89859
  }
@@ -90063,6 +90799,259 @@ var Raw;
90063
90799
  }
90064
90800
  }
90065
90801
  stories_1.SearchPosts = SearchPosts;
90802
+ class CreateAlbum extends index_js_1.TLObject {
90803
+ __response__;
90804
+ peer;
90805
+ title;
90806
+ stories;
90807
+ constructor(params) {
90808
+ super();
90809
+ this.classType = 'functions';
90810
+ this.className = 'stories.CreateAlbum';
90811
+ this.constructorId = 0xa36396e5;
90812
+ this.subclassOfId = 0x7c8c5ea2;
90813
+ this._slots = ['peer', 'title', 'stories'];
90814
+ this.peer = params.peer;
90815
+ this.title = params.title;
90816
+ this.stories = params.stories;
90817
+ }
90818
+ static async read(_data, ..._args) {
90819
+ let peer = await index_js_1.TLObject.read(_data);
90820
+ let title = await index_js_1.Primitive.String.read(_data);
90821
+ let stories = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
90822
+ return new Raw.stories.CreateAlbum({ peer: peer, title: title, stories: stories });
90823
+ }
90824
+ write() {
90825
+ const b = new deps_js_1.BytesIO();
90826
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90827
+ if (this.peer !== undefined) {
90828
+ b.write(this.peer.write());
90829
+ }
90830
+ if (this.title !== undefined) {
90831
+ b.write(index_js_1.Primitive.String.write(this.title));
90832
+ }
90833
+ if (this.stories) {
90834
+ b.write(index_js_1.Primitive.Vector.write(this.stories, index_js_1.Primitive.Int));
90835
+ }
90836
+ return deps_js_1.Buffer.from(b.buffer);
90837
+ }
90838
+ }
90839
+ stories_1.CreateAlbum = CreateAlbum;
90840
+ class UpdateAlbum extends index_js_1.TLObject {
90841
+ __response__;
90842
+ peer;
90843
+ albumId;
90844
+ title;
90845
+ deleteStories;
90846
+ addStories;
90847
+ order;
90848
+ constructor(params) {
90849
+ super();
90850
+ this.classType = 'functions';
90851
+ this.className = 'stories.UpdateAlbum';
90852
+ this.constructorId = 0x5e5259b6;
90853
+ this.subclassOfId = 0x7c8c5ea2;
90854
+ this._slots = ['peer', 'albumId', 'title', 'deleteStories', 'addStories', 'order'];
90855
+ this.peer = params.peer;
90856
+ this.albumId = params.albumId;
90857
+ this.title = params.title;
90858
+ this.deleteStories = params.deleteStories;
90859
+ this.addStories = params.addStories;
90860
+ this.order = params.order;
90861
+ }
90862
+ static async read(_data, ..._args) {
90863
+ let flags = await index_js_1.Primitive.Int.read(_data);
90864
+ let peer = await index_js_1.TLObject.read(_data);
90865
+ let albumId = await index_js_1.Primitive.Int.read(_data);
90866
+ let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
90867
+ let deleteStories = flags & (1 << 1) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
90868
+ let addStories = flags & (1 << 2) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
90869
+ let order = flags & (1 << 3) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
90870
+ return new Raw.stories.UpdateAlbum({
90871
+ peer: peer,
90872
+ albumId: albumId,
90873
+ title: title,
90874
+ deleteStories: deleteStories,
90875
+ addStories: addStories,
90876
+ order: order,
90877
+ });
90878
+ }
90879
+ write() {
90880
+ const b = new deps_js_1.BytesIO();
90881
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90882
+ let flags = 0;
90883
+ flags |= this.title !== undefined ? 1 << 0 : 0;
90884
+ flags |= this.deleteStories ? 1 << 1 : 0;
90885
+ flags |= this.addStories ? 1 << 2 : 0;
90886
+ flags |= this.order ? 1 << 3 : 0;
90887
+ b.write(index_js_1.Primitive.Int.write(flags));
90888
+ if (this.peer !== undefined) {
90889
+ b.write(this.peer.write());
90890
+ }
90891
+ if (this.albumId !== undefined) {
90892
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
90893
+ }
90894
+ if (this.title !== undefined) {
90895
+ b.write(index_js_1.Primitive.String.write(this.title));
90896
+ }
90897
+ if (this.deleteStories) {
90898
+ b.write(index_js_1.Primitive.Vector.write(this.deleteStories, index_js_1.Primitive.Int));
90899
+ }
90900
+ if (this.addStories) {
90901
+ b.write(index_js_1.Primitive.Vector.write(this.addStories, index_js_1.Primitive.Int));
90902
+ }
90903
+ if (this.order) {
90904
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
90905
+ }
90906
+ return deps_js_1.Buffer.from(b.buffer);
90907
+ }
90908
+ }
90909
+ stories_1.UpdateAlbum = UpdateAlbum;
90910
+ class ReorderAlbums extends index_js_1.TLObject {
90911
+ __response__;
90912
+ peer;
90913
+ order;
90914
+ constructor(params) {
90915
+ super();
90916
+ this.classType = 'functions';
90917
+ this.className = 'stories.ReorderAlbums';
90918
+ this.constructorId = 0x8535fbd9;
90919
+ this.subclassOfId = 0xf5b399ac;
90920
+ this._slots = ['peer', 'order'];
90921
+ this.peer = params.peer;
90922
+ this.order = params.order;
90923
+ }
90924
+ static async read(_data, ..._args) {
90925
+ let peer = await index_js_1.TLObject.read(_data);
90926
+ let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
90927
+ return new Raw.stories.ReorderAlbums({ peer: peer, order: order });
90928
+ }
90929
+ write() {
90930
+ const b = new deps_js_1.BytesIO();
90931
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90932
+ if (this.peer !== undefined) {
90933
+ b.write(this.peer.write());
90934
+ }
90935
+ if (this.order) {
90936
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
90937
+ }
90938
+ return deps_js_1.Buffer.from(b.buffer);
90939
+ }
90940
+ }
90941
+ stories_1.ReorderAlbums = ReorderAlbums;
90942
+ class DeleteAlbum extends index_js_1.TLObject {
90943
+ __response__;
90944
+ peer;
90945
+ albumId;
90946
+ constructor(params) {
90947
+ super();
90948
+ this.classType = 'functions';
90949
+ this.className = 'stories.DeleteAlbum';
90950
+ this.constructorId = 0x8d3456d0;
90951
+ this.subclassOfId = 0xf5b399ac;
90952
+ this._slots = ['peer', 'albumId'];
90953
+ this.peer = params.peer;
90954
+ this.albumId = params.albumId;
90955
+ }
90956
+ static async read(_data, ..._args) {
90957
+ let peer = await index_js_1.TLObject.read(_data);
90958
+ let albumId = await index_js_1.Primitive.Int.read(_data);
90959
+ return new Raw.stories.DeleteAlbum({ peer: peer, albumId: albumId });
90960
+ }
90961
+ write() {
90962
+ const b = new deps_js_1.BytesIO();
90963
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90964
+ if (this.peer !== undefined) {
90965
+ b.write(this.peer.write());
90966
+ }
90967
+ if (this.albumId !== undefined) {
90968
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
90969
+ }
90970
+ return deps_js_1.Buffer.from(b.buffer);
90971
+ }
90972
+ }
90973
+ stories_1.DeleteAlbum = DeleteAlbum;
90974
+ class GetAlbums extends index_js_1.TLObject {
90975
+ __response__;
90976
+ peer;
90977
+ hash;
90978
+ constructor(params) {
90979
+ super();
90980
+ this.classType = 'functions';
90981
+ this.className = 'stories.GetAlbums';
90982
+ this.constructorId = 0x25b3eac7;
90983
+ this.subclassOfId = 0x5a73d39;
90984
+ this._slots = ['peer', 'hash'];
90985
+ this.peer = params.peer;
90986
+ this.hash = params.hash;
90987
+ }
90988
+ static async read(_data, ..._args) {
90989
+ let peer = await index_js_1.TLObject.read(_data);
90990
+ let hash = await index_js_1.Primitive.Long.read(_data);
90991
+ return new Raw.stories.GetAlbums({ peer: peer, hash: hash });
90992
+ }
90993
+ write() {
90994
+ const b = new deps_js_1.BytesIO();
90995
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
90996
+ if (this.peer !== undefined) {
90997
+ b.write(this.peer.write());
90998
+ }
90999
+ if (this.hash !== undefined) {
91000
+ b.write(index_js_1.Primitive.Long.write(this.hash));
91001
+ }
91002
+ return deps_js_1.Buffer.from(b.buffer);
91003
+ }
91004
+ }
91005
+ stories_1.GetAlbums = GetAlbums;
91006
+ class GetAlbumStories extends index_js_1.TLObject {
91007
+ __response__;
91008
+ peer;
91009
+ albumId;
91010
+ offset;
91011
+ limit;
91012
+ constructor(params) {
91013
+ super();
91014
+ this.classType = 'functions';
91015
+ this.className = 'stories.GetAlbumStories';
91016
+ this.constructorId = 0xac806d61;
91017
+ this.subclassOfId = 0x251c0c2c;
91018
+ this._slots = ['peer', 'albumId', 'offset', 'limit'];
91019
+ this.peer = params.peer;
91020
+ this.albumId = params.albumId;
91021
+ this.offset = params.offset;
91022
+ this.limit = params.limit;
91023
+ }
91024
+ static async read(_data, ..._args) {
91025
+ let peer = await index_js_1.TLObject.read(_data);
91026
+ let albumId = await index_js_1.Primitive.Int.read(_data);
91027
+ let offset = await index_js_1.Primitive.Int.read(_data);
91028
+ let limit = await index_js_1.Primitive.Int.read(_data);
91029
+ return new Raw.stories.GetAlbumStories({
91030
+ peer: peer,
91031
+ albumId: albumId,
91032
+ offset: offset,
91033
+ limit: limit,
91034
+ });
91035
+ }
91036
+ write() {
91037
+ const b = new deps_js_1.BytesIO();
91038
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
91039
+ if (this.peer !== undefined) {
91040
+ b.write(this.peer.write());
91041
+ }
91042
+ if (this.albumId !== undefined) {
91043
+ b.write(index_js_1.Primitive.Int.write(this.albumId));
91044
+ }
91045
+ if (this.offset !== undefined) {
91046
+ b.write(index_js_1.Primitive.Int.write(this.offset));
91047
+ }
91048
+ if (this.limit !== undefined) {
91049
+ b.write(index_js_1.Primitive.Int.write(this.limit));
91050
+ }
91051
+ return deps_js_1.Buffer.from(b.buffer);
91052
+ }
91053
+ }
91054
+ stories_1.GetAlbumStories = GetAlbumStories;
90066
91055
  })(stories = Raw.stories || (Raw.stories = {}));
90067
91056
  let premium;
90068
91057
  (function (premium) {