@tgsnake/skema 1.0.0 → 1.2.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 = 207;
8
+ Raw.Layer = 210;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -11474,11 +11474,12 @@ var Raw;
11474
11474
  botVerification;
11475
11475
  sendPaidMessagesStars;
11476
11476
  disallowedGifts;
11477
+ starsRating;
11477
11478
  constructor(params) {
11478
11479
  super();
11479
11480
  this.classType = 'types';
11480
11481
  this.className = 'UserFull';
11481
- this.constructorId = 0x99e78045;
11482
+ this.constructorId = 0x29de80be;
11482
11483
  this.subclassOfId = 0x1f4661b9;
11483
11484
  this._slots = [
11484
11485
  'blocked',
@@ -11529,6 +11530,7 @@ var Raw;
11529
11530
  'botVerification',
11530
11531
  'sendPaidMessagesStars',
11531
11532
  'disallowedGifts',
11533
+ 'starsRating',
11532
11534
  ];
11533
11535
  this.blocked = params.blocked;
11534
11536
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -11578,6 +11580,7 @@ var Raw;
11578
11580
  this.botVerification = params.botVerification;
11579
11581
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
11580
11582
  this.disallowedGifts = params.disallowedGifts;
11583
+ this.starsRating = params.starsRating;
11581
11584
  }
11582
11585
  static async read(_data, ..._args) {
11583
11586
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -11630,6 +11633,7 @@ var Raw;
11630
11633
  let botVerification = flags2 & (1 << 12) ? await index_js_1.TLObject.read(_data) : undefined;
11631
11634
  let sendPaidMessagesStars = flags2 & (1 << 14) ? await index_js_1.Primitive.Long.read(_data) : undefined;
11632
11635
  let disallowedGifts = flags2 & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
11636
+ let starsRating = flags2 & (1 << 17) ? await index_js_1.TLObject.read(_data) : undefined;
11633
11637
  return new Raw.UserFull({
11634
11638
  blocked: blocked,
11635
11639
  phoneCallsAvailable: phoneCallsAvailable,
@@ -11679,6 +11683,7 @@ var Raw;
11679
11683
  botVerification: botVerification,
11680
11684
  sendPaidMessagesStars: sendPaidMessagesStars,
11681
11685
  disallowedGifts: disallowedGifts,
11686
+ starsRating: starsRating,
11682
11687
  });
11683
11688
  }
11684
11689
  write() {
@@ -11731,6 +11736,7 @@ var Raw;
11731
11736
  flags2 |= this.botVerification !== undefined ? 1 << 12 : 0;
11732
11737
  flags2 |= this.sendPaidMessagesStars !== undefined ? 1 << 14 : 0;
11733
11738
  flags2 |= this.disallowedGifts !== undefined ? 1 << 15 : 0;
11739
+ flags2 |= this.starsRating !== undefined ? 1 << 17 : 0;
11734
11740
  b.write(index_js_1.Primitive.Int.write(flags2));
11735
11741
  if (this.id !== undefined) {
11736
11742
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -11825,6 +11831,9 @@ var Raw;
11825
11831
  if (this.disallowedGifts !== undefined) {
11826
11832
  b.write(this.disallowedGifts.write());
11827
11833
  }
11834
+ if (this.starsRating !== undefined) {
11835
+ b.write(this.starsRating.write());
11836
+ }
11828
11837
  return deps_js_1.Buffer.from(b.buffer);
11829
11838
  }
11830
11839
  }
@@ -38311,11 +38320,12 @@ var Raw;
38311
38320
  quoteText;
38312
38321
  quoteEntities;
38313
38322
  quoteOffset;
38323
+ todoItemId;
38314
38324
  constructor(params) {
38315
38325
  super();
38316
38326
  this.classType = 'types';
38317
38327
  this.className = 'MessageReplyHeader';
38318
- this.constructorId = 0xafbc09db;
38328
+ this.constructorId = 0x6917560b;
38319
38329
  this.subclassOfId = 0x5b4d9167;
38320
38330
  this._slots = [
38321
38331
  'replyToScheduled',
@@ -38329,6 +38339,7 @@ var Raw;
38329
38339
  'quoteText',
38330
38340
  'quoteEntities',
38331
38341
  'quoteOffset',
38342
+ 'todoItemId',
38332
38343
  ];
38333
38344
  this.replyToScheduled = params.replyToScheduled;
38334
38345
  this.forumTopic = params.forumTopic;
@@ -38341,6 +38352,7 @@ var Raw;
38341
38352
  this.quoteText = params.quoteText;
38342
38353
  this.quoteEntities = params.quoteEntities;
38343
38354
  this.quoteOffset = params.quoteOffset;
38355
+ this.todoItemId = params.todoItemId;
38344
38356
  }
38345
38357
  static async read(_data, ..._args) {
38346
38358
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -38355,6 +38367,7 @@ var Raw;
38355
38367
  let quoteText = flags & (1 << 6) ? await index_js_1.Primitive.String.read(_data) : undefined;
38356
38368
  let quoteEntities = flags & (1 << 7) ? await index_js_1.TLObject.read(_data) : [];
38357
38369
  let quoteOffset = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
38370
+ let todoItemId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
38358
38371
  return new Raw.MessageReplyHeader({
38359
38372
  replyToScheduled: replyToScheduled,
38360
38373
  forumTopic: forumTopic,
@@ -38367,6 +38380,7 @@ var Raw;
38367
38380
  quoteText: quoteText,
38368
38381
  quoteEntities: quoteEntities,
38369
38382
  quoteOffset: quoteOffset,
38383
+ todoItemId: todoItemId,
38370
38384
  });
38371
38385
  }
38372
38386
  write() {
@@ -38384,6 +38398,7 @@ var Raw;
38384
38398
  flags |= this.quoteText !== undefined ? 1 << 6 : 0;
38385
38399
  flags |= this.quoteEntities ? 1 << 7 : 0;
38386
38400
  flags |= this.quoteOffset !== undefined ? 1 << 10 : 0;
38401
+ flags |= this.todoItemId !== undefined ? 1 << 11 : 0;
38387
38402
  b.write(index_js_1.Primitive.Int.write(flags));
38388
38403
  if (this.replyToMsgId !== undefined) {
38389
38404
  b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
@@ -38409,6 +38424,9 @@ var Raw;
38409
38424
  if (this.quoteOffset !== undefined) {
38410
38425
  b.write(index_js_1.Primitive.Int.write(this.quoteOffset));
38411
38426
  }
38427
+ if (this.todoItemId !== undefined) {
38428
+ b.write(index_js_1.Primitive.Int.write(this.todoItemId));
38429
+ }
38412
38430
  return deps_js_1.Buffer.from(b.buffer);
38413
38431
  }
38414
38432
  }
@@ -43824,11 +43842,12 @@ var Raw;
43824
43842
  quoteEntities;
43825
43843
  quoteOffset;
43826
43844
  monoforumPeerId;
43845
+ todoItemId;
43827
43846
  constructor(params) {
43828
43847
  super();
43829
43848
  this.classType = 'types';
43830
43849
  this.className = 'InputReplyToMessage';
43831
- this.constructorId = 0xb07038b0;
43850
+ this.constructorId = 0x869fbe10;
43832
43851
  this.subclassOfId = 0x8c71131d;
43833
43852
  this._slots = [
43834
43853
  'replyToMsgId',
@@ -43838,6 +43857,7 @@ var Raw;
43838
43857
  'quoteEntities',
43839
43858
  'quoteOffset',
43840
43859
  'monoforumPeerId',
43860
+ 'todoItemId',
43841
43861
  ];
43842
43862
  this.replyToMsgId = params.replyToMsgId;
43843
43863
  this.topMsgId = params.topMsgId;
@@ -43846,6 +43866,7 @@ var Raw;
43846
43866
  this.quoteEntities = params.quoteEntities;
43847
43867
  this.quoteOffset = params.quoteOffset;
43848
43868
  this.monoforumPeerId = params.monoforumPeerId;
43869
+ this.todoItemId = params.todoItemId;
43849
43870
  }
43850
43871
  static async read(_data, ..._args) {
43851
43872
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -43856,6 +43877,7 @@ var Raw;
43856
43877
  let quoteEntities = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
43857
43878
  let quoteOffset = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
43858
43879
  let monoforumPeerId = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
43880
+ let todoItemId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
43859
43881
  return new Raw.InputReplyToMessage({
43860
43882
  replyToMsgId: replyToMsgId,
43861
43883
  topMsgId: topMsgId,
@@ -43864,6 +43886,7 @@ var Raw;
43864
43886
  quoteEntities: quoteEntities,
43865
43887
  quoteOffset: quoteOffset,
43866
43888
  monoforumPeerId: monoforumPeerId,
43889
+ todoItemId: todoItemId,
43867
43890
  });
43868
43891
  }
43869
43892
  write() {
@@ -43876,6 +43899,7 @@ var Raw;
43876
43899
  flags |= this.quoteEntities ? 1 << 3 : 0;
43877
43900
  flags |= this.quoteOffset !== undefined ? 1 << 4 : 0;
43878
43901
  flags |= this.monoforumPeerId !== undefined ? 1 << 5 : 0;
43902
+ flags |= this.todoItemId !== undefined ? 1 << 6 : 0;
43879
43903
  b.write(index_js_1.Primitive.Int.write(flags));
43880
43904
  if (this.replyToMsgId !== undefined) {
43881
43905
  b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
@@ -43898,6 +43922,9 @@ var Raw;
43898
43922
  if (this.monoforumPeerId !== undefined) {
43899
43923
  b.write(this.monoforumPeerId.write());
43900
43924
  }
43925
+ if (this.todoItemId !== undefined) {
43926
+ b.write(index_js_1.Primitive.Int.write(this.todoItemId));
43927
+ }
43901
43928
  return deps_js_1.Buffer.from(b.buffer);
43902
43929
  }
43903
43930
  }
@@ -48125,6 +48152,8 @@ var Raw;
48125
48152
  limited;
48126
48153
  soldOut;
48127
48154
  birthday;
48155
+ requirePremium;
48156
+ limitedPerUser;
48128
48157
  id;
48129
48158
  sticker;
48130
48159
  stars;
@@ -48138,16 +48167,20 @@ var Raw;
48138
48167
  resellMinStars;
48139
48168
  title;
48140
48169
  releasedBy;
48170
+ perUserTotal;
48171
+ perUserRemains;
48141
48172
  constructor(params) {
48142
48173
  super();
48143
48174
  this.classType = 'types';
48144
48175
  this.className = 'StarGift';
48145
- this.constructorId = 0x7f853c12;
48176
+ this.constructorId = 0xbcff5b;
48146
48177
  this.subclassOfId = 0xc31c590b;
48147
48178
  this._slots = [
48148
48179
  'limited',
48149
48180
  'soldOut',
48150
48181
  'birthday',
48182
+ 'requirePremium',
48183
+ 'limitedPerUser',
48151
48184
  'id',
48152
48185
  'sticker',
48153
48186
  'stars',
@@ -48161,10 +48194,14 @@ var Raw;
48161
48194
  'resellMinStars',
48162
48195
  'title',
48163
48196
  'releasedBy',
48197
+ 'perUserTotal',
48198
+ 'perUserRemains',
48164
48199
  ];
48165
48200
  this.limited = params.limited;
48166
48201
  this.soldOut = params.soldOut;
48167
48202
  this.birthday = params.birthday;
48203
+ this.requirePremium = params.requirePremium;
48204
+ this.limitedPerUser = params.limitedPerUser;
48168
48205
  this.id = params.id;
48169
48206
  this.sticker = params.sticker;
48170
48207
  this.stars = params.stars;
@@ -48178,12 +48215,16 @@ var Raw;
48178
48215
  this.resellMinStars = params.resellMinStars;
48179
48216
  this.title = params.title;
48180
48217
  this.releasedBy = params.releasedBy;
48218
+ this.perUserTotal = params.perUserTotal;
48219
+ this.perUserRemains = params.perUserRemains;
48181
48220
  }
48182
48221
  static async read(_data, ..._args) {
48183
48222
  let flags = await index_js_1.Primitive.Int.read(_data);
48184
48223
  let limited = flags & (1 << 0) ? true : false;
48185
48224
  let soldOut = flags & (1 << 1) ? true : false;
48186
48225
  let birthday = flags & (1 << 2) ? true : false;
48226
+ let requirePremium = flags & (1 << 7) ? true : false;
48227
+ let limitedPerUser = flags & (1 << 8) ? true : false;
48187
48228
  let id = await index_js_1.Primitive.Long.read(_data);
48188
48229
  let sticker = await index_js_1.TLObject.read(_data);
48189
48230
  let stars = await index_js_1.Primitive.Long.read(_data);
@@ -48197,10 +48238,14 @@ var Raw;
48197
48238
  let resellMinStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48198
48239
  let title = flags & (1 << 5) ? await index_js_1.Primitive.String.read(_data) : undefined;
48199
48240
  let releasedBy = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
48241
+ let perUserTotal = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48242
+ let perUserRemains = flags & (1 << 8) ? await index_js_1.Primitive.Int.read(_data) : undefined;
48200
48243
  return new Raw.StarGift({
48201
48244
  limited: limited,
48202
48245
  soldOut: soldOut,
48203
48246
  birthday: birthday,
48247
+ requirePremium: requirePremium,
48248
+ limitedPerUser: limitedPerUser,
48204
48249
  id: id,
48205
48250
  sticker: sticker,
48206
48251
  stars: stars,
@@ -48214,6 +48259,8 @@ var Raw;
48214
48259
  resellMinStars: resellMinStars,
48215
48260
  title: title,
48216
48261
  releasedBy: releasedBy,
48262
+ perUserTotal: perUserTotal,
48263
+ perUserRemains: perUserRemains,
48217
48264
  });
48218
48265
  }
48219
48266
  write() {
@@ -48223,6 +48270,8 @@ var Raw;
48223
48270
  flags |= this.limited ? 1 << 0 : 0;
48224
48271
  flags |= this.soldOut ? 1 << 1 : 0;
48225
48272
  flags |= this.birthday ? 1 << 2 : 0;
48273
+ flags |= this.requirePremium ? 1 << 7 : 0;
48274
+ flags |= this.limitedPerUser ? 1 << 8 : 0;
48226
48275
  flags |= this.availabilityRemains !== undefined ? 1 << 0 : 0;
48227
48276
  flags |= this.availabilityTotal !== undefined ? 1 << 0 : 0;
48228
48277
  flags |= this.availabilityResale !== undefined ? 1 << 4 : 0;
@@ -48232,6 +48281,8 @@ var Raw;
48232
48281
  flags |= this.resellMinStars !== undefined ? 1 << 4 : 0;
48233
48282
  flags |= this.title !== undefined ? 1 << 5 : 0;
48234
48283
  flags |= this.releasedBy !== undefined ? 1 << 6 : 0;
48284
+ flags |= this.perUserTotal !== undefined ? 1 << 8 : 0;
48285
+ flags |= this.perUserRemains !== undefined ? 1 << 8 : 0;
48235
48286
  b.write(index_js_1.Primitive.Int.write(flags));
48236
48287
  if (this.id !== undefined) {
48237
48288
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -48272,11 +48323,18 @@ var Raw;
48272
48323
  if (this.releasedBy !== undefined) {
48273
48324
  b.write(this.releasedBy.write());
48274
48325
  }
48326
+ if (this.perUserTotal !== undefined) {
48327
+ b.write(index_js_1.Primitive.Int.write(this.perUserTotal));
48328
+ }
48329
+ if (this.perUserRemains !== undefined) {
48330
+ b.write(index_js_1.Primitive.Int.write(this.perUserRemains));
48331
+ }
48275
48332
  return deps_js_1.Buffer.from(b.buffer);
48276
48333
  }
48277
48334
  }
48278
48335
  Raw.StarGift = StarGift;
48279
48336
  class StarGiftUnique extends index_js_1.TLObject {
48337
+ requirePremium;
48280
48338
  id;
48281
48339
  title;
48282
48340
  slug;
@@ -48297,6 +48355,7 @@ var Raw;
48297
48355
  this.constructorId = 0xf63778ae;
48298
48356
  this.subclassOfId = 0xc31c590b;
48299
48357
  this._slots = [
48358
+ 'requirePremium',
48300
48359
  'id',
48301
48360
  'title',
48302
48361
  'slug',
@@ -48311,6 +48370,7 @@ var Raw;
48311
48370
  'resellStars',
48312
48371
  'releasedBy',
48313
48372
  ];
48373
+ this.requirePremium = params.requirePremium;
48314
48374
  this.id = params.id;
48315
48375
  this.title = params.title;
48316
48376
  this.slug = params.slug;
@@ -48327,6 +48387,7 @@ var Raw;
48327
48387
  }
48328
48388
  static async read(_data, ..._args) {
48329
48389
  let flags = await index_js_1.Primitive.Int.read(_data);
48390
+ let requirePremium = flags & (1 << 6) ? true : false;
48330
48391
  let id = await index_js_1.Primitive.Long.read(_data);
48331
48392
  let title = await index_js_1.Primitive.String.read(_data);
48332
48393
  let slug = await index_js_1.Primitive.String.read(_data);
@@ -48341,6 +48402,7 @@ var Raw;
48341
48402
  let resellStars = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
48342
48403
  let releasedBy = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
48343
48404
  return new Raw.StarGiftUnique({
48405
+ requirePremium: requirePremium,
48344
48406
  id: id,
48345
48407
  title: title,
48346
48408
  slug: slug,
@@ -48360,6 +48422,7 @@ var Raw;
48360
48422
  const b = new deps_js_1.BytesIO();
48361
48423
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
48362
48424
  let flags = 0;
48425
+ flags |= this.requirePremium ? 1 << 6 : 0;
48363
48426
  flags |= this.ownerId !== undefined ? 1 << 0 : 0;
48364
48427
  flags |= this.ownerName !== undefined ? 1 << 1 : 0;
48365
48428
  flags |= this.ownerAddress !== undefined ? 1 << 2 : 0;
@@ -49119,11 +49182,12 @@ var Raw;
49119
49182
  transferStars;
49120
49183
  canTransferAt;
49121
49184
  canResellAt;
49185
+ collectionId;
49122
49186
  constructor(params) {
49123
49187
  super();
49124
49188
  this.classType = 'types';
49125
49189
  this.className = 'SavedStarGift';
49126
- this.constructorId = 0xdfda0499;
49190
+ this.constructorId = 0x1ea646df;
49127
49191
  this.subclassOfId = 0x8e2b3c14;
49128
49192
  this._slots = [
49129
49193
  'nameHidden',
@@ -49143,6 +49207,7 @@ var Raw;
49143
49207
  'transferStars',
49144
49208
  'canTransferAt',
49145
49209
  'canResellAt',
49210
+ 'collectionId',
49146
49211
  ];
49147
49212
  this.nameHidden = params.nameHidden;
49148
49213
  this.unsaved = params.unsaved;
@@ -49161,6 +49226,7 @@ var Raw;
49161
49226
  this.transferStars = params.transferStars;
49162
49227
  this.canTransferAt = params.canTransferAt;
49163
49228
  this.canResellAt = params.canResellAt;
49229
+ this.collectionId = params.collectionId;
49164
49230
  }
49165
49231
  static async read(_data, ..._args) {
49166
49232
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -49181,6 +49247,7 @@ var Raw;
49181
49247
  let transferStars = flags & (1 << 8) ? await index_js_1.Primitive.Long.read(_data) : undefined;
49182
49248
  let canTransferAt = flags & (1 << 13) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49183
49249
  let canResellAt = flags & (1 << 14) ? await index_js_1.Primitive.Int.read(_data) : undefined;
49250
+ let collectionId = flags & (1 << 15) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
49184
49251
  return new Raw.SavedStarGift({
49185
49252
  nameHidden: nameHidden,
49186
49253
  unsaved: unsaved,
@@ -49199,6 +49266,7 @@ var Raw;
49199
49266
  transferStars: transferStars,
49200
49267
  canTransferAt: canTransferAt,
49201
49268
  canResellAt: canResellAt,
49269
+ collectionId: collectionId,
49202
49270
  });
49203
49271
  }
49204
49272
  write() {
@@ -49220,6 +49288,7 @@ var Raw;
49220
49288
  flags |= this.transferStars !== undefined ? 1 << 8 : 0;
49221
49289
  flags |= this.canTransferAt !== undefined ? 1 << 13 : 0;
49222
49290
  flags |= this.canResellAt !== undefined ? 1 << 14 : 0;
49291
+ flags |= this.collectionId ? 1 << 15 : 0;
49223
49292
  b.write(index_js_1.Primitive.Int.write(flags));
49224
49293
  if (this.fromId !== undefined) {
49225
49294
  b.write(this.fromId.write());
@@ -49257,6 +49326,9 @@ var Raw;
49257
49326
  if (this.canResellAt !== undefined) {
49258
49327
  b.write(index_js_1.Primitive.Int.write(this.canResellAt));
49259
49328
  }
49329
+ if (this.collectionId) {
49330
+ b.write(index_js_1.Primitive.Vector.write(this.collectionId, index_js_1.Primitive.Int));
49331
+ }
49260
49332
  return deps_js_1.Buffer.from(b.buffer);
49261
49333
  }
49262
49334
  }
@@ -49995,6 +50067,117 @@ var Raw;
49995
50067
  }
49996
50068
  }
49997
50069
  Raw.SuggestedPost = SuggestedPost;
50070
+ class StarsRating extends index_js_1.TLObject {
50071
+ level;
50072
+ currentLevelStars;
50073
+ stars;
50074
+ nextLevelStars;
50075
+ constructor(params) {
50076
+ super();
50077
+ this.classType = 'types';
50078
+ this.className = 'StarsRating';
50079
+ this.constructorId = 0x1b0e4f07;
50080
+ this.subclassOfId = 0x63736420;
50081
+ this._slots = ['level', 'currentLevelStars', 'stars', 'nextLevelStars'];
50082
+ this.level = params.level;
50083
+ this.currentLevelStars = params.currentLevelStars;
50084
+ this.stars = params.stars;
50085
+ this.nextLevelStars = params.nextLevelStars;
50086
+ }
50087
+ static async read(_data, ..._args) {
50088
+ let flags = await index_js_1.Primitive.Int.read(_data);
50089
+ let level = await index_js_1.Primitive.Int.read(_data);
50090
+ let currentLevelStars = await index_js_1.Primitive.Long.read(_data);
50091
+ let stars = await index_js_1.Primitive.Long.read(_data);
50092
+ let nextLevelStars = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
50093
+ return new Raw.StarsRating({
50094
+ level: level,
50095
+ currentLevelStars: currentLevelStars,
50096
+ stars: stars,
50097
+ nextLevelStars: nextLevelStars,
50098
+ });
50099
+ }
50100
+ write() {
50101
+ const b = new deps_js_1.BytesIO();
50102
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50103
+ let flags = 0;
50104
+ flags |= this.nextLevelStars !== undefined ? 1 << 0 : 0;
50105
+ b.write(index_js_1.Primitive.Int.write(flags));
50106
+ if (this.level !== undefined) {
50107
+ b.write(index_js_1.Primitive.Int.write(this.level));
50108
+ }
50109
+ if (this.currentLevelStars !== undefined) {
50110
+ b.write(index_js_1.Primitive.Long.write(this.currentLevelStars));
50111
+ }
50112
+ if (this.stars !== undefined) {
50113
+ b.write(index_js_1.Primitive.Long.write(this.stars));
50114
+ }
50115
+ if (this.nextLevelStars !== undefined) {
50116
+ b.write(index_js_1.Primitive.Long.write(this.nextLevelStars));
50117
+ }
50118
+ return deps_js_1.Buffer.from(b.buffer);
50119
+ }
50120
+ }
50121
+ Raw.StarsRating = StarsRating;
50122
+ class StarGiftCollection extends index_js_1.TLObject {
50123
+ collectionId;
50124
+ title;
50125
+ icon;
50126
+ giftsCount;
50127
+ hash;
50128
+ constructor(params) {
50129
+ super();
50130
+ this.classType = 'types';
50131
+ this.className = 'StarGiftCollection';
50132
+ this.constructorId = 0x9d6b13b0;
50133
+ this.subclassOfId = 0x43e0cb4a;
50134
+ this._slots = ['collectionId', 'title', 'icon', 'giftsCount', 'hash'];
50135
+ this.collectionId = params.collectionId;
50136
+ this.title = params.title;
50137
+ this.icon = params.icon;
50138
+ this.giftsCount = params.giftsCount;
50139
+ this.hash = params.hash;
50140
+ }
50141
+ static async read(_data, ..._args) {
50142
+ let flags = await index_js_1.Primitive.Int.read(_data);
50143
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
50144
+ let title = await index_js_1.Primitive.String.read(_data);
50145
+ let icon = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
50146
+ let giftsCount = await index_js_1.Primitive.Int.read(_data);
50147
+ let hash = await index_js_1.Primitive.Long.read(_data);
50148
+ return new Raw.StarGiftCollection({
50149
+ collectionId: collectionId,
50150
+ title: title,
50151
+ icon: icon,
50152
+ giftsCount: giftsCount,
50153
+ hash: hash,
50154
+ });
50155
+ }
50156
+ write() {
50157
+ const b = new deps_js_1.BytesIO();
50158
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
50159
+ let flags = 0;
50160
+ flags |= this.icon !== undefined ? 1 << 0 : 0;
50161
+ b.write(index_js_1.Primitive.Int.write(flags));
50162
+ if (this.collectionId !== undefined) {
50163
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
50164
+ }
50165
+ if (this.title !== undefined) {
50166
+ b.write(index_js_1.Primitive.String.write(this.title));
50167
+ }
50168
+ if (this.icon !== undefined) {
50169
+ b.write(this.icon.write());
50170
+ }
50171
+ if (this.giftsCount !== undefined) {
50172
+ b.write(index_js_1.Primitive.Int.write(this.giftsCount));
50173
+ }
50174
+ if (this.hash !== undefined) {
50175
+ b.write(index_js_1.Primitive.Long.write(this.hash));
50176
+ }
50177
+ return deps_js_1.Buffer.from(b.buffer);
50178
+ }
50179
+ }
50180
+ Raw.StarGiftCollection = StarGiftCollection;
49998
50181
  class InvokeAfterMsg extends index_js_1.TLObject {
49999
50182
  __response__;
50000
50183
  msgId;
@@ -81690,6 +81873,50 @@ var Raw;
81690
81873
  }
81691
81874
  }
81692
81875
  payments.ResaleStarGifts = ResaleStarGifts;
81876
+ class StarGiftCollectionsNotModified extends index_js_1.TLObject {
81877
+ constructor() {
81878
+ super();
81879
+ this.classType = 'types';
81880
+ this.className = 'payments.StarGiftCollectionsNotModified';
81881
+ this.constructorId = 0xa0ba4f17;
81882
+ this.subclassOfId = 0xf01721ec;
81883
+ this._slots = [];
81884
+ }
81885
+ static async read(_data, ..._args) {
81886
+ return new Raw.payments.StarGiftCollectionsNotModified();
81887
+ }
81888
+ write() {
81889
+ const b = new deps_js_1.BytesIO();
81890
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81891
+ return deps_js_1.Buffer.from(b.buffer);
81892
+ }
81893
+ }
81894
+ payments.StarGiftCollectionsNotModified = StarGiftCollectionsNotModified;
81895
+ class StarGiftCollections extends index_js_1.TLObject {
81896
+ collections;
81897
+ constructor(params) {
81898
+ super();
81899
+ this.classType = 'types';
81900
+ this.className = 'payments.StarGiftCollections';
81901
+ this.constructorId = 0x8a2932f3;
81902
+ this.subclassOfId = 0xf01721ec;
81903
+ this._slots = ['collections'];
81904
+ this.collections = params.collections;
81905
+ }
81906
+ static async read(_data, ..._args) {
81907
+ let collections = await index_js_1.TLObject.read(_data);
81908
+ return new Raw.payments.StarGiftCollections({ collections: collections });
81909
+ }
81910
+ write() {
81911
+ const b = new deps_js_1.BytesIO();
81912
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
81913
+ if (this.collections) {
81914
+ b.write(index_js_1.Primitive.Vector.write(this.collections));
81915
+ }
81916
+ return deps_js_1.Buffer.from(b.buffer);
81917
+ }
81918
+ }
81919
+ payments.StarGiftCollections = StarGiftCollections;
81693
81920
  class GetPaymentForm extends index_js_1.TLObject {
81694
81921
  __response__;
81695
81922
  invoice;
@@ -83195,13 +83422,14 @@ var Raw;
83195
83422
  excludeUnique;
83196
83423
  sortByValue;
83197
83424
  peer;
83425
+ collectionId;
83198
83426
  offset;
83199
83427
  limit;
83200
83428
  constructor(params) {
83201
83429
  super();
83202
83430
  this.classType = 'functions';
83203
83431
  this.className = 'payments.GetSavedStarGifts';
83204
- this.constructorId = 0x23830de9;
83432
+ this.constructorId = 0xa319e569;
83205
83433
  this.subclassOfId = 0xd5112897;
83206
83434
  this._slots = [
83207
83435
  'excludeUnsaved',
@@ -83211,6 +83439,7 @@ var Raw;
83211
83439
  'excludeUnique',
83212
83440
  'sortByValue',
83213
83441
  'peer',
83442
+ 'collectionId',
83214
83443
  'offset',
83215
83444
  'limit',
83216
83445
  ];
@@ -83221,6 +83450,7 @@ var Raw;
83221
83450
  this.excludeUnique = params.excludeUnique;
83222
83451
  this.sortByValue = params.sortByValue;
83223
83452
  this.peer = params.peer;
83453
+ this.collectionId = params.collectionId;
83224
83454
  this.offset = params.offset;
83225
83455
  this.limit = params.limit;
83226
83456
  }
@@ -83233,6 +83463,7 @@ var Raw;
83233
83463
  let excludeUnique = flags & (1 << 4) ? true : false;
83234
83464
  let sortByValue = flags & (1 << 5) ? true : false;
83235
83465
  let peer = await index_js_1.TLObject.read(_data);
83466
+ let collectionId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
83236
83467
  let offset = await index_js_1.Primitive.String.read(_data);
83237
83468
  let limit = await index_js_1.Primitive.Int.read(_data);
83238
83469
  return new Raw.payments.GetSavedStarGifts({
@@ -83243,6 +83474,7 @@ var Raw;
83243
83474
  excludeUnique: excludeUnique,
83244
83475
  sortByValue: sortByValue,
83245
83476
  peer: peer,
83477
+ collectionId: collectionId,
83246
83478
  offset: offset,
83247
83479
  limit: limit,
83248
83480
  });
@@ -83257,10 +83489,14 @@ var Raw;
83257
83489
  flags |= this.excludeLimited ? 1 << 3 : 0;
83258
83490
  flags |= this.excludeUnique ? 1 << 4 : 0;
83259
83491
  flags |= this.sortByValue ? 1 << 5 : 0;
83492
+ flags |= this.collectionId !== undefined ? 1 << 6 : 0;
83260
83493
  b.write(index_js_1.Primitive.Int.write(flags));
83261
83494
  if (this.peer !== undefined) {
83262
83495
  b.write(this.peer.write());
83263
83496
  }
83497
+ if (this.collectionId !== undefined) {
83498
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
83499
+ }
83264
83500
  if (this.offset !== undefined) {
83265
83501
  b.write(index_js_1.Primitive.String.write(this.offset));
83266
83502
  }
@@ -83537,6 +83773,217 @@ var Raw;
83537
83773
  }
83538
83774
  }
83539
83775
  payments.UpdateStarGiftPrice = UpdateStarGiftPrice;
83776
+ class CreateStarGiftCollection extends index_js_1.TLObject {
83777
+ __response__;
83778
+ peer;
83779
+ title;
83780
+ stargift;
83781
+ constructor(params) {
83782
+ super();
83783
+ this.classType = 'functions';
83784
+ this.className = 'payments.CreateStarGiftCollection';
83785
+ this.constructorId = 0x1f4a0e87;
83786
+ this.subclassOfId = 0x43e0cb4a;
83787
+ this._slots = ['peer', 'title', 'stargift'];
83788
+ this.peer = params.peer;
83789
+ this.title = params.title;
83790
+ this.stargift = params.stargift;
83791
+ }
83792
+ static async read(_data, ..._args) {
83793
+ let peer = await index_js_1.TLObject.read(_data);
83794
+ let title = await index_js_1.Primitive.String.read(_data);
83795
+ let stargift = await index_js_1.TLObject.read(_data);
83796
+ return new Raw.payments.CreateStarGiftCollection({
83797
+ peer: peer,
83798
+ title: title,
83799
+ stargift: stargift,
83800
+ });
83801
+ }
83802
+ write() {
83803
+ const b = new deps_js_1.BytesIO();
83804
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83805
+ if (this.peer !== undefined) {
83806
+ b.write(this.peer.write());
83807
+ }
83808
+ if (this.title !== undefined) {
83809
+ b.write(index_js_1.Primitive.String.write(this.title));
83810
+ }
83811
+ if (this.stargift) {
83812
+ b.write(index_js_1.Primitive.Vector.write(this.stargift));
83813
+ }
83814
+ return deps_js_1.Buffer.from(b.buffer);
83815
+ }
83816
+ }
83817
+ payments.CreateStarGiftCollection = CreateStarGiftCollection;
83818
+ class UpdateStarGiftCollection extends index_js_1.TLObject {
83819
+ __response__;
83820
+ peer;
83821
+ collectionId;
83822
+ title;
83823
+ deleteStargift;
83824
+ addStargift;
83825
+ order;
83826
+ constructor(params) {
83827
+ super();
83828
+ this.classType = 'functions';
83829
+ this.className = 'payments.UpdateStarGiftCollection';
83830
+ this.constructorId = 0x4fddbee7;
83831
+ this.subclassOfId = 0x43e0cb4a;
83832
+ this._slots = ['peer', 'collectionId', 'title', 'deleteStargift', 'addStargift', 'order'];
83833
+ this.peer = params.peer;
83834
+ this.collectionId = params.collectionId;
83835
+ this.title = params.title;
83836
+ this.deleteStargift = params.deleteStargift;
83837
+ this.addStargift = params.addStargift;
83838
+ this.order = params.order;
83839
+ }
83840
+ static async read(_data, ..._args) {
83841
+ let flags = await index_js_1.Primitive.Int.read(_data);
83842
+ let peer = await index_js_1.TLObject.read(_data);
83843
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
83844
+ let title = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
83845
+ let deleteStargift = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
83846
+ let addStargift = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
83847
+ let order = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
83848
+ return new Raw.payments.UpdateStarGiftCollection({
83849
+ peer: peer,
83850
+ collectionId: collectionId,
83851
+ title: title,
83852
+ deleteStargift: deleteStargift,
83853
+ addStargift: addStargift,
83854
+ order: order,
83855
+ });
83856
+ }
83857
+ write() {
83858
+ const b = new deps_js_1.BytesIO();
83859
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83860
+ let flags = 0;
83861
+ flags |= this.title !== undefined ? 1 << 0 : 0;
83862
+ flags |= this.deleteStargift ? 1 << 1 : 0;
83863
+ flags |= this.addStargift ? 1 << 2 : 0;
83864
+ flags |= this.order ? 1 << 3 : 0;
83865
+ b.write(index_js_1.Primitive.Int.write(flags));
83866
+ if (this.peer !== undefined) {
83867
+ b.write(this.peer.write());
83868
+ }
83869
+ if (this.collectionId !== undefined) {
83870
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
83871
+ }
83872
+ if (this.title !== undefined) {
83873
+ b.write(index_js_1.Primitive.String.write(this.title));
83874
+ }
83875
+ if (this.deleteStargift) {
83876
+ b.write(index_js_1.Primitive.Vector.write(this.deleteStargift));
83877
+ }
83878
+ if (this.addStargift) {
83879
+ b.write(index_js_1.Primitive.Vector.write(this.addStargift));
83880
+ }
83881
+ if (this.order) {
83882
+ b.write(index_js_1.Primitive.Vector.write(this.order));
83883
+ }
83884
+ return deps_js_1.Buffer.from(b.buffer);
83885
+ }
83886
+ }
83887
+ payments.UpdateStarGiftCollection = UpdateStarGiftCollection;
83888
+ class ReorderStarGiftCollections extends index_js_1.TLObject {
83889
+ __response__;
83890
+ peer;
83891
+ order;
83892
+ constructor(params) {
83893
+ super();
83894
+ this.classType = 'functions';
83895
+ this.className = 'payments.ReorderStarGiftCollections';
83896
+ this.constructorId = 0xc32af4cc;
83897
+ this.subclassOfId = 0xf5b399ac;
83898
+ this._slots = ['peer', 'order'];
83899
+ this.peer = params.peer;
83900
+ this.order = params.order;
83901
+ }
83902
+ static async read(_data, ..._args) {
83903
+ let peer = await index_js_1.TLObject.read(_data);
83904
+ let order = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
83905
+ return new Raw.payments.ReorderStarGiftCollections({ peer: peer, order: order });
83906
+ }
83907
+ write() {
83908
+ const b = new deps_js_1.BytesIO();
83909
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83910
+ if (this.peer !== undefined) {
83911
+ b.write(this.peer.write());
83912
+ }
83913
+ if (this.order) {
83914
+ b.write(index_js_1.Primitive.Vector.write(this.order, index_js_1.Primitive.Int));
83915
+ }
83916
+ return deps_js_1.Buffer.from(b.buffer);
83917
+ }
83918
+ }
83919
+ payments.ReorderStarGiftCollections = ReorderStarGiftCollections;
83920
+ class DeleteStarGiftCollection extends index_js_1.TLObject {
83921
+ __response__;
83922
+ peer;
83923
+ collectionId;
83924
+ constructor(params) {
83925
+ super();
83926
+ this.classType = 'functions';
83927
+ this.className = 'payments.DeleteStarGiftCollection';
83928
+ this.constructorId = 0xad5648e8;
83929
+ this.subclassOfId = 0xf5b399ac;
83930
+ this._slots = ['peer', 'collectionId'];
83931
+ this.peer = params.peer;
83932
+ this.collectionId = params.collectionId;
83933
+ }
83934
+ static async read(_data, ..._args) {
83935
+ let peer = await index_js_1.TLObject.read(_data);
83936
+ let collectionId = await index_js_1.Primitive.Int.read(_data);
83937
+ return new Raw.payments.DeleteStarGiftCollection({
83938
+ peer: peer,
83939
+ collectionId: collectionId,
83940
+ });
83941
+ }
83942
+ write() {
83943
+ const b = new deps_js_1.BytesIO();
83944
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83945
+ if (this.peer !== undefined) {
83946
+ b.write(this.peer.write());
83947
+ }
83948
+ if (this.collectionId !== undefined) {
83949
+ b.write(index_js_1.Primitive.Int.write(this.collectionId));
83950
+ }
83951
+ return deps_js_1.Buffer.from(b.buffer);
83952
+ }
83953
+ }
83954
+ payments.DeleteStarGiftCollection = DeleteStarGiftCollection;
83955
+ class GetStarGiftCollections extends index_js_1.TLObject {
83956
+ __response__;
83957
+ peer;
83958
+ hash;
83959
+ constructor(params) {
83960
+ super();
83961
+ this.classType = 'functions';
83962
+ this.className = 'payments.GetStarGiftCollections';
83963
+ this.constructorId = 0x981b91dd;
83964
+ this.subclassOfId = 0xf01721ec;
83965
+ this._slots = ['peer', 'hash'];
83966
+ this.peer = params.peer;
83967
+ this.hash = params.hash;
83968
+ }
83969
+ static async read(_data, ..._args) {
83970
+ let peer = await index_js_1.TLObject.read(_data);
83971
+ let hash = await index_js_1.Primitive.Long.read(_data);
83972
+ return new Raw.payments.GetStarGiftCollections({ peer: peer, hash: hash });
83973
+ }
83974
+ write() {
83975
+ const b = new deps_js_1.BytesIO();
83976
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
83977
+ if (this.peer !== undefined) {
83978
+ b.write(this.peer.write());
83979
+ }
83980
+ if (this.hash !== undefined) {
83981
+ b.write(index_js_1.Primitive.Long.write(this.hash));
83982
+ }
83983
+ return deps_js_1.Buffer.from(b.buffer);
83984
+ }
83985
+ }
83986
+ payments.GetStarGiftCollections = GetStarGiftCollections;
83540
83987
  })(payments = Raw.payments || (Raw.payments = {}));
83541
83988
  let phone;
83542
83989
  (function (phone) {