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