@tgsnake/skema 1.11.0 → 1.12.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 = 223;
8
+ Raw.Layer = 224;
9
9
  Raw.HighestSCLayer = 144;
10
10
  class ResPQ extends index_js_1.TLObject {
11
11
  nonce;
@@ -2351,32 +2351,40 @@ var Raw;
2351
2351
  Raw.InputMediaEmpty = InputMediaEmpty;
2352
2352
  class InputMediaUploadedPhoto extends index_js_1.TLObject {
2353
2353
  spoiler;
2354
+ livePhoto;
2354
2355
  file;
2355
2356
  stickers;
2356
2357
  ttlSeconds;
2358
+ video;
2357
2359
  constructor(params) {
2358
2360
  super();
2359
2361
  this.classType = 'types';
2360
2362
  this.className = 'InputMediaUploadedPhoto';
2361
- this.constructorId = 0x1e287d04;
2363
+ this.constructorId = 0x7d8375da;
2362
2364
  this.subclassOfId = 0xfaf846f4;
2363
- this._slots = ['spoiler', 'file', 'stickers', 'ttlSeconds'];
2365
+ this._slots = ['spoiler', 'livePhoto', 'file', 'stickers', 'ttlSeconds', 'video'];
2364
2366
  this.spoiler = params.spoiler;
2367
+ this.livePhoto = params.livePhoto;
2365
2368
  this.file = params.file;
2366
2369
  this.stickers = params.stickers;
2367
2370
  this.ttlSeconds = params.ttlSeconds;
2371
+ this.video = params.video;
2368
2372
  }
2369
2373
  static async read(_data, ..._args) {
2370
2374
  let flags = await index_js_1.Primitive.Int.read(_data);
2371
2375
  let spoiler = flags & (1 << 2) ? true : false;
2376
+ let livePhoto = flags & (1 << 3) ? true : false;
2372
2377
  let file = await index_js_1.TLObject.read(_data);
2373
2378
  let stickers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : [];
2374
2379
  let ttlSeconds = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
2380
+ let video = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
2375
2381
  return new Raw.InputMediaUploadedPhoto({
2376
2382
  spoiler: spoiler,
2383
+ livePhoto: livePhoto,
2377
2384
  file: file,
2378
2385
  stickers: stickers,
2379
2386
  ttlSeconds: ttlSeconds,
2387
+ video: video,
2380
2388
  });
2381
2389
  }
2382
2390
  write() {
@@ -2384,8 +2392,10 @@ var Raw;
2384
2392
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
2385
2393
  let flags = 0;
2386
2394
  flags |= this.spoiler ? 1 << 2 : 0;
2395
+ flags |= this.livePhoto ? 1 << 3 : 0;
2387
2396
  flags |= this.stickers ? 1 << 0 : 0;
2388
2397
  flags |= this.ttlSeconds !== undefined ? 1 << 1 : 0;
2398
+ flags |= this.video !== undefined ? 1 << 3 : 0;
2389
2399
  b.write(index_js_1.Primitive.Int.write(flags));
2390
2400
  if (this.file !== undefined) {
2391
2401
  b.write(this.file.write());
@@ -2396,38 +2406,55 @@ var Raw;
2396
2406
  if (this.ttlSeconds !== undefined) {
2397
2407
  b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
2398
2408
  }
2409
+ if (this.video !== undefined) {
2410
+ b.write(this.video.write());
2411
+ }
2399
2412
  return deps_js_1.Buffer.from(b.buffer);
2400
2413
  }
2401
2414
  }
2402
2415
  Raw.InputMediaUploadedPhoto = InputMediaUploadedPhoto;
2403
2416
  class InputMediaPhoto extends index_js_1.TLObject {
2404
2417
  spoiler;
2418
+ livePhoto;
2405
2419
  id;
2406
2420
  ttlSeconds;
2421
+ video;
2407
2422
  constructor(params) {
2408
2423
  super();
2409
2424
  this.classType = 'types';
2410
2425
  this.className = 'InputMediaPhoto';
2411
- this.constructorId = 0xb3ba0635;
2426
+ this.constructorId = 0xe3af4434;
2412
2427
  this.subclassOfId = 0xfaf846f4;
2413
- this._slots = ['spoiler', 'id', 'ttlSeconds'];
2428
+ this._slots = ['spoiler', 'livePhoto', 'id', 'ttlSeconds', 'video'];
2414
2429
  this.spoiler = params.spoiler;
2430
+ this.livePhoto = params.livePhoto;
2415
2431
  this.id = params.id;
2416
2432
  this.ttlSeconds = params.ttlSeconds;
2433
+ this.video = params.video;
2417
2434
  }
2418
2435
  static async read(_data, ..._args) {
2419
2436
  let flags = await index_js_1.Primitive.Int.read(_data);
2420
2437
  let spoiler = flags & (1 << 1) ? true : false;
2438
+ let livePhoto = flags & (1 << 2) ? true : false;
2421
2439
  let id = await index_js_1.TLObject.read(_data);
2422
2440
  let ttlSeconds = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
2423
- return new Raw.InputMediaPhoto({ spoiler: spoiler, id: id, ttlSeconds: ttlSeconds });
2441
+ let video = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
2442
+ return new Raw.InputMediaPhoto({
2443
+ spoiler: spoiler,
2444
+ livePhoto: livePhoto,
2445
+ id: id,
2446
+ ttlSeconds: ttlSeconds,
2447
+ video: video,
2448
+ });
2424
2449
  }
2425
2450
  write() {
2426
2451
  const b = new deps_js_1.BytesIO();
2427
2452
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
2428
2453
  let flags = 0;
2429
2454
  flags |= this.spoiler ? 1 << 1 : 0;
2455
+ flags |= this.livePhoto ? 1 << 2 : 0;
2430
2456
  flags |= this.ttlSeconds !== undefined ? 1 << 0 : 0;
2457
+ flags |= this.video !== undefined ? 1 << 2 : 0;
2431
2458
  b.write(index_js_1.Primitive.Int.write(flags));
2432
2459
  if (this.id !== undefined) {
2433
2460
  b.write(this.id.write());
@@ -2435,6 +2462,9 @@ var Raw;
2435
2462
  if (this.ttlSeconds !== undefined) {
2436
2463
  b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
2437
2464
  }
2465
+ if (this.video !== undefined) {
2466
+ b.write(this.video.write());
2467
+ }
2438
2468
  return deps_js_1.Buffer.from(b.buffer);
2439
2469
  }
2440
2470
  }
@@ -3041,31 +3071,46 @@ var Raw;
3041
3071
  class InputMediaPoll extends index_js_1.TLObject {
3042
3072
  poll;
3043
3073
  correctAnswers;
3074
+ attachedMedia;
3044
3075
  solution;
3045
3076
  solutionEntities;
3077
+ solutionMedia;
3046
3078
  constructor(params) {
3047
3079
  super();
3048
3080
  this.classType = 'types';
3049
3081
  this.className = 'InputMediaPoll';
3050
- this.constructorId = 0xf94e5f1;
3082
+ this.constructorId = 0x883a4108;
3051
3083
  this.subclassOfId = 0xfaf846f4;
3052
- this._slots = ['poll', 'correctAnswers', 'solution', 'solutionEntities'];
3084
+ this._slots = [
3085
+ 'poll',
3086
+ 'correctAnswers',
3087
+ 'attachedMedia',
3088
+ 'solution',
3089
+ 'solutionEntities',
3090
+ 'solutionMedia',
3091
+ ];
3053
3092
  this.poll = params.poll;
3054
3093
  this.correctAnswers = params.correctAnswers;
3094
+ this.attachedMedia = params.attachedMedia;
3055
3095
  this.solution = params.solution;
3056
3096
  this.solutionEntities = params.solutionEntities;
3097
+ this.solutionMedia = params.solutionMedia;
3057
3098
  }
3058
3099
  static async read(_data, ..._args) {
3059
3100
  let flags = await index_js_1.Primitive.Int.read(_data);
3060
3101
  let poll = await index_js_1.TLObject.read(_data);
3061
- let correctAnswers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Bytes) : [];
3102
+ let correctAnswers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
3103
+ let attachedMedia = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
3062
3104
  let solution = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
3063
3105
  let solutionEntities = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
3106
+ let solutionMedia = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
3064
3107
  return new Raw.InputMediaPoll({
3065
3108
  poll: poll,
3066
3109
  correctAnswers: correctAnswers,
3110
+ attachedMedia: attachedMedia,
3067
3111
  solution: solution,
3068
3112
  solutionEntities: solutionEntities,
3113
+ solutionMedia: solutionMedia,
3069
3114
  });
3070
3115
  }
3071
3116
  write() {
@@ -3073,14 +3118,19 @@ var Raw;
3073
3118
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
3074
3119
  let flags = 0;
3075
3120
  flags |= this.correctAnswers ? 1 << 0 : 0;
3121
+ flags |= this.attachedMedia !== undefined ? 1 << 3 : 0;
3076
3122
  flags |= this.solution !== undefined ? 1 << 1 : 0;
3077
3123
  flags |= this.solutionEntities ? 1 << 1 : 0;
3124
+ flags |= this.solutionMedia !== undefined ? 1 << 2 : 0;
3078
3125
  b.write(index_js_1.Primitive.Int.write(flags));
3079
3126
  if (this.poll !== undefined) {
3080
3127
  b.write(this.poll.write());
3081
3128
  }
3082
3129
  if (this.correctAnswers) {
3083
- b.write(index_js_1.Primitive.Vector.write(this.correctAnswers, index_js_1.Primitive.Bytes));
3130
+ b.write(index_js_1.Primitive.Vector.write(this.correctAnswers, index_js_1.Primitive.Int));
3131
+ }
3132
+ if (this.attachedMedia !== undefined) {
3133
+ b.write(this.attachedMedia.write());
3084
3134
  }
3085
3135
  if (this.solution !== undefined) {
3086
3136
  b.write(index_js_1.Primitive.String.write(this.solution));
@@ -3088,6 +3138,9 @@ var Raw;
3088
3138
  if (this.solutionEntities) {
3089
3139
  b.write(index_js_1.Primitive.Vector.write(this.solutionEntities));
3090
3140
  }
3141
+ if (this.solutionMedia !== undefined) {
3142
+ b.write(this.solutionMedia.write());
3143
+ }
3091
3144
  return deps_js_1.Buffer.from(b.buffer);
3092
3145
  }
3093
3146
  }
@@ -4063,6 +4116,7 @@ var Raw;
4063
4116
  botHasMainApp;
4064
4117
  botForumView;
4065
4118
  botForumCanManageTopics;
4119
+ botCanManageBots;
4066
4120
  id;
4067
4121
  accessHash;
4068
4122
  firstName;
@@ -4117,6 +4171,7 @@ var Raw;
4117
4171
  'botHasMainApp',
4118
4172
  'botForumView',
4119
4173
  'botForumCanManageTopics',
4174
+ 'botCanManageBots',
4120
4175
  'id',
4121
4176
  'accessHash',
4122
4177
  'firstName',
@@ -4165,6 +4220,7 @@ var Raw;
4165
4220
  this.botHasMainApp = params.botHasMainApp;
4166
4221
  this.botForumView = params.botForumView;
4167
4222
  this.botForumCanManageTopics = params.botForumCanManageTopics;
4223
+ this.botCanManageBots = params.botCanManageBots;
4168
4224
  this.id = params.id;
4169
4225
  this.accessHash = params.accessHash;
4170
4226
  this.firstName = params.firstName;
@@ -4216,6 +4272,7 @@ var Raw;
4216
4272
  let botHasMainApp = flags2 & (1 << 13) ? true : false;
4217
4273
  let botForumView = flags2 & (1 << 16) ? true : false;
4218
4274
  let botForumCanManageTopics = flags2 & (1 << 17) ? true : false;
4275
+ let botCanManageBots = flags2 & (1 << 18) ? true : false;
4219
4276
  let id = await index_js_1.Primitive.Long.read(_data);
4220
4277
  let accessHash = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
4221
4278
  let firstName = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
@@ -4264,6 +4321,7 @@ var Raw;
4264
4321
  botHasMainApp: botHasMainApp,
4265
4322
  botForumView: botForumView,
4266
4323
  botForumCanManageTopics: botForumCanManageTopics,
4324
+ botCanManageBots: botCanManageBots,
4267
4325
  id: id,
4268
4326
  accessHash: accessHash,
4269
4327
  firstName: firstName,
@@ -4331,6 +4389,7 @@ var Raw;
4331
4389
  flags2 |= this.botHasMainApp ? 1 << 13 : 0;
4332
4390
  flags2 |= this.botForumView ? 1 << 16 : 0;
4333
4391
  flags2 |= this.botForumCanManageTopics ? 1 << 17 : 0;
4392
+ flags2 |= this.botCanManageBots ? 1 << 18 : 0;
4334
4393
  flags2 |= this.usernames ? 1 << 0 : 0;
4335
4394
  flags2 |= this.storiesMaxId !== undefined ? 1 << 5 : 0;
4336
4395
  flags2 |= this.color !== undefined ? 1 << 8 : 0;
@@ -6897,33 +6956,47 @@ var Raw;
6897
6956
  Raw.MessageMediaEmpty = MessageMediaEmpty;
6898
6957
  class MessageMediaPhoto extends index_js_1.TLObject {
6899
6958
  spoiler;
6959
+ livePhoto;
6900
6960
  photo;
6901
6961
  ttlSeconds;
6962
+ video;
6902
6963
  constructor(params) {
6903
6964
  super();
6904
6965
  this.classType = 'types';
6905
6966
  this.className = 'MessageMediaPhoto';
6906
- this.constructorId = 0x695150d7;
6967
+ this.constructorId = 0xe216eb63;
6907
6968
  this.subclassOfId = 0x476cbe32;
6908
- this._slots = ['spoiler', 'photo', 'ttlSeconds'];
6969
+ this._slots = ['spoiler', 'livePhoto', 'photo', 'ttlSeconds', 'video'];
6909
6970
  this.spoiler = params.spoiler;
6971
+ this.livePhoto = params.livePhoto;
6910
6972
  this.photo = params.photo;
6911
6973
  this.ttlSeconds = params.ttlSeconds;
6974
+ this.video = params.video;
6912
6975
  }
6913
6976
  static async read(_data, ..._args) {
6914
6977
  let flags = await index_js_1.Primitive.Int.read(_data);
6915
6978
  let spoiler = flags & (1 << 3) ? true : false;
6979
+ let livePhoto = flags & (1 << 4) ? true : false;
6916
6980
  let photo = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
6917
6981
  let ttlSeconds = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
6918
- return new Raw.MessageMediaPhoto({ spoiler: spoiler, photo: photo, ttlSeconds: ttlSeconds });
6982
+ let video = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
6983
+ return new Raw.MessageMediaPhoto({
6984
+ spoiler: spoiler,
6985
+ livePhoto: livePhoto,
6986
+ photo: photo,
6987
+ ttlSeconds: ttlSeconds,
6988
+ video: video,
6989
+ });
6919
6990
  }
6920
6991
  write() {
6921
6992
  const b = new deps_js_1.BytesIO();
6922
6993
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
6923
6994
  let flags = 0;
6924
6995
  flags |= this.spoiler ? 1 << 3 : 0;
6996
+ flags |= this.livePhoto ? 1 << 4 : 0;
6925
6997
  flags |= this.photo !== undefined ? 1 << 0 : 0;
6926
6998
  flags |= this.ttlSeconds !== undefined ? 1 << 2 : 0;
6999
+ flags |= this.video !== undefined ? 1 << 4 : 0;
6927
7000
  b.write(index_js_1.Primitive.Int.write(flags));
6928
7001
  if (this.photo !== undefined) {
6929
7002
  b.write(this.photo.write());
@@ -6931,6 +7004,9 @@ var Raw;
6931
7004
  if (this.ttlSeconds !== undefined) {
6932
7005
  b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
6933
7006
  }
7007
+ if (this.video !== undefined) {
7008
+ b.write(this.video.write());
7009
+ }
6934
7010
  return deps_js_1.Buffer.from(b.buffer);
6935
7011
  }
6936
7012
  }
@@ -7429,30 +7505,44 @@ var Raw;
7429
7505
  class MessageMediaPoll extends index_js_1.TLObject {
7430
7506
  poll;
7431
7507
  results;
7508
+ attachedMedia;
7432
7509
  constructor(params) {
7433
7510
  super();
7434
7511
  this.classType = 'types';
7435
7512
  this.className = 'MessageMediaPoll';
7436
- this.constructorId = 0x4bd6e798;
7513
+ this.constructorId = 0x773f4e66;
7437
7514
  this.subclassOfId = 0x476cbe32;
7438
- this._slots = ['poll', 'results'];
7515
+ this._slots = ['poll', 'results', 'attachedMedia'];
7439
7516
  this.poll = params.poll;
7440
7517
  this.results = params.results;
7518
+ this.attachedMedia = params.attachedMedia;
7441
7519
  }
7442
7520
  static async read(_data, ..._args) {
7521
+ let flags = await index_js_1.Primitive.Int.read(_data);
7443
7522
  let poll = await index_js_1.TLObject.read(_data);
7444
7523
  let results = await index_js_1.TLObject.read(_data);
7445
- return new Raw.MessageMediaPoll({ poll: poll, results: results });
7524
+ let attachedMedia = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
7525
+ return new Raw.MessageMediaPoll({
7526
+ poll: poll,
7527
+ results: results,
7528
+ attachedMedia: attachedMedia,
7529
+ });
7446
7530
  }
7447
7531
  write() {
7448
7532
  const b = new deps_js_1.BytesIO();
7449
7533
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
7534
+ let flags = 0;
7535
+ flags |= this.attachedMedia !== undefined ? 1 << 0 : 0;
7536
+ b.write(index_js_1.Primitive.Int.write(flags));
7450
7537
  if (this.poll !== undefined) {
7451
7538
  b.write(this.poll.write());
7452
7539
  }
7453
7540
  if (this.results !== undefined) {
7454
7541
  b.write(this.results.write());
7455
7542
  }
7543
+ if (this.attachedMedia !== undefined) {
7544
+ b.write(this.attachedMedia.write());
7545
+ }
7456
7546
  return deps_js_1.Buffer.from(b.buffer);
7457
7547
  }
7458
7548
  }
@@ -10517,6 +10607,81 @@ var Raw;
10517
10607
  }
10518
10608
  }
10519
10609
  Raw.MessageActionNoForwardsRequest = MessageActionNoForwardsRequest;
10610
+ class MessageActionPollAppendAnswer extends index_js_1.TLObject {
10611
+ answer;
10612
+ constructor(params) {
10613
+ super();
10614
+ this.classType = 'types';
10615
+ this.className = 'MessageActionPollAppendAnswer';
10616
+ this.constructorId = 0x9da1cd6c;
10617
+ this.subclassOfId = 0x8680d126;
10618
+ this._slots = ['answer'];
10619
+ this.answer = params.answer;
10620
+ }
10621
+ static async read(_data, ..._args) {
10622
+ let answer = await index_js_1.TLObject.read(_data);
10623
+ return new Raw.MessageActionPollAppendAnswer({ answer: answer });
10624
+ }
10625
+ write() {
10626
+ const b = new deps_js_1.BytesIO();
10627
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10628
+ if (this.answer !== undefined) {
10629
+ b.write(this.answer.write());
10630
+ }
10631
+ return deps_js_1.Buffer.from(b.buffer);
10632
+ }
10633
+ }
10634
+ Raw.MessageActionPollAppendAnswer = MessageActionPollAppendAnswer;
10635
+ class MessageActionPollDeleteAnswer extends index_js_1.TLObject {
10636
+ answer;
10637
+ constructor(params) {
10638
+ super();
10639
+ this.classType = 'types';
10640
+ this.className = 'MessageActionPollDeleteAnswer';
10641
+ this.constructorId = 0x399674dc;
10642
+ this.subclassOfId = 0x8680d126;
10643
+ this._slots = ['answer'];
10644
+ this.answer = params.answer;
10645
+ }
10646
+ static async read(_data, ..._args) {
10647
+ let answer = await index_js_1.TLObject.read(_data);
10648
+ return new Raw.MessageActionPollDeleteAnswer({ answer: answer });
10649
+ }
10650
+ write() {
10651
+ const b = new deps_js_1.BytesIO();
10652
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10653
+ if (this.answer !== undefined) {
10654
+ b.write(this.answer.write());
10655
+ }
10656
+ return deps_js_1.Buffer.from(b.buffer);
10657
+ }
10658
+ }
10659
+ Raw.MessageActionPollDeleteAnswer = MessageActionPollDeleteAnswer;
10660
+ class MessageActionManagedBotCreated extends index_js_1.TLObject {
10661
+ botId;
10662
+ constructor(params) {
10663
+ super();
10664
+ this.classType = 'types';
10665
+ this.className = 'MessageActionManagedBotCreated';
10666
+ this.constructorId = 0x16605e3e;
10667
+ this.subclassOfId = 0x8680d126;
10668
+ this._slots = ['botId'];
10669
+ this.botId = params.botId;
10670
+ }
10671
+ static async read(_data, ..._args) {
10672
+ let botId = await index_js_1.Primitive.Long.read(_data);
10673
+ return new Raw.MessageActionManagedBotCreated({ botId: botId });
10674
+ }
10675
+ write() {
10676
+ const b = new deps_js_1.BytesIO();
10677
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
10678
+ if (this.botId !== undefined) {
10679
+ b.write(index_js_1.Primitive.Long.write(this.botId));
10680
+ }
10681
+ return deps_js_1.Buffer.from(b.buffer);
10682
+ }
10683
+ }
10684
+ Raw.MessageActionManagedBotCreated = MessageActionManagedBotCreated;
10520
10685
  class Dialog extends index_js_1.TLObject {
10521
10686
  pinned;
10522
10687
  unreadMark;
@@ -10528,6 +10693,7 @@ var Raw;
10528
10693
  unreadCount;
10529
10694
  unreadMentionsCount;
10530
10695
  unreadReactionsCount;
10696
+ unreadPollVotesCount;
10531
10697
  notifySettings;
10532
10698
  pts;
10533
10699
  draft;
@@ -10537,7 +10703,7 @@ var Raw;
10537
10703
  super();
10538
10704
  this.classType = 'types';
10539
10705
  this.className = 'Dialog';
10540
- this.constructorId = 0xd58a08c6;
10706
+ this.constructorId = 0xfc89f7f3;
10541
10707
  this.subclassOfId = 0x42cddd54;
10542
10708
  this._slots = [
10543
10709
  'pinned',
@@ -10550,6 +10716,7 @@ var Raw;
10550
10716
  'unreadCount',
10551
10717
  'unreadMentionsCount',
10552
10718
  'unreadReactionsCount',
10719
+ 'unreadPollVotesCount',
10553
10720
  'notifySettings',
10554
10721
  'pts',
10555
10722
  'draft',
@@ -10566,6 +10733,7 @@ var Raw;
10566
10733
  this.unreadCount = params.unreadCount;
10567
10734
  this.unreadMentionsCount = params.unreadMentionsCount;
10568
10735
  this.unreadReactionsCount = params.unreadReactionsCount;
10736
+ this.unreadPollVotesCount = params.unreadPollVotesCount;
10569
10737
  this.notifySettings = params.notifySettings;
10570
10738
  this.pts = params.pts;
10571
10739
  this.draft = params.draft;
@@ -10584,6 +10752,7 @@ var Raw;
10584
10752
  let unreadCount = await index_js_1.Primitive.Int.read(_data);
10585
10753
  let unreadMentionsCount = await index_js_1.Primitive.Int.read(_data);
10586
10754
  let unreadReactionsCount = await index_js_1.Primitive.Int.read(_data);
10755
+ let unreadPollVotesCount = await index_js_1.Primitive.Int.read(_data);
10587
10756
  let notifySettings = await index_js_1.TLObject.read(_data);
10588
10757
  let pts = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
10589
10758
  let draft = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -10600,6 +10769,7 @@ var Raw;
10600
10769
  unreadCount: unreadCount,
10601
10770
  unreadMentionsCount: unreadMentionsCount,
10602
10771
  unreadReactionsCount: unreadReactionsCount,
10772
+ unreadPollVotesCount: unreadPollVotesCount,
10603
10773
  notifySettings: notifySettings,
10604
10774
  pts: pts,
10605
10775
  draft: draft,
@@ -10640,6 +10810,9 @@ var Raw;
10640
10810
  if (this.unreadReactionsCount !== undefined) {
10641
10811
  b.write(index_js_1.Primitive.Int.write(this.unreadReactionsCount));
10642
10812
  }
10813
+ if (this.unreadPollVotesCount !== undefined) {
10814
+ b.write(index_js_1.Primitive.Int.write(this.unreadPollVotesCount));
10815
+ }
10643
10816
  if (this.notifySettings !== undefined) {
10644
10817
  b.write(this.notifySettings.write());
10645
10818
  }
@@ -11989,6 +12162,7 @@ var Raw;
11989
12162
  displayGiftsButton;
11990
12163
  noforwardsMyEnabled;
11991
12164
  noforwardsPeerEnabled;
12165
+ unofficialSecurityRisk;
11992
12166
  id;
11993
12167
  about;
11994
12168
  settings;
@@ -12026,11 +12200,12 @@ var Raw;
12026
12200
  mainTab;
12027
12201
  savedMusic;
12028
12202
  note;
12203
+ botManagerId;
12029
12204
  constructor(params) {
12030
12205
  super();
12031
12206
  this.classType = 'types';
12032
12207
  this.className = 'UserFull';
12033
- this.constructorId = 0xa02bc13e;
12208
+ this.constructorId = 0x6cbe645;
12034
12209
  this.subclassOfId = 0x1f4661b9;
12035
12210
  this._slots = [
12036
12211
  'blocked',
@@ -12052,6 +12227,7 @@ var Raw;
12052
12227
  'displayGiftsButton',
12053
12228
  'noforwardsMyEnabled',
12054
12229
  'noforwardsPeerEnabled',
12230
+ 'unofficialSecurityRisk',
12055
12231
  'id',
12056
12232
  'about',
12057
12233
  'settings',
@@ -12089,6 +12265,7 @@ var Raw;
12089
12265
  'mainTab',
12090
12266
  'savedMusic',
12091
12267
  'note',
12268
+ 'botManagerId',
12092
12269
  ];
12093
12270
  this.blocked = params.blocked;
12094
12271
  this.phoneCallsAvailable = params.phoneCallsAvailable;
@@ -12109,6 +12286,7 @@ var Raw;
12109
12286
  this.displayGiftsButton = params.displayGiftsButton;
12110
12287
  this.noforwardsMyEnabled = params.noforwardsMyEnabled;
12111
12288
  this.noforwardsPeerEnabled = params.noforwardsPeerEnabled;
12289
+ this.unofficialSecurityRisk = params.unofficialSecurityRisk;
12112
12290
  this.id = params.id;
12113
12291
  this.about = params.about;
12114
12292
  this.settings = params.settings;
@@ -12146,6 +12324,7 @@ var Raw;
12146
12324
  this.mainTab = params.mainTab;
12147
12325
  this.savedMusic = params.savedMusic;
12148
12326
  this.note = params.note;
12327
+ this.botManagerId = params.botManagerId;
12149
12328
  }
12150
12329
  static async read(_data, ..._args) {
12151
12330
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -12169,6 +12348,7 @@ var Raw;
12169
12348
  let displayGiftsButton = flags2 & (1 << 16) ? true : false;
12170
12349
  let noforwardsMyEnabled = flags2 & (1 << 23) ? true : false;
12171
12350
  let noforwardsPeerEnabled = flags2 & (1 << 24) ? true : false;
12351
+ let unofficialSecurityRisk = flags2 & (1 << 26) ? true : false;
12172
12352
  let id = await index_js_1.Primitive.Long.read(_data);
12173
12353
  let about = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
12174
12354
  let settings = await index_js_1.TLObject.read(_data);
@@ -12206,6 +12386,7 @@ var Raw;
12206
12386
  let mainTab = flags2 & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
12207
12387
  let savedMusic = flags2 & (1 << 21) ? await index_js_1.TLObject.read(_data) : undefined;
12208
12388
  let note = flags2 & (1 << 22) ? await index_js_1.TLObject.read(_data) : undefined;
12389
+ let botManagerId = flags2 & (1 << 25) ? await index_js_1.Primitive.Long.read(_data) : undefined;
12209
12390
  return new Raw.UserFull({
12210
12391
  blocked: blocked,
12211
12392
  phoneCallsAvailable: phoneCallsAvailable,
@@ -12226,6 +12407,7 @@ var Raw;
12226
12407
  displayGiftsButton: displayGiftsButton,
12227
12408
  noforwardsMyEnabled: noforwardsMyEnabled,
12228
12409
  noforwardsPeerEnabled: noforwardsPeerEnabled,
12410
+ unofficialSecurityRisk: unofficialSecurityRisk,
12229
12411
  id: id,
12230
12412
  about: about,
12231
12413
  settings: settings,
@@ -12263,6 +12445,7 @@ var Raw;
12263
12445
  mainTab: mainTab,
12264
12446
  savedMusic: savedMusic,
12265
12447
  note: note,
12448
+ botManagerId: botManagerId,
12266
12449
  });
12267
12450
  }
12268
12451
  write() {
@@ -12304,6 +12487,7 @@ var Raw;
12304
12487
  flags2 |= this.displayGiftsButton ? 1 << 16 : 0;
12305
12488
  flags2 |= this.noforwardsMyEnabled ? 1 << 23 : 0;
12306
12489
  flags2 |= this.noforwardsPeerEnabled ? 1 << 24 : 0;
12490
+ flags2 |= this.unofficialSecurityRisk ? 1 << 26 : 0;
12307
12491
  flags2 |= this.businessWorkHours !== undefined ? 1 << 0 : 0;
12308
12492
  flags2 |= this.businessLocation !== undefined ? 1 << 1 : 0;
12309
12493
  flags2 |= this.businessGreetingMessage !== undefined ? 1 << 2 : 0;
@@ -12323,6 +12507,7 @@ var Raw;
12323
12507
  flags2 |= this.mainTab !== undefined ? 1 << 20 : 0;
12324
12508
  flags2 |= this.savedMusic !== undefined ? 1 << 21 : 0;
12325
12509
  flags2 |= this.note !== undefined ? 1 << 22 : 0;
12510
+ flags2 |= this.botManagerId !== undefined ? 1 << 25 : 0;
12326
12511
  b.write(index_js_1.Primitive.Int.write(flags2));
12327
12512
  if (this.id !== undefined) {
12328
12513
  b.write(index_js_1.Primitive.Long.write(this.id));
@@ -12435,6 +12620,9 @@ var Raw;
12435
12620
  if (this.note !== undefined) {
12436
12621
  b.write(this.note.write());
12437
12622
  }
12623
+ if (this.botManagerId !== undefined) {
12624
+ b.write(index_js_1.Primitive.Long.write(this.botManagerId));
12625
+ }
12438
12626
  return deps_js_1.Buffer.from(b.buffer);
12439
12627
  }
12440
12628
  }
@@ -12862,6 +13050,25 @@ var Raw;
12862
13050
  }
12863
13051
  }
12864
13052
  Raw.InputMessagesFilterPinned = InputMessagesFilterPinned;
13053
+ class InputMessagesFilterPoll extends index_js_1.TLObject {
13054
+ constructor() {
13055
+ super();
13056
+ this.classType = 'types';
13057
+ this.className = 'InputMessagesFilterPoll';
13058
+ this.constructorId = 0xfa2bc90a;
13059
+ this.subclassOfId = 0x8a36ec14;
13060
+ this._slots = [];
13061
+ }
13062
+ static async read(_data, ..._args) {
13063
+ return new Raw.InputMessagesFilterPoll();
13064
+ }
13065
+ write() {
13066
+ const b = new deps_js_1.BytesIO();
13067
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
13068
+ return deps_js_1.Buffer.from(b.buffer);
13069
+ }
13070
+ }
13071
+ Raw.InputMessagesFilterPoll = InputMessagesFilterPoll;
12865
13072
  class UpdateNewMessage extends index_js_1.TLObject {
12866
13073
  message;
12867
13074
  pts;
@@ -15294,6 +15501,9 @@ var Raw;
15294
15501
  }
15295
15502
  Raw.UpdateDialogUnreadMark = UpdateDialogUnreadMark;
15296
15503
  class UpdateMessagePoll extends index_js_1.TLObject {
15504
+ peer;
15505
+ msgId;
15506
+ topMsgId;
15297
15507
  pollId;
15298
15508
  poll;
15299
15509
  results;
@@ -15301,26 +15511,51 @@ var Raw;
15301
15511
  super();
15302
15512
  this.classType = 'types';
15303
15513
  this.className = 'UpdateMessagePoll';
15304
- this.constructorId = 0xaca1657b;
15514
+ this.constructorId = 0xd64c522b;
15305
15515
  this.subclassOfId = 0x9f89304e;
15306
- this._slots = ['pollId', 'poll', 'results'];
15516
+ this._slots = ['peer', 'msgId', 'topMsgId', 'pollId', 'poll', 'results'];
15517
+ this.peer = params.peer;
15518
+ this.msgId = params.msgId;
15519
+ this.topMsgId = params.topMsgId;
15307
15520
  this.pollId = params.pollId;
15308
15521
  this.poll = params.poll;
15309
15522
  this.results = params.results;
15310
15523
  }
15311
15524
  static async read(_data, ..._args) {
15312
15525
  let flags = await index_js_1.Primitive.Int.read(_data);
15526
+ let peer = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
15527
+ let msgId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
15528
+ let topMsgId = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
15313
15529
  let pollId = await index_js_1.Primitive.Long.read(_data);
15314
15530
  let poll = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
15315
15531
  let results = await index_js_1.TLObject.read(_data);
15316
- return new Raw.UpdateMessagePoll({ pollId: pollId, poll: poll, results: results });
15532
+ return new Raw.UpdateMessagePoll({
15533
+ peer: peer,
15534
+ msgId: msgId,
15535
+ topMsgId: topMsgId,
15536
+ pollId: pollId,
15537
+ poll: poll,
15538
+ results: results,
15539
+ });
15317
15540
  }
15318
15541
  write() {
15319
15542
  const b = new deps_js_1.BytesIO();
15320
15543
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
15321
15544
  let flags = 0;
15545
+ flags |= this.peer !== undefined ? 1 << 1 : 0;
15546
+ flags |= this.msgId !== undefined ? 1 << 1 : 0;
15547
+ flags |= this.topMsgId !== undefined ? 1 << 2 : 0;
15322
15548
  flags |= this.poll !== undefined ? 1 << 0 : 0;
15323
15549
  b.write(index_js_1.Primitive.Int.write(flags));
15550
+ if (this.peer !== undefined) {
15551
+ b.write(this.peer.write());
15552
+ }
15553
+ if (this.msgId !== undefined) {
15554
+ b.write(index_js_1.Primitive.Int.write(this.msgId));
15555
+ }
15556
+ if (this.topMsgId !== undefined) {
15557
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
15558
+ }
15324
15559
  if (this.pollId !== undefined) {
15325
15560
  b.write(index_js_1.Primitive.Long.write(this.pollId));
15326
15561
  }
@@ -15617,28 +15852,32 @@ var Raw;
15617
15852
  pollId;
15618
15853
  peer;
15619
15854
  options;
15855
+ positions;
15620
15856
  qts;
15621
15857
  constructor(params) {
15622
15858
  super();
15623
15859
  this.classType = 'types';
15624
15860
  this.className = 'UpdateMessagePollVote';
15625
- this.constructorId = 0x24f40e77;
15861
+ this.constructorId = 0x7699f014;
15626
15862
  this.subclassOfId = 0x9f89304e;
15627
- this._slots = ['pollId', 'peer', 'options', 'qts'];
15863
+ this._slots = ['pollId', 'peer', 'options', 'positions', 'qts'];
15628
15864
  this.pollId = params.pollId;
15629
15865
  this.peer = params.peer;
15630
15866
  this.options = params.options;
15867
+ this.positions = params.positions;
15631
15868
  this.qts = params.qts;
15632
15869
  }
15633
15870
  static async read(_data, ..._args) {
15634
15871
  let pollId = await index_js_1.Primitive.Long.read(_data);
15635
15872
  let peer = await index_js_1.TLObject.read(_data);
15636
15873
  let options = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Bytes);
15874
+ let positions = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
15637
15875
  let qts = await index_js_1.Primitive.Int.read(_data);
15638
15876
  return new Raw.UpdateMessagePollVote({
15639
15877
  pollId: pollId,
15640
15878
  peer: peer,
15641
15879
  options: options,
15880
+ positions: positions,
15642
15881
  qts: qts,
15643
15882
  });
15644
15883
  }
@@ -15654,6 +15893,9 @@ var Raw;
15654
15893
  if (this.options) {
15655
15894
  b.write(index_js_1.Primitive.Vector.write(this.options, index_js_1.Primitive.Bytes));
15656
15895
  }
15896
+ if (this.positions) {
15897
+ b.write(index_js_1.Primitive.Vector.write(this.positions, index_js_1.Primitive.Int));
15898
+ }
15657
15899
  if (this.qts !== undefined) {
15658
15900
  b.write(index_js_1.Primitive.Int.write(this.qts));
15659
15901
  }
@@ -18656,6 +18898,43 @@ var Raw;
18656
18898
  }
18657
18899
  }
18658
18900
  Raw.UpdateChatParticipantRank = UpdateChatParticipantRank;
18901
+ class UpdateManagedBot extends index_js_1.TLObject {
18902
+ userId;
18903
+ botId;
18904
+ qts;
18905
+ constructor(params) {
18906
+ super();
18907
+ this.classType = 'types';
18908
+ this.className = 'UpdateManagedBot';
18909
+ this.constructorId = 0x4880ed9a;
18910
+ this.subclassOfId = 0x9f89304e;
18911
+ this._slots = ['userId', 'botId', 'qts'];
18912
+ this.userId = params.userId;
18913
+ this.botId = params.botId;
18914
+ this.qts = params.qts;
18915
+ }
18916
+ static async read(_data, ..._args) {
18917
+ let userId = await index_js_1.Primitive.Long.read(_data);
18918
+ let botId = await index_js_1.Primitive.Long.read(_data);
18919
+ let qts = await index_js_1.Primitive.Int.read(_data);
18920
+ return new Raw.UpdateManagedBot({ userId: userId, botId: botId, qts: qts });
18921
+ }
18922
+ write() {
18923
+ const b = new deps_js_1.BytesIO();
18924
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
18925
+ if (this.userId !== undefined) {
18926
+ b.write(index_js_1.Primitive.Long.write(this.userId));
18927
+ }
18928
+ if (this.botId !== undefined) {
18929
+ b.write(index_js_1.Primitive.Long.write(this.botId));
18930
+ }
18931
+ if (this.qts !== undefined) {
18932
+ b.write(index_js_1.Primitive.Int.write(this.qts));
18933
+ }
18934
+ return deps_js_1.Buffer.from(b.buffer);
18935
+ }
18936
+ }
18937
+ Raw.UpdateManagedBot = UpdateManagedBot;
18659
18938
  class UpdatesTooLong extends index_js_1.TLObject {
18660
18939
  constructor() {
18661
18940
  super();
@@ -25713,6 +25992,105 @@ var Raw;
25713
25992
  }
25714
25993
  }
25715
25994
  Raw.MessageEntityFormattedDate = MessageEntityFormattedDate;
25995
+ class MessageEntityDiffInsert extends index_js_1.TLObject {
25996
+ offset;
25997
+ length;
25998
+ constructor(params) {
25999
+ super();
26000
+ this.classType = 'types';
26001
+ this.className = 'MessageEntityDiffInsert';
26002
+ this.constructorId = 0x71777116;
26003
+ this.subclassOfId = 0xcf6419dc;
26004
+ this._slots = ['offset', 'length'];
26005
+ this.offset = params.offset;
26006
+ this.length = params.length;
26007
+ }
26008
+ static async read(_data, ..._args) {
26009
+ let offset = await index_js_1.Primitive.Int.read(_data);
26010
+ let length = await index_js_1.Primitive.Int.read(_data);
26011
+ return new Raw.MessageEntityDiffInsert({ offset: offset, length: length });
26012
+ }
26013
+ write() {
26014
+ const b = new deps_js_1.BytesIO();
26015
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
26016
+ if (this.offset !== undefined) {
26017
+ b.write(index_js_1.Primitive.Int.write(this.offset));
26018
+ }
26019
+ if (this.length !== undefined) {
26020
+ b.write(index_js_1.Primitive.Int.write(this.length));
26021
+ }
26022
+ return deps_js_1.Buffer.from(b.buffer);
26023
+ }
26024
+ }
26025
+ Raw.MessageEntityDiffInsert = MessageEntityDiffInsert;
26026
+ class MessageEntityDiffReplace extends index_js_1.TLObject {
26027
+ offset;
26028
+ length;
26029
+ oldText;
26030
+ constructor(params) {
26031
+ super();
26032
+ this.classType = 'types';
26033
+ this.className = 'MessageEntityDiffReplace';
26034
+ this.constructorId = 0xc6c1e5a7;
26035
+ this.subclassOfId = 0xcf6419dc;
26036
+ this._slots = ['offset', 'length', 'oldText'];
26037
+ this.offset = params.offset;
26038
+ this.length = params.length;
26039
+ this.oldText = params.oldText;
26040
+ }
26041
+ static async read(_data, ..._args) {
26042
+ let offset = await index_js_1.Primitive.Int.read(_data);
26043
+ let length = await index_js_1.Primitive.Int.read(_data);
26044
+ let oldText = await index_js_1.Primitive.String.read(_data);
26045
+ return new Raw.MessageEntityDiffReplace({ offset: offset, length: length, oldText: oldText });
26046
+ }
26047
+ write() {
26048
+ const b = new deps_js_1.BytesIO();
26049
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
26050
+ if (this.offset !== undefined) {
26051
+ b.write(index_js_1.Primitive.Int.write(this.offset));
26052
+ }
26053
+ if (this.length !== undefined) {
26054
+ b.write(index_js_1.Primitive.Int.write(this.length));
26055
+ }
26056
+ if (this.oldText !== undefined) {
26057
+ b.write(index_js_1.Primitive.String.write(this.oldText));
26058
+ }
26059
+ return deps_js_1.Buffer.from(b.buffer);
26060
+ }
26061
+ }
26062
+ Raw.MessageEntityDiffReplace = MessageEntityDiffReplace;
26063
+ class MessageEntityDiffDelete extends index_js_1.TLObject {
26064
+ offset;
26065
+ length;
26066
+ constructor(params) {
26067
+ super();
26068
+ this.classType = 'types';
26069
+ this.className = 'MessageEntityDiffDelete';
26070
+ this.constructorId = 0x652c1c5;
26071
+ this.subclassOfId = 0xcf6419dc;
26072
+ this._slots = ['offset', 'length'];
26073
+ this.offset = params.offset;
26074
+ this.length = params.length;
26075
+ }
26076
+ static async read(_data, ..._args) {
26077
+ let offset = await index_js_1.Primitive.Int.read(_data);
26078
+ let length = await index_js_1.Primitive.Int.read(_data);
26079
+ return new Raw.MessageEntityDiffDelete({ offset: offset, length: length });
26080
+ }
26081
+ write() {
26082
+ const b = new deps_js_1.BytesIO();
26083
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
26084
+ if (this.offset !== undefined) {
26085
+ b.write(index_js_1.Primitive.Int.write(this.offset));
26086
+ }
26087
+ if (this.length !== undefined) {
26088
+ b.write(index_js_1.Primitive.Int.write(this.length));
26089
+ }
26090
+ return deps_js_1.Buffer.from(b.buffer);
26091
+ }
26092
+ }
26093
+ Raw.MessageEntityDiffDelete = MessageEntityDiffDelete;
25716
26094
  class InputChannelEmpty extends index_js_1.TLObject {
25717
26095
  constructor() {
25718
26096
  super();
@@ -36725,49 +37103,120 @@ var Raw;
36725
37103
  class PollAnswer extends index_js_1.TLObject {
36726
37104
  text;
36727
37105
  option;
37106
+ media;
37107
+ addedBy;
37108
+ date;
36728
37109
  constructor(params) {
36729
37110
  super();
36730
37111
  this.classType = 'types';
36731
37112
  this.className = 'PollAnswer';
36732
- this.constructorId = 0xff16e2ca;
37113
+ this.constructorId = 0x4b7d786a;
36733
37114
  this.subclassOfId = 0x7ea5dd9e;
36734
- this._slots = ['text', 'option'];
37115
+ this._slots = ['text', 'option', 'media', 'addedBy', 'date'];
36735
37116
  this.text = params.text;
36736
37117
  this.option = params.option;
37118
+ this.media = params.media;
37119
+ this.addedBy = params.addedBy;
37120
+ this.date = params.date;
36737
37121
  }
36738
37122
  static async read(_data, ..._args) {
37123
+ let flags = await index_js_1.Primitive.Int.read(_data);
36739
37124
  let text = await index_js_1.TLObject.read(_data);
36740
37125
  let option = await index_js_1.Primitive.Bytes.read(_data);
36741
- return new Raw.PollAnswer({ text: text, option: option });
37126
+ let media = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
37127
+ let addedBy = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
37128
+ let date = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
37129
+ return new Raw.PollAnswer({
37130
+ text: text,
37131
+ option: option,
37132
+ media: media,
37133
+ addedBy: addedBy,
37134
+ date: date,
37135
+ });
36742
37136
  }
36743
37137
  write() {
36744
37138
  const b = new deps_js_1.BytesIO();
36745
37139
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
37140
+ let flags = 0;
37141
+ flags |= this.media !== undefined ? 1 << 0 : 0;
37142
+ flags |= this.addedBy !== undefined ? 1 << 1 : 0;
37143
+ flags |= this.date !== undefined ? 1 << 1 : 0;
37144
+ b.write(index_js_1.Primitive.Int.write(flags));
36746
37145
  if (this.text !== undefined) {
36747
37146
  b.write(this.text.write());
36748
37147
  }
36749
37148
  if (this.option !== undefined) {
36750
37149
  b.write(index_js_1.Primitive.Bytes.write(this.option));
36751
37150
  }
37151
+ if (this.media !== undefined) {
37152
+ b.write(this.media.write());
37153
+ }
37154
+ if (this.addedBy !== undefined) {
37155
+ b.write(this.addedBy.write());
37156
+ }
37157
+ if (this.date !== undefined) {
37158
+ b.write(index_js_1.Primitive.Int.write(this.date));
37159
+ }
36752
37160
  return deps_js_1.Buffer.from(b.buffer);
36753
37161
  }
36754
37162
  }
36755
37163
  Raw.PollAnswer = PollAnswer;
37164
+ class InputPollAnswer extends index_js_1.TLObject {
37165
+ text;
37166
+ media;
37167
+ constructor(params) {
37168
+ super();
37169
+ this.classType = 'types';
37170
+ this.className = 'InputPollAnswer';
37171
+ this.constructorId = 0x199fed96;
37172
+ this.subclassOfId = 0x7ea5dd9e;
37173
+ this._slots = ['text', 'media'];
37174
+ this.text = params.text;
37175
+ this.media = params.media;
37176
+ }
37177
+ static async read(_data, ..._args) {
37178
+ let flags = await index_js_1.Primitive.Int.read(_data);
37179
+ let text = await index_js_1.TLObject.read(_data);
37180
+ let media = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
37181
+ return new Raw.InputPollAnswer({ text: text, media: media });
37182
+ }
37183
+ write() {
37184
+ const b = new deps_js_1.BytesIO();
37185
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
37186
+ let flags = 0;
37187
+ flags |= this.media !== undefined ? 1 << 0 : 0;
37188
+ b.write(index_js_1.Primitive.Int.write(flags));
37189
+ if (this.text !== undefined) {
37190
+ b.write(this.text.write());
37191
+ }
37192
+ if (this.media !== undefined) {
37193
+ b.write(this.media.write());
37194
+ }
37195
+ return deps_js_1.Buffer.from(b.buffer);
37196
+ }
37197
+ }
37198
+ Raw.InputPollAnswer = InputPollAnswer;
36756
37199
  class Poll extends index_js_1.TLObject {
36757
37200
  id;
36758
37201
  closed;
36759
37202
  publicVoters;
36760
37203
  multipleChoice;
36761
37204
  quiz;
37205
+ openAnswers;
37206
+ revotingDisabled;
37207
+ shuffleAnswers;
37208
+ hideResultsUntilClose;
37209
+ creator;
36762
37210
  question;
36763
37211
  answers;
36764
37212
  closePeriod;
36765
37213
  closeDate;
37214
+ hash;
36766
37215
  constructor(params) {
36767
37216
  super();
36768
37217
  this.classType = 'types';
36769
37218
  this.className = 'Poll';
36770
- this.constructorId = 0x58747131;
37219
+ this.constructorId = 0xb8425be9;
36771
37220
  this.subclassOfId = 0x248e557b;
36772
37221
  this._slots = [
36773
37222
  'id',
@@ -36775,20 +37224,32 @@ var Raw;
36775
37224
  'publicVoters',
36776
37225
  'multipleChoice',
36777
37226
  'quiz',
37227
+ 'openAnswers',
37228
+ 'revotingDisabled',
37229
+ 'shuffleAnswers',
37230
+ 'hideResultsUntilClose',
37231
+ 'creator',
36778
37232
  'question',
36779
37233
  'answers',
36780
37234
  'closePeriod',
36781
37235
  'closeDate',
37236
+ 'hash',
36782
37237
  ];
36783
37238
  this.id = params.id;
36784
37239
  this.closed = params.closed;
36785
37240
  this.publicVoters = params.publicVoters;
36786
37241
  this.multipleChoice = params.multipleChoice;
36787
37242
  this.quiz = params.quiz;
37243
+ this.openAnswers = params.openAnswers;
37244
+ this.revotingDisabled = params.revotingDisabled;
37245
+ this.shuffleAnswers = params.shuffleAnswers;
37246
+ this.hideResultsUntilClose = params.hideResultsUntilClose;
37247
+ this.creator = params.creator;
36788
37248
  this.question = params.question;
36789
37249
  this.answers = params.answers;
36790
37250
  this.closePeriod = params.closePeriod;
36791
37251
  this.closeDate = params.closeDate;
37252
+ this.hash = params.hash;
36792
37253
  }
36793
37254
  static async read(_data, ..._args) {
36794
37255
  let id = await index_js_1.Primitive.Long.read(_data);
@@ -36797,20 +37258,32 @@ var Raw;
36797
37258
  let publicVoters = flags & (1 << 1) ? true : false;
36798
37259
  let multipleChoice = flags & (1 << 2) ? true : false;
36799
37260
  let quiz = flags & (1 << 3) ? true : false;
37261
+ let openAnswers = flags & (1 << 6) ? true : false;
37262
+ let revotingDisabled = flags & (1 << 7) ? true : false;
37263
+ let shuffleAnswers = flags & (1 << 8) ? true : false;
37264
+ let hideResultsUntilClose = flags & (1 << 9) ? true : false;
37265
+ let creator = flags & (1 << 10) ? true : false;
36800
37266
  let question = await index_js_1.TLObject.read(_data);
36801
37267
  let answers = await index_js_1.TLObject.read(_data);
36802
37268
  let closePeriod = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
36803
37269
  let closeDate = flags & (1 << 5) ? await index_js_1.Primitive.Int.read(_data) : undefined;
37270
+ let hash = await index_js_1.Primitive.Long.read(_data);
36804
37271
  return new Raw.Poll({
36805
37272
  id: id,
36806
37273
  closed: closed,
36807
37274
  publicVoters: publicVoters,
36808
37275
  multipleChoice: multipleChoice,
36809
37276
  quiz: quiz,
37277
+ openAnswers: openAnswers,
37278
+ revotingDisabled: revotingDisabled,
37279
+ shuffleAnswers: shuffleAnswers,
37280
+ hideResultsUntilClose: hideResultsUntilClose,
37281
+ creator: creator,
36810
37282
  question: question,
36811
37283
  answers: answers,
36812
37284
  closePeriod: closePeriod,
36813
37285
  closeDate: closeDate,
37286
+ hash: hash,
36814
37287
  });
36815
37288
  }
36816
37289
  write() {
@@ -36824,6 +37297,11 @@ var Raw;
36824
37297
  flags |= this.publicVoters ? 1 << 1 : 0;
36825
37298
  flags |= this.multipleChoice ? 1 << 2 : 0;
36826
37299
  flags |= this.quiz ? 1 << 3 : 0;
37300
+ flags |= this.openAnswers ? 1 << 6 : 0;
37301
+ flags |= this.revotingDisabled ? 1 << 7 : 0;
37302
+ flags |= this.shuffleAnswers ? 1 << 8 : 0;
37303
+ flags |= this.hideResultsUntilClose ? 1 << 9 : 0;
37304
+ flags |= this.creator ? 1 << 10 : 0;
36827
37305
  flags |= this.closePeriod !== undefined ? 1 << 4 : 0;
36828
37306
  flags |= this.closeDate !== undefined ? 1 << 5 : 0;
36829
37307
  b.write(index_js_1.Primitive.Int.write(flags));
@@ -36839,6 +37317,9 @@ var Raw;
36839
37317
  if (this.closeDate !== undefined) {
36840
37318
  b.write(index_js_1.Primitive.Int.write(this.closeDate));
36841
37319
  }
37320
+ if (this.hash !== undefined) {
37321
+ b.write(index_js_1.Primitive.Long.write(this.hash));
37322
+ }
36842
37323
  return deps_js_1.Buffer.from(b.buffer);
36843
37324
  }
36844
37325
  }
@@ -36848,29 +37329,33 @@ var Raw;
36848
37329
  correct;
36849
37330
  option;
36850
37331
  voters;
37332
+ recentVoters;
36851
37333
  constructor(params) {
36852
37334
  super();
36853
37335
  this.classType = 'types';
36854
37336
  this.className = 'PollAnswerVoters';
36855
- this.constructorId = 0x3b6ddad2;
37337
+ this.constructorId = 0x3645230a;
36856
37338
  this.subclassOfId = 0x7ce0cf91;
36857
- this._slots = ['chosen', 'correct', 'option', 'voters'];
37339
+ this._slots = ['chosen', 'correct', 'option', 'voters', 'recentVoters'];
36858
37340
  this.chosen = params.chosen;
36859
37341
  this.correct = params.correct;
36860
37342
  this.option = params.option;
36861
37343
  this.voters = params.voters;
37344
+ this.recentVoters = params.recentVoters;
36862
37345
  }
36863
37346
  static async read(_data, ..._args) {
36864
37347
  let flags = await index_js_1.Primitive.Int.read(_data);
36865
37348
  let chosen = flags & (1 << 0) ? true : false;
36866
37349
  let correct = flags & (1 << 1) ? true : false;
36867
37350
  let option = await index_js_1.Primitive.Bytes.read(_data);
36868
- let voters = await index_js_1.Primitive.Int.read(_data);
37351
+ let voters = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
37352
+ let recentVoters = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
36869
37353
  return new Raw.PollAnswerVoters({
36870
37354
  chosen: chosen,
36871
37355
  correct: correct,
36872
37356
  option: option,
36873
37357
  voters: voters,
37358
+ recentVoters: recentVoters,
36874
37359
  });
36875
37360
  }
36876
37361
  write() {
@@ -36879,6 +37364,8 @@ var Raw;
36879
37364
  let flags = 0;
36880
37365
  flags |= this.chosen ? 1 << 0 : 0;
36881
37366
  flags |= this.correct ? 1 << 1 : 0;
37367
+ flags |= this.voters !== undefined ? 1 << 2 : 0;
37368
+ flags |= this.recentVoters ? 1 << 2 : 0;
36882
37369
  b.write(index_js_1.Primitive.Int.write(flags));
36883
37370
  if (this.option !== undefined) {
36884
37371
  b.write(index_js_1.Primitive.Bytes.write(this.option));
@@ -36886,53 +37373,66 @@ var Raw;
36886
37373
  if (this.voters !== undefined) {
36887
37374
  b.write(index_js_1.Primitive.Int.write(this.voters));
36888
37375
  }
37376
+ if (this.recentVoters) {
37377
+ b.write(index_js_1.Primitive.Vector.write(this.recentVoters));
37378
+ }
36889
37379
  return deps_js_1.Buffer.from(b.buffer);
36890
37380
  }
36891
37381
  }
36892
37382
  Raw.PollAnswerVoters = PollAnswerVoters;
36893
37383
  class PollResults extends index_js_1.TLObject {
36894
37384
  min;
37385
+ hasUnreadVotes;
36895
37386
  results;
36896
37387
  totalVoters;
36897
37388
  recentVoters;
36898
37389
  solution;
36899
37390
  solutionEntities;
37391
+ solutionMedia;
36900
37392
  constructor(params) {
36901
37393
  super();
36902
37394
  this.classType = 'types';
36903
37395
  this.className = 'PollResults';
36904
- this.constructorId = 0x7adf2420;
37396
+ this.constructorId = 0xba7bb15e;
36905
37397
  this.subclassOfId = 0xc3b4f687;
36906
37398
  this._slots = [
36907
37399
  'min',
37400
+ 'hasUnreadVotes',
36908
37401
  'results',
36909
37402
  'totalVoters',
36910
37403
  'recentVoters',
36911
37404
  'solution',
36912
37405
  'solutionEntities',
37406
+ 'solutionMedia',
36913
37407
  ];
36914
37408
  this.min = params.min;
37409
+ this.hasUnreadVotes = params.hasUnreadVotes;
36915
37410
  this.results = params.results;
36916
37411
  this.totalVoters = params.totalVoters;
36917
37412
  this.recentVoters = params.recentVoters;
36918
37413
  this.solution = params.solution;
36919
37414
  this.solutionEntities = params.solutionEntities;
37415
+ this.solutionMedia = params.solutionMedia;
36920
37416
  }
36921
37417
  static async read(_data, ..._args) {
36922
37418
  let flags = await index_js_1.Primitive.Int.read(_data);
36923
37419
  let min = flags & (1 << 0) ? true : false;
37420
+ let hasUnreadVotes = flags & (1 << 6) ? true : false;
36924
37421
  let results = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
36925
37422
  let totalVoters = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
36926
37423
  let recentVoters = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
36927
37424
  let solution = flags & (1 << 4) ? await index_js_1.Primitive.String.read(_data) : undefined;
36928
37425
  let solutionEntities = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
37426
+ let solutionMedia = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
36929
37427
  return new Raw.PollResults({
36930
37428
  min: min,
37429
+ hasUnreadVotes: hasUnreadVotes,
36931
37430
  results: results,
36932
37431
  totalVoters: totalVoters,
36933
37432
  recentVoters: recentVoters,
36934
37433
  solution: solution,
36935
37434
  solutionEntities: solutionEntities,
37435
+ solutionMedia: solutionMedia,
36936
37436
  });
36937
37437
  }
36938
37438
  write() {
@@ -36940,11 +37440,13 @@ var Raw;
36940
37440
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
36941
37441
  let flags = 0;
36942
37442
  flags |= this.min ? 1 << 0 : 0;
37443
+ flags |= this.hasUnreadVotes ? 1 << 6 : 0;
36943
37444
  flags |= this.results ? 1 << 1 : 0;
36944
37445
  flags |= this.totalVoters !== undefined ? 1 << 2 : 0;
36945
37446
  flags |= this.recentVoters ? 1 << 3 : 0;
36946
37447
  flags |= this.solution !== undefined ? 1 << 4 : 0;
36947
37448
  flags |= this.solutionEntities ? 1 << 4 : 0;
37449
+ flags |= this.solutionMedia !== undefined ? 1 << 5 : 0;
36948
37450
  b.write(index_js_1.Primitive.Int.write(flags));
36949
37451
  if (this.results) {
36950
37452
  b.write(index_js_1.Primitive.Vector.write(this.results));
@@ -36961,6 +37463,9 @@ var Raw;
36961
37463
  if (this.solutionEntities) {
36962
37464
  b.write(index_js_1.Primitive.Vector.write(this.solutionEntities));
36963
37465
  }
37466
+ if (this.solutionMedia !== undefined) {
37467
+ b.write(this.solutionMedia.write());
37468
+ }
36964
37469
  return deps_js_1.Buffer.from(b.buffer);
36965
37470
  }
36966
37471
  }
@@ -37961,6 +38466,7 @@ var Raw;
37961
38466
  requestWriteAccess;
37962
38467
  requestPhoneNumber;
37963
38468
  matchCodesFirst;
38469
+ isApp;
37964
38470
  bot;
37965
38471
  domain;
37966
38472
  browser;
@@ -37969,16 +38475,18 @@ var Raw;
37969
38475
  region;
37970
38476
  matchCodes;
37971
38477
  userIdHint;
38478
+ verifiedAppName;
37972
38479
  constructor(params) {
37973
38480
  super();
37974
38481
  this.classType = 'types';
37975
38482
  this.className = 'UrlAuthResultRequest';
37976
- this.constructorId = 0xf8f8eb1e;
38483
+ this.constructorId = 0x3cd623ec;
37977
38484
  this.subclassOfId = 0x7765cb1e;
37978
38485
  this._slots = [
37979
38486
  'requestWriteAccess',
37980
38487
  'requestPhoneNumber',
37981
38488
  'matchCodesFirst',
38489
+ 'isApp',
37982
38490
  'bot',
37983
38491
  'domain',
37984
38492
  'browser',
@@ -37987,10 +38495,12 @@ var Raw;
37987
38495
  'region',
37988
38496
  'matchCodes',
37989
38497
  'userIdHint',
38498
+ 'verifiedAppName',
37990
38499
  ];
37991
38500
  this.requestWriteAccess = params.requestWriteAccess;
37992
38501
  this.requestPhoneNumber = params.requestPhoneNumber;
37993
38502
  this.matchCodesFirst = params.matchCodesFirst;
38503
+ this.isApp = params.isApp;
37994
38504
  this.bot = params.bot;
37995
38505
  this.domain = params.domain;
37996
38506
  this.browser = params.browser;
@@ -37999,12 +38509,14 @@ var Raw;
37999
38509
  this.region = params.region;
38000
38510
  this.matchCodes = params.matchCodes;
38001
38511
  this.userIdHint = params.userIdHint;
38512
+ this.verifiedAppName = params.verifiedAppName;
38002
38513
  }
38003
38514
  static async read(_data, ..._args) {
38004
38515
  let flags = await index_js_1.Primitive.Int.read(_data);
38005
38516
  let requestWriteAccess = flags & (1 << 0) ? true : false;
38006
38517
  let requestPhoneNumber = flags & (1 << 1) ? true : false;
38007
38518
  let matchCodesFirst = flags & (1 << 5) ? true : false;
38519
+ let isApp = flags & (1 << 6) ? true : false;
38008
38520
  let bot = await index_js_1.TLObject.read(_data);
38009
38521
  let domain = await index_js_1.Primitive.String.read(_data);
38010
38522
  let browser = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
@@ -38013,10 +38525,12 @@ var Raw;
38013
38525
  let region = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
38014
38526
  let matchCodes = flags & (1 << 3) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.String) : [];
38015
38527
  let userIdHint = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
38528
+ let verifiedAppName = flags & (1 << 7) ? await index_js_1.Primitive.String.read(_data) : undefined;
38016
38529
  return new Raw.UrlAuthResultRequest({
38017
38530
  requestWriteAccess: requestWriteAccess,
38018
38531
  requestPhoneNumber: requestPhoneNumber,
38019
38532
  matchCodesFirst: matchCodesFirst,
38533
+ isApp: isApp,
38020
38534
  bot: bot,
38021
38535
  domain: domain,
38022
38536
  browser: browser,
@@ -38025,6 +38539,7 @@ var Raw;
38025
38539
  region: region,
38026
38540
  matchCodes: matchCodes,
38027
38541
  userIdHint: userIdHint,
38542
+ verifiedAppName: verifiedAppName,
38028
38543
  });
38029
38544
  }
38030
38545
  write() {
@@ -38034,12 +38549,14 @@ var Raw;
38034
38549
  flags |= this.requestWriteAccess ? 1 << 0 : 0;
38035
38550
  flags |= this.requestPhoneNumber ? 1 << 1 : 0;
38036
38551
  flags |= this.matchCodesFirst ? 1 << 5 : 0;
38552
+ flags |= this.isApp ? 1 << 6 : 0;
38037
38553
  flags |= this.browser !== undefined ? 1 << 2 : 0;
38038
38554
  flags |= this.platform !== undefined ? 1 << 2 : 0;
38039
38555
  flags |= this.ip !== undefined ? 1 << 2 : 0;
38040
38556
  flags |= this.region !== undefined ? 1 << 2 : 0;
38041
38557
  flags |= this.matchCodes ? 1 << 3 : 0;
38042
38558
  flags |= this.userIdHint !== undefined ? 1 << 4 : 0;
38559
+ flags |= this.verifiedAppName !== undefined ? 1 << 7 : 0;
38043
38560
  b.write(index_js_1.Primitive.Int.write(flags));
38044
38561
  if (this.bot !== undefined) {
38045
38562
  b.write(this.bot.write());
@@ -38065,6 +38582,9 @@ var Raw;
38065
38582
  if (this.userIdHint !== undefined) {
38066
38583
  b.write(index_js_1.Primitive.Long.write(this.userIdHint));
38067
38584
  }
38585
+ if (this.verifiedAppName !== undefined) {
38586
+ b.write(index_js_1.Primitive.String.write(this.verifiedAppName));
38587
+ }
38068
38588
  return deps_js_1.Buffer.from(b.buffer);
38069
38589
  }
38070
38590
  }
@@ -39740,11 +40260,12 @@ var Raw;
39740
40260
  quoteEntities;
39741
40261
  quoteOffset;
39742
40262
  todoItemId;
40263
+ pollOption;
39743
40264
  constructor(params) {
39744
40265
  super();
39745
40266
  this.classType = 'types';
39746
40267
  this.className = 'MessageReplyHeader';
39747
- this.constructorId = 0x6917560b;
40268
+ this.constructorId = 0x1b97dd66;
39748
40269
  this.subclassOfId = 0x5b4d9167;
39749
40270
  this._slots = [
39750
40271
  'replyToScheduled',
@@ -39759,6 +40280,7 @@ var Raw;
39759
40280
  'quoteEntities',
39760
40281
  'quoteOffset',
39761
40282
  'todoItemId',
40283
+ 'pollOption',
39762
40284
  ];
39763
40285
  this.replyToScheduled = params.replyToScheduled;
39764
40286
  this.forumTopic = params.forumTopic;
@@ -39772,6 +40294,7 @@ var Raw;
39772
40294
  this.quoteEntities = params.quoteEntities;
39773
40295
  this.quoteOffset = params.quoteOffset;
39774
40296
  this.todoItemId = params.todoItemId;
40297
+ this.pollOption = params.pollOption;
39775
40298
  }
39776
40299
  static async read(_data, ..._args) {
39777
40300
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -39787,6 +40310,7 @@ var Raw;
39787
40310
  let quoteEntities = flags & (1 << 7) ? await index_js_1.TLObject.read(_data) : [];
39788
40311
  let quoteOffset = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
39789
40312
  let todoItemId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
40313
+ let pollOption = flags & (1 << 12) ? await index_js_1.Primitive.Bytes.read(_data) : undefined;
39790
40314
  return new Raw.MessageReplyHeader({
39791
40315
  replyToScheduled: replyToScheduled,
39792
40316
  forumTopic: forumTopic,
@@ -39800,6 +40324,7 @@ var Raw;
39800
40324
  quoteEntities: quoteEntities,
39801
40325
  quoteOffset: quoteOffset,
39802
40326
  todoItemId: todoItemId,
40327
+ pollOption: pollOption,
39803
40328
  });
39804
40329
  }
39805
40330
  write() {
@@ -39818,6 +40343,7 @@ var Raw;
39818
40343
  flags |= this.quoteEntities ? 1 << 7 : 0;
39819
40344
  flags |= this.quoteOffset !== undefined ? 1 << 10 : 0;
39820
40345
  flags |= this.todoItemId !== undefined ? 1 << 11 : 0;
40346
+ flags |= this.pollOption !== undefined ? 1 << 12 : 0;
39821
40347
  b.write(index_js_1.Primitive.Int.write(flags));
39822
40348
  if (this.replyToMsgId !== undefined) {
39823
40349
  b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
@@ -39846,6 +40372,9 @@ var Raw;
39846
40372
  if (this.todoItemId !== undefined) {
39847
40373
  b.write(index_js_1.Primitive.Int.write(this.todoItemId));
39848
40374
  }
40375
+ if (this.pollOption !== undefined) {
40376
+ b.write(index_js_1.Primitive.Bytes.write(this.pollOption));
40377
+ }
39849
40378
  return deps_js_1.Buffer.from(b.buffer);
39850
40379
  }
39851
40380
  }
@@ -44015,6 +44544,7 @@ var Raw;
44015
44544
  unreadCount;
44016
44545
  unreadMentionsCount;
44017
44546
  unreadReactionsCount;
44547
+ unreadPollVotesCount;
44018
44548
  fromId;
44019
44549
  notifySettings;
44020
44550
  draft;
@@ -44022,7 +44552,7 @@ var Raw;
44022
44552
  super();
44023
44553
  this.classType = 'types';
44024
44554
  this.className = 'ForumTopic';
44025
- this.constructorId = 0xcdff0eca;
44555
+ this.constructorId = 0xfcdad815;
44026
44556
  this.subclassOfId = 0x8d182203;
44027
44557
  this._slots = [
44028
44558
  'my',
@@ -44043,6 +44573,7 @@ var Raw;
44043
44573
  'unreadCount',
44044
44574
  'unreadMentionsCount',
44045
44575
  'unreadReactionsCount',
44576
+ 'unreadPollVotesCount',
44046
44577
  'fromId',
44047
44578
  'notifySettings',
44048
44579
  'draft',
@@ -44065,6 +44596,7 @@ var Raw;
44065
44596
  this.unreadCount = params.unreadCount;
44066
44597
  this.unreadMentionsCount = params.unreadMentionsCount;
44067
44598
  this.unreadReactionsCount = params.unreadReactionsCount;
44599
+ this.unreadPollVotesCount = params.unreadPollVotesCount;
44068
44600
  this.fromId = params.fromId;
44069
44601
  this.notifySettings = params.notifySettings;
44070
44602
  this.draft = params.draft;
@@ -44089,6 +44621,7 @@ var Raw;
44089
44621
  let unreadCount = await index_js_1.Primitive.Int.read(_data);
44090
44622
  let unreadMentionsCount = await index_js_1.Primitive.Int.read(_data);
44091
44623
  let unreadReactionsCount = await index_js_1.Primitive.Int.read(_data);
44624
+ let unreadPollVotesCount = await index_js_1.Primitive.Int.read(_data);
44092
44625
  let fromId = await index_js_1.TLObject.read(_data);
44093
44626
  let notifySettings = await index_js_1.TLObject.read(_data);
44094
44627
  let draft = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
@@ -44111,6 +44644,7 @@ var Raw;
44111
44644
  unreadCount: unreadCount,
44112
44645
  unreadMentionsCount: unreadMentionsCount,
44113
44646
  unreadReactionsCount: unreadReactionsCount,
44647
+ unreadPollVotesCount: unreadPollVotesCount,
44114
44648
  fromId: fromId,
44115
44649
  notifySettings: notifySettings,
44116
44650
  draft: draft,
@@ -44165,6 +44699,9 @@ var Raw;
44165
44699
  if (this.unreadReactionsCount !== undefined) {
44166
44700
  b.write(index_js_1.Primitive.Int.write(this.unreadReactionsCount));
44167
44701
  }
44702
+ if (this.unreadPollVotesCount !== undefined) {
44703
+ b.write(index_js_1.Primitive.Int.write(this.unreadPollVotesCount));
44704
+ }
44168
44705
  if (this.fromId !== undefined) {
44169
44706
  b.write(this.fromId.write());
44170
44707
  }
@@ -44394,6 +44931,50 @@ var Raw;
44394
44931
  }
44395
44932
  }
44396
44933
  Raw.RequestPeerTypeBroadcast = RequestPeerTypeBroadcast;
44934
+ class RequestPeerTypeCreateBot extends index_js_1.TLObject {
44935
+ botManaged;
44936
+ suggestedName;
44937
+ suggestedUsername;
44938
+ constructor(params) {
44939
+ super();
44940
+ this.classType = 'types';
44941
+ this.className = 'RequestPeerTypeCreateBot';
44942
+ this.constructorId = 0x3e81e078;
44943
+ this.subclassOfId = 0xe9a0e814;
44944
+ this._slots = ['botManaged', 'suggestedName', 'suggestedUsername'];
44945
+ this.botManaged = params.botManaged;
44946
+ this.suggestedName = params.suggestedName;
44947
+ this.suggestedUsername = params.suggestedUsername;
44948
+ }
44949
+ static async read(_data, ..._args) {
44950
+ let flags = await index_js_1.Primitive.Int.read(_data);
44951
+ let botManaged = flags & (1 << 0) ? true : false;
44952
+ let suggestedName = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
44953
+ let suggestedUsername = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
44954
+ return new Raw.RequestPeerTypeCreateBot({
44955
+ botManaged: botManaged,
44956
+ suggestedName: suggestedName,
44957
+ suggestedUsername: suggestedUsername,
44958
+ });
44959
+ }
44960
+ write() {
44961
+ const b = new deps_js_1.BytesIO();
44962
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
44963
+ let flags = 0;
44964
+ flags |= this.botManaged ? 1 << 0 : 0;
44965
+ flags |= this.suggestedName !== undefined ? 1 << 1 : 0;
44966
+ flags |= this.suggestedUsername !== undefined ? 1 << 2 : 0;
44967
+ b.write(index_js_1.Primitive.Int.write(flags));
44968
+ if (this.suggestedName !== undefined) {
44969
+ b.write(index_js_1.Primitive.String.write(this.suggestedName));
44970
+ }
44971
+ if (this.suggestedUsername !== undefined) {
44972
+ b.write(index_js_1.Primitive.String.write(this.suggestedUsername));
44973
+ }
44974
+ return deps_js_1.Buffer.from(b.buffer);
44975
+ }
44976
+ }
44977
+ Raw.RequestPeerTypeCreateBot = RequestPeerTypeCreateBot;
44397
44978
  class EmojiListNotModified extends index_js_1.TLObject {
44398
44979
  constructor() {
44399
44980
  super();
@@ -45234,11 +45815,12 @@ var Raw;
45234
45815
  views;
45235
45816
  sentReaction;
45236
45817
  albums;
45818
+ music;
45237
45819
  constructor(params) {
45238
45820
  super();
45239
45821
  this.classType = 'types';
45240
45822
  this.className = 'StoryItem';
45241
- this.constructorId = 0xedf164f1;
45823
+ this.constructorId = 0x16a4b93c;
45242
45824
  this.subclassOfId = 0xd477b133;
45243
45825
  this._slots = [
45244
45826
  'pinned',
@@ -45263,6 +45845,7 @@ var Raw;
45263
45845
  'views',
45264
45846
  'sentReaction',
45265
45847
  'albums',
45848
+ 'music',
45266
45849
  ];
45267
45850
  this.pinned = params.pinned;
45268
45851
  this.public = params.public;
@@ -45286,6 +45869,7 @@ var Raw;
45286
45869
  this.views = params.views;
45287
45870
  this.sentReaction = params.sentReaction;
45288
45871
  this.albums = params.albums;
45872
+ this.music = params.music;
45289
45873
  }
45290
45874
  static async read(_data, ..._args) {
45291
45875
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -45311,6 +45895,7 @@ var Raw;
45311
45895
  let views = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
45312
45896
  let sentReaction = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
45313
45897
  let albums = flags & (1 << 19) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
45898
+ let music = flags & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
45314
45899
  return new Raw.StoryItem({
45315
45900
  pinned: pinned,
45316
45901
  public: _public,
@@ -45334,6 +45919,7 @@ var Raw;
45334
45919
  views: views,
45335
45920
  sentReaction: sentReaction,
45336
45921
  albums: albums,
45922
+ music: music,
45337
45923
  });
45338
45924
  }
45339
45925
  write() {
@@ -45358,6 +45944,7 @@ var Raw;
45358
45944
  flags |= this.views !== undefined ? 1 << 3 : 0;
45359
45945
  flags |= this.sentReaction !== undefined ? 1 << 15 : 0;
45360
45946
  flags |= this.albums ? 1 << 19 : 0;
45947
+ flags |= this.music !== undefined ? 1 << 20 : 0;
45361
45948
  b.write(index_js_1.Primitive.Int.write(flags));
45362
45949
  if (this.id !== undefined) {
45363
45950
  b.write(index_js_1.Primitive.Int.write(this.id));
@@ -45398,6 +45985,9 @@ var Raw;
45398
45985
  if (this.albums) {
45399
45986
  b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
45400
45987
  }
45988
+ if (this.music !== undefined) {
45989
+ b.write(this.music.write());
45990
+ }
45401
45991
  return deps_js_1.Buffer.from(b.buffer);
45402
45992
  }
45403
45993
  }
@@ -45553,11 +46143,12 @@ var Raw;
45553
46143
  quoteOffset;
45554
46144
  monoforumPeerId;
45555
46145
  todoItemId;
46146
+ pollOption;
45556
46147
  constructor(params) {
45557
46148
  super();
45558
46149
  this.classType = 'types';
45559
46150
  this.className = 'InputReplyToMessage';
45560
- this.constructorId = 0x869fbe10;
46151
+ this.constructorId = 0x3bd4b7c2;
45561
46152
  this.subclassOfId = 0x8c71131d;
45562
46153
  this._slots = [
45563
46154
  'replyToMsgId',
@@ -45568,6 +46159,7 @@ var Raw;
45568
46159
  'quoteOffset',
45569
46160
  'monoforumPeerId',
45570
46161
  'todoItemId',
46162
+ 'pollOption',
45571
46163
  ];
45572
46164
  this.replyToMsgId = params.replyToMsgId;
45573
46165
  this.topMsgId = params.topMsgId;
@@ -45577,6 +46169,7 @@ var Raw;
45577
46169
  this.quoteOffset = params.quoteOffset;
45578
46170
  this.monoforumPeerId = params.monoforumPeerId;
45579
46171
  this.todoItemId = params.todoItemId;
46172
+ this.pollOption = params.pollOption;
45580
46173
  }
45581
46174
  static async read(_data, ..._args) {
45582
46175
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -45588,6 +46181,7 @@ var Raw;
45588
46181
  let quoteOffset = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
45589
46182
  let monoforumPeerId = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
45590
46183
  let todoItemId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
46184
+ let pollOption = flags & (1 << 7) ? await index_js_1.Primitive.Bytes.read(_data) : undefined;
45591
46185
  return new Raw.InputReplyToMessage({
45592
46186
  replyToMsgId: replyToMsgId,
45593
46187
  topMsgId: topMsgId,
@@ -45597,6 +46191,7 @@ var Raw;
45597
46191
  quoteOffset: quoteOffset,
45598
46192
  monoforumPeerId: monoforumPeerId,
45599
46193
  todoItemId: todoItemId,
46194
+ pollOption: pollOption,
45600
46195
  });
45601
46196
  }
45602
46197
  write() {
@@ -45610,6 +46205,7 @@ var Raw;
45610
46205
  flags |= this.quoteOffset !== undefined ? 1 << 4 : 0;
45611
46206
  flags |= this.monoforumPeerId !== undefined ? 1 << 5 : 0;
45612
46207
  flags |= this.todoItemId !== undefined ? 1 << 6 : 0;
46208
+ flags |= this.pollOption !== undefined ? 1 << 7 : 0;
45613
46209
  b.write(index_js_1.Primitive.Int.write(flags));
45614
46210
  if (this.replyToMsgId !== undefined) {
45615
46211
  b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
@@ -45635,6 +46231,9 @@ var Raw;
45635
46231
  if (this.todoItemId !== undefined) {
45636
46232
  b.write(index_js_1.Primitive.Int.write(this.todoItemId));
45637
46233
  }
46234
+ if (this.pollOption !== undefined) {
46235
+ b.write(index_js_1.Primitive.Bytes.write(this.pollOption));
46236
+ }
45638
46237
  return deps_js_1.Buffer.from(b.buffer);
45639
46238
  }
45640
46239
  }
@@ -48712,17 +49311,25 @@ var Raw;
48712
49311
  class ReactionsNotifySettings extends index_js_1.TLObject {
48713
49312
  messagesNotifyFrom;
48714
49313
  storiesNotifyFrom;
49314
+ pollVotesNotifyFrom;
48715
49315
  sound;
48716
49316
  showPreviews;
48717
49317
  constructor(params) {
48718
49318
  super();
48719
49319
  this.classType = 'types';
48720
49320
  this.className = 'ReactionsNotifySettings';
48721
- this.constructorId = 0x56e34970;
49321
+ this.constructorId = 0x71e4ea58;
48722
49322
  this.subclassOfId = 0x8dff0851;
48723
- this._slots = ['messagesNotifyFrom', 'storiesNotifyFrom', 'sound', 'showPreviews'];
49323
+ this._slots = [
49324
+ 'messagesNotifyFrom',
49325
+ 'storiesNotifyFrom',
49326
+ 'pollVotesNotifyFrom',
49327
+ 'sound',
49328
+ 'showPreviews',
49329
+ ];
48724
49330
  this.messagesNotifyFrom = params.messagesNotifyFrom;
48725
49331
  this.storiesNotifyFrom = params.storiesNotifyFrom;
49332
+ this.pollVotesNotifyFrom = params.pollVotesNotifyFrom;
48726
49333
  this.sound = params.sound;
48727
49334
  this.showPreviews = params.showPreviews;
48728
49335
  }
@@ -48730,11 +49337,13 @@ var Raw;
48730
49337
  let flags = await index_js_1.Primitive.Int.read(_data);
48731
49338
  let messagesNotifyFrom = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
48732
49339
  let storiesNotifyFrom = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
49340
+ let pollVotesNotifyFrom = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
48733
49341
  let sound = await index_js_1.TLObject.read(_data);
48734
49342
  let showPreviews = await index_js_1.Primitive.Bool.read(_data);
48735
49343
  return new Raw.ReactionsNotifySettings({
48736
49344
  messagesNotifyFrom: messagesNotifyFrom,
48737
49345
  storiesNotifyFrom: storiesNotifyFrom,
49346
+ pollVotesNotifyFrom: pollVotesNotifyFrom,
48738
49347
  sound: sound,
48739
49348
  showPreviews: showPreviews,
48740
49349
  });
@@ -48745,6 +49354,7 @@ var Raw;
48745
49354
  let flags = 0;
48746
49355
  flags |= this.messagesNotifyFrom !== undefined ? 1 << 0 : 0;
48747
49356
  flags |= this.storiesNotifyFrom !== undefined ? 1 << 1 : 0;
49357
+ flags |= this.pollVotesNotifyFrom !== undefined ? 1 << 2 : 0;
48748
49358
  b.write(index_js_1.Primitive.Int.write(flags));
48749
49359
  if (this.messagesNotifyFrom !== undefined) {
48750
49360
  b.write(this.messagesNotifyFrom.write());
@@ -48752,6 +49362,9 @@ var Raw;
48752
49362
  if (this.storiesNotifyFrom !== undefined) {
48753
49363
  b.write(this.storiesNotifyFrom.write());
48754
49364
  }
49365
+ if (this.pollVotesNotifyFrom !== undefined) {
49366
+ b.write(this.pollVotesNotifyFrom.write());
49367
+ }
48755
49368
  if (this.sound !== undefined) {
48756
49369
  b.write(this.sound.write());
48757
49370
  }
@@ -53723,6 +54336,75 @@ var Raw;
53723
54336
  }
53724
54337
  }
53725
54338
  Raw.KeyboardButtonStyle = KeyboardButtonStyle;
54339
+ class InputMessageReadMetric extends index_js_1.TLObject {
54340
+ msgId;
54341
+ viewId;
54342
+ timeInViewMs;
54343
+ activeTimeInViewMs;
54344
+ heightToViewportRatioPermille;
54345
+ seenRangeRatioPermille;
54346
+ constructor(params) {
54347
+ super();
54348
+ this.classType = 'types';
54349
+ this.className = 'InputMessageReadMetric';
54350
+ this.constructorId = 0x402b4495;
54351
+ this.subclassOfId = 0xed5a5ca5;
54352
+ this._slots = [
54353
+ 'msgId',
54354
+ 'viewId',
54355
+ 'timeInViewMs',
54356
+ 'activeTimeInViewMs',
54357
+ 'heightToViewportRatioPermille',
54358
+ 'seenRangeRatioPermille',
54359
+ ];
54360
+ this.msgId = params.msgId;
54361
+ this.viewId = params.viewId;
54362
+ this.timeInViewMs = params.timeInViewMs;
54363
+ this.activeTimeInViewMs = params.activeTimeInViewMs;
54364
+ this.heightToViewportRatioPermille = params.heightToViewportRatioPermille;
54365
+ this.seenRangeRatioPermille = params.seenRangeRatioPermille;
54366
+ }
54367
+ static async read(_data, ..._args) {
54368
+ let msgId = await index_js_1.Primitive.Int.read(_data);
54369
+ let viewId = await index_js_1.Primitive.Long.read(_data);
54370
+ let timeInViewMs = await index_js_1.Primitive.Int.read(_data);
54371
+ let activeTimeInViewMs = await index_js_1.Primitive.Int.read(_data);
54372
+ let heightToViewportRatioPermille = await index_js_1.Primitive.Int.read(_data);
54373
+ let seenRangeRatioPermille = await index_js_1.Primitive.Int.read(_data);
54374
+ return new Raw.InputMessageReadMetric({
54375
+ msgId: msgId,
54376
+ viewId: viewId,
54377
+ timeInViewMs: timeInViewMs,
54378
+ activeTimeInViewMs: activeTimeInViewMs,
54379
+ heightToViewportRatioPermille: heightToViewportRatioPermille,
54380
+ seenRangeRatioPermille: seenRangeRatioPermille,
54381
+ });
54382
+ }
54383
+ write() {
54384
+ const b = new deps_js_1.BytesIO();
54385
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
54386
+ if (this.msgId !== undefined) {
54387
+ b.write(index_js_1.Primitive.Int.write(this.msgId));
54388
+ }
54389
+ if (this.viewId !== undefined) {
54390
+ b.write(index_js_1.Primitive.Long.write(this.viewId));
54391
+ }
54392
+ if (this.timeInViewMs !== undefined) {
54393
+ b.write(index_js_1.Primitive.Int.write(this.timeInViewMs));
54394
+ }
54395
+ if (this.activeTimeInViewMs !== undefined) {
54396
+ b.write(index_js_1.Primitive.Int.write(this.activeTimeInViewMs));
54397
+ }
54398
+ if (this.heightToViewportRatioPermille !== undefined) {
54399
+ b.write(index_js_1.Primitive.Int.write(this.heightToViewportRatioPermille));
54400
+ }
54401
+ if (this.seenRangeRatioPermille !== undefined) {
54402
+ b.write(index_js_1.Primitive.Int.write(this.seenRangeRatioPermille));
54403
+ }
54404
+ return deps_js_1.Buffer.from(b.buffer);
54405
+ }
54406
+ }
54407
+ Raw.InputMessageReadMetric = InputMessageReadMetric;
53726
54408
  class InvokeAfterMsg extends index_js_1.TLObject {
53727
54409
  __response__;
53728
54410
  msgId;
@@ -65294,6 +65976,44 @@ var Raw;
65294
65976
  }
65295
65977
  }
65296
65978
  messages_1.EmojiGameDiceInfo = EmojiGameDiceInfo;
65979
+ class ComposedMessageWithAI extends index_js_1.TLObject {
65980
+ resultText;
65981
+ diffText;
65982
+ constructor(params) {
65983
+ super();
65984
+ this.classType = 'types';
65985
+ this.className = 'messages.ComposedMessageWithAI';
65986
+ this.constructorId = 0x90d7adfa;
65987
+ this.subclassOfId = 0x140803df;
65988
+ this._slots = ['resultText', 'diffText'];
65989
+ this.resultText = params.resultText;
65990
+ this.diffText = params.diffText;
65991
+ }
65992
+ static async read(_data, ..._args) {
65993
+ let flags = await index_js_1.Primitive.Int.read(_data);
65994
+ let resultText = await index_js_1.TLObject.read(_data);
65995
+ let diffText = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
65996
+ return new Raw.messages.ComposedMessageWithAI({
65997
+ resultText: resultText,
65998
+ diffText: diffText,
65999
+ });
66000
+ }
66001
+ write() {
66002
+ const b = new deps_js_1.BytesIO();
66003
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
66004
+ let flags = 0;
66005
+ flags |= this.diffText !== undefined ? 1 << 0 : 0;
66006
+ b.write(index_js_1.Primitive.Int.write(flags));
66007
+ if (this.resultText !== undefined) {
66008
+ b.write(this.resultText.write());
66009
+ }
66010
+ if (this.diffText !== undefined) {
66011
+ b.write(this.diffText.write());
66012
+ }
66013
+ return deps_js_1.Buffer.from(b.buffer);
66014
+ }
66015
+ }
66016
+ messages_1.ComposedMessageWithAI = ComposedMessageWithAI;
65297
66017
  class GetMessages extends index_js_1.TLObject {
65298
66018
  __response__;
65299
66019
  id;
@@ -70070,20 +70790,23 @@ var Raw;
70070
70790
  __response__;
70071
70791
  peer;
70072
70792
  msgId;
70793
+ pollHash;
70073
70794
  constructor(params) {
70074
70795
  super();
70075
70796
  this.classType = 'functions';
70076
70797
  this.className = 'messages.GetPollResults';
70077
- this.constructorId = 0x73bb643b;
70798
+ this.constructorId = 0xeda3e33b;
70078
70799
  this.subclassOfId = 0x8af52aac;
70079
- this._slots = ['peer', 'msgId'];
70800
+ this._slots = ['peer', 'msgId', 'pollHash'];
70080
70801
  this.peer = params.peer;
70081
70802
  this.msgId = params.msgId;
70803
+ this.pollHash = params.pollHash;
70082
70804
  }
70083
70805
  static async read(_data, ..._args) {
70084
70806
  let peer = await index_js_1.TLObject.read(_data);
70085
70807
  let msgId = await index_js_1.Primitive.Int.read(_data);
70086
- return new Raw.messages.GetPollResults({ peer: peer, msgId: msgId });
70808
+ let pollHash = await index_js_1.Primitive.Long.read(_data);
70809
+ return new Raw.messages.GetPollResults({ peer: peer, msgId: msgId, pollHash: pollHash });
70087
70810
  }
70088
70811
  write() {
70089
70812
  const b = new deps_js_1.BytesIO();
@@ -70094,6 +70817,9 @@ var Raw;
70094
70817
  if (this.msgId !== undefined) {
70095
70818
  b.write(index_js_1.Primitive.Int.write(this.msgId));
70096
70819
  }
70820
+ if (this.pollHash !== undefined) {
70821
+ b.write(index_js_1.Primitive.Long.write(this.pollHash));
70822
+ }
70097
70823
  return deps_js_1.Buffer.from(b.buffer);
70098
70824
  }
70099
70825
  }
@@ -72348,17 +73074,19 @@ var Raw;
72348
73074
  id;
72349
73075
  text;
72350
73076
  toLang;
73077
+ tone;
72351
73078
  constructor(params) {
72352
73079
  super();
72353
73080
  this.classType = 'functions';
72354
73081
  this.className = 'messages.TranslateText';
72355
- this.constructorId = 0x63183030;
73082
+ this.constructorId = 0xa5eec345;
72356
73083
  this.subclassOfId = 0x24243e8;
72357
- this._slots = ['peer', 'id', 'text', 'toLang'];
73084
+ this._slots = ['peer', 'id', 'text', 'toLang', 'tone'];
72358
73085
  this.peer = params.peer;
72359
73086
  this.id = params.id;
72360
73087
  this.text = params.text;
72361
73088
  this.toLang = params.toLang;
73089
+ this.tone = params.tone;
72362
73090
  }
72363
73091
  static async read(_data, ..._args) {
72364
73092
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -72366,7 +73094,14 @@ var Raw;
72366
73094
  let id = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
72367
73095
  let text = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
72368
73096
  let toLang = await index_js_1.Primitive.String.read(_data);
72369
- return new Raw.messages.TranslateText({ peer: peer, id: id, text: text, toLang: toLang });
73097
+ let tone = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
73098
+ return new Raw.messages.TranslateText({
73099
+ peer: peer,
73100
+ id: id,
73101
+ text: text,
73102
+ toLang: toLang,
73103
+ tone: tone,
73104
+ });
72370
73105
  }
72371
73106
  write() {
72372
73107
  const b = new deps_js_1.BytesIO();
@@ -72375,6 +73110,7 @@ var Raw;
72375
73110
  flags |= this.peer !== undefined ? 1 << 0 : 0;
72376
73111
  flags |= this.id ? 1 << 0 : 0;
72377
73112
  flags |= this.text ? 1 << 1 : 0;
73113
+ flags |= this.tone !== undefined ? 1 << 2 : 0;
72378
73114
  b.write(index_js_1.Primitive.Int.write(flags));
72379
73115
  if (this.peer !== undefined) {
72380
73116
  b.write(this.peer.write());
@@ -72388,6 +73124,9 @@ var Raw;
72388
73124
  if (this.toLang !== undefined) {
72389
73125
  b.write(index_js_1.Primitive.String.write(this.toLang));
72390
73126
  }
73127
+ if (this.tone !== undefined) {
73128
+ b.write(index_js_1.Primitive.String.write(this.tone));
73129
+ }
72391
73130
  return deps_js_1.Buffer.from(b.buffer);
72392
73131
  }
72393
73132
  }
@@ -73386,28 +74125,33 @@ var Raw;
73386
74125
  __response__;
73387
74126
  peer;
73388
74127
  msgId;
74128
+ webappReqId;
73389
74129
  buttonId;
73390
74130
  requestedPeers;
73391
74131
  constructor(params) {
73392
74132
  super();
73393
74133
  this.classType = 'functions';
73394
74134
  this.className = 'messages.SendBotRequestedPeer';
73395
- this.constructorId = 0x91b2d060;
74135
+ this.constructorId = 0x6c5cf2a7;
73396
74136
  this.subclassOfId = 0x8af52aac;
73397
- this._slots = ['peer', 'msgId', 'buttonId', 'requestedPeers'];
74137
+ this._slots = ['peer', 'msgId', 'webappReqId', 'buttonId', 'requestedPeers'];
73398
74138
  this.peer = params.peer;
73399
74139
  this.msgId = params.msgId;
74140
+ this.webappReqId = params.webappReqId;
73400
74141
  this.buttonId = params.buttonId;
73401
74142
  this.requestedPeers = params.requestedPeers;
73402
74143
  }
73403
74144
  static async read(_data, ..._args) {
74145
+ let flags = await index_js_1.Primitive.Int.read(_data);
73404
74146
  let peer = await index_js_1.TLObject.read(_data);
73405
- let msgId = await index_js_1.Primitive.Int.read(_data);
74147
+ let msgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
74148
+ let webappReqId = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
73406
74149
  let buttonId = await index_js_1.Primitive.Int.read(_data);
73407
74150
  let requestedPeers = await index_js_1.TLObject.read(_data);
73408
74151
  return new Raw.messages.SendBotRequestedPeer({
73409
74152
  peer: peer,
73410
74153
  msgId: msgId,
74154
+ webappReqId: webappReqId,
73411
74155
  buttonId: buttonId,
73412
74156
  requestedPeers: requestedPeers,
73413
74157
  });
@@ -73415,12 +74159,19 @@ var Raw;
73415
74159
  write() {
73416
74160
  const b = new deps_js_1.BytesIO();
73417
74161
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
74162
+ let flags = 0;
74163
+ flags |= this.msgId !== undefined ? 1 << 0 : 0;
74164
+ flags |= this.webappReqId !== undefined ? 1 << 1 : 0;
74165
+ b.write(index_js_1.Primitive.Int.write(flags));
73418
74166
  if (this.peer !== undefined) {
73419
74167
  b.write(this.peer.write());
73420
74168
  }
73421
74169
  if (this.msgId !== undefined) {
73422
74170
  b.write(index_js_1.Primitive.Int.write(this.msgId));
73423
74171
  }
74172
+ if (this.webappReqId !== undefined) {
74173
+ b.write(index_js_1.Primitive.String.write(this.webappReqId));
74174
+ }
73424
74175
  if (this.buttonId !== undefined) {
73425
74176
  b.write(index_js_1.Primitive.Int.write(this.buttonId));
73426
74177
  }
@@ -75874,29 +76625,33 @@ var Raw;
75874
76625
  peer;
75875
76626
  id;
75876
76627
  toLang;
76628
+ tone;
75877
76629
  constructor(params) {
75878
76630
  super();
75879
76631
  this.classType = 'functions';
75880
76632
  this.className = 'messages.SummarizeText';
75881
- this.constructorId = 0x9d4104e2;
76633
+ this.constructorId = 0xabbbd346;
75882
76634
  this.subclassOfId = 0x95ca4b05;
75883
- this._slots = ['peer', 'id', 'toLang'];
76635
+ this._slots = ['peer', 'id', 'toLang', 'tone'];
75884
76636
  this.peer = params.peer;
75885
76637
  this.id = params.id;
75886
76638
  this.toLang = params.toLang;
76639
+ this.tone = params.tone;
75887
76640
  }
75888
76641
  static async read(_data, ..._args) {
75889
76642
  let flags = await index_js_1.Primitive.Int.read(_data);
75890
76643
  let peer = await index_js_1.TLObject.read(_data);
75891
76644
  let id = await index_js_1.Primitive.Int.read(_data);
75892
76645
  let toLang = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
75893
- return new Raw.messages.SummarizeText({ peer: peer, id: id, toLang: toLang });
76646
+ let tone = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
76647
+ return new Raw.messages.SummarizeText({ peer: peer, id: id, toLang: toLang, tone: tone });
75894
76648
  }
75895
76649
  write() {
75896
76650
  const b = new deps_js_1.BytesIO();
75897
76651
  b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
75898
76652
  let flags = 0;
75899
76653
  flags |= this.toLang !== undefined ? 1 << 0 : 0;
76654
+ flags |= this.tone !== undefined ? 1 << 2 : 0;
75900
76655
  b.write(index_js_1.Primitive.Int.write(flags));
75901
76656
  if (this.peer !== undefined) {
75902
76657
  b.write(this.peer.write());
@@ -75907,6 +76662,9 @@ var Raw;
75907
76662
  if (this.toLang !== undefined) {
75908
76663
  b.write(index_js_1.Primitive.String.write(this.toLang));
75909
76664
  }
76665
+ if (this.tone !== undefined) {
76666
+ b.write(index_js_1.Primitive.String.write(this.tone));
76667
+ }
75910
76668
  return deps_js_1.Buffer.from(b.buffer);
75911
76669
  }
75912
76670
  }
@@ -76075,6 +76833,313 @@ var Raw;
76075
76833
  }
76076
76834
  }
76077
76835
  messages_1.CheckUrlAuthMatchCode = CheckUrlAuthMatchCode;
76836
+ class ComposeMessageWithAI extends index_js_1.TLObject {
76837
+ __response__;
76838
+ proofread;
76839
+ emojify;
76840
+ text;
76841
+ translateToLang;
76842
+ changeTone;
76843
+ constructor(params) {
76844
+ super();
76845
+ this.classType = 'functions';
76846
+ this.className = 'messages.ComposeMessageWithAI';
76847
+ this.constructorId = 0xfd426afe;
76848
+ this.subclassOfId = 0x140803df;
76849
+ this._slots = ['proofread', 'emojify', 'text', 'translateToLang', 'changeTone'];
76850
+ this.proofread = params.proofread;
76851
+ this.emojify = params.emojify;
76852
+ this.text = params.text;
76853
+ this.translateToLang = params.translateToLang;
76854
+ this.changeTone = params.changeTone;
76855
+ }
76856
+ static async read(_data, ..._args) {
76857
+ let flags = await index_js_1.Primitive.Int.read(_data);
76858
+ let proofread = flags & (1 << 0) ? true : false;
76859
+ let emojify = flags & (1 << 3) ? true : false;
76860
+ let text = await index_js_1.TLObject.read(_data);
76861
+ let translateToLang = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
76862
+ let changeTone = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
76863
+ return new Raw.messages.ComposeMessageWithAI({
76864
+ proofread: proofread,
76865
+ emojify: emojify,
76866
+ text: text,
76867
+ translateToLang: translateToLang,
76868
+ changeTone: changeTone,
76869
+ });
76870
+ }
76871
+ write() {
76872
+ const b = new deps_js_1.BytesIO();
76873
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76874
+ let flags = 0;
76875
+ flags |= this.proofread ? 1 << 0 : 0;
76876
+ flags |= this.emojify ? 1 << 3 : 0;
76877
+ flags |= this.translateToLang !== undefined ? 1 << 1 : 0;
76878
+ flags |= this.changeTone !== undefined ? 1 << 2 : 0;
76879
+ b.write(index_js_1.Primitive.Int.write(flags));
76880
+ if (this.text !== undefined) {
76881
+ b.write(this.text.write());
76882
+ }
76883
+ if (this.translateToLang !== undefined) {
76884
+ b.write(index_js_1.Primitive.String.write(this.translateToLang));
76885
+ }
76886
+ if (this.changeTone !== undefined) {
76887
+ b.write(index_js_1.Primitive.String.write(this.changeTone));
76888
+ }
76889
+ return deps_js_1.Buffer.from(b.buffer);
76890
+ }
76891
+ }
76892
+ messages_1.ComposeMessageWithAI = ComposeMessageWithAI;
76893
+ class ReportReadMetrics extends index_js_1.TLObject {
76894
+ __response__;
76895
+ peer;
76896
+ metrics;
76897
+ constructor(params) {
76898
+ super();
76899
+ this.classType = 'functions';
76900
+ this.className = 'messages.ReportReadMetrics';
76901
+ this.constructorId = 0x4067c5e6;
76902
+ this.subclassOfId = 0xf5b399ac;
76903
+ this._slots = ['peer', 'metrics'];
76904
+ this.peer = params.peer;
76905
+ this.metrics = params.metrics;
76906
+ }
76907
+ static async read(_data, ..._args) {
76908
+ let peer = await index_js_1.TLObject.read(_data);
76909
+ let metrics = await index_js_1.TLObject.read(_data);
76910
+ return new Raw.messages.ReportReadMetrics({ peer: peer, metrics: metrics });
76911
+ }
76912
+ write() {
76913
+ const b = new deps_js_1.BytesIO();
76914
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76915
+ if (this.peer !== undefined) {
76916
+ b.write(this.peer.write());
76917
+ }
76918
+ if (this.metrics) {
76919
+ b.write(index_js_1.Primitive.Vector.write(this.metrics));
76920
+ }
76921
+ return deps_js_1.Buffer.from(b.buffer);
76922
+ }
76923
+ }
76924
+ messages_1.ReportReadMetrics = ReportReadMetrics;
76925
+ class ReportMusicListen extends index_js_1.TLObject {
76926
+ __response__;
76927
+ id;
76928
+ listenedDuration;
76929
+ constructor(params) {
76930
+ super();
76931
+ this.classType = 'functions';
76932
+ this.className = 'messages.ReportMusicListen';
76933
+ this.constructorId = 0xddbcd819;
76934
+ this.subclassOfId = 0xf5b399ac;
76935
+ this._slots = ['id', 'listenedDuration'];
76936
+ this.id = params.id;
76937
+ this.listenedDuration = params.listenedDuration;
76938
+ }
76939
+ static async read(_data, ..._args) {
76940
+ let id = await index_js_1.TLObject.read(_data);
76941
+ let listenedDuration = await index_js_1.Primitive.Int.read(_data);
76942
+ return new Raw.messages.ReportMusicListen({ id: id, listenedDuration: listenedDuration });
76943
+ }
76944
+ write() {
76945
+ const b = new deps_js_1.BytesIO();
76946
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76947
+ if (this.id !== undefined) {
76948
+ b.write(this.id.write());
76949
+ }
76950
+ if (this.listenedDuration !== undefined) {
76951
+ b.write(index_js_1.Primitive.Int.write(this.listenedDuration));
76952
+ }
76953
+ return deps_js_1.Buffer.from(b.buffer);
76954
+ }
76955
+ }
76956
+ messages_1.ReportMusicListen = ReportMusicListen;
76957
+ class AddPollAnswer extends index_js_1.TLObject {
76958
+ __response__;
76959
+ peer;
76960
+ msgId;
76961
+ answer;
76962
+ constructor(params) {
76963
+ super();
76964
+ this.classType = 'functions';
76965
+ this.className = 'messages.AddPollAnswer';
76966
+ this.constructorId = 0x19bc4b6d;
76967
+ this.subclassOfId = 0x8af52aac;
76968
+ this._slots = ['peer', 'msgId', 'answer'];
76969
+ this.peer = params.peer;
76970
+ this.msgId = params.msgId;
76971
+ this.answer = params.answer;
76972
+ }
76973
+ static async read(_data, ..._args) {
76974
+ let peer = await index_js_1.TLObject.read(_data);
76975
+ let msgId = await index_js_1.Primitive.Int.read(_data);
76976
+ let answer = await index_js_1.TLObject.read(_data);
76977
+ return new Raw.messages.AddPollAnswer({ peer: peer, msgId: msgId, answer: answer });
76978
+ }
76979
+ write() {
76980
+ const b = new deps_js_1.BytesIO();
76981
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
76982
+ if (this.peer !== undefined) {
76983
+ b.write(this.peer.write());
76984
+ }
76985
+ if (this.msgId !== undefined) {
76986
+ b.write(index_js_1.Primitive.Int.write(this.msgId));
76987
+ }
76988
+ if (this.answer !== undefined) {
76989
+ b.write(this.answer.write());
76990
+ }
76991
+ return deps_js_1.Buffer.from(b.buffer);
76992
+ }
76993
+ }
76994
+ messages_1.AddPollAnswer = AddPollAnswer;
76995
+ class DeletePollAnswer extends index_js_1.TLObject {
76996
+ __response__;
76997
+ peer;
76998
+ msgId;
76999
+ option;
77000
+ constructor(params) {
77001
+ super();
77002
+ this.classType = 'functions';
77003
+ this.className = 'messages.DeletePollAnswer';
77004
+ this.constructorId = 0xac8505a5;
77005
+ this.subclassOfId = 0x8af52aac;
77006
+ this._slots = ['peer', 'msgId', 'option'];
77007
+ this.peer = params.peer;
77008
+ this.msgId = params.msgId;
77009
+ this.option = params.option;
77010
+ }
77011
+ static async read(_data, ..._args) {
77012
+ let peer = await index_js_1.TLObject.read(_data);
77013
+ let msgId = await index_js_1.Primitive.Int.read(_data);
77014
+ let option = await index_js_1.Primitive.Bytes.read(_data);
77015
+ return new Raw.messages.DeletePollAnswer({ peer: peer, msgId: msgId, option: option });
77016
+ }
77017
+ write() {
77018
+ const b = new deps_js_1.BytesIO();
77019
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
77020
+ if (this.peer !== undefined) {
77021
+ b.write(this.peer.write());
77022
+ }
77023
+ if (this.msgId !== undefined) {
77024
+ b.write(index_js_1.Primitive.Int.write(this.msgId));
77025
+ }
77026
+ if (this.option !== undefined) {
77027
+ b.write(index_js_1.Primitive.Bytes.write(this.option));
77028
+ }
77029
+ return deps_js_1.Buffer.from(b.buffer);
77030
+ }
77031
+ }
77032
+ messages_1.DeletePollAnswer = DeletePollAnswer;
77033
+ class GetUnreadPollVotes extends index_js_1.TLObject {
77034
+ __response__;
77035
+ peer;
77036
+ topMsgId;
77037
+ offsetId;
77038
+ addOffset;
77039
+ limit;
77040
+ maxId;
77041
+ minId;
77042
+ constructor(params) {
77043
+ super();
77044
+ this.classType = 'functions';
77045
+ this.className = 'messages.GetUnreadPollVotes';
77046
+ this.constructorId = 0x43286cf2;
77047
+ this.subclassOfId = 0xd4b40b5e;
77048
+ this._slots = ['peer', 'topMsgId', 'offsetId', 'addOffset', 'limit', 'maxId', 'minId'];
77049
+ this.peer = params.peer;
77050
+ this.topMsgId = params.topMsgId;
77051
+ this.offsetId = params.offsetId;
77052
+ this.addOffset = params.addOffset;
77053
+ this.limit = params.limit;
77054
+ this.maxId = params.maxId;
77055
+ this.minId = params.minId;
77056
+ }
77057
+ static async read(_data, ..._args) {
77058
+ let flags = await index_js_1.Primitive.Int.read(_data);
77059
+ let peer = await index_js_1.TLObject.read(_data);
77060
+ let topMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
77061
+ let offsetId = await index_js_1.Primitive.Int.read(_data);
77062
+ let addOffset = await index_js_1.Primitive.Int.read(_data);
77063
+ let limit = await index_js_1.Primitive.Int.read(_data);
77064
+ let maxId = await index_js_1.Primitive.Int.read(_data);
77065
+ let minId = await index_js_1.Primitive.Int.read(_data);
77066
+ return new Raw.messages.GetUnreadPollVotes({
77067
+ peer: peer,
77068
+ topMsgId: topMsgId,
77069
+ offsetId: offsetId,
77070
+ addOffset: addOffset,
77071
+ limit: limit,
77072
+ maxId: maxId,
77073
+ minId: minId,
77074
+ });
77075
+ }
77076
+ write() {
77077
+ const b = new deps_js_1.BytesIO();
77078
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
77079
+ let flags = 0;
77080
+ flags |= this.topMsgId !== undefined ? 1 << 0 : 0;
77081
+ b.write(index_js_1.Primitive.Int.write(flags));
77082
+ if (this.peer !== undefined) {
77083
+ b.write(this.peer.write());
77084
+ }
77085
+ if (this.topMsgId !== undefined) {
77086
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
77087
+ }
77088
+ if (this.offsetId !== undefined) {
77089
+ b.write(index_js_1.Primitive.Int.write(this.offsetId));
77090
+ }
77091
+ if (this.addOffset !== undefined) {
77092
+ b.write(index_js_1.Primitive.Int.write(this.addOffset));
77093
+ }
77094
+ if (this.limit !== undefined) {
77095
+ b.write(index_js_1.Primitive.Int.write(this.limit));
77096
+ }
77097
+ if (this.maxId !== undefined) {
77098
+ b.write(index_js_1.Primitive.Int.write(this.maxId));
77099
+ }
77100
+ if (this.minId !== undefined) {
77101
+ b.write(index_js_1.Primitive.Int.write(this.minId));
77102
+ }
77103
+ return deps_js_1.Buffer.from(b.buffer);
77104
+ }
77105
+ }
77106
+ messages_1.GetUnreadPollVotes = GetUnreadPollVotes;
77107
+ class ReadPollVotes extends index_js_1.TLObject {
77108
+ __response__;
77109
+ peer;
77110
+ topMsgId;
77111
+ constructor(params) {
77112
+ super();
77113
+ this.classType = 'functions';
77114
+ this.className = 'messages.ReadPollVotes';
77115
+ this.constructorId = 0x1720b4d8;
77116
+ this.subclassOfId = 0x2c49c116;
77117
+ this._slots = ['peer', 'topMsgId'];
77118
+ this.peer = params.peer;
77119
+ this.topMsgId = params.topMsgId;
77120
+ }
77121
+ static async read(_data, ..._args) {
77122
+ let flags = await index_js_1.Primitive.Int.read(_data);
77123
+ let peer = await index_js_1.TLObject.read(_data);
77124
+ let topMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
77125
+ return new Raw.messages.ReadPollVotes({ peer: peer, topMsgId: topMsgId });
77126
+ }
77127
+ write() {
77128
+ const b = new deps_js_1.BytesIO();
77129
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
77130
+ let flags = 0;
77131
+ flags |= this.topMsgId !== undefined ? 1 << 0 : 0;
77132
+ b.write(index_js_1.Primitive.Int.write(flags));
77133
+ if (this.peer !== undefined) {
77134
+ b.write(this.peer.write());
77135
+ }
77136
+ if (this.topMsgId !== undefined) {
77137
+ b.write(index_js_1.Primitive.Int.write(this.topMsgId));
77138
+ }
77139
+ return deps_js_1.Buffer.from(b.buffer);
77140
+ }
77141
+ }
77142
+ messages_1.ReadPollVotes = ReadPollVotes;
76078
77143
  })(messages = Raw.messages || (Raw.messages = {}));
76079
77144
  let updates;
76080
77145
  (function (updates) {
@@ -88768,6 +89833,7 @@ var Raw;
88768
89833
  sortByPrice;
88769
89834
  sortByNum;
88770
89835
  forCraft;
89836
+ starsOnly;
88771
89837
  attributesHash;
88772
89838
  giftId;
88773
89839
  attributes;
@@ -88783,6 +89849,7 @@ var Raw;
88783
89849
  'sortByPrice',
88784
89850
  'sortByNum',
88785
89851
  'forCraft',
89852
+ 'starsOnly',
88786
89853
  'attributesHash',
88787
89854
  'giftId',
88788
89855
  'attributes',
@@ -88792,6 +89859,7 @@ var Raw;
88792
89859
  this.sortByPrice = params.sortByPrice;
88793
89860
  this.sortByNum = params.sortByNum;
88794
89861
  this.forCraft = params.forCraft;
89862
+ this.starsOnly = params.starsOnly;
88795
89863
  this.attributesHash = params.attributesHash;
88796
89864
  this.giftId = params.giftId;
88797
89865
  this.attributes = params.attributes;
@@ -88803,6 +89871,7 @@ var Raw;
88803
89871
  let sortByPrice = flags & (1 << 1) ? true : false;
88804
89872
  let sortByNum = flags & (1 << 2) ? true : false;
88805
89873
  let forCraft = flags & (1 << 4) ? true : false;
89874
+ let starsOnly = flags & (1 << 5) ? true : false;
88806
89875
  let attributesHash = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
88807
89876
  let giftId = await index_js_1.Primitive.Long.read(_data);
88808
89877
  let attributes = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
@@ -88812,6 +89881,7 @@ var Raw;
88812
89881
  sortByPrice: sortByPrice,
88813
89882
  sortByNum: sortByNum,
88814
89883
  forCraft: forCraft,
89884
+ starsOnly: starsOnly,
88815
89885
  attributesHash: attributesHash,
88816
89886
  giftId: giftId,
88817
89887
  attributes: attributes,
@@ -88826,6 +89896,7 @@ var Raw;
88826
89896
  flags |= this.sortByPrice ? 1 << 1 : 0;
88827
89897
  flags |= this.sortByNum ? 1 << 2 : 0;
88828
89898
  flags |= this.forCraft ? 1 << 4 : 0;
89899
+ flags |= this.starsOnly ? 1 << 5 : 0;
88829
89900
  flags |= this.attributesHash !== undefined ? 1 << 0 : 0;
88830
89901
  flags |= this.attributes ? 1 << 3 : 0;
88831
89902
  b.write(index_js_1.Primitive.Int.write(flags));
@@ -93809,6 +94880,56 @@ var Raw;
93809
94880
  }
93810
94881
  }
93811
94882
  bots.PreviewInfo = PreviewInfo;
94883
+ class ExportedBotToken extends index_js_1.TLObject {
94884
+ token;
94885
+ constructor(params) {
94886
+ super();
94887
+ this.classType = 'types';
94888
+ this.className = 'bots.ExportedBotToken';
94889
+ this.constructorId = 0x3c60b621;
94890
+ this.subclassOfId = 0x78496c77;
94891
+ this._slots = ['token'];
94892
+ this.token = params.token;
94893
+ }
94894
+ static async read(_data, ..._args) {
94895
+ let token = await index_js_1.Primitive.String.read(_data);
94896
+ return new Raw.bots.ExportedBotToken({ token: token });
94897
+ }
94898
+ write() {
94899
+ const b = new deps_js_1.BytesIO();
94900
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
94901
+ if (this.token !== undefined) {
94902
+ b.write(index_js_1.Primitive.String.write(this.token));
94903
+ }
94904
+ return deps_js_1.Buffer.from(b.buffer);
94905
+ }
94906
+ }
94907
+ bots.ExportedBotToken = ExportedBotToken;
94908
+ class RequestedButton extends index_js_1.TLObject {
94909
+ webappReqId;
94910
+ constructor(params) {
94911
+ super();
94912
+ this.classType = 'types';
94913
+ this.className = 'bots.RequestedButton';
94914
+ this.constructorId = 0xf13bbcd7;
94915
+ this.subclassOfId = 0xf9df53a;
94916
+ this._slots = ['webappReqId'];
94917
+ this.webappReqId = params.webappReqId;
94918
+ }
94919
+ static async read(_data, ..._args) {
94920
+ let webappReqId = await index_js_1.Primitive.String.read(_data);
94921
+ return new Raw.bots.RequestedButton({ webappReqId: webappReqId });
94922
+ }
94923
+ write() {
94924
+ const b = new deps_js_1.BytesIO();
94925
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
94926
+ if (this.webappReqId !== undefined) {
94927
+ b.write(index_js_1.Primitive.String.write(this.webappReqId));
94928
+ }
94929
+ return deps_js_1.Buffer.from(b.buffer);
94930
+ }
94931
+ }
94932
+ bots.RequestedButton = RequestedButton;
93812
94933
  class SendCustomRequest extends index_js_1.TLObject {
93813
94934
  __response__;
93814
94935
  customMethod;
@@ -94851,6 +95972,178 @@ var Raw;
94851
95972
  }
94852
95973
  }
94853
95974
  bots.GetBotRecommendations = GetBotRecommendations;
95975
+ class CheckUsername extends index_js_1.TLObject {
95976
+ __response__;
95977
+ username;
95978
+ constructor(params) {
95979
+ super();
95980
+ this.classType = 'functions';
95981
+ this.className = 'bots.CheckUsername';
95982
+ this.constructorId = 0x87f2219b;
95983
+ this.subclassOfId = 0xf5b399ac;
95984
+ this._slots = ['username'];
95985
+ this.username = params.username;
95986
+ }
95987
+ static async read(_data, ..._args) {
95988
+ let username = await index_js_1.Primitive.String.read(_data);
95989
+ return new Raw.bots.CheckUsername({ username: username });
95990
+ }
95991
+ write() {
95992
+ const b = new deps_js_1.BytesIO();
95993
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
95994
+ if (this.username !== undefined) {
95995
+ b.write(index_js_1.Primitive.String.write(this.username));
95996
+ }
95997
+ return deps_js_1.Buffer.from(b.buffer);
95998
+ }
95999
+ }
96000
+ bots.CheckUsername = CheckUsername;
96001
+ class CreateBot extends index_js_1.TLObject {
96002
+ __response__;
96003
+ viaDeeplink;
96004
+ name;
96005
+ username;
96006
+ managerId;
96007
+ constructor(params) {
96008
+ super();
96009
+ this.classType = 'functions';
96010
+ this.className = 'bots.CreateBot';
96011
+ this.constructorId = 0xe5b17f2b;
96012
+ this.subclassOfId = 0x2da17977;
96013
+ this._slots = ['viaDeeplink', 'name', 'username', 'managerId'];
96014
+ this.viaDeeplink = params.viaDeeplink;
96015
+ this.name = params.name;
96016
+ this.username = params.username;
96017
+ this.managerId = params.managerId;
96018
+ }
96019
+ static async read(_data, ..._args) {
96020
+ let flags = await index_js_1.Primitive.Int.read(_data);
96021
+ let viaDeeplink = flags & (1 << 0) ? true : false;
96022
+ let name = await index_js_1.Primitive.String.read(_data);
96023
+ let username = await index_js_1.Primitive.String.read(_data);
96024
+ let managerId = await index_js_1.TLObject.read(_data);
96025
+ return new Raw.bots.CreateBot({
96026
+ viaDeeplink: viaDeeplink,
96027
+ name: name,
96028
+ username: username,
96029
+ managerId: managerId,
96030
+ });
96031
+ }
96032
+ write() {
96033
+ const b = new deps_js_1.BytesIO();
96034
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
96035
+ let flags = 0;
96036
+ flags |= this.viaDeeplink ? 1 << 0 : 0;
96037
+ b.write(index_js_1.Primitive.Int.write(flags));
96038
+ if (this.name !== undefined) {
96039
+ b.write(index_js_1.Primitive.String.write(this.name));
96040
+ }
96041
+ if (this.username !== undefined) {
96042
+ b.write(index_js_1.Primitive.String.write(this.username));
96043
+ }
96044
+ if (this.managerId !== undefined) {
96045
+ b.write(this.managerId.write());
96046
+ }
96047
+ return deps_js_1.Buffer.from(b.buffer);
96048
+ }
96049
+ }
96050
+ bots.CreateBot = CreateBot;
96051
+ class ExportBotToken extends index_js_1.TLObject {
96052
+ __response__;
96053
+ bot;
96054
+ revoke;
96055
+ constructor(params) {
96056
+ super();
96057
+ this.classType = 'functions';
96058
+ this.className = 'bots.ExportBotToken';
96059
+ this.constructorId = 0xbd0d99eb;
96060
+ this.subclassOfId = 0x78496c77;
96061
+ this._slots = ['bot', 'revoke'];
96062
+ this.bot = params.bot;
96063
+ this.revoke = params.revoke;
96064
+ }
96065
+ static async read(_data, ..._args) {
96066
+ let bot = await index_js_1.TLObject.read(_data);
96067
+ let revoke = await index_js_1.Primitive.Bool.read(_data);
96068
+ return new Raw.bots.ExportBotToken({ bot: bot, revoke: revoke });
96069
+ }
96070
+ write() {
96071
+ const b = new deps_js_1.BytesIO();
96072
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
96073
+ if (this.bot !== undefined) {
96074
+ b.write(this.bot.write());
96075
+ }
96076
+ if (this.revoke !== undefined) {
96077
+ b.write(index_js_1.Primitive.Bool.write(this.revoke));
96078
+ }
96079
+ return deps_js_1.Buffer.from(b.buffer);
96080
+ }
96081
+ }
96082
+ bots.ExportBotToken = ExportBotToken;
96083
+ class RequestWebViewButton extends index_js_1.TLObject {
96084
+ __response__;
96085
+ userId;
96086
+ button;
96087
+ constructor(params) {
96088
+ super();
96089
+ this.classType = 'functions';
96090
+ this.className = 'bots.RequestWebViewButton';
96091
+ this.constructorId = 0x31a2a35e;
96092
+ this.subclassOfId = 0xf9df53a;
96093
+ this._slots = ['userId', 'button'];
96094
+ this.userId = params.userId;
96095
+ this.button = params.button;
96096
+ }
96097
+ static async read(_data, ..._args) {
96098
+ let userId = await index_js_1.TLObject.read(_data);
96099
+ let button = await index_js_1.TLObject.read(_data);
96100
+ return new Raw.bots.RequestWebViewButton({ userId: userId, button: button });
96101
+ }
96102
+ write() {
96103
+ const b = new deps_js_1.BytesIO();
96104
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
96105
+ if (this.userId !== undefined) {
96106
+ b.write(this.userId.write());
96107
+ }
96108
+ if (this.button !== undefined) {
96109
+ b.write(this.button.write());
96110
+ }
96111
+ return deps_js_1.Buffer.from(b.buffer);
96112
+ }
96113
+ }
96114
+ bots.RequestWebViewButton = RequestWebViewButton;
96115
+ class GetRequestedWebViewButton extends index_js_1.TLObject {
96116
+ __response__;
96117
+ bot;
96118
+ webappReqId;
96119
+ constructor(params) {
96120
+ super();
96121
+ this.classType = 'functions';
96122
+ this.className = 'bots.GetRequestedWebViewButton';
96123
+ this.constructorId = 0xbf25b7f3;
96124
+ this.subclassOfId = 0xbad74a3;
96125
+ this._slots = ['bot', 'webappReqId'];
96126
+ this.bot = params.bot;
96127
+ this.webappReqId = params.webappReqId;
96128
+ }
96129
+ static async read(_data, ..._args) {
96130
+ let bot = await index_js_1.TLObject.read(_data);
96131
+ let webappReqId = await index_js_1.Primitive.String.read(_data);
96132
+ return new Raw.bots.GetRequestedWebViewButton({ bot: bot, webappReqId: webappReqId });
96133
+ }
96134
+ write() {
96135
+ const b = new deps_js_1.BytesIO();
96136
+ b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
96137
+ if (this.bot !== undefined) {
96138
+ b.write(this.bot.write());
96139
+ }
96140
+ if (this.webappReqId !== undefined) {
96141
+ b.write(index_js_1.Primitive.String.write(this.webappReqId));
96142
+ }
96143
+ return deps_js_1.Buffer.from(b.buffer);
96144
+ }
96145
+ }
96146
+ bots.GetRequestedWebViewButton = GetRequestedWebViewButton;
94854
96147
  })(bots = Raw.bots || (Raw.bots = {}));
94855
96148
  let stories;
94856
96149
  (function (stories_1) {
@@ -95409,11 +96702,12 @@ var Raw;
95409
96702
  fwdFromId;
95410
96703
  fwdFromStory;
95411
96704
  albums;
96705
+ music;
95412
96706
  constructor(params) {
95413
96707
  super();
95414
96708
  this.classType = 'functions';
95415
96709
  this.className = 'stories.SendStory';
95416
- this.constructorId = 0x737fc2ec;
96710
+ this.constructorId = 0x8f9e6898;
95417
96711
  this.subclassOfId = 0x8af52aac;
95418
96712
  this._slots = [
95419
96713
  'pinned',
@@ -95430,6 +96724,7 @@ var Raw;
95430
96724
  'fwdFromId',
95431
96725
  'fwdFromStory',
95432
96726
  'albums',
96727
+ 'music',
95433
96728
  ];
95434
96729
  this.pinned = params.pinned;
95435
96730
  this.noforwards = params.noforwards;
@@ -95445,6 +96740,7 @@ var Raw;
95445
96740
  this.fwdFromId = params.fwdFromId;
95446
96741
  this.fwdFromStory = params.fwdFromStory;
95447
96742
  this.albums = params.albums;
96743
+ this.music = params.music;
95448
96744
  }
95449
96745
  static async read(_data, ..._args) {
95450
96746
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -95462,6 +96758,7 @@ var Raw;
95462
96758
  let fwdFromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
95463
96759
  let fwdFromStory = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
95464
96760
  let albums = flags & (1 << 8) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
96761
+ let music = flags & (1 << 9) ? await index_js_1.TLObject.read(_data) : undefined;
95465
96762
  return new Raw.stories.SendStory({
95466
96763
  pinned: pinned,
95467
96764
  noforwards: noforwards,
@@ -95477,6 +96774,7 @@ var Raw;
95477
96774
  fwdFromId: fwdFromId,
95478
96775
  fwdFromStory: fwdFromStory,
95479
96776
  albums: albums,
96777
+ music: music,
95480
96778
  });
95481
96779
  }
95482
96780
  write() {
@@ -95493,6 +96791,7 @@ var Raw;
95493
96791
  flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
95494
96792
  flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
95495
96793
  flags |= this.albums ? 1 << 8 : 0;
96794
+ flags |= this.music !== undefined ? 1 << 9 : 0;
95496
96795
  b.write(index_js_1.Primitive.Int.write(flags));
95497
96796
  if (this.peer !== undefined) {
95498
96797
  b.write(this.peer.write());
@@ -95527,6 +96826,9 @@ var Raw;
95527
96826
  if (this.albums) {
95528
96827
  b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
95529
96828
  }
96829
+ if (this.music !== undefined) {
96830
+ b.write(this.music.write());
96831
+ }
95530
96832
  return deps_js_1.Buffer.from(b.buffer);
95531
96833
  }
95532
96834
  }
@@ -95540,13 +96842,23 @@ var Raw;
95540
96842
  caption;
95541
96843
  entities;
95542
96844
  privacyRules;
96845
+ music;
95543
96846
  constructor(params) {
95544
96847
  super();
95545
96848
  this.classType = 'functions';
95546
96849
  this.className = 'stories.EditStory';
95547
- this.constructorId = 0xb583ba46;
96850
+ this.constructorId = 0x2c63a72b;
95548
96851
  this.subclassOfId = 0x8af52aac;
95549
- this._slots = ['peer', 'id', 'media', 'mediaAreas', 'caption', 'entities', 'privacyRules'];
96852
+ this._slots = [
96853
+ 'peer',
96854
+ 'id',
96855
+ 'media',
96856
+ 'mediaAreas',
96857
+ 'caption',
96858
+ 'entities',
96859
+ 'privacyRules',
96860
+ 'music',
96861
+ ];
95550
96862
  this.peer = params.peer;
95551
96863
  this.id = params.id;
95552
96864
  this.media = params.media;
@@ -95554,6 +96866,7 @@ var Raw;
95554
96866
  this.caption = params.caption;
95555
96867
  this.entities = params.entities;
95556
96868
  this.privacyRules = params.privacyRules;
96869
+ this.music = params.music;
95557
96870
  }
95558
96871
  static async read(_data, ..._args) {
95559
96872
  let flags = await index_js_1.Primitive.Int.read(_data);
@@ -95564,6 +96877,7 @@ var Raw;
95564
96877
  let caption = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
95565
96878
  let entities = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
95566
96879
  let privacyRules = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
96880
+ let music = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
95567
96881
  return new Raw.stories.EditStory({
95568
96882
  peer: peer,
95569
96883
  id: id,
@@ -95572,6 +96886,7 @@ var Raw;
95572
96886
  caption: caption,
95573
96887
  entities: entities,
95574
96888
  privacyRules: privacyRules,
96889
+ music: music,
95575
96890
  });
95576
96891
  }
95577
96892
  write() {
@@ -95583,6 +96898,7 @@ var Raw;
95583
96898
  flags |= this.caption !== undefined ? 1 << 1 : 0;
95584
96899
  flags |= this.entities ? 1 << 1 : 0;
95585
96900
  flags |= this.privacyRules ? 1 << 2 : 0;
96901
+ flags |= this.music !== undefined ? 1 << 4 : 0;
95586
96902
  b.write(index_js_1.Primitive.Int.write(flags));
95587
96903
  if (this.peer !== undefined) {
95588
96904
  b.write(this.peer.write());
@@ -95605,6 +96921,9 @@ var Raw;
95605
96921
  if (this.privacyRules) {
95606
96922
  b.write(index_js_1.Primitive.Vector.write(this.privacyRules));
95607
96923
  }
96924
+ if (this.music !== undefined) {
96925
+ b.write(this.music.write());
96926
+ }
95608
96927
  return deps_js_1.Buffer.from(b.buffer);
95609
96928
  }
95610
96929
  }