@tgsnake/skema 3.1.0-browser.0 → 3.1.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.
Files changed (65) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2739 -2739
  5. package/dist/src/raw/class/Raw.d.ts +7516 -7516
  6. package/dist/src/raw/class/Raw.js +20426 -26448
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +231 -231
  14. package/dist/src/raw/class/tl/bots.js +504 -524
  15. package/dist/src/raw/class/tl/channels.d.ts +331 -331
  16. package/dist/src/raw/class/tl/channels.js +732 -823
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  26. package/dist/src/raw/class/tl/folders.js +11 -11
  27. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  28. package/dist/src/raw/class/tl/fragment.js +25 -32
  29. package/dist/src/raw/class/tl/help.d.ts +286 -286
  30. package/dist/src/raw/class/tl/help.js +618 -686
  31. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  32. package/dist/src/raw/class/tl/langpack.js +57 -57
  33. package/dist/src/raw/class/tl/messages.d.ts +1851 -1851
  34. package/dist/src/raw/class/tl/messages.js +4854 -5924
  35. package/dist/src/raw/class/tl/payments.d.ts +641 -641
  36. package/dist/src/raw/class/tl/payments.js +1734 -2198
  37. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  38. package/dist/src/raw/class/tl/phone.js +644 -779
  39. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  40. package/dist/src/raw/class/tl/photos.js +116 -139
  41. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  42. package/dist/src/raw/class/tl/premium.js +111 -133
  43. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  44. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  45. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  46. package/dist/src/raw/class/tl/stats.js +169 -268
  47. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  48. package/dist/src/raw/class/tl/stickers.js +144 -173
  49. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  50. package/dist/src/raw/class/tl/storage.js +71 -71
  51. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  52. package/dist/src/raw/class/tl/stories.js +622 -781
  53. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  54. package/dist/src/raw/class/tl/toncenter.js +47 -52
  55. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  56. package/dist/src/raw/class/tl/updates.js +175 -246
  57. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  58. package/dist/src/raw/class/tl/upload.js +155 -178
  59. package/dist/src/raw/class/tl/users.d.ts +61 -61
  60. package/dist/src/raw/class/tl/users.js +124 -124
  61. package/dist/src/raw/class/tl/wallet.d.ts +206 -206
  62. package/dist/src/raw/class/tl/wallet.js +525 -591
  63. package/dist/src/raw/class/types.d.ts +1 -1
  64. package/dist/src/raw/class/types.js +1 -1
  65. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -35,34 +35,11 @@ export class BroadcastStats extends TLObject {
35
35
  recentPostsInteractions;
36
36
  constructor(params) {
37
37
  super();
38
- this.classType = 'types';
39
- this.className = 'stats.BroadcastStats';
38
+ this.classType = "types";
39
+ this.className = "stats.BroadcastStats";
40
40
  this.constructorId = 0x396ca5fc;
41
41
  this.subclassOfId = 0x7ff25428;
42
- this._slots = [
43
- 'period',
44
- 'followers',
45
- 'viewsPerPost',
46
- 'sharesPerPost',
47
- 'reactionsPerPost',
48
- 'viewsPerStory',
49
- 'sharesPerStory',
50
- 'reactionsPerStory',
51
- 'enabledNotifications',
52
- 'growthGraph',
53
- 'followersGraph',
54
- 'muteGraph',
55
- 'topHoursGraph',
56
- 'interactionsGraph',
57
- 'ivInteractionsGraph',
58
- 'viewsBySourceGraph',
59
- 'newFollowersBySourceGraph',
60
- 'languagesGraph',
61
- 'reactionsByEmotionGraph',
62
- 'storyInteractionsGraph',
63
- 'storyReactionsByEmotionGraph',
64
- 'recentPostsInteractions',
65
- ];
42
+ this._slots = ["period", "followers", "viewsPerPost", "sharesPerPost", "reactionsPerPost", "viewsPerStory", "sharesPerStory", "reactionsPerStory", "enabledNotifications", "growthGraph", "followersGraph", "muteGraph", "topHoursGraph", "interactionsGraph", "ivInteractionsGraph", "viewsBySourceGraph", "newFollowersBySourceGraph", "languagesGraph", "reactionsByEmotionGraph", "storyInteractionsGraph", "storyReactionsByEmotionGraph", "recentPostsInteractions"];
66
43
  this.period = params.period;
67
44
  this.followers = params.followers;
68
45
  this.viewsPerPost = params.viewsPerPost;
@@ -87,9 +64,9 @@ export class BroadcastStats extends TLObject {
87
64
  this.recentPostsInteractions = params.recentPostsInteractions;
88
65
  }
89
66
  /**
90
- * Generate the TLObject from buffer.
91
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
92
- */
67
+ * Generate the TLObject from buffer.
68
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
69
+ */
93
70
  static async read(_data, ..._args) {
94
71
  // no flags
95
72
  let period = await TLObject.read(_data);
@@ -114,34 +91,11 @@ export class BroadcastStats extends TLObject {
114
91
  let storyInteractionsGraph = await TLObject.read(_data);
115
92
  let storyReactionsByEmotionGraph = await TLObject.read(_data);
116
93
  let recentPostsInteractions = await TLObject.read(_data);
117
- return new BroadcastStats({
118
- period: period,
119
- followers: followers,
120
- viewsPerPost: viewsPerPost,
121
- sharesPerPost: sharesPerPost,
122
- reactionsPerPost: reactionsPerPost,
123
- viewsPerStory: viewsPerStory,
124
- sharesPerStory: sharesPerStory,
125
- reactionsPerStory: reactionsPerStory,
126
- enabledNotifications: enabledNotifications,
127
- growthGraph: growthGraph,
128
- followersGraph: followersGraph,
129
- muteGraph: muteGraph,
130
- topHoursGraph: topHoursGraph,
131
- interactionsGraph: interactionsGraph,
132
- ivInteractionsGraph: ivInteractionsGraph,
133
- viewsBySourceGraph: viewsBySourceGraph,
134
- newFollowersBySourceGraph: newFollowersBySourceGraph,
135
- languagesGraph: languagesGraph,
136
- reactionsByEmotionGraph: reactionsByEmotionGraph,
137
- storyInteractionsGraph: storyInteractionsGraph,
138
- storyReactionsByEmotionGraph: storyReactionsByEmotionGraph,
139
- recentPostsInteractions: recentPostsInteractions,
140
- });
94
+ return new BroadcastStats({ "period": period, "followers": followers, "viewsPerPost": viewsPerPost, "sharesPerPost": sharesPerPost, "reactionsPerPost": reactionsPerPost, "viewsPerStory": viewsPerStory, "sharesPerStory": sharesPerStory, "reactionsPerStory": reactionsPerStory, "enabledNotifications": enabledNotifications, "growthGraph": growthGraph, "followersGraph": followersGraph, "muteGraph": muteGraph, "topHoursGraph": topHoursGraph, "interactionsGraph": interactionsGraph, "ivInteractionsGraph": ivInteractionsGraph, "viewsBySourceGraph": viewsBySourceGraph, "newFollowersBySourceGraph": newFollowersBySourceGraph, "languagesGraph": languagesGraph, "reactionsByEmotionGraph": reactionsByEmotionGraph, "storyInteractionsGraph": storyInteractionsGraph, "storyReactionsByEmotionGraph": storyReactionsByEmotionGraph, "recentPostsInteractions": recentPostsInteractions });
141
95
  }
142
96
  /**
143
- * Generate buffer from TLObject.
144
- */
97
+ * Generate buffer from TLObject.
98
+ */
145
99
  write() {
146
100
  const b = new BytesIO();
147
101
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -210,7 +164,7 @@ export class BroadcastStats extends TLObject {
210
164
  b.write(this.storyReactionsByEmotionGraph.write());
211
165
  }
212
166
  if (this.recentPostsInteractions) {
213
- b.write(Primitive.Vector.write(this.recentPostsInteractions));
167
+ b.write((Primitive.Vector.write(this.recentPostsInteractions)));
214
168
  }
215
169
  return b.buffer;
216
170
  }
@@ -235,29 +189,11 @@ export class MegagroupStats extends TLObject {
235
189
  users;
236
190
  constructor(params) {
237
191
  super();
238
- this.classType = 'types';
239
- this.className = 'stats.MegagroupStats';
192
+ this.classType = "types";
193
+ this.className = "stats.MegagroupStats";
240
194
  this.constructorId = 0xef7ff916;
241
195
  this.subclassOfId = 0x5b59be8d;
242
- this._slots = [
243
- 'period',
244
- 'members',
245
- 'messages',
246
- 'viewers',
247
- 'posters',
248
- 'growthGraph',
249
- 'membersGraph',
250
- 'newMembersBySourceGraph',
251
- 'languagesGraph',
252
- 'messagesGraph',
253
- 'actionsGraph',
254
- 'topHoursGraph',
255
- 'weekdaysGraph',
256
- 'topPosters',
257
- 'topAdmins',
258
- 'topInviters',
259
- 'users',
260
- ];
196
+ this._slots = ["period", "members", "messages", "viewers", "posters", "growthGraph", "membersGraph", "newMembersBySourceGraph", "languagesGraph", "messagesGraph", "actionsGraph", "topHoursGraph", "weekdaysGraph", "topPosters", "topAdmins", "topInviters", "users"];
261
197
  this.period = params.period;
262
198
  this.members = params.members;
263
199
  this.messages = params.messages;
@@ -277,9 +213,9 @@ export class MegagroupStats extends TLObject {
277
213
  this.users = params.users;
278
214
  }
279
215
  /**
280
- * Generate the TLObject from buffer.
281
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
282
- */
216
+ * Generate the TLObject from buffer.
217
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
218
+ */
283
219
  static async read(_data, ..._args) {
284
220
  // no flags
285
221
  let period = await TLObject.read(_data);
@@ -299,29 +235,11 @@ export class MegagroupStats extends TLObject {
299
235
  let topAdmins = await TLObject.read(_data);
300
236
  let topInviters = await TLObject.read(_data);
301
237
  let users = await TLObject.read(_data);
302
- return new MegagroupStats({
303
- period: period,
304
- members: members,
305
- messages: messages,
306
- viewers: viewers,
307
- posters: posters,
308
- growthGraph: growthGraph,
309
- membersGraph: membersGraph,
310
- newMembersBySourceGraph: newMembersBySourceGraph,
311
- languagesGraph: languagesGraph,
312
- messagesGraph: messagesGraph,
313
- actionsGraph: actionsGraph,
314
- topHoursGraph: topHoursGraph,
315
- weekdaysGraph: weekdaysGraph,
316
- topPosters: topPosters,
317
- topAdmins: topAdmins,
318
- topInviters: topInviters,
319
- users: users,
320
- });
238
+ return new MegagroupStats({ "period": period, "members": members, "messages": messages, "viewers": viewers, "posters": posters, "growthGraph": growthGraph, "membersGraph": membersGraph, "newMembersBySourceGraph": newMembersBySourceGraph, "languagesGraph": languagesGraph, "messagesGraph": messagesGraph, "actionsGraph": actionsGraph, "topHoursGraph": topHoursGraph, "weekdaysGraph": weekdaysGraph, "topPosters": topPosters, "topAdmins": topAdmins, "topInviters": topInviters, "users": users });
321
239
  }
322
240
  /**
323
- * Generate buffer from TLObject.
324
- */
241
+ * Generate buffer from TLObject.
242
+ */
325
243
  write() {
326
244
  const b = new BytesIO();
327
245
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -366,16 +284,16 @@ export class MegagroupStats extends TLObject {
366
284
  b.write(this.weekdaysGraph.write());
367
285
  }
368
286
  if (this.topPosters) {
369
- b.write(Primitive.Vector.write(this.topPosters));
287
+ b.write((Primitive.Vector.write(this.topPosters)));
370
288
  }
371
289
  if (this.topAdmins) {
372
- b.write(Primitive.Vector.write(this.topAdmins));
290
+ b.write((Primitive.Vector.write(this.topAdmins)));
373
291
  }
374
292
  if (this.topInviters) {
375
- b.write(Primitive.Vector.write(this.topInviters));
293
+ b.write((Primitive.Vector.write(this.topInviters)));
376
294
  }
377
295
  if (this.users) {
378
- b.write(Primitive.Vector.write(this.users));
296
+ b.write((Primitive.Vector.write(this.users)));
379
297
  }
380
298
  return b.buffer;
381
299
  }
@@ -385,30 +303,27 @@ export class MessageStats extends TLObject {
385
303
  reactionsByEmotionGraph;
386
304
  constructor(params) {
387
305
  super();
388
- this.classType = 'types';
389
- this.className = 'stats.MessageStats';
306
+ this.classType = "types";
307
+ this.className = "stats.MessageStats";
390
308
  this.constructorId = 0x7fe91c14;
391
309
  this.subclassOfId = 0x9604a322;
392
- this._slots = ['viewsGraph', 'reactionsByEmotionGraph'];
310
+ this._slots = ["viewsGraph", "reactionsByEmotionGraph"];
393
311
  this.viewsGraph = params.viewsGraph;
394
312
  this.reactionsByEmotionGraph = params.reactionsByEmotionGraph;
395
313
  }
396
314
  /**
397
- * Generate the TLObject from buffer.
398
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
399
- */
315
+ * Generate the TLObject from buffer.
316
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
317
+ */
400
318
  static async read(_data, ..._args) {
401
319
  // no flags
402
320
  let viewsGraph = await TLObject.read(_data);
403
321
  let reactionsByEmotionGraph = await TLObject.read(_data);
404
- return new MessageStats({
405
- viewsGraph: viewsGraph,
406
- reactionsByEmotionGraph: reactionsByEmotionGraph,
407
- });
322
+ return new MessageStats({ "viewsGraph": viewsGraph, "reactionsByEmotionGraph": reactionsByEmotionGraph });
408
323
  }
409
324
  /**
410
- * Generate buffer from TLObject.
411
- */
325
+ * Generate buffer from TLObject.
326
+ */
412
327
  write() {
413
328
  const b = new BytesIO();
414
329
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -427,30 +342,27 @@ export class StoryStats extends TLObject {
427
342
  reactionsByEmotionGraph;
428
343
  constructor(params) {
429
344
  super();
430
- this.classType = 'types';
431
- this.className = 'stats.StoryStats';
345
+ this.classType = "types";
346
+ this.className = "stats.StoryStats";
432
347
  this.constructorId = 0x50cd067c;
433
348
  this.subclassOfId = 0x8b4d43d4;
434
- this._slots = ['viewsGraph', 'reactionsByEmotionGraph'];
349
+ this._slots = ["viewsGraph", "reactionsByEmotionGraph"];
435
350
  this.viewsGraph = params.viewsGraph;
436
351
  this.reactionsByEmotionGraph = params.reactionsByEmotionGraph;
437
352
  }
438
353
  /**
439
- * Generate the TLObject from buffer.
440
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
441
- */
354
+ * Generate the TLObject from buffer.
355
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
356
+ */
442
357
  static async read(_data, ..._args) {
443
358
  // no flags
444
359
  let viewsGraph = await TLObject.read(_data);
445
360
  let reactionsByEmotionGraph = await TLObject.read(_data);
446
- return new StoryStats({
447
- viewsGraph: viewsGraph,
448
- reactionsByEmotionGraph: reactionsByEmotionGraph,
449
- });
361
+ return new StoryStats({ "viewsGraph": viewsGraph, "reactionsByEmotionGraph": reactionsByEmotionGraph });
450
362
  }
451
363
  /**
452
- * Generate buffer from TLObject.
453
- */
364
+ * Generate buffer from TLObject.
365
+ */
454
366
  write() {
455
367
  const b = new BytesIO();
456
368
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -472,11 +384,11 @@ export class PublicForwards extends TLObject {
472
384
  users;
473
385
  constructor(params) {
474
386
  super();
475
- this.classType = 'types';
476
- this.className = 'stats.PublicForwards';
387
+ this.classType = "types";
388
+ this.className = "stats.PublicForwards";
477
389
  this.constructorId = 0x93037e20;
478
390
  this.subclassOfId = 0xa7283211;
479
- this._slots = ['count', 'forwards', 'nextOffset', 'chats', 'users'];
391
+ this._slots = ["count", "forwards", "nextOffset", "chats", "users"];
480
392
  this.count = params.count;
481
393
  this.forwards = params.forwards;
482
394
  this.nextOffset = params.nextOffset;
@@ -484,49 +396,43 @@ export class PublicForwards extends TLObject {
484
396
  this.users = params.users;
485
397
  }
486
398
  /**
487
- * Generate the TLObject from buffer.
488
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
489
- */
399
+ * Generate the TLObject from buffer.
400
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
401
+ */
490
402
  static async read(_data, ..._args) {
491
403
  // @ts-ignore
492
404
  let flags = await Primitive.Int.read(_data);
493
405
  let count = await Primitive.Int.read(_data);
494
406
  let forwards = await TLObject.read(_data);
495
- let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
407
+ let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
496
408
  let chats = await TLObject.read(_data);
497
409
  let users = await TLObject.read(_data);
498
- return new PublicForwards({
499
- count: count,
500
- forwards: forwards,
501
- nextOffset: nextOffset,
502
- chats: chats,
503
- users: users,
504
- });
410
+ return new PublicForwards({ "count": count, "forwards": forwards, "nextOffset": nextOffset, "chats": chats, "users": users });
505
411
  }
506
412
  /**
507
- * Generate buffer from TLObject.
508
- */
413
+ * Generate buffer from TLObject.
414
+ */
509
415
  write() {
510
416
  const b = new BytesIO();
511
417
  b.write(Primitive.Int.write(this.constructorId, false));
512
418
  // @ts-ignore
513
419
  let flags = 0;
514
- flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
515
- b.write(Primitive.Int.write(flags));
420
+ flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
421
+ b.write((Primitive.Int.write(flags)));
516
422
  if (this.count !== undefined) {
517
- b.write(Primitive.Int.write(this.count));
423
+ b.write((Primitive.Int.write(this.count)));
518
424
  }
519
425
  if (this.forwards) {
520
- b.write(Primitive.Vector.write(this.forwards));
426
+ b.write((Primitive.Vector.write(this.forwards)));
521
427
  }
522
428
  if (this.nextOffset !== undefined) {
523
- b.write(Primitive.String.write(this.nextOffset));
429
+ b.write((Primitive.String.write(this.nextOffset)));
524
430
  }
525
431
  if (this.chats) {
526
- b.write(Primitive.Vector.write(this.chats));
432
+ b.write((Primitive.Vector.write(this.chats)));
527
433
  }
528
434
  if (this.users) {
529
- b.write(Primitive.Vector.write(this.users));
435
+ b.write((Primitive.Vector.write(this.users)));
530
436
  }
531
437
  return b.buffer;
532
438
  }
@@ -535,25 +441,25 @@ export class PollStats extends TLObject {
535
441
  votesGraph;
536
442
  constructor(params) {
537
443
  super();
538
- this.classType = 'types';
539
- this.className = 'stats.PollStats';
444
+ this.classType = "types";
445
+ this.className = "stats.PollStats";
540
446
  this.constructorId = 0x2999beed;
541
447
  this.subclassOfId = 0xe95194cf;
542
- this._slots = ['votesGraph'];
448
+ this._slots = ["votesGraph"];
543
449
  this.votesGraph = params.votesGraph;
544
450
  }
545
451
  /**
546
- * Generate the TLObject from buffer.
547
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
548
- */
452
+ * Generate the TLObject from buffer.
453
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
454
+ */
549
455
  static async read(_data, ..._args) {
550
456
  // no flags
551
457
  let votesGraph = await TLObject.read(_data);
552
- return new PollStats({ votesGraph: votesGraph });
458
+ return new PollStats({ "votesGraph": votesGraph });
553
459
  }
554
460
  /**
555
- * Generate buffer from TLObject.
556
- */
461
+ * Generate buffer from TLObject.
462
+ */
557
463
  write() {
558
464
  const b = new BytesIO();
559
465
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -570,35 +476,35 @@ export class GetBroadcastStats extends TLObject {
570
476
  channel;
571
477
  constructor(params) {
572
478
  super();
573
- this.classType = 'functions';
574
- this.className = 'stats.GetBroadcastStats';
479
+ this.classType = "functions";
480
+ this.className = "stats.GetBroadcastStats";
575
481
  this.constructorId = 0xab42441a;
576
482
  this.subclassOfId = 0x7ff25428;
577
- this._slots = ['dark', 'channel'];
483
+ this._slots = ["dark", "channel"];
578
484
  this.dark = params.dark;
579
485
  this.channel = params.channel;
580
486
  }
581
487
  /**
582
- * Generate the TLObject from buffer.
583
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
584
- */
488
+ * Generate the TLObject from buffer.
489
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
490
+ */
585
491
  static async read(_data, ..._args) {
586
492
  // @ts-ignore
587
493
  let flags = await Primitive.Int.read(_data);
588
- let dark = flags & (1 << 0) ? true : false;
494
+ let dark = (flags & (1 << 0)) ? true : false;
589
495
  let channel = await TLObject.read(_data);
590
- return new GetBroadcastStats({ dark: dark, channel: channel });
496
+ return new GetBroadcastStats({ "dark": dark, "channel": channel });
591
497
  }
592
498
  /**
593
- * Generate buffer from TLObject.
594
- */
499
+ * Generate buffer from TLObject.
500
+ */
595
501
  write() {
596
502
  const b = new BytesIO();
597
503
  b.write(Primitive.Int.write(this.constructorId, false));
598
504
  // @ts-ignore
599
505
  let flags = 0;
600
- flags |= this.dark ? 1 << 0 : 0;
601
- b.write(Primitive.Int.write(flags));
506
+ flags |= this.dark ? (1 << 0) : 0;
507
+ b.write((Primitive.Int.write(flags)));
602
508
  if (this.channel !== undefined) {
603
509
  b.write(this.channel.write());
604
510
  }
@@ -611,40 +517,40 @@ export class LoadAsyncGraph extends TLObject {
611
517
  x;
612
518
  constructor(params) {
613
519
  super();
614
- this.classType = 'functions';
615
- this.className = 'stats.LoadAsyncGraph';
520
+ this.classType = "functions";
521
+ this.className = "stats.LoadAsyncGraph";
616
522
  this.constructorId = 0x621d5fa0;
617
523
  this.subclassOfId = 0x9b903153;
618
- this._slots = ['token', 'x'];
524
+ this._slots = ["token", "x"];
619
525
  this.token = params.token;
620
526
  this.x = params.x;
621
527
  }
622
528
  /**
623
- * Generate the TLObject from buffer.
624
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
625
- */
529
+ * Generate the TLObject from buffer.
530
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
531
+ */
626
532
  static async read(_data, ..._args) {
627
533
  // @ts-ignore
628
534
  let flags = await Primitive.Int.read(_data);
629
535
  let token = await Primitive.String.read(_data);
630
- let x = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
631
- return new LoadAsyncGraph({ token: token, x: x });
536
+ let x = (flags & (1 << 0)) ? await Primitive.Long.read(_data) : undefined;
537
+ return new LoadAsyncGraph({ "token": token, "x": x });
632
538
  }
633
539
  /**
634
- * Generate buffer from TLObject.
635
- */
540
+ * Generate buffer from TLObject.
541
+ */
636
542
  write() {
637
543
  const b = new BytesIO();
638
544
  b.write(Primitive.Int.write(this.constructorId, false));
639
545
  // @ts-ignore
640
546
  let flags = 0;
641
- flags |= this.x !== undefined ? 1 << 0 : 0;
642
- b.write(Primitive.Int.write(flags));
547
+ flags |= this.x !== undefined ? (1 << 0) : 0;
548
+ b.write((Primitive.Int.write(flags)));
643
549
  if (this.token !== undefined) {
644
- b.write(Primitive.String.write(this.token));
550
+ b.write((Primitive.String.write(this.token)));
645
551
  }
646
552
  if (this.x !== undefined) {
647
- b.write(Primitive.Long.write(this.x));
553
+ b.write((Primitive.Long.write(this.x)));
648
554
  }
649
555
  return b.buffer;
650
556
  }
@@ -655,35 +561,35 @@ export class GetMegagroupStats extends TLObject {
655
561
  channel;
656
562
  constructor(params) {
657
563
  super();
658
- this.classType = 'functions';
659
- this.className = 'stats.GetMegagroupStats';
564
+ this.classType = "functions";
565
+ this.className = "stats.GetMegagroupStats";
660
566
  this.constructorId = 0xdcdf8607;
661
567
  this.subclassOfId = 0x5b59be8d;
662
- this._slots = ['dark', 'channel'];
568
+ this._slots = ["dark", "channel"];
663
569
  this.dark = params.dark;
664
570
  this.channel = params.channel;
665
571
  }
666
572
  /**
667
- * Generate the TLObject from buffer.
668
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
669
- */
573
+ * Generate the TLObject from buffer.
574
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
575
+ */
670
576
  static async read(_data, ..._args) {
671
577
  // @ts-ignore
672
578
  let flags = await Primitive.Int.read(_data);
673
- let dark = flags & (1 << 0) ? true : false;
579
+ let dark = (flags & (1 << 0)) ? true : false;
674
580
  let channel = await TLObject.read(_data);
675
- return new GetMegagroupStats({ dark: dark, channel: channel });
581
+ return new GetMegagroupStats({ "dark": dark, "channel": channel });
676
582
  }
677
583
  /**
678
- * Generate buffer from TLObject.
679
- */
584
+ * Generate buffer from TLObject.
585
+ */
680
586
  write() {
681
587
  const b = new BytesIO();
682
588
  b.write(Primitive.Int.write(this.constructorId, false));
683
589
  // @ts-ignore
684
590
  let flags = 0;
685
- flags |= this.dark ? 1 << 0 : 0;
686
- b.write(Primitive.Int.write(flags));
591
+ flags |= this.dark ? (1 << 0) : 0;
592
+ b.write((Primitive.Int.write(flags)));
687
593
  if (this.channel !== undefined) {
688
594
  b.write(this.channel.write());
689
595
  }
@@ -698,36 +604,31 @@ export class GetMessagePublicForwards extends TLObject {
698
604
  limit;
699
605
  constructor(params) {
700
606
  super();
701
- this.classType = 'functions';
702
- this.className = 'stats.GetMessagePublicForwards';
607
+ this.classType = "functions";
608
+ this.className = "stats.GetMessagePublicForwards";
703
609
  this.constructorId = 0x5f150144;
704
610
  this.subclassOfId = 0xa7283211;
705
- this._slots = ['channel', 'msgId', 'offset', 'limit'];
611
+ this._slots = ["channel", "msgId", "offset", "limit"];
706
612
  this.channel = params.channel;
707
613
  this.msgId = params.msgId;
708
614
  this.offset = params.offset;
709
615
  this.limit = params.limit;
710
616
  }
711
617
  /**
712
- * Generate the TLObject from buffer.
713
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
714
- */
618
+ * Generate the TLObject from buffer.
619
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
620
+ */
715
621
  static async read(_data, ..._args) {
716
622
  // no flags
717
623
  let channel = await TLObject.read(_data);
718
624
  let msgId = await Primitive.Int.read(_data);
719
625
  let offset = await Primitive.String.read(_data);
720
626
  let limit = await Primitive.Int.read(_data);
721
- return new GetMessagePublicForwards({
722
- channel: channel,
723
- msgId: msgId,
724
- offset: offset,
725
- limit: limit,
726
- });
627
+ return new GetMessagePublicForwards({ "channel": channel, "msgId": msgId, "offset": offset, "limit": limit });
727
628
  }
728
629
  /**
729
- * Generate buffer from TLObject.
730
- */
630
+ * Generate buffer from TLObject.
631
+ */
731
632
  write() {
732
633
  const b = new BytesIO();
733
634
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -736,13 +637,13 @@ export class GetMessagePublicForwards extends TLObject {
736
637
  b.write(this.channel.write());
737
638
  }
738
639
  if (this.msgId !== undefined) {
739
- b.write(Primitive.Int.write(this.msgId));
640
+ b.write((Primitive.Int.write(this.msgId)));
740
641
  }
741
642
  if (this.offset !== undefined) {
742
- b.write(Primitive.String.write(this.offset));
643
+ b.write((Primitive.String.write(this.offset)));
743
644
  }
744
645
  if (this.limit !== undefined) {
745
- b.write(Primitive.Int.write(this.limit));
646
+ b.write((Primitive.Int.write(this.limit)));
746
647
  }
747
648
  return b.buffer;
748
649
  }
@@ -754,42 +655,42 @@ export class GetMessageStats extends TLObject {
754
655
  msgId;
755
656
  constructor(params) {
756
657
  super();
757
- this.classType = 'functions';
758
- this.className = 'stats.GetMessageStats';
658
+ this.classType = "functions";
659
+ this.className = "stats.GetMessageStats";
759
660
  this.constructorId = 0xb6e0a3f5;
760
661
  this.subclassOfId = 0x9604a322;
761
- this._slots = ['dark', 'channel', 'msgId'];
662
+ this._slots = ["dark", "channel", "msgId"];
762
663
  this.dark = params.dark;
763
664
  this.channel = params.channel;
764
665
  this.msgId = params.msgId;
765
666
  }
766
667
  /**
767
- * Generate the TLObject from buffer.
768
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
769
- */
668
+ * Generate the TLObject from buffer.
669
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
670
+ */
770
671
  static async read(_data, ..._args) {
771
672
  // @ts-ignore
772
673
  let flags = await Primitive.Int.read(_data);
773
- let dark = flags & (1 << 0) ? true : false;
674
+ let dark = (flags & (1 << 0)) ? true : false;
774
675
  let channel = await TLObject.read(_data);
775
676
  let msgId = await Primitive.Int.read(_data);
776
- return new GetMessageStats({ dark: dark, channel: channel, msgId: msgId });
677
+ return new GetMessageStats({ "dark": dark, "channel": channel, "msgId": msgId });
777
678
  }
778
679
  /**
779
- * Generate buffer from TLObject.
780
- */
680
+ * Generate buffer from TLObject.
681
+ */
781
682
  write() {
782
683
  const b = new BytesIO();
783
684
  b.write(Primitive.Int.write(this.constructorId, false));
784
685
  // @ts-ignore
785
686
  let flags = 0;
786
- flags |= this.dark ? 1 << 0 : 0;
787
- b.write(Primitive.Int.write(flags));
687
+ flags |= this.dark ? (1 << 0) : 0;
688
+ b.write((Primitive.Int.write(flags)));
788
689
  if (this.channel !== undefined) {
789
690
  b.write(this.channel.write());
790
691
  }
791
692
  if (this.msgId !== undefined) {
792
- b.write(Primitive.Int.write(this.msgId));
693
+ b.write((Primitive.Int.write(this.msgId)));
793
694
  }
794
695
  return b.buffer;
795
696
  }
@@ -801,42 +702,42 @@ export class GetStoryStats extends TLObject {
801
702
  id;
802
703
  constructor(params) {
803
704
  super();
804
- this.classType = 'functions';
805
- this.className = 'stats.GetStoryStats';
705
+ this.classType = "functions";
706
+ this.className = "stats.GetStoryStats";
806
707
  this.constructorId = 0x374fef40;
807
708
  this.subclassOfId = 0x8b4d43d4;
808
- this._slots = ['dark', 'peer', 'id'];
709
+ this._slots = ["dark", "peer", "id"];
809
710
  this.dark = params.dark;
810
711
  this.peer = params.peer;
811
712
  this.id = params.id;
812
713
  }
813
714
  /**
814
- * Generate the TLObject from buffer.
815
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
816
- */
715
+ * Generate the TLObject from buffer.
716
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
717
+ */
817
718
  static async read(_data, ..._args) {
818
719
  // @ts-ignore
819
720
  let flags = await Primitive.Int.read(_data);
820
- let dark = flags & (1 << 0) ? true : false;
721
+ let dark = (flags & (1 << 0)) ? true : false;
821
722
  let peer = await TLObject.read(_data);
822
723
  let id = await Primitive.Int.read(_data);
823
- return new GetStoryStats({ dark: dark, peer: peer, id: id });
724
+ return new GetStoryStats({ "dark": dark, "peer": peer, "id": id });
824
725
  }
825
726
  /**
826
- * Generate buffer from TLObject.
827
- */
727
+ * Generate buffer from TLObject.
728
+ */
828
729
  write() {
829
730
  const b = new BytesIO();
830
731
  b.write(Primitive.Int.write(this.constructorId, false));
831
732
  // @ts-ignore
832
733
  let flags = 0;
833
- flags |= this.dark ? 1 << 0 : 0;
834
- b.write(Primitive.Int.write(flags));
734
+ flags |= this.dark ? (1 << 0) : 0;
735
+ b.write((Primitive.Int.write(flags)));
835
736
  if (this.peer !== undefined) {
836
737
  b.write(this.peer.write());
837
738
  }
838
739
  if (this.id !== undefined) {
839
- b.write(Primitive.Int.write(this.id));
740
+ b.write((Primitive.Int.write(this.id)));
840
741
  }
841
742
  return b.buffer;
842
743
  }
@@ -849,31 +750,31 @@ export class GetStoryPublicForwards extends TLObject {
849
750
  limit;
850
751
  constructor(params) {
851
752
  super();
852
- this.classType = 'functions';
853
- this.className = 'stats.GetStoryPublicForwards';
753
+ this.classType = "functions";
754
+ this.className = "stats.GetStoryPublicForwards";
854
755
  this.constructorId = 0xa6437ef6;
855
756
  this.subclassOfId = 0xa7283211;
856
- this._slots = ['peer', 'id', 'offset', 'limit'];
757
+ this._slots = ["peer", "id", "offset", "limit"];
857
758
  this.peer = params.peer;
858
759
  this.id = params.id;
859
760
  this.offset = params.offset;
860
761
  this.limit = params.limit;
861
762
  }
862
763
  /**
863
- * Generate the TLObject from buffer.
864
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
865
- */
764
+ * Generate the TLObject from buffer.
765
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
766
+ */
866
767
  static async read(_data, ..._args) {
867
768
  // no flags
868
769
  let peer = await TLObject.read(_data);
869
770
  let id = await Primitive.Int.read(_data);
870
771
  let offset = await Primitive.String.read(_data);
871
772
  let limit = await Primitive.Int.read(_data);
872
- return new GetStoryPublicForwards({ peer: peer, id: id, offset: offset, limit: limit });
773
+ return new GetStoryPublicForwards({ "peer": peer, "id": id, "offset": offset, "limit": limit });
873
774
  }
874
775
  /**
875
- * Generate buffer from TLObject.
876
- */
776
+ * Generate buffer from TLObject.
777
+ */
877
778
  write() {
878
779
  const b = new BytesIO();
879
780
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -882,13 +783,13 @@ export class GetStoryPublicForwards extends TLObject {
882
783
  b.write(this.peer.write());
883
784
  }
884
785
  if (this.id !== undefined) {
885
- b.write(Primitive.Int.write(this.id));
786
+ b.write((Primitive.Int.write(this.id)));
886
787
  }
887
788
  if (this.offset !== undefined) {
888
- b.write(Primitive.String.write(this.offset));
789
+ b.write((Primitive.String.write(this.offset)));
889
790
  }
890
791
  if (this.limit !== undefined) {
891
- b.write(Primitive.Int.write(this.limit));
792
+ b.write((Primitive.Int.write(this.limit)));
892
793
  }
893
794
  return b.buffer;
894
795
  }
@@ -900,42 +801,42 @@ export class GetPollStats extends TLObject {
900
801
  msgId;
901
802
  constructor(params) {
902
803
  super();
903
- this.classType = 'functions';
904
- this.className = 'stats.GetPollStats';
804
+ this.classType = "functions";
805
+ this.className = "stats.GetPollStats";
905
806
  this.constructorId = 0xc27dfa68;
906
807
  this.subclassOfId = 0xe95194cf;
907
- this._slots = ['dark', 'peer', 'msgId'];
808
+ this._slots = ["dark", "peer", "msgId"];
908
809
  this.dark = params.dark;
909
810
  this.peer = params.peer;
910
811
  this.msgId = params.msgId;
911
812
  }
912
813
  /**
913
- * Generate the TLObject from buffer.
914
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
915
- */
814
+ * Generate the TLObject from buffer.
815
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
816
+ */
916
817
  static async read(_data, ..._args) {
917
818
  // @ts-ignore
918
819
  let flags = await Primitive.Int.read(_data);
919
- let dark = flags & (1 << 0) ? true : false;
820
+ let dark = (flags & (1 << 0)) ? true : false;
920
821
  let peer = await TLObject.read(_data);
921
822
  let msgId = await Primitive.Int.read(_data);
922
- return new GetPollStats({ dark: dark, peer: peer, msgId: msgId });
823
+ return new GetPollStats({ "dark": dark, "peer": peer, "msgId": msgId });
923
824
  }
924
825
  /**
925
- * Generate buffer from TLObject.
926
- */
826
+ * Generate buffer from TLObject.
827
+ */
927
828
  write() {
928
829
  const b = new BytesIO();
929
830
  b.write(Primitive.Int.write(this.constructorId, false));
930
831
  // @ts-ignore
931
832
  let flags = 0;
932
- flags |= this.dark ? 1 << 0 : 0;
933
- b.write(Primitive.Int.write(flags));
833
+ flags |= this.dark ? (1 << 0) : 0;
834
+ b.write((Primitive.Int.write(flags)));
934
835
  if (this.peer !== undefined) {
935
836
  b.write(this.peer.write());
936
837
  }
937
838
  if (this.msgId !== undefined) {
938
- b.write(Primitive.Int.write(this.msgId));
839
+ b.write((Primitive.Int.write(this.msgId)));
939
840
  }
940
841
  return b.buffer;
941
842
  }