@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';
@@ -15,36 +15,36 @@ export class AllStoriesNotModified extends TLObject {
15
15
  stealthMode;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = "types";
19
- this.className = "stories.AllStoriesNotModified";
18
+ this.classType = 'types';
19
+ this.className = 'stories.AllStoriesNotModified';
20
20
  this.constructorId = 0x1158fe3e;
21
21
  this.subclassOfId = 0x7e60d0cd;
22
- this._slots = ["state", "stealthMode"];
22
+ this._slots = ['state', 'stealthMode'];
23
23
  this.state = params.state;
24
24
  this.stealthMode = params.stealthMode;
25
25
  }
26
26
  /**
27
- * Generate the TLObject from buffer.
28
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
- */
27
+ * Generate the TLObject from buffer.
28
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
+ */
30
30
  static async read(_data, ..._args) {
31
31
  // @ts-ignore
32
32
  let flags = await Primitive.Int.read(_data);
33
33
  let state = await Primitive.String.read(_data);
34
34
  let stealthMode = await TLObject.read(_data);
35
- return new AllStoriesNotModified({ "state": state, "stealthMode": stealthMode });
35
+ return new AllStoriesNotModified({ state: state, stealthMode: stealthMode });
36
36
  }
37
37
  /**
38
- * Generate buffer from TLObject.
39
- */
38
+ * Generate buffer from TLObject.
39
+ */
40
40
  write() {
41
41
  const b = new BytesIO();
42
42
  b.write(Primitive.Int.write(this.constructorId, false));
43
43
  // @ts-ignore
44
44
  let flags = 0;
45
- b.write((Primitive.Int.write(flags)));
45
+ b.write(Primitive.Int.write(flags));
46
46
  if (this.state !== undefined) {
47
- b.write((Primitive.String.write(this.state)));
47
+ b.write(Primitive.String.write(this.state));
48
48
  }
49
49
  if (this.stealthMode !== undefined) {
50
50
  b.write(this.stealthMode.write());
@@ -62,11 +62,11 @@ export class AllStories extends TLObject {
62
62
  stealthMode;
63
63
  constructor(params) {
64
64
  super();
65
- this.classType = "types";
66
- this.className = "stories.AllStories";
65
+ this.classType = 'types';
66
+ this.className = 'stories.AllStories';
67
67
  this.constructorId = 0x6efc5e81;
68
68
  this.subclassOfId = 0x7e60d0cd;
69
- this._slots = ["hasMore", "count", "state", "peerStories", "chats", "users", "stealthMode"];
69
+ this._slots = ['hasMore', 'count', 'state', 'peerStories', 'chats', 'users', 'stealthMode'];
70
70
  this.hasMore = params.hasMore;
71
71
  this.count = params.count;
72
72
  this.state = params.state;
@@ -76,45 +76,53 @@ export class AllStories extends TLObject {
76
76
  this.stealthMode = params.stealthMode;
77
77
  }
78
78
  /**
79
- * Generate the TLObject from buffer.
80
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
81
- */
79
+ * Generate the TLObject from buffer.
80
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
81
+ */
82
82
  static async read(_data, ..._args) {
83
83
  // @ts-ignore
84
84
  let flags = await Primitive.Int.read(_data);
85
- let hasMore = (flags & (1 << 0)) ? true : false;
85
+ let hasMore = flags & (1 << 0) ? true : false;
86
86
  let count = await Primitive.Int.read(_data);
87
87
  let state = await Primitive.String.read(_data);
88
88
  let peerStories = await TLObject.read(_data);
89
89
  let chats = await TLObject.read(_data);
90
90
  let users = await TLObject.read(_data);
91
91
  let stealthMode = await TLObject.read(_data);
92
- return new AllStories({ "hasMore": hasMore, "count": count, "state": state, "peerStories": peerStories, "chats": chats, "users": users, "stealthMode": stealthMode });
93
- }
94
- /**
95
- * Generate buffer from TLObject.
96
- */
92
+ return new AllStories({
93
+ hasMore: hasMore,
94
+ count: count,
95
+ state: state,
96
+ peerStories: peerStories,
97
+ chats: chats,
98
+ users: users,
99
+ stealthMode: stealthMode,
100
+ });
101
+ }
102
+ /**
103
+ * Generate buffer from TLObject.
104
+ */
97
105
  write() {
98
106
  const b = new BytesIO();
99
107
  b.write(Primitive.Int.write(this.constructorId, false));
100
108
  // @ts-ignore
101
109
  let flags = 0;
102
- flags |= this.hasMore ? (1 << 0) : 0;
103
- b.write((Primitive.Int.write(flags)));
110
+ flags |= this.hasMore ? 1 << 0 : 0;
111
+ b.write(Primitive.Int.write(flags));
104
112
  if (this.count !== undefined) {
105
- b.write((Primitive.Int.write(this.count)));
113
+ b.write(Primitive.Int.write(this.count));
106
114
  }
107
115
  if (this.state !== undefined) {
108
- b.write((Primitive.String.write(this.state)));
116
+ b.write(Primitive.String.write(this.state));
109
117
  }
110
118
  if (this.peerStories) {
111
- b.write((Primitive.Vector.write(this.peerStories)));
119
+ b.write(Primitive.Vector.write(this.peerStories));
112
120
  }
113
121
  if (this.chats) {
114
- b.write((Primitive.Vector.write(this.chats)));
122
+ b.write(Primitive.Vector.write(this.chats));
115
123
  }
116
124
  if (this.users) {
117
- b.write((Primitive.Vector.write(this.users)));
125
+ b.write(Primitive.Vector.write(this.users));
118
126
  }
119
127
  if (this.stealthMode !== undefined) {
120
128
  b.write(this.stealthMode.write());
@@ -130,11 +138,11 @@ export class Stories extends TLObject {
130
138
  users;
131
139
  constructor(params) {
132
140
  super();
133
- this.classType = "types";
134
- this.className = "stories.Stories";
141
+ this.classType = 'types';
142
+ this.className = 'stories.Stories';
135
143
  this.constructorId = 0x63c3dd0a;
136
144
  this.subclassOfId = 0x251c0c2c;
137
- this._slots = ["count", "stories", "pinnedToTop", "chats", "users"];
145
+ this._slots = ['count', 'stories', 'pinnedToTop', 'chats', 'users'];
138
146
  this.count = params.count;
139
147
  this.stories = params.stories;
140
148
  this.pinnedToTop = params.pinnedToTop;
@@ -142,43 +150,49 @@ export class Stories extends TLObject {
142
150
  this.users = params.users;
143
151
  }
144
152
  /**
145
- * Generate the TLObject from buffer.
146
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
147
- */
153
+ * Generate the TLObject from buffer.
154
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
155
+ */
148
156
  static async read(_data, ..._args) {
149
157
  // @ts-ignore
150
158
  let flags = await Primitive.Int.read(_data);
151
159
  let count = await Primitive.Int.read(_data);
152
160
  let stories = await TLObject.read(_data);
153
- let pinnedToTop = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.Int) : [];
161
+ let pinnedToTop = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
154
162
  let chats = await TLObject.read(_data);
155
163
  let users = await TLObject.read(_data);
156
- return new Stories({ "count": count, "stories": stories, "pinnedToTop": pinnedToTop, "chats": chats, "users": users });
164
+ return new Stories({
165
+ count: count,
166
+ stories: stories,
167
+ pinnedToTop: pinnedToTop,
168
+ chats: chats,
169
+ users: users,
170
+ });
157
171
  }
158
172
  /**
159
- * Generate buffer from TLObject.
160
- */
173
+ * Generate buffer from TLObject.
174
+ */
161
175
  write() {
162
176
  const b = new BytesIO();
163
177
  b.write(Primitive.Int.write(this.constructorId, false));
164
178
  // @ts-ignore
165
179
  let flags = 0;
166
- flags |= this.pinnedToTop ? (1 << 0) : 0;
167
- b.write((Primitive.Int.write(flags)));
180
+ flags |= this.pinnedToTop ? 1 << 0 : 0;
181
+ b.write(Primitive.Int.write(flags));
168
182
  if (this.count !== undefined) {
169
- b.write((Primitive.Int.write(this.count)));
183
+ b.write(Primitive.Int.write(this.count));
170
184
  }
171
185
  if (this.stories) {
172
- b.write((Primitive.Vector.write(this.stories)));
186
+ b.write(Primitive.Vector.write(this.stories));
173
187
  }
174
188
  if (this.pinnedToTop) {
175
- b.write((Primitive.Vector.write(this.pinnedToTop, Primitive.Int)));
189
+ b.write(Primitive.Vector.write(this.pinnedToTop, Primitive.Int));
176
190
  }
177
191
  if (this.chats) {
178
- b.write((Primitive.Vector.write(this.chats)));
192
+ b.write(Primitive.Vector.write(this.chats));
179
193
  }
180
194
  if (this.users) {
181
- b.write((Primitive.Vector.write(this.users)));
195
+ b.write(Primitive.Vector.write(this.users));
182
196
  }
183
197
  return b.buffer;
184
198
  }
@@ -194,11 +208,20 @@ export class StoryViewsList extends TLObject {
194
208
  nextOffset;
195
209
  constructor(params) {
196
210
  super();
197
- this.classType = "types";
198
- this.className = "stories.StoryViewsList";
211
+ this.classType = 'types';
212
+ this.className = 'stories.StoryViewsList';
199
213
  this.constructorId = 0x59d78fc5;
200
214
  this.subclassOfId = 0xb9437560;
201
- this._slots = ["count", "viewsCount", "forwardsCount", "reactionsCount", "views", "chats", "users", "nextOffset"];
215
+ this._slots = [
216
+ 'count',
217
+ 'viewsCount',
218
+ 'forwardsCount',
219
+ 'reactionsCount',
220
+ 'views',
221
+ 'chats',
222
+ 'users',
223
+ 'nextOffset',
224
+ ];
202
225
  this.count = params.count;
203
226
  this.viewsCount = params.viewsCount;
204
227
  this.forwardsCount = params.forwardsCount;
@@ -209,9 +232,9 @@ export class StoryViewsList extends TLObject {
209
232
  this.nextOffset = params.nextOffset;
210
233
  }
211
234
  /**
212
- * Generate the TLObject from buffer.
213
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
214
- */
235
+ * Generate the TLObject from buffer.
236
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
237
+ */
215
238
  static async read(_data, ..._args) {
216
239
  // @ts-ignore
217
240
  let flags = await Primitive.Int.read(_data);
@@ -222,42 +245,51 @@ export class StoryViewsList extends TLObject {
222
245
  let views = await TLObject.read(_data);
223
246
  let chats = await TLObject.read(_data);
224
247
  let users = await TLObject.read(_data);
225
- let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
226
- return new StoryViewsList({ "count": count, "viewsCount": viewsCount, "forwardsCount": forwardsCount, "reactionsCount": reactionsCount, "views": views, "chats": chats, "users": users, "nextOffset": nextOffset });
227
- }
228
- /**
229
- * Generate buffer from TLObject.
230
- */
248
+ let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
249
+ return new StoryViewsList({
250
+ count: count,
251
+ viewsCount: viewsCount,
252
+ forwardsCount: forwardsCount,
253
+ reactionsCount: reactionsCount,
254
+ views: views,
255
+ chats: chats,
256
+ users: users,
257
+ nextOffset: nextOffset,
258
+ });
259
+ }
260
+ /**
261
+ * Generate buffer from TLObject.
262
+ */
231
263
  write() {
232
264
  const b = new BytesIO();
233
265
  b.write(Primitive.Int.write(this.constructorId, false));
234
266
  // @ts-ignore
235
267
  let flags = 0;
236
- flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
237
- b.write((Primitive.Int.write(flags)));
268
+ flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
269
+ b.write(Primitive.Int.write(flags));
238
270
  if (this.count !== undefined) {
239
- b.write((Primitive.Int.write(this.count)));
271
+ b.write(Primitive.Int.write(this.count));
240
272
  }
241
273
  if (this.viewsCount !== undefined) {
242
- b.write((Primitive.Int.write(this.viewsCount)));
274
+ b.write(Primitive.Int.write(this.viewsCount));
243
275
  }
244
276
  if (this.forwardsCount !== undefined) {
245
- b.write((Primitive.Int.write(this.forwardsCount)));
277
+ b.write(Primitive.Int.write(this.forwardsCount));
246
278
  }
247
279
  if (this.reactionsCount !== undefined) {
248
- b.write((Primitive.Int.write(this.reactionsCount)));
280
+ b.write(Primitive.Int.write(this.reactionsCount));
249
281
  }
250
282
  if (this.views) {
251
- b.write((Primitive.Vector.write(this.views)));
283
+ b.write(Primitive.Vector.write(this.views));
252
284
  }
253
285
  if (this.chats) {
254
- b.write((Primitive.Vector.write(this.chats)));
286
+ b.write(Primitive.Vector.write(this.chats));
255
287
  }
256
288
  if (this.users) {
257
- b.write((Primitive.Vector.write(this.users)));
289
+ b.write(Primitive.Vector.write(this.users));
258
290
  }
259
291
  if (this.nextOffset !== undefined) {
260
- b.write((Primitive.String.write(this.nextOffset)));
292
+ b.write(Primitive.String.write(this.nextOffset));
261
293
  }
262
294
  return b.buffer;
263
295
  }
@@ -267,36 +299,36 @@ export class StoryViews extends TLObject {
267
299
  users;
268
300
  constructor(params) {
269
301
  super();
270
- this.classType = "types";
271
- this.className = "stories.StoryViews";
302
+ this.classType = 'types';
303
+ this.className = 'stories.StoryViews';
272
304
  this.constructorId = 0xde9eed1d;
273
305
  this.subclassOfId = 0x4b3fc4ba;
274
- this._slots = ["views", "users"];
306
+ this._slots = ['views', 'users'];
275
307
  this.views = params.views;
276
308
  this.users = params.users;
277
309
  }
278
310
  /**
279
- * Generate the TLObject from buffer.
280
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
281
- */
311
+ * Generate the TLObject from buffer.
312
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
313
+ */
282
314
  static async read(_data, ..._args) {
283
315
  // no flags
284
316
  let views = await TLObject.read(_data);
285
317
  let users = await TLObject.read(_data);
286
- return new StoryViews({ "views": views, "users": users });
318
+ return new StoryViews({ views: views, users: users });
287
319
  }
288
320
  /**
289
- * Generate buffer from TLObject.
290
- */
321
+ * Generate buffer from TLObject.
322
+ */
291
323
  write() {
292
324
  const b = new BytesIO();
293
325
  b.write(Primitive.Int.write(this.constructorId, false));
294
326
  // no flags
295
327
  if (this.views) {
296
- b.write((Primitive.Vector.write(this.views)));
328
+ b.write(Primitive.Vector.write(this.views));
297
329
  }
298
330
  if (this.users) {
299
- b.write((Primitive.Vector.write(this.users)));
331
+ b.write(Primitive.Vector.write(this.users));
300
332
  }
301
333
  return b.buffer;
302
334
  }
@@ -307,29 +339,29 @@ export class PeerStories extends TLObject {
307
339
  users;
308
340
  constructor(params) {
309
341
  super();
310
- this.classType = "types";
311
- this.className = "stories.PeerStories";
342
+ this.classType = 'types';
343
+ this.className = 'stories.PeerStories';
312
344
  this.constructorId = 0xcae68768;
313
345
  this.subclassOfId = 0x9d56cfd0;
314
- this._slots = ["stories", "chats", "users"];
346
+ this._slots = ['stories', 'chats', 'users'];
315
347
  this.stories = params.stories;
316
348
  this.chats = params.chats;
317
349
  this.users = params.users;
318
350
  }
319
351
  /**
320
- * Generate the TLObject from buffer.
321
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
322
- */
352
+ * Generate the TLObject from buffer.
353
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
354
+ */
323
355
  static async read(_data, ..._args) {
324
356
  // no flags
325
357
  let stories = await TLObject.read(_data);
326
358
  let chats = await TLObject.read(_data);
327
359
  let users = await TLObject.read(_data);
328
- return new PeerStories({ "stories": stories, "chats": chats, "users": users });
360
+ return new PeerStories({ stories: stories, chats: chats, users: users });
329
361
  }
330
362
  /**
331
- * Generate buffer from TLObject.
332
- */
363
+ * Generate buffer from TLObject.
364
+ */
333
365
  write() {
334
366
  const b = new BytesIO();
335
367
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -338,10 +370,10 @@ export class PeerStories extends TLObject {
338
370
  b.write(this.stories.write());
339
371
  }
340
372
  if (this.chats) {
341
- b.write((Primitive.Vector.write(this.chats)));
373
+ b.write(Primitive.Vector.write(this.chats));
342
374
  }
343
375
  if (this.users) {
344
- b.write((Primitive.Vector.write(this.users)));
376
+ b.write(Primitive.Vector.write(this.users));
345
377
  }
346
378
  return b.buffer;
347
379
  }
@@ -354,11 +386,11 @@ export class StoryReactionsList extends TLObject {
354
386
  nextOffset;
355
387
  constructor(params) {
356
388
  super();
357
- this.classType = "types";
358
- this.className = "stories.StoryReactionsList";
389
+ this.classType = 'types';
390
+ this.className = 'stories.StoryReactionsList';
359
391
  this.constructorId = 0xaa5f789c;
360
392
  this.subclassOfId = 0x46f91e3;
361
- this._slots = ["count", "reactions", "chats", "users", "nextOffset"];
393
+ this._slots = ['count', 'reactions', 'chats', 'users', 'nextOffset'];
362
394
  this.count = params.count;
363
395
  this.reactions = params.reactions;
364
396
  this.chats = params.chats;
@@ -366,9 +398,9 @@ export class StoryReactionsList extends TLObject {
366
398
  this.nextOffset = params.nextOffset;
367
399
  }
368
400
  /**
369
- * Generate the TLObject from buffer.
370
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
371
- */
401
+ * Generate the TLObject from buffer.
402
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
403
+ */
372
404
  static async read(_data, ..._args) {
373
405
  // @ts-ignore
374
406
  let flags = await Primitive.Int.read(_data);
@@ -376,33 +408,39 @@ export class StoryReactionsList extends TLObject {
376
408
  let reactions = await TLObject.read(_data);
377
409
  let chats = await TLObject.read(_data);
378
410
  let users = await TLObject.read(_data);
379
- let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
380
- return new StoryReactionsList({ "count": count, "reactions": reactions, "chats": chats, "users": users, "nextOffset": nextOffset });
381
- }
382
- /**
383
- * Generate buffer from TLObject.
384
- */
411
+ let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
412
+ return new StoryReactionsList({
413
+ count: count,
414
+ reactions: reactions,
415
+ chats: chats,
416
+ users: users,
417
+ nextOffset: nextOffset,
418
+ });
419
+ }
420
+ /**
421
+ * Generate buffer from TLObject.
422
+ */
385
423
  write() {
386
424
  const b = new BytesIO();
387
425
  b.write(Primitive.Int.write(this.constructorId, false));
388
426
  // @ts-ignore
389
427
  let flags = 0;
390
- flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
391
- b.write((Primitive.Int.write(flags)));
428
+ flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
429
+ b.write(Primitive.Int.write(flags));
392
430
  if (this.count !== undefined) {
393
- b.write((Primitive.Int.write(this.count)));
431
+ b.write(Primitive.Int.write(this.count));
394
432
  }
395
433
  if (this.reactions) {
396
- b.write((Primitive.Vector.write(this.reactions)));
434
+ b.write(Primitive.Vector.write(this.reactions));
397
435
  }
398
436
  if (this.chats) {
399
- b.write((Primitive.Vector.write(this.chats)));
437
+ b.write(Primitive.Vector.write(this.chats));
400
438
  }
401
439
  if (this.users) {
402
- b.write((Primitive.Vector.write(this.users)));
440
+ b.write(Primitive.Vector.write(this.users));
403
441
  }
404
442
  if (this.nextOffset !== undefined) {
405
- b.write((Primitive.String.write(this.nextOffset)));
443
+ b.write(Primitive.String.write(this.nextOffset));
406
444
  }
407
445
  return b.buffer;
408
446
  }
@@ -415,11 +453,11 @@ export class FoundStories extends TLObject {
415
453
  users;
416
454
  constructor(params) {
417
455
  super();
418
- this.classType = "types";
419
- this.className = "stories.FoundStories";
456
+ this.classType = 'types';
457
+ this.className = 'stories.FoundStories';
420
458
  this.constructorId = 0xe2de7737;
421
459
  this.subclassOfId = 0x17790b35;
422
- this._slots = ["count", "stories", "nextOffset", "chats", "users"];
460
+ this._slots = ['count', 'stories', 'nextOffset', 'chats', 'users'];
423
461
  this.count = params.count;
424
462
  this.stories = params.stories;
425
463
  this.nextOffset = params.nextOffset;
@@ -427,43 +465,49 @@ export class FoundStories extends TLObject {
427
465
  this.users = params.users;
428
466
  }
429
467
  /**
430
- * Generate the TLObject from buffer.
431
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
432
- */
468
+ * Generate the TLObject from buffer.
469
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
470
+ */
433
471
  static async read(_data, ..._args) {
434
472
  // @ts-ignore
435
473
  let flags = await Primitive.Int.read(_data);
436
474
  let count = await Primitive.Int.read(_data);
437
475
  let stories = await TLObject.read(_data);
438
- let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
476
+ let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
439
477
  let chats = await TLObject.read(_data);
440
478
  let users = await TLObject.read(_data);
441
- return new FoundStories({ "count": count, "stories": stories, "nextOffset": nextOffset, "chats": chats, "users": users });
479
+ return new FoundStories({
480
+ count: count,
481
+ stories: stories,
482
+ nextOffset: nextOffset,
483
+ chats: chats,
484
+ users: users,
485
+ });
442
486
  }
443
487
  /**
444
- * Generate buffer from TLObject.
445
- */
488
+ * Generate buffer from TLObject.
489
+ */
446
490
  write() {
447
491
  const b = new BytesIO();
448
492
  b.write(Primitive.Int.write(this.constructorId, false));
449
493
  // @ts-ignore
450
494
  let flags = 0;
451
- flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
452
- b.write((Primitive.Int.write(flags)));
495
+ flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
496
+ b.write(Primitive.Int.write(flags));
453
497
  if (this.count !== undefined) {
454
- b.write((Primitive.Int.write(this.count)));
498
+ b.write(Primitive.Int.write(this.count));
455
499
  }
456
500
  if (this.stories) {
457
- b.write((Primitive.Vector.write(this.stories)));
501
+ b.write(Primitive.Vector.write(this.stories));
458
502
  }
459
503
  if (this.nextOffset !== undefined) {
460
- b.write((Primitive.String.write(this.nextOffset)));
504
+ b.write(Primitive.String.write(this.nextOffset));
461
505
  }
462
506
  if (this.chats) {
463
- b.write((Primitive.Vector.write(this.chats)));
507
+ b.write(Primitive.Vector.write(this.chats));
464
508
  }
465
509
  if (this.users) {
466
- b.write((Primitive.Vector.write(this.users)));
510
+ b.write(Primitive.Vector.write(this.users));
467
511
  }
468
512
  return b.buffer;
469
513
  }
@@ -472,31 +516,31 @@ export class CanSendStoryCount extends TLObject {
472
516
  countRemains;
473
517
  constructor(params) {
474
518
  super();
475
- this.classType = "types";
476
- this.className = "stories.CanSendStoryCount";
519
+ this.classType = 'types';
520
+ this.className = 'stories.CanSendStoryCount';
477
521
  this.constructorId = 0xc387c04e;
478
522
  this.subclassOfId = 0xcb53a298;
479
- this._slots = ["countRemains"];
523
+ this._slots = ['countRemains'];
480
524
  this.countRemains = params.countRemains;
481
525
  }
482
526
  /**
483
- * Generate the TLObject from buffer.
484
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
485
- */
527
+ * Generate the TLObject from buffer.
528
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
529
+ */
486
530
  static async read(_data, ..._args) {
487
531
  // no flags
488
532
  let countRemains = await Primitive.Int.read(_data);
489
- return new CanSendStoryCount({ "countRemains": countRemains });
533
+ return new CanSendStoryCount({ countRemains: countRemains });
490
534
  }
491
535
  /**
492
- * Generate buffer from TLObject.
493
- */
536
+ * Generate buffer from TLObject.
537
+ */
494
538
  write() {
495
539
  const b = new BytesIO();
496
540
  b.write(Primitive.Int.write(this.constructorId, false));
497
541
  // no flags
498
542
  if (this.countRemains !== undefined) {
499
- b.write((Primitive.Int.write(this.countRemains)));
543
+ b.write(Primitive.Int.write(this.countRemains));
500
544
  }
501
545
  return b.buffer;
502
546
  }
@@ -504,23 +548,23 @@ export class CanSendStoryCount extends TLObject {
504
548
  export class AlbumsNotModified extends TLObject {
505
549
  constructor() {
506
550
  super();
507
- this.classType = "types";
508
- this.className = "stories.AlbumsNotModified";
551
+ this.classType = 'types';
552
+ this.className = 'stories.AlbumsNotModified';
509
553
  this.constructorId = 0x564edaeb;
510
554
  this.subclassOfId = 0x5a73d39;
511
555
  this._slots = [];
512
556
  }
513
557
  /**
514
- * Generate the TLObject from buffer.
515
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
516
- */
558
+ * Generate the TLObject from buffer.
559
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
560
+ */
517
561
  static async read(_data, ..._args) {
518
562
  // no flags
519
563
  return new AlbumsNotModified();
520
564
  }
521
565
  /**
522
- * Generate buffer from TLObject.
523
- */
566
+ * Generate buffer from TLObject.
567
+ */
524
568
  write() {
525
569
  const b = new BytesIO();
526
570
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -533,36 +577,36 @@ export class Albums extends TLObject {
533
577
  albums;
534
578
  constructor(params) {
535
579
  super();
536
- this.classType = "types";
537
- this.className = "stories.Albums";
580
+ this.classType = 'types';
581
+ this.className = 'stories.Albums';
538
582
  this.constructorId = 0xc3987a3a;
539
583
  this.subclassOfId = 0x5a73d39;
540
- this._slots = ["hash", "albums"];
584
+ this._slots = ['hash', 'albums'];
541
585
  this.hash = params.hash;
542
586
  this.albums = params.albums;
543
587
  }
544
588
  /**
545
- * Generate the TLObject from buffer.
546
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
547
- */
589
+ * Generate the TLObject from buffer.
590
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
591
+ */
548
592
  static async read(_data, ..._args) {
549
593
  // no flags
550
594
  let hash = await Primitive.Long.read(_data);
551
595
  let albums = await TLObject.read(_data);
552
- return new Albums({ "hash": hash, "albums": albums });
596
+ return new Albums({ hash: hash, albums: albums });
553
597
  }
554
598
  /**
555
- * Generate buffer from TLObject.
556
- */
599
+ * Generate buffer from TLObject.
600
+ */
557
601
  write() {
558
602
  const b = new BytesIO();
559
603
  b.write(Primitive.Int.write(this.constructorId, false));
560
604
  // no flags
561
605
  if (this.hash !== undefined) {
562
- b.write((Primitive.Long.write(this.hash)));
606
+ b.write(Primitive.Long.write(this.hash));
563
607
  }
564
608
  if (this.albums) {
565
- b.write((Primitive.Vector.write(this.albums)));
609
+ b.write(Primitive.Vector.write(this.albums));
566
610
  }
567
611
  return b.buffer;
568
612
  }
@@ -572,25 +616,25 @@ export class CanSendStory extends TLObject {
572
616
  peer;
573
617
  constructor(params) {
574
618
  super();
575
- this.classType = "functions";
576
- this.className = "stories.CanSendStory";
619
+ this.classType = 'functions';
620
+ this.className = 'stories.CanSendStory';
577
621
  this.constructorId = 0x30eb63f0;
578
622
  this.subclassOfId = 0xcb53a298;
579
- this._slots = ["peer"];
623
+ this._slots = ['peer'];
580
624
  this.peer = params.peer;
581
625
  }
582
626
  /**
583
- * Generate the TLObject from buffer.
584
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
585
- */
627
+ * Generate the TLObject from buffer.
628
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
629
+ */
586
630
  static async read(_data, ..._args) {
587
631
  // no flags
588
632
  let peer = await TLObject.read(_data);
589
- return new CanSendStory({ "peer": peer });
633
+ return new CanSendStory({ peer: peer });
590
634
  }
591
635
  /**
592
- * Generate buffer from TLObject.
593
- */
636
+ * Generate buffer from TLObject.
637
+ */
594
638
  write() {
595
639
  const b = new BytesIO();
596
640
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -620,11 +664,27 @@ export class SendStory extends TLObject {
620
664
  music;
621
665
  constructor(params) {
622
666
  super();
623
- this.classType = "functions";
624
- this.className = "stories.SendStory";
667
+ this.classType = 'functions';
668
+ this.className = 'stories.SendStory';
625
669
  this.constructorId = 0x8f9e6898;
626
670
  this.subclassOfId = 0x8af52aac;
627
- this._slots = ["pinned", "noforwards", "fwdModified", "peer", "media", "mediaAreas", "caption", "entities", "privacyRules", "randomId", "period", "fwdFromId", "fwdFromStory", "albums", "music"];
671
+ this._slots = [
672
+ 'pinned',
673
+ 'noforwards',
674
+ 'fwdModified',
675
+ 'peer',
676
+ 'media',
677
+ 'mediaAreas',
678
+ 'caption',
679
+ 'entities',
680
+ 'privacyRules',
681
+ 'randomId',
682
+ 'period',
683
+ 'fwdFromId',
684
+ 'fwdFromStory',
685
+ 'albums',
686
+ 'music',
687
+ ];
628
688
  this.pinned = params.pinned;
629
689
  this.noforwards = params.noforwards;
630
690
  this.fwdModified = params.fwdModified;
@@ -642,49 +702,65 @@ export class SendStory extends TLObject {
642
702
  this.music = params.music;
643
703
  }
644
704
  /**
645
- * Generate the TLObject from buffer.
646
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
647
- */
705
+ * Generate the TLObject from buffer.
706
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
707
+ */
648
708
  static async read(_data, ..._args) {
649
709
  // @ts-ignore
650
710
  let flags = await Primitive.Int.read(_data);
651
- let pinned = (flags & (1 << 2)) ? true : false;
652
- let noforwards = (flags & (1 << 4)) ? true : false;
653
- let fwdModified = (flags & (1 << 7)) ? true : false;
711
+ let pinned = flags & (1 << 2) ? true : false;
712
+ let noforwards = flags & (1 << 4) ? true : false;
713
+ let fwdModified = flags & (1 << 7) ? true : false;
654
714
  let peer = await TLObject.read(_data);
655
715
  let media = await TLObject.read(_data);
656
- let mediaAreas = (flags & (1 << 5)) ? await TLObject.read(_data) : [];
657
- let caption = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
658
- let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
716
+ let mediaAreas = flags & (1 << 5) ? await TLObject.read(_data) : [];
717
+ let caption = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
718
+ let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
659
719
  let privacyRules = await TLObject.read(_data);
660
720
  let randomId = await Primitive.Long.read(_data);
661
- let period = (flags & (1 << 3)) ? await Primitive.Int.read(_data) : undefined;
662
- let fwdFromId = (flags & (1 << 6)) ? await TLObject.read(_data) : undefined;
663
- let fwdFromStory = (flags & (1 << 6)) ? await Primitive.Int.read(_data) : undefined;
664
- let albums = (flags & (1 << 8)) ? await TLObject.read(_data, Primitive.Int) : [];
665
- let music = (flags & (1 << 9)) ? await TLObject.read(_data) : undefined;
666
- return new SendStory({ "pinned": pinned, "noforwards": noforwards, "fwdModified": fwdModified, "peer": peer, "media": media, "mediaAreas": mediaAreas, "caption": caption, "entities": entities, "privacyRules": privacyRules, "randomId": randomId, "period": period, "fwdFromId": fwdFromId, "fwdFromStory": fwdFromStory, "albums": albums, "music": music });
667
- }
668
- /**
669
- * Generate buffer from TLObject.
670
- */
721
+ let period = flags & (1 << 3) ? await Primitive.Int.read(_data) : undefined;
722
+ let fwdFromId = flags & (1 << 6) ? await TLObject.read(_data) : undefined;
723
+ let fwdFromStory = flags & (1 << 6) ? await Primitive.Int.read(_data) : undefined;
724
+ let albums = flags & (1 << 8) ? await TLObject.read(_data, Primitive.Int) : [];
725
+ let music = flags & (1 << 9) ? await TLObject.read(_data) : undefined;
726
+ return new SendStory({
727
+ pinned: pinned,
728
+ noforwards: noforwards,
729
+ fwdModified: fwdModified,
730
+ peer: peer,
731
+ media: media,
732
+ mediaAreas: mediaAreas,
733
+ caption: caption,
734
+ entities: entities,
735
+ privacyRules: privacyRules,
736
+ randomId: randomId,
737
+ period: period,
738
+ fwdFromId: fwdFromId,
739
+ fwdFromStory: fwdFromStory,
740
+ albums: albums,
741
+ music: music,
742
+ });
743
+ }
744
+ /**
745
+ * Generate buffer from TLObject.
746
+ */
671
747
  write() {
672
748
  const b = new BytesIO();
673
749
  b.write(Primitive.Int.write(this.constructorId, false));
674
750
  // @ts-ignore
675
751
  let flags = 0;
676
- flags |= this.pinned ? (1 << 2) : 0;
677
- flags |= this.noforwards ? (1 << 4) : 0;
678
- flags |= this.fwdModified ? (1 << 7) : 0;
679
- flags |= this.mediaAreas ? (1 << 5) : 0;
680
- flags |= this.caption !== undefined ? (1 << 0) : 0;
681
- flags |= this.entities ? (1 << 1) : 0;
682
- flags |= this.period !== undefined ? (1 << 3) : 0;
683
- flags |= this.fwdFromId !== undefined ? (1 << 6) : 0;
684
- flags |= this.fwdFromStory !== undefined ? (1 << 6) : 0;
685
- flags |= this.albums ? (1 << 8) : 0;
686
- flags |= this.music !== undefined ? (1 << 9) : 0;
687
- b.write((Primitive.Int.write(flags)));
752
+ flags |= this.pinned ? 1 << 2 : 0;
753
+ flags |= this.noforwards ? 1 << 4 : 0;
754
+ flags |= this.fwdModified ? 1 << 7 : 0;
755
+ flags |= this.mediaAreas ? 1 << 5 : 0;
756
+ flags |= this.caption !== undefined ? 1 << 0 : 0;
757
+ flags |= this.entities ? 1 << 1 : 0;
758
+ flags |= this.period !== undefined ? 1 << 3 : 0;
759
+ flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
760
+ flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
761
+ flags |= this.albums ? 1 << 8 : 0;
762
+ flags |= this.music !== undefined ? 1 << 9 : 0;
763
+ b.write(Primitive.Int.write(flags));
688
764
  if (this.peer !== undefined) {
689
765
  b.write(this.peer.write());
690
766
  }
@@ -692,31 +768,31 @@ export class SendStory extends TLObject {
692
768
  b.write(this.media.write());
693
769
  }
694
770
  if (this.mediaAreas) {
695
- b.write((Primitive.Vector.write(this.mediaAreas)));
771
+ b.write(Primitive.Vector.write(this.mediaAreas));
696
772
  }
697
773
  if (this.caption !== undefined) {
698
- b.write((Primitive.String.write(this.caption)));
774
+ b.write(Primitive.String.write(this.caption));
699
775
  }
700
776
  if (this.entities) {
701
- b.write((Primitive.Vector.write(this.entities)));
777
+ b.write(Primitive.Vector.write(this.entities));
702
778
  }
703
779
  if (this.privacyRules) {
704
- b.write((Primitive.Vector.write(this.privacyRules)));
780
+ b.write(Primitive.Vector.write(this.privacyRules));
705
781
  }
706
782
  if (this.randomId !== undefined) {
707
- b.write((Primitive.Long.write(this.randomId)));
783
+ b.write(Primitive.Long.write(this.randomId));
708
784
  }
709
785
  if (this.period !== undefined) {
710
- b.write((Primitive.Int.write(this.period)));
786
+ b.write(Primitive.Int.write(this.period));
711
787
  }
712
788
  if (this.fwdFromId !== undefined) {
713
789
  b.write(this.fwdFromId.write());
714
790
  }
715
791
  if (this.fwdFromStory !== undefined) {
716
- b.write((Primitive.Int.write(this.fwdFromStory)));
792
+ b.write(Primitive.Int.write(this.fwdFromStory));
717
793
  }
718
794
  if (this.albums) {
719
- b.write((Primitive.Vector.write(this.albums, Primitive.Int)));
795
+ b.write(Primitive.Vector.write(this.albums, Primitive.Int));
720
796
  }
721
797
  if (this.music !== undefined) {
722
798
  b.write(this.music.write());
@@ -736,11 +812,20 @@ export class EditStory extends TLObject {
736
812
  music;
737
813
  constructor(params) {
738
814
  super();
739
- this.classType = "functions";
740
- this.className = "stories.EditStory";
815
+ this.classType = 'functions';
816
+ this.className = 'stories.EditStory';
741
817
  this.constructorId = 0x2c63a72b;
742
818
  this.subclassOfId = 0x8af52aac;
743
- this._slots = ["peer", "id", "media", "mediaAreas", "caption", "entities", "privacyRules", "music"];
819
+ this._slots = [
820
+ 'peer',
821
+ 'id',
822
+ 'media',
823
+ 'mediaAreas',
824
+ 'caption',
825
+ 'entities',
826
+ 'privacyRules',
827
+ 'music',
828
+ ];
744
829
  this.peer = params.peer;
745
830
  this.id = params.id;
746
831
  this.media = params.media;
@@ -751,57 +836,66 @@ export class EditStory extends TLObject {
751
836
  this.music = params.music;
752
837
  }
753
838
  /**
754
- * Generate the TLObject from buffer.
755
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
756
- */
839
+ * Generate the TLObject from buffer.
840
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
841
+ */
757
842
  static async read(_data, ..._args) {
758
843
  // @ts-ignore
759
844
  let flags = await Primitive.Int.read(_data);
760
845
  let peer = await TLObject.read(_data);
761
846
  let id = await Primitive.Int.read(_data);
762
- let media = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
763
- let mediaAreas = (flags & (1 << 3)) ? await TLObject.read(_data) : [];
764
- let caption = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
765
- let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
766
- let privacyRules = (flags & (1 << 2)) ? await TLObject.read(_data) : [];
767
- let music = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
768
- return new EditStory({ "peer": peer, "id": id, "media": media, "mediaAreas": mediaAreas, "caption": caption, "entities": entities, "privacyRules": privacyRules, "music": music });
769
- }
770
- /**
771
- * Generate buffer from TLObject.
772
- */
847
+ let media = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
848
+ let mediaAreas = flags & (1 << 3) ? await TLObject.read(_data) : [];
849
+ let caption = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
850
+ let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
851
+ let privacyRules = flags & (1 << 2) ? await TLObject.read(_data) : [];
852
+ let music = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
853
+ return new EditStory({
854
+ peer: peer,
855
+ id: id,
856
+ media: media,
857
+ mediaAreas: mediaAreas,
858
+ caption: caption,
859
+ entities: entities,
860
+ privacyRules: privacyRules,
861
+ music: music,
862
+ });
863
+ }
864
+ /**
865
+ * Generate buffer from TLObject.
866
+ */
773
867
  write() {
774
868
  const b = new BytesIO();
775
869
  b.write(Primitive.Int.write(this.constructorId, false));
776
870
  // @ts-ignore
777
871
  let flags = 0;
778
- flags |= this.media !== undefined ? (1 << 0) : 0;
779
- flags |= this.mediaAreas ? (1 << 3) : 0;
780
- flags |= this.caption !== undefined ? (1 << 1) : 0;
781
- flags |= this.entities ? (1 << 1) : 0;
782
- flags |= this.privacyRules ? (1 << 2) : 0;
783
- flags |= this.music !== undefined ? (1 << 4) : 0;
784
- b.write((Primitive.Int.write(flags)));
872
+ flags |= this.media !== undefined ? 1 << 0 : 0;
873
+ flags |= this.mediaAreas ? 1 << 3 : 0;
874
+ flags |= this.caption !== undefined ? 1 << 1 : 0;
875
+ flags |= this.entities ? 1 << 1 : 0;
876
+ flags |= this.privacyRules ? 1 << 2 : 0;
877
+ flags |= this.music !== undefined ? 1 << 4 : 0;
878
+ b.write(Primitive.Int.write(flags));
785
879
  if (this.peer !== undefined) {
786
880
  b.write(this.peer.write());
787
881
  }
788
882
  if (this.id !== undefined) {
789
- b.write((Primitive.Int.write(this.id)));
883
+ b.write(Primitive.Int.write(this.id));
790
884
  }
791
885
  if (this.media !== undefined) {
792
886
  b.write(this.media.write());
793
887
  }
794
888
  if (this.mediaAreas) {
795
- b.write((Primitive.Vector.write(this.mediaAreas)));
889
+ b.write(Primitive.Vector.write(this.mediaAreas));
796
890
  }
797
891
  if (this.caption !== undefined) {
798
- b.write((Primitive.String.write(this.caption)));
892
+ b.write(Primitive.String.write(this.caption));
799
893
  }
800
894
  if (this.entities) {
801
- b.write((Primitive.Vector.write(this.entities)));
895
+ b.write(Primitive.Vector.write(this.entities));
802
896
  }
803
897
  if (this.privacyRules) {
804
- b.write((Primitive.Vector.write(this.privacyRules)));
898
+ b.write(Primitive.Vector.write(this.privacyRules));
805
899
  }
806
900
  if (this.music !== undefined) {
807
901
  b.write(this.music.write());
@@ -815,27 +909,27 @@ export class DeleteStories extends TLObject {
815
909
  id;
816
910
  constructor(params) {
817
911
  super();
818
- this.classType = "functions";
819
- this.className = "stories.DeleteStories";
912
+ this.classType = 'functions';
913
+ this.className = 'stories.DeleteStories';
820
914
  this.constructorId = 0xae59db5f;
821
915
  this.subclassOfId = 0x5026710f;
822
- this._slots = ["peer", "id"];
916
+ this._slots = ['peer', 'id'];
823
917
  this.peer = params.peer;
824
918
  this.id = params.id;
825
919
  }
826
920
  /**
827
- * Generate the TLObject from buffer.
828
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
829
- */
921
+ * Generate the TLObject from buffer.
922
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
923
+ */
830
924
  static async read(_data, ..._args) {
831
925
  // no flags
832
926
  let peer = await TLObject.read(_data);
833
927
  let id = await TLObject.read(_data, Primitive.Int);
834
- return new DeleteStories({ "peer": peer, "id": id });
928
+ return new DeleteStories({ peer: peer, id: id });
835
929
  }
836
930
  /**
837
- * Generate buffer from TLObject.
838
- */
931
+ * Generate buffer from TLObject.
932
+ */
839
933
  write() {
840
934
  const b = new BytesIO();
841
935
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -844,7 +938,7 @@ export class DeleteStories extends TLObject {
844
938
  b.write(this.peer.write());
845
939
  }
846
940
  if (this.id) {
847
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
941
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
848
942
  }
849
943
  return b.buffer;
850
944
  }
@@ -856,29 +950,29 @@ export class TogglePinned extends TLObject {
856
950
  pinned;
857
951
  constructor(params) {
858
952
  super();
859
- this.classType = "functions";
860
- this.className = "stories.TogglePinned";
953
+ this.classType = 'functions';
954
+ this.className = 'stories.TogglePinned';
861
955
  this.constructorId = 0x9a75a1ef;
862
956
  this.subclassOfId = 0x5026710f;
863
- this._slots = ["peer", "id", "pinned"];
957
+ this._slots = ['peer', 'id', 'pinned'];
864
958
  this.peer = params.peer;
865
959
  this.id = params.id;
866
960
  this.pinned = params.pinned;
867
961
  }
868
962
  /**
869
- * Generate the TLObject from buffer.
870
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
871
- */
963
+ * Generate the TLObject from buffer.
964
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
965
+ */
872
966
  static async read(_data, ..._args) {
873
967
  // no flags
874
968
  let peer = await TLObject.read(_data);
875
969
  let id = await TLObject.read(_data, Primitive.Int);
876
970
  let pinned = await Primitive.Bool.read(_data);
877
- return new TogglePinned({ "peer": peer, "id": id, "pinned": pinned });
971
+ return new TogglePinned({ peer: peer, id: id, pinned: pinned });
878
972
  }
879
973
  /**
880
- * Generate buffer from TLObject.
881
- */
974
+ * Generate buffer from TLObject.
975
+ */
882
976
  write() {
883
977
  const b = new BytesIO();
884
978
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -887,10 +981,10 @@ export class TogglePinned extends TLObject {
887
981
  b.write(this.peer.write());
888
982
  }
889
983
  if (this.id) {
890
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
984
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
891
985
  }
892
986
  if (this.pinned !== undefined) {
893
- b.write((Primitive.Bool.write(this.pinned)));
987
+ b.write(Primitive.Bool.write(this.pinned));
894
988
  }
895
989
  return b.buffer;
896
990
  }
@@ -902,41 +996,41 @@ export class GetAllStories extends TLObject {
902
996
  state;
903
997
  constructor(params) {
904
998
  super();
905
- this.classType = "functions";
906
- this.className = "stories.GetAllStories";
999
+ this.classType = 'functions';
1000
+ this.className = 'stories.GetAllStories';
907
1001
  this.constructorId = 0xeeb0d625;
908
1002
  this.subclassOfId = 0x7e60d0cd;
909
- this._slots = ["next", "hidden", "state"];
1003
+ this._slots = ['next', 'hidden', 'state'];
910
1004
  this.next = params.next;
911
1005
  this.hidden = params.hidden;
912
1006
  this.state = params.state;
913
1007
  }
914
1008
  /**
915
- * Generate the TLObject from buffer.
916
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
917
- */
1009
+ * Generate the TLObject from buffer.
1010
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1011
+ */
918
1012
  static async read(_data, ..._args) {
919
1013
  // @ts-ignore
920
1014
  let flags = await Primitive.Int.read(_data);
921
- let next = (flags & (1 << 1)) ? true : false;
922
- let hidden = (flags & (1 << 2)) ? true : false;
923
- let state = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
924
- return new GetAllStories({ "next": next, "hidden": hidden, "state": state });
1015
+ let next = flags & (1 << 1) ? true : false;
1016
+ let hidden = flags & (1 << 2) ? true : false;
1017
+ let state = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
1018
+ return new GetAllStories({ next: next, hidden: hidden, state: state });
925
1019
  }
926
1020
  /**
927
- * Generate buffer from TLObject.
928
- */
1021
+ * Generate buffer from TLObject.
1022
+ */
929
1023
  write() {
930
1024
  const b = new BytesIO();
931
1025
  b.write(Primitive.Int.write(this.constructorId, false));
932
1026
  // @ts-ignore
933
1027
  let flags = 0;
934
- flags |= this.next ? (1 << 1) : 0;
935
- flags |= this.hidden ? (1 << 2) : 0;
936
- flags |= this.state !== undefined ? (1 << 0) : 0;
937
- b.write((Primitive.Int.write(flags)));
1028
+ flags |= this.next ? 1 << 1 : 0;
1029
+ flags |= this.hidden ? 1 << 2 : 0;
1030
+ flags |= this.state !== undefined ? 1 << 0 : 0;
1031
+ b.write(Primitive.Int.write(flags));
938
1032
  if (this.state !== undefined) {
939
- b.write((Primitive.String.write(this.state)));
1033
+ b.write(Primitive.String.write(this.state));
940
1034
  }
941
1035
  return b.buffer;
942
1036
  }
@@ -948,29 +1042,29 @@ export class GetPinnedStories extends TLObject {
948
1042
  limit;
949
1043
  constructor(params) {
950
1044
  super();
951
- this.classType = "functions";
952
- this.className = "stories.GetPinnedStories";
1045
+ this.classType = 'functions';
1046
+ this.className = 'stories.GetPinnedStories';
953
1047
  this.constructorId = 0x5821a5dc;
954
1048
  this.subclassOfId = 0x251c0c2c;
955
- this._slots = ["peer", "offsetId", "limit"];
1049
+ this._slots = ['peer', 'offsetId', 'limit'];
956
1050
  this.peer = params.peer;
957
1051
  this.offsetId = params.offsetId;
958
1052
  this.limit = params.limit;
959
1053
  }
960
1054
  /**
961
- * Generate the TLObject from buffer.
962
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
963
- */
1055
+ * Generate the TLObject from buffer.
1056
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1057
+ */
964
1058
  static async read(_data, ..._args) {
965
1059
  // no flags
966
1060
  let peer = await TLObject.read(_data);
967
1061
  let offsetId = await Primitive.Int.read(_data);
968
1062
  let limit = await Primitive.Int.read(_data);
969
- return new GetPinnedStories({ "peer": peer, "offsetId": offsetId, "limit": limit });
1063
+ return new GetPinnedStories({ peer: peer, offsetId: offsetId, limit: limit });
970
1064
  }
971
1065
  /**
972
- * Generate buffer from TLObject.
973
- */
1066
+ * Generate buffer from TLObject.
1067
+ */
974
1068
  write() {
975
1069
  const b = new BytesIO();
976
1070
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -979,10 +1073,10 @@ export class GetPinnedStories extends TLObject {
979
1073
  b.write(this.peer.write());
980
1074
  }
981
1075
  if (this.offsetId !== undefined) {
982
- b.write((Primitive.Int.write(this.offsetId)));
1076
+ b.write(Primitive.Int.write(this.offsetId));
983
1077
  }
984
1078
  if (this.limit !== undefined) {
985
- b.write((Primitive.Int.write(this.limit)));
1079
+ b.write(Primitive.Int.write(this.limit));
986
1080
  }
987
1081
  return b.buffer;
988
1082
  }
@@ -994,29 +1088,29 @@ export class GetStoriesArchive extends TLObject {
994
1088
  limit;
995
1089
  constructor(params) {
996
1090
  super();
997
- this.classType = "functions";
998
- this.className = "stories.GetStoriesArchive";
1091
+ this.classType = 'functions';
1092
+ this.className = 'stories.GetStoriesArchive';
999
1093
  this.constructorId = 0xb4352016;
1000
1094
  this.subclassOfId = 0x251c0c2c;
1001
- this._slots = ["peer", "offsetId", "limit"];
1095
+ this._slots = ['peer', 'offsetId', 'limit'];
1002
1096
  this.peer = params.peer;
1003
1097
  this.offsetId = params.offsetId;
1004
1098
  this.limit = params.limit;
1005
1099
  }
1006
1100
  /**
1007
- * Generate the TLObject from buffer.
1008
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1009
- */
1101
+ * Generate the TLObject from buffer.
1102
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1103
+ */
1010
1104
  static async read(_data, ..._args) {
1011
1105
  // no flags
1012
1106
  let peer = await TLObject.read(_data);
1013
1107
  let offsetId = await Primitive.Int.read(_data);
1014
1108
  let limit = await Primitive.Int.read(_data);
1015
- return new GetStoriesArchive({ "peer": peer, "offsetId": offsetId, "limit": limit });
1109
+ return new GetStoriesArchive({ peer: peer, offsetId: offsetId, limit: limit });
1016
1110
  }
1017
1111
  /**
1018
- * Generate buffer from TLObject.
1019
- */
1112
+ * Generate buffer from TLObject.
1113
+ */
1020
1114
  write() {
1021
1115
  const b = new BytesIO();
1022
1116
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1025,10 +1119,10 @@ export class GetStoriesArchive extends TLObject {
1025
1119
  b.write(this.peer.write());
1026
1120
  }
1027
1121
  if (this.offsetId !== undefined) {
1028
- b.write((Primitive.Int.write(this.offsetId)));
1122
+ b.write(Primitive.Int.write(this.offsetId));
1029
1123
  }
1030
1124
  if (this.limit !== undefined) {
1031
- b.write((Primitive.Int.write(this.limit)));
1125
+ b.write(Primitive.Int.write(this.limit));
1032
1126
  }
1033
1127
  return b.buffer;
1034
1128
  }
@@ -1039,27 +1133,27 @@ export class GetStoriesByID extends TLObject {
1039
1133
  id;
1040
1134
  constructor(params) {
1041
1135
  super();
1042
- this.classType = "functions";
1043
- this.className = "stories.GetStoriesByID";
1136
+ this.classType = 'functions';
1137
+ this.className = 'stories.GetStoriesByID';
1044
1138
  this.constructorId = 0x5774ca74;
1045
1139
  this.subclassOfId = 0x251c0c2c;
1046
- this._slots = ["peer", "id"];
1140
+ this._slots = ['peer', 'id'];
1047
1141
  this.peer = params.peer;
1048
1142
  this.id = params.id;
1049
1143
  }
1050
1144
  /**
1051
- * Generate the TLObject from buffer.
1052
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1053
- */
1145
+ * Generate the TLObject from buffer.
1146
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1147
+ */
1054
1148
  static async read(_data, ..._args) {
1055
1149
  // no flags
1056
1150
  let peer = await TLObject.read(_data);
1057
1151
  let id = await TLObject.read(_data, Primitive.Int);
1058
- return new GetStoriesByID({ "peer": peer, "id": id });
1152
+ return new GetStoriesByID({ peer: peer, id: id });
1059
1153
  }
1060
1154
  /**
1061
- * Generate buffer from TLObject.
1062
- */
1155
+ * Generate buffer from TLObject.
1156
+ */
1063
1157
  write() {
1064
1158
  const b = new BytesIO();
1065
1159
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1068,7 +1162,7 @@ export class GetStoriesByID extends TLObject {
1068
1162
  b.write(this.peer.write());
1069
1163
  }
1070
1164
  if (this.id) {
1071
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1165
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
1072
1166
  }
1073
1167
  return b.buffer;
1074
1168
  }
@@ -1078,31 +1172,31 @@ export class ToggleAllStoriesHidden extends TLObject {
1078
1172
  hidden;
1079
1173
  constructor(params) {
1080
1174
  super();
1081
- this.classType = "functions";
1082
- this.className = "stories.ToggleAllStoriesHidden";
1175
+ this.classType = 'functions';
1176
+ this.className = 'stories.ToggleAllStoriesHidden';
1083
1177
  this.constructorId = 0x7c2557c4;
1084
1178
  this.subclassOfId = 0xf5b399ac;
1085
- this._slots = ["hidden"];
1179
+ this._slots = ['hidden'];
1086
1180
  this.hidden = params.hidden;
1087
1181
  }
1088
1182
  /**
1089
- * Generate the TLObject from buffer.
1090
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1091
- */
1183
+ * Generate the TLObject from buffer.
1184
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1185
+ */
1092
1186
  static async read(_data, ..._args) {
1093
1187
  // no flags
1094
1188
  let hidden = await Primitive.Bool.read(_data);
1095
- return new ToggleAllStoriesHidden({ "hidden": hidden });
1189
+ return new ToggleAllStoriesHidden({ hidden: hidden });
1096
1190
  }
1097
1191
  /**
1098
- * Generate buffer from TLObject.
1099
- */
1192
+ * Generate buffer from TLObject.
1193
+ */
1100
1194
  write() {
1101
1195
  const b = new BytesIO();
1102
1196
  b.write(Primitive.Int.write(this.constructorId, false));
1103
1197
  // no flags
1104
1198
  if (this.hidden !== undefined) {
1105
- b.write((Primitive.Bool.write(this.hidden)));
1199
+ b.write(Primitive.Bool.write(this.hidden));
1106
1200
  }
1107
1201
  return b.buffer;
1108
1202
  }
@@ -1113,27 +1207,27 @@ export class ReadStories extends TLObject {
1113
1207
  maxId;
1114
1208
  constructor(params) {
1115
1209
  super();
1116
- this.classType = "functions";
1117
- this.className = "stories.ReadStories";
1210
+ this.classType = 'functions';
1211
+ this.className = 'stories.ReadStories';
1118
1212
  this.constructorId = 0xa556dac8;
1119
1213
  this.subclassOfId = 0x5026710f;
1120
- this._slots = ["peer", "maxId"];
1214
+ this._slots = ['peer', 'maxId'];
1121
1215
  this.peer = params.peer;
1122
1216
  this.maxId = params.maxId;
1123
1217
  }
1124
1218
  /**
1125
- * Generate the TLObject from buffer.
1126
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1127
- */
1219
+ * Generate the TLObject from buffer.
1220
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1221
+ */
1128
1222
  static async read(_data, ..._args) {
1129
1223
  // no flags
1130
1224
  let peer = await TLObject.read(_data);
1131
1225
  let maxId = await Primitive.Int.read(_data);
1132
- return new ReadStories({ "peer": peer, "maxId": maxId });
1226
+ return new ReadStories({ peer: peer, maxId: maxId });
1133
1227
  }
1134
1228
  /**
1135
- * Generate buffer from TLObject.
1136
- */
1229
+ * Generate buffer from TLObject.
1230
+ */
1137
1231
  write() {
1138
1232
  const b = new BytesIO();
1139
1233
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1142,7 +1236,7 @@ export class ReadStories extends TLObject {
1142
1236
  b.write(this.peer.write());
1143
1237
  }
1144
1238
  if (this.maxId !== undefined) {
1145
- b.write((Primitive.Int.write(this.maxId)));
1239
+ b.write(Primitive.Int.write(this.maxId));
1146
1240
  }
1147
1241
  return b.buffer;
1148
1242
  }
@@ -1153,27 +1247,27 @@ export class IncrementStoryViews extends TLObject {
1153
1247
  id;
1154
1248
  constructor(params) {
1155
1249
  super();
1156
- this.classType = "functions";
1157
- this.className = "stories.IncrementStoryViews";
1250
+ this.classType = 'functions';
1251
+ this.className = 'stories.IncrementStoryViews';
1158
1252
  this.constructorId = 0xb2028afb;
1159
1253
  this.subclassOfId = 0xf5b399ac;
1160
- this._slots = ["peer", "id"];
1254
+ this._slots = ['peer', 'id'];
1161
1255
  this.peer = params.peer;
1162
1256
  this.id = params.id;
1163
1257
  }
1164
1258
  /**
1165
- * Generate the TLObject from buffer.
1166
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1167
- */
1259
+ * Generate the TLObject from buffer.
1260
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1261
+ */
1168
1262
  static async read(_data, ..._args) {
1169
1263
  // no flags
1170
1264
  let peer = await TLObject.read(_data);
1171
1265
  let id = await TLObject.read(_data, Primitive.Int);
1172
- return new IncrementStoryViews({ "peer": peer, "id": id });
1266
+ return new IncrementStoryViews({ peer: peer, id: id });
1173
1267
  }
1174
1268
  /**
1175
- * Generate buffer from TLObject.
1176
- */
1269
+ * Generate buffer from TLObject.
1270
+ */
1177
1271
  write() {
1178
1272
  const b = new BytesIO();
1179
1273
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1182,7 +1276,7 @@ export class IncrementStoryViews extends TLObject {
1182
1276
  b.write(this.peer.write());
1183
1277
  }
1184
1278
  if (this.id) {
1185
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1279
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
1186
1280
  }
1187
1281
  return b.buffer;
1188
1282
  }
@@ -1199,11 +1293,20 @@ export class GetStoryViewsList extends TLObject {
1199
1293
  limit;
1200
1294
  constructor(params) {
1201
1295
  super();
1202
- this.classType = "functions";
1203
- this.className = "stories.GetStoryViewsList";
1296
+ this.classType = 'functions';
1297
+ this.className = 'stories.GetStoryViewsList';
1204
1298
  this.constructorId = 0x7ed23c57;
1205
1299
  this.subclassOfId = 0xb9437560;
1206
- this._slots = ["justContacts", "reactionsFirst", "forwardsFirst", "peer", "q", "id", "offset", "limit"];
1300
+ this._slots = [
1301
+ 'justContacts',
1302
+ 'reactionsFirst',
1303
+ 'forwardsFirst',
1304
+ 'peer',
1305
+ 'q',
1306
+ 'id',
1307
+ 'offset',
1308
+ 'limit',
1309
+ ];
1207
1310
  this.justContacts = params.justContacts;
1208
1311
  this.reactionsFirst = params.reactionsFirst;
1209
1312
  this.forwardsFirst = params.forwardsFirst;
@@ -1214,49 +1317,58 @@ export class GetStoryViewsList extends TLObject {
1214
1317
  this.limit = params.limit;
1215
1318
  }
1216
1319
  /**
1217
- * Generate the TLObject from buffer.
1218
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1219
- */
1320
+ * Generate the TLObject from buffer.
1321
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1322
+ */
1220
1323
  static async read(_data, ..._args) {
1221
1324
  // @ts-ignore
1222
1325
  let flags = await Primitive.Int.read(_data);
1223
- let justContacts = (flags & (1 << 0)) ? true : false;
1224
- let reactionsFirst = (flags & (1 << 2)) ? true : false;
1225
- let forwardsFirst = (flags & (1 << 3)) ? true : false;
1326
+ let justContacts = flags & (1 << 0) ? true : false;
1327
+ let reactionsFirst = flags & (1 << 2) ? true : false;
1328
+ let forwardsFirst = flags & (1 << 3) ? true : false;
1226
1329
  let peer = await TLObject.read(_data);
1227
- let q = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
1330
+ let q = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
1228
1331
  let id = await Primitive.Int.read(_data);
1229
1332
  let offset = await Primitive.String.read(_data);
1230
1333
  let limit = await Primitive.Int.read(_data);
1231
- return new GetStoryViewsList({ "justContacts": justContacts, "reactionsFirst": reactionsFirst, "forwardsFirst": forwardsFirst, "peer": peer, "q": q, "id": id, "offset": offset, "limit": limit });
1232
- }
1233
- /**
1234
- * Generate buffer from TLObject.
1235
- */
1334
+ return new GetStoryViewsList({
1335
+ justContacts: justContacts,
1336
+ reactionsFirst: reactionsFirst,
1337
+ forwardsFirst: forwardsFirst,
1338
+ peer: peer,
1339
+ q: q,
1340
+ id: id,
1341
+ offset: offset,
1342
+ limit: limit,
1343
+ });
1344
+ }
1345
+ /**
1346
+ * Generate buffer from TLObject.
1347
+ */
1236
1348
  write() {
1237
1349
  const b = new BytesIO();
1238
1350
  b.write(Primitive.Int.write(this.constructorId, false));
1239
1351
  // @ts-ignore
1240
1352
  let flags = 0;
1241
- flags |= this.justContacts ? (1 << 0) : 0;
1242
- flags |= this.reactionsFirst ? (1 << 2) : 0;
1243
- flags |= this.forwardsFirst ? (1 << 3) : 0;
1244
- flags |= this.q !== undefined ? (1 << 1) : 0;
1245
- b.write((Primitive.Int.write(flags)));
1353
+ flags |= this.justContacts ? 1 << 0 : 0;
1354
+ flags |= this.reactionsFirst ? 1 << 2 : 0;
1355
+ flags |= this.forwardsFirst ? 1 << 3 : 0;
1356
+ flags |= this.q !== undefined ? 1 << 1 : 0;
1357
+ b.write(Primitive.Int.write(flags));
1246
1358
  if (this.peer !== undefined) {
1247
1359
  b.write(this.peer.write());
1248
1360
  }
1249
1361
  if (this.q !== undefined) {
1250
- b.write((Primitive.String.write(this.q)));
1362
+ b.write(Primitive.String.write(this.q));
1251
1363
  }
1252
1364
  if (this.id !== undefined) {
1253
- b.write((Primitive.Int.write(this.id)));
1365
+ b.write(Primitive.Int.write(this.id));
1254
1366
  }
1255
1367
  if (this.offset !== undefined) {
1256
- b.write((Primitive.String.write(this.offset)));
1368
+ b.write(Primitive.String.write(this.offset));
1257
1369
  }
1258
1370
  if (this.limit !== undefined) {
1259
- b.write((Primitive.Int.write(this.limit)));
1371
+ b.write(Primitive.Int.write(this.limit));
1260
1372
  }
1261
1373
  return b.buffer;
1262
1374
  }
@@ -1267,27 +1379,27 @@ export class GetStoriesViews extends TLObject {
1267
1379
  id;
1268
1380
  constructor(params) {
1269
1381
  super();
1270
- this.classType = "functions";
1271
- this.className = "stories.GetStoriesViews";
1382
+ this.classType = 'functions';
1383
+ this.className = 'stories.GetStoriesViews';
1272
1384
  this.constructorId = 0x28e16cc8;
1273
1385
  this.subclassOfId = 0x4b3fc4ba;
1274
- this._slots = ["peer", "id"];
1386
+ this._slots = ['peer', 'id'];
1275
1387
  this.peer = params.peer;
1276
1388
  this.id = params.id;
1277
1389
  }
1278
1390
  /**
1279
- * Generate the TLObject from buffer.
1280
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1281
- */
1391
+ * Generate the TLObject from buffer.
1392
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1393
+ */
1282
1394
  static async read(_data, ..._args) {
1283
1395
  // no flags
1284
1396
  let peer = await TLObject.read(_data);
1285
1397
  let id = await TLObject.read(_data, Primitive.Int);
1286
- return new GetStoriesViews({ "peer": peer, "id": id });
1398
+ return new GetStoriesViews({ peer: peer, id: id });
1287
1399
  }
1288
1400
  /**
1289
- * Generate buffer from TLObject.
1290
- */
1401
+ * Generate buffer from TLObject.
1402
+ */
1291
1403
  write() {
1292
1404
  const b = new BytesIO();
1293
1405
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1296,7 +1408,7 @@ export class GetStoriesViews extends TLObject {
1296
1408
  b.write(this.peer.write());
1297
1409
  }
1298
1410
  if (this.id) {
1299
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1411
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
1300
1412
  }
1301
1413
  return b.buffer;
1302
1414
  }
@@ -1307,27 +1419,27 @@ export class ExportStoryLink extends TLObject {
1307
1419
  id;
1308
1420
  constructor(params) {
1309
1421
  super();
1310
- this.classType = "functions";
1311
- this.className = "stories.ExportStoryLink";
1422
+ this.classType = 'functions';
1423
+ this.className = 'stories.ExportStoryLink';
1312
1424
  this.constructorId = 0x7b8def20;
1313
1425
  this.subclassOfId = 0xfc541a6;
1314
- this._slots = ["peer", "id"];
1426
+ this._slots = ['peer', 'id'];
1315
1427
  this.peer = params.peer;
1316
1428
  this.id = params.id;
1317
1429
  }
1318
1430
  /**
1319
- * Generate the TLObject from buffer.
1320
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1321
- */
1431
+ * Generate the TLObject from buffer.
1432
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1433
+ */
1322
1434
  static async read(_data, ..._args) {
1323
1435
  // no flags
1324
1436
  let peer = await TLObject.read(_data);
1325
1437
  let id = await Primitive.Int.read(_data);
1326
- return new ExportStoryLink({ "peer": peer, "id": id });
1438
+ return new ExportStoryLink({ peer: peer, id: id });
1327
1439
  }
1328
1440
  /**
1329
- * Generate buffer from TLObject.
1330
- */
1441
+ * Generate buffer from TLObject.
1442
+ */
1331
1443
  write() {
1332
1444
  const b = new BytesIO();
1333
1445
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1336,7 +1448,7 @@ export class ExportStoryLink extends TLObject {
1336
1448
  b.write(this.peer.write());
1337
1449
  }
1338
1450
  if (this.id !== undefined) {
1339
- b.write((Primitive.Int.write(this.id)));
1451
+ b.write(Primitive.Int.write(this.id));
1340
1452
  }
1341
1453
  return b.buffer;
1342
1454
  }
@@ -1349,31 +1461,31 @@ export class Report extends TLObject {
1349
1461
  message;
1350
1462
  constructor(params) {
1351
1463
  super();
1352
- this.classType = "functions";
1353
- this.className = "stories.Report";
1464
+ this.classType = 'functions';
1465
+ this.className = 'stories.Report';
1354
1466
  this.constructorId = 0x19d8eb45;
1355
1467
  this.subclassOfId = 0xacd3f438;
1356
- this._slots = ["peer", "id", "option", "message"];
1468
+ this._slots = ['peer', 'id', 'option', 'message'];
1357
1469
  this.peer = params.peer;
1358
1470
  this.id = params.id;
1359
1471
  this.option = params.option;
1360
1472
  this.message = params.message;
1361
1473
  }
1362
1474
  /**
1363
- * Generate the TLObject from buffer.
1364
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1365
- */
1475
+ * Generate the TLObject from buffer.
1476
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1477
+ */
1366
1478
  static async read(_data, ..._args) {
1367
1479
  // no flags
1368
1480
  let peer = await TLObject.read(_data);
1369
1481
  let id = await TLObject.read(_data, Primitive.Int);
1370
1482
  let option = await Primitive.Bytes.read(_data);
1371
1483
  let message = await Primitive.String.read(_data);
1372
- return new Report({ "peer": peer, "id": id, "option": option, "message": message });
1484
+ return new Report({ peer: peer, id: id, option: option, message: message });
1373
1485
  }
1374
1486
  /**
1375
- * Generate buffer from TLObject.
1376
- */
1487
+ * Generate buffer from TLObject.
1488
+ */
1377
1489
  write() {
1378
1490
  const b = new BytesIO();
1379
1491
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1382,13 +1494,13 @@ export class Report extends TLObject {
1382
1494
  b.write(this.peer.write());
1383
1495
  }
1384
1496
  if (this.id) {
1385
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1497
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
1386
1498
  }
1387
1499
  if (this.option !== undefined) {
1388
- b.write((Primitive.Bytes.write(this.option)));
1500
+ b.write(Primitive.Bytes.write(this.option));
1389
1501
  }
1390
1502
  if (this.message !== undefined) {
1391
- b.write((Primitive.String.write(this.message)));
1503
+ b.write(Primitive.String.write(this.message));
1392
1504
  }
1393
1505
  return b.buffer;
1394
1506
  }
@@ -1399,36 +1511,36 @@ export class ActivateStealthMode extends TLObject {
1399
1511
  future;
1400
1512
  constructor(params) {
1401
1513
  super();
1402
- this.classType = "functions";
1403
- this.className = "stories.ActivateStealthMode";
1514
+ this.classType = 'functions';
1515
+ this.className = 'stories.ActivateStealthMode';
1404
1516
  this.constructorId = 0x57bbd166;
1405
1517
  this.subclassOfId = 0x8af52aac;
1406
- this._slots = ["past", "future"];
1518
+ this._slots = ['past', 'future'];
1407
1519
  this.past = params.past;
1408
1520
  this.future = params.future;
1409
1521
  }
1410
1522
  /**
1411
- * Generate the TLObject from buffer.
1412
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1413
- */
1523
+ * Generate the TLObject from buffer.
1524
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1525
+ */
1414
1526
  static async read(_data, ..._args) {
1415
1527
  // @ts-ignore
1416
1528
  let flags = await Primitive.Int.read(_data);
1417
- let past = (flags & (1 << 0)) ? true : false;
1418
- let future = (flags & (1 << 1)) ? true : false;
1419
- return new ActivateStealthMode({ "past": past, "future": future });
1529
+ let past = flags & (1 << 0) ? true : false;
1530
+ let future = flags & (1 << 1) ? true : false;
1531
+ return new ActivateStealthMode({ past: past, future: future });
1420
1532
  }
1421
1533
  /**
1422
- * Generate buffer from TLObject.
1423
- */
1534
+ * Generate buffer from TLObject.
1535
+ */
1424
1536
  write() {
1425
1537
  const b = new BytesIO();
1426
1538
  b.write(Primitive.Int.write(this.constructorId, false));
1427
1539
  // @ts-ignore
1428
1540
  let flags = 0;
1429
- flags |= this.past ? (1 << 0) : 0;
1430
- flags |= this.future ? (1 << 1) : 0;
1431
- b.write((Primitive.Int.write(flags)));
1541
+ flags |= this.past ? 1 << 0 : 0;
1542
+ flags |= this.future ? 1 << 1 : 0;
1543
+ b.write(Primitive.Int.write(flags));
1432
1544
  return b.buffer;
1433
1545
  }
1434
1546
  }
@@ -1440,44 +1552,49 @@ export class SendReaction extends TLObject {
1440
1552
  reaction;
1441
1553
  constructor(params) {
1442
1554
  super();
1443
- this.classType = "functions";
1444
- this.className = "stories.SendReaction";
1555
+ this.classType = 'functions';
1556
+ this.className = 'stories.SendReaction';
1445
1557
  this.constructorId = 0x7fd736b2;
1446
1558
  this.subclassOfId = 0x8af52aac;
1447
- this._slots = ["addToRecent", "peer", "storyId", "reaction"];
1559
+ this._slots = ['addToRecent', 'peer', 'storyId', 'reaction'];
1448
1560
  this.addToRecent = params.addToRecent;
1449
1561
  this.peer = params.peer;
1450
1562
  this.storyId = params.storyId;
1451
1563
  this.reaction = params.reaction;
1452
1564
  }
1453
1565
  /**
1454
- * Generate the TLObject from buffer.
1455
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1456
- */
1566
+ * Generate the TLObject from buffer.
1567
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1568
+ */
1457
1569
  static async read(_data, ..._args) {
1458
1570
  // @ts-ignore
1459
1571
  let flags = await Primitive.Int.read(_data);
1460
- let addToRecent = (flags & (1 << 0)) ? true : false;
1572
+ let addToRecent = flags & (1 << 0) ? true : false;
1461
1573
  let peer = await TLObject.read(_data);
1462
1574
  let storyId = await Primitive.Int.read(_data);
1463
1575
  let reaction = await TLObject.read(_data);
1464
- return new SendReaction({ "addToRecent": addToRecent, "peer": peer, "storyId": storyId, "reaction": reaction });
1576
+ return new SendReaction({
1577
+ addToRecent: addToRecent,
1578
+ peer: peer,
1579
+ storyId: storyId,
1580
+ reaction: reaction,
1581
+ });
1465
1582
  }
1466
1583
  /**
1467
- * Generate buffer from TLObject.
1468
- */
1584
+ * Generate buffer from TLObject.
1585
+ */
1469
1586
  write() {
1470
1587
  const b = new BytesIO();
1471
1588
  b.write(Primitive.Int.write(this.constructorId, false));
1472
1589
  // @ts-ignore
1473
1590
  let flags = 0;
1474
- flags |= this.addToRecent ? (1 << 0) : 0;
1475
- b.write((Primitive.Int.write(flags)));
1591
+ flags |= this.addToRecent ? 1 << 0 : 0;
1592
+ b.write(Primitive.Int.write(flags));
1476
1593
  if (this.peer !== undefined) {
1477
1594
  b.write(this.peer.write());
1478
1595
  }
1479
1596
  if (this.storyId !== undefined) {
1480
- b.write((Primitive.Int.write(this.storyId)));
1597
+ b.write(Primitive.Int.write(this.storyId));
1481
1598
  }
1482
1599
  if (this.reaction !== undefined) {
1483
1600
  b.write(this.reaction.write());
@@ -1490,25 +1607,25 @@ export class GetPeerStories extends TLObject {
1490
1607
  peer;
1491
1608
  constructor(params) {
1492
1609
  super();
1493
- this.classType = "functions";
1494
- this.className = "stories.GetPeerStories";
1610
+ this.classType = 'functions';
1611
+ this.className = 'stories.GetPeerStories';
1495
1612
  this.constructorId = 0x2c4ada50;
1496
1613
  this.subclassOfId = 0x9d56cfd0;
1497
- this._slots = ["peer"];
1614
+ this._slots = ['peer'];
1498
1615
  this.peer = params.peer;
1499
1616
  }
1500
1617
  /**
1501
- * Generate the TLObject from buffer.
1502
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1503
- */
1618
+ * Generate the TLObject from buffer.
1619
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1620
+ */
1504
1621
  static async read(_data, ..._args) {
1505
1622
  // no flags
1506
1623
  let peer = await TLObject.read(_data);
1507
- return new GetPeerStories({ "peer": peer });
1624
+ return new GetPeerStories({ peer: peer });
1508
1625
  }
1509
1626
  /**
1510
- * Generate buffer from TLObject.
1511
- */
1627
+ * Generate buffer from TLObject.
1628
+ */
1512
1629
  write() {
1513
1630
  const b = new BytesIO();
1514
1631
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1523,23 +1640,23 @@ export class GetAllReadPeerStories extends TLObject {
1523
1640
  __response__;
1524
1641
  constructor() {
1525
1642
  super();
1526
- this.classType = "functions";
1527
- this.className = "stories.GetAllReadPeerStories";
1643
+ this.classType = 'functions';
1644
+ this.className = 'stories.GetAllReadPeerStories';
1528
1645
  this.constructorId = 0x9b5ae7f9;
1529
1646
  this.subclassOfId = 0x8af52aac;
1530
1647
  this._slots = [];
1531
1648
  }
1532
1649
  /**
1533
- * Generate the TLObject from buffer.
1534
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1535
- */
1650
+ * Generate the TLObject from buffer.
1651
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1652
+ */
1536
1653
  static async read(_data, ..._args) {
1537
1654
  // no flags
1538
1655
  return new GetAllReadPeerStories();
1539
1656
  }
1540
1657
  /**
1541
- * Generate buffer from TLObject.
1542
- */
1658
+ * Generate buffer from TLObject.
1659
+ */
1543
1660
  write() {
1544
1661
  const b = new BytesIO();
1545
1662
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1552,31 +1669,31 @@ export class GetPeerMaxIDs extends TLObject {
1552
1669
  id;
1553
1670
  constructor(params) {
1554
1671
  super();
1555
- this.classType = "functions";
1556
- this.className = "stories.GetPeerMaxIDs";
1672
+ this.classType = 'functions';
1673
+ this.className = 'stories.GetPeerMaxIDs';
1557
1674
  this.constructorId = 0x78499170;
1558
1675
  this.subclassOfId = 0x3cb69156;
1559
- this._slots = ["id"];
1676
+ this._slots = ['id'];
1560
1677
  this.id = params.id;
1561
1678
  }
1562
1679
  /**
1563
- * Generate the TLObject from buffer.
1564
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1565
- */
1680
+ * Generate the TLObject from buffer.
1681
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1682
+ */
1566
1683
  static async read(_data, ..._args) {
1567
1684
  // no flags
1568
1685
  let id = await TLObject.read(_data);
1569
- return new GetPeerMaxIDs({ "id": id });
1686
+ return new GetPeerMaxIDs({ id: id });
1570
1687
  }
1571
1688
  /**
1572
- * Generate buffer from TLObject.
1573
- */
1689
+ * Generate buffer from TLObject.
1690
+ */
1574
1691
  write() {
1575
1692
  const b = new BytesIO();
1576
1693
  b.write(Primitive.Int.write(this.constructorId, false));
1577
1694
  // no flags
1578
1695
  if (this.id) {
1579
- b.write((Primitive.Vector.write(this.id)));
1696
+ b.write(Primitive.Vector.write(this.id));
1580
1697
  }
1581
1698
  return b.buffer;
1582
1699
  }
@@ -1585,23 +1702,23 @@ export class GetChatsToSend extends TLObject {
1585
1702
  __response__;
1586
1703
  constructor() {
1587
1704
  super();
1588
- this.classType = "functions";
1589
- this.className = "stories.GetChatsToSend";
1705
+ this.classType = 'functions';
1706
+ this.className = 'stories.GetChatsToSend';
1590
1707
  this.constructorId = 0xa56a8b60;
1591
1708
  this.subclassOfId = 0x99d5cb14;
1592
1709
  this._slots = [];
1593
1710
  }
1594
1711
  /**
1595
- * Generate the TLObject from buffer.
1596
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1597
- */
1712
+ * Generate the TLObject from buffer.
1713
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1714
+ */
1598
1715
  static async read(_data, ..._args) {
1599
1716
  // no flags
1600
1717
  return new GetChatsToSend();
1601
1718
  }
1602
1719
  /**
1603
- * Generate buffer from TLObject.
1604
- */
1720
+ * Generate buffer from TLObject.
1721
+ */
1605
1722
  write() {
1606
1723
  const b = new BytesIO();
1607
1724
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1615,27 +1732,27 @@ export class TogglePeerStoriesHidden extends TLObject {
1615
1732
  hidden;
1616
1733
  constructor(params) {
1617
1734
  super();
1618
- this.classType = "functions";
1619
- this.className = "stories.TogglePeerStoriesHidden";
1735
+ this.classType = 'functions';
1736
+ this.className = 'stories.TogglePeerStoriesHidden';
1620
1737
  this.constructorId = 0xbd0415c4;
1621
1738
  this.subclassOfId = 0xf5b399ac;
1622
- this._slots = ["peer", "hidden"];
1739
+ this._slots = ['peer', 'hidden'];
1623
1740
  this.peer = params.peer;
1624
1741
  this.hidden = params.hidden;
1625
1742
  }
1626
1743
  /**
1627
- * Generate the TLObject from buffer.
1628
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1629
- */
1744
+ * Generate the TLObject from buffer.
1745
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1746
+ */
1630
1747
  static async read(_data, ..._args) {
1631
1748
  // no flags
1632
1749
  let peer = await TLObject.read(_data);
1633
1750
  let hidden = await Primitive.Bool.read(_data);
1634
- return new TogglePeerStoriesHidden({ "peer": peer, "hidden": hidden });
1751
+ return new TogglePeerStoriesHidden({ peer: peer, hidden: hidden });
1635
1752
  }
1636
1753
  /**
1637
- * Generate buffer from TLObject.
1638
- */
1754
+ * Generate buffer from TLObject.
1755
+ */
1639
1756
  write() {
1640
1757
  const b = new BytesIO();
1641
1758
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1644,7 +1761,7 @@ export class TogglePeerStoriesHidden extends TLObject {
1644
1761
  b.write(this.peer.write());
1645
1762
  }
1646
1763
  if (this.hidden !== undefined) {
1647
- b.write((Primitive.Bool.write(this.hidden)));
1764
+ b.write(Primitive.Bool.write(this.hidden));
1648
1765
  }
1649
1766
  return b.buffer;
1650
1767
  }
@@ -1659,11 +1776,11 @@ export class GetStoryReactionsList extends TLObject {
1659
1776
  limit;
1660
1777
  constructor(params) {
1661
1778
  super();
1662
- this.classType = "functions";
1663
- this.className = "stories.GetStoryReactionsList";
1779
+ this.classType = 'functions';
1780
+ this.className = 'stories.GetStoryReactionsList';
1664
1781
  this.constructorId = 0xb9b2881f;
1665
1782
  this.subclassOfId = 0x46f91e3;
1666
- this._slots = ["forwardsFirst", "peer", "id", "reaction", "offset", "limit"];
1783
+ this._slots = ['forwardsFirst', 'peer', 'id', 'reaction', 'offset', 'limit'];
1667
1784
  this.forwardsFirst = params.forwardsFirst;
1668
1785
  this.peer = params.peer;
1669
1786
  this.id = params.id;
@@ -1672,46 +1789,53 @@ export class GetStoryReactionsList extends TLObject {
1672
1789
  this.limit = params.limit;
1673
1790
  }
1674
1791
  /**
1675
- * Generate the TLObject from buffer.
1676
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1677
- */
1792
+ * Generate the TLObject from buffer.
1793
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1794
+ */
1678
1795
  static async read(_data, ..._args) {
1679
1796
  // @ts-ignore
1680
1797
  let flags = await Primitive.Int.read(_data);
1681
- let forwardsFirst = (flags & (1 << 2)) ? true : false;
1798
+ let forwardsFirst = flags & (1 << 2) ? true : false;
1682
1799
  let peer = await TLObject.read(_data);
1683
1800
  let id = await Primitive.Int.read(_data);
1684
- let reaction = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
1685
- let offset = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
1801
+ let reaction = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
1802
+ let offset = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
1686
1803
  let limit = await Primitive.Int.read(_data);
1687
- return new GetStoryReactionsList({ "forwardsFirst": forwardsFirst, "peer": peer, "id": id, "reaction": reaction, "offset": offset, "limit": limit });
1688
- }
1689
- /**
1690
- * Generate buffer from TLObject.
1691
- */
1804
+ return new GetStoryReactionsList({
1805
+ forwardsFirst: forwardsFirst,
1806
+ peer: peer,
1807
+ id: id,
1808
+ reaction: reaction,
1809
+ offset: offset,
1810
+ limit: limit,
1811
+ });
1812
+ }
1813
+ /**
1814
+ * Generate buffer from TLObject.
1815
+ */
1692
1816
  write() {
1693
1817
  const b = new BytesIO();
1694
1818
  b.write(Primitive.Int.write(this.constructorId, false));
1695
1819
  // @ts-ignore
1696
1820
  let flags = 0;
1697
- flags |= this.forwardsFirst ? (1 << 2) : 0;
1698
- flags |= this.reaction !== undefined ? (1 << 0) : 0;
1699
- flags |= this.offset !== undefined ? (1 << 1) : 0;
1700
- b.write((Primitive.Int.write(flags)));
1821
+ flags |= this.forwardsFirst ? 1 << 2 : 0;
1822
+ flags |= this.reaction !== undefined ? 1 << 0 : 0;
1823
+ flags |= this.offset !== undefined ? 1 << 1 : 0;
1824
+ b.write(Primitive.Int.write(flags));
1701
1825
  if (this.peer !== undefined) {
1702
1826
  b.write(this.peer.write());
1703
1827
  }
1704
1828
  if (this.id !== undefined) {
1705
- b.write((Primitive.Int.write(this.id)));
1829
+ b.write(Primitive.Int.write(this.id));
1706
1830
  }
1707
1831
  if (this.reaction !== undefined) {
1708
1832
  b.write(this.reaction.write());
1709
1833
  }
1710
1834
  if (this.offset !== undefined) {
1711
- b.write((Primitive.String.write(this.offset)));
1835
+ b.write(Primitive.String.write(this.offset));
1712
1836
  }
1713
1837
  if (this.limit !== undefined) {
1714
- b.write((Primitive.Int.write(this.limit)));
1838
+ b.write(Primitive.Int.write(this.limit));
1715
1839
  }
1716
1840
  return b.buffer;
1717
1841
  }
@@ -1722,27 +1846,27 @@ export class TogglePinnedToTop extends TLObject {
1722
1846
  id;
1723
1847
  constructor(params) {
1724
1848
  super();
1725
- this.classType = "functions";
1726
- this.className = "stories.TogglePinnedToTop";
1849
+ this.classType = 'functions';
1850
+ this.className = 'stories.TogglePinnedToTop';
1727
1851
  this.constructorId = 0xb297e9b;
1728
1852
  this.subclassOfId = 0xf5b399ac;
1729
- this._slots = ["peer", "id"];
1853
+ this._slots = ['peer', 'id'];
1730
1854
  this.peer = params.peer;
1731
1855
  this.id = params.id;
1732
1856
  }
1733
1857
  /**
1734
- * Generate the TLObject from buffer.
1735
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1736
- */
1858
+ * Generate the TLObject from buffer.
1859
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1860
+ */
1737
1861
  static async read(_data, ..._args) {
1738
1862
  // no flags
1739
1863
  let peer = await TLObject.read(_data);
1740
1864
  let id = await TLObject.read(_data, Primitive.Int);
1741
- return new TogglePinnedToTop({ "peer": peer, "id": id });
1865
+ return new TogglePinnedToTop({ peer: peer, id: id });
1742
1866
  }
1743
1867
  /**
1744
- * Generate buffer from TLObject.
1745
- */
1868
+ * Generate buffer from TLObject.
1869
+ */
1746
1870
  write() {
1747
1871
  const b = new BytesIO();
1748
1872
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1751,7 +1875,7 @@ export class TogglePinnedToTop extends TLObject {
1751
1875
  b.write(this.peer.write());
1752
1876
  }
1753
1877
  if (this.id) {
1754
- b.write((Primitive.Vector.write(this.id, Primitive.Int)));
1878
+ b.write(Primitive.Vector.write(this.id, Primitive.Int));
1755
1879
  }
1756
1880
  return b.buffer;
1757
1881
  }
@@ -1765,11 +1889,11 @@ export class SearchPosts extends TLObject {
1765
1889
  limit;
1766
1890
  constructor(params) {
1767
1891
  super();
1768
- this.classType = "functions";
1769
- this.className = "stories.SearchPosts";
1892
+ this.classType = 'functions';
1893
+ this.className = 'stories.SearchPosts';
1770
1894
  this.constructorId = 0xd1810907;
1771
1895
  this.subclassOfId = 0x17790b35;
1772
- this._slots = ["hashtag", "area", "peer", "offset", "limit"];
1896
+ this._slots = ['hashtag', 'area', 'peer', 'offset', 'limit'];
1773
1897
  this.hashtag = params.hashtag;
1774
1898
  this.area = params.area;
1775
1899
  this.peer = params.peer;
@@ -1777,33 +1901,39 @@ export class SearchPosts extends TLObject {
1777
1901
  this.limit = params.limit;
1778
1902
  }
1779
1903
  /**
1780
- * Generate the TLObject from buffer.
1781
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1782
- */
1904
+ * Generate the TLObject from buffer.
1905
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1906
+ */
1783
1907
  static async read(_data, ..._args) {
1784
1908
  // @ts-ignore
1785
1909
  let flags = await Primitive.Int.read(_data);
1786
- let hashtag = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
1787
- let area = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
1788
- let peer = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
1910
+ let hashtag = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
1911
+ let area = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
1912
+ let peer = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
1789
1913
  let offset = await Primitive.String.read(_data);
1790
1914
  let limit = await Primitive.Int.read(_data);
1791
- return new SearchPosts({ "hashtag": hashtag, "area": area, "peer": peer, "offset": offset, "limit": limit });
1915
+ return new SearchPosts({
1916
+ hashtag: hashtag,
1917
+ area: area,
1918
+ peer: peer,
1919
+ offset: offset,
1920
+ limit: limit,
1921
+ });
1792
1922
  }
1793
1923
  /**
1794
- * Generate buffer from TLObject.
1795
- */
1924
+ * Generate buffer from TLObject.
1925
+ */
1796
1926
  write() {
1797
1927
  const b = new BytesIO();
1798
1928
  b.write(Primitive.Int.write(this.constructorId, false));
1799
1929
  // @ts-ignore
1800
1930
  let flags = 0;
1801
- flags |= this.hashtag !== undefined ? (1 << 0) : 0;
1802
- flags |= this.area !== undefined ? (1 << 1) : 0;
1803
- flags |= this.peer !== undefined ? (1 << 2) : 0;
1804
- b.write((Primitive.Int.write(flags)));
1931
+ flags |= this.hashtag !== undefined ? 1 << 0 : 0;
1932
+ flags |= this.area !== undefined ? 1 << 1 : 0;
1933
+ flags |= this.peer !== undefined ? 1 << 2 : 0;
1934
+ b.write(Primitive.Int.write(flags));
1805
1935
  if (this.hashtag !== undefined) {
1806
- b.write((Primitive.String.write(this.hashtag)));
1936
+ b.write(Primitive.String.write(this.hashtag));
1807
1937
  }
1808
1938
  if (this.area !== undefined) {
1809
1939
  b.write(this.area.write());
@@ -1812,10 +1942,10 @@ export class SearchPosts extends TLObject {
1812
1942
  b.write(this.peer.write());
1813
1943
  }
1814
1944
  if (this.offset !== undefined) {
1815
- b.write((Primitive.String.write(this.offset)));
1945
+ b.write(Primitive.String.write(this.offset));
1816
1946
  }
1817
1947
  if (this.limit !== undefined) {
1818
- b.write((Primitive.Int.write(this.limit)));
1948
+ b.write(Primitive.Int.write(this.limit));
1819
1949
  }
1820
1950
  return b.buffer;
1821
1951
  }
@@ -1827,29 +1957,29 @@ export class CreateAlbum extends TLObject {
1827
1957
  stories;
1828
1958
  constructor(params) {
1829
1959
  super();
1830
- this.classType = "functions";
1831
- this.className = "stories.CreateAlbum";
1960
+ this.classType = 'functions';
1961
+ this.className = 'stories.CreateAlbum';
1832
1962
  this.constructorId = 0xa36396e5;
1833
1963
  this.subclassOfId = 0x7c8c5ea2;
1834
- this._slots = ["peer", "title", "stories"];
1964
+ this._slots = ['peer', 'title', 'stories'];
1835
1965
  this.peer = params.peer;
1836
1966
  this.title = params.title;
1837
1967
  this.stories = params.stories;
1838
1968
  }
1839
1969
  /**
1840
- * Generate the TLObject from buffer.
1841
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1842
- */
1970
+ * Generate the TLObject from buffer.
1971
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1972
+ */
1843
1973
  static async read(_data, ..._args) {
1844
1974
  // no flags
1845
1975
  let peer = await TLObject.read(_data);
1846
1976
  let title = await Primitive.String.read(_data);
1847
1977
  let stories = await TLObject.read(_data, Primitive.Int);
1848
- return new CreateAlbum({ "peer": peer, "title": title, "stories": stories });
1978
+ return new CreateAlbum({ peer: peer, title: title, stories: stories });
1849
1979
  }
1850
1980
  /**
1851
- * Generate buffer from TLObject.
1852
- */
1981
+ * Generate buffer from TLObject.
1982
+ */
1853
1983
  write() {
1854
1984
  const b = new BytesIO();
1855
1985
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1858,10 +1988,10 @@ export class CreateAlbum extends TLObject {
1858
1988
  b.write(this.peer.write());
1859
1989
  }
1860
1990
  if (this.title !== undefined) {
1861
- b.write((Primitive.String.write(this.title)));
1991
+ b.write(Primitive.String.write(this.title));
1862
1992
  }
1863
1993
  if (this.stories) {
1864
- b.write((Primitive.Vector.write(this.stories, Primitive.Int)));
1994
+ b.write(Primitive.Vector.write(this.stories, Primitive.Int));
1865
1995
  }
1866
1996
  return b.buffer;
1867
1997
  }
@@ -1876,11 +2006,11 @@ export class UpdateAlbum extends TLObject {
1876
2006
  order;
1877
2007
  constructor(params) {
1878
2008
  super();
1879
- this.classType = "functions";
1880
- this.className = "stories.UpdateAlbum";
2009
+ this.classType = 'functions';
2010
+ this.className = 'stories.UpdateAlbum';
1881
2011
  this.constructorId = 0x5e5259b6;
1882
2012
  this.subclassOfId = 0x7c8c5ea2;
1883
- this._slots = ["peer", "albumId", "title", "deleteStories", "addStories", "order"];
2013
+ this._slots = ['peer', 'albumId', 'title', 'deleteStories', 'addStories', 'order'];
1884
2014
  this.peer = params.peer;
1885
2015
  this.albumId = params.albumId;
1886
2016
  this.title = params.title;
@@ -1889,50 +2019,57 @@ export class UpdateAlbum extends TLObject {
1889
2019
  this.order = params.order;
1890
2020
  }
1891
2021
  /**
1892
- * Generate the TLObject from buffer.
1893
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1894
- */
2022
+ * Generate the TLObject from buffer.
2023
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2024
+ */
1895
2025
  static async read(_data, ..._args) {
1896
2026
  // @ts-ignore
1897
2027
  let flags = await Primitive.Int.read(_data);
1898
2028
  let peer = await TLObject.read(_data);
1899
2029
  let albumId = await Primitive.Int.read(_data);
1900
- let title = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
1901
- let deleteStories = (flags & (1 << 1)) ? await TLObject.read(_data, Primitive.Int) : [];
1902
- let addStories = (flags & (1 << 2)) ? await TLObject.read(_data, Primitive.Int) : [];
1903
- let order = (flags & (1 << 3)) ? await TLObject.read(_data, Primitive.Int) : [];
1904
- return new UpdateAlbum({ "peer": peer, "albumId": albumId, "title": title, "deleteStories": deleteStories, "addStories": addStories, "order": order });
1905
- }
1906
- /**
1907
- * Generate buffer from TLObject.
1908
- */
2030
+ let title = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2031
+ let deleteStories = flags & (1 << 1) ? await TLObject.read(_data, Primitive.Int) : [];
2032
+ let addStories = flags & (1 << 2) ? await TLObject.read(_data, Primitive.Int) : [];
2033
+ let order = flags & (1 << 3) ? await TLObject.read(_data, Primitive.Int) : [];
2034
+ return new UpdateAlbum({
2035
+ peer: peer,
2036
+ albumId: albumId,
2037
+ title: title,
2038
+ deleteStories: deleteStories,
2039
+ addStories: addStories,
2040
+ order: order,
2041
+ });
2042
+ }
2043
+ /**
2044
+ * Generate buffer from TLObject.
2045
+ */
1909
2046
  write() {
1910
2047
  const b = new BytesIO();
1911
2048
  b.write(Primitive.Int.write(this.constructorId, false));
1912
2049
  // @ts-ignore
1913
2050
  let flags = 0;
1914
- flags |= this.title !== undefined ? (1 << 0) : 0;
1915
- flags |= this.deleteStories ? (1 << 1) : 0;
1916
- flags |= this.addStories ? (1 << 2) : 0;
1917
- flags |= this.order ? (1 << 3) : 0;
1918
- b.write((Primitive.Int.write(flags)));
2051
+ flags |= this.title !== undefined ? 1 << 0 : 0;
2052
+ flags |= this.deleteStories ? 1 << 1 : 0;
2053
+ flags |= this.addStories ? 1 << 2 : 0;
2054
+ flags |= this.order ? 1 << 3 : 0;
2055
+ b.write(Primitive.Int.write(flags));
1919
2056
  if (this.peer !== undefined) {
1920
2057
  b.write(this.peer.write());
1921
2058
  }
1922
2059
  if (this.albumId !== undefined) {
1923
- b.write((Primitive.Int.write(this.albumId)));
2060
+ b.write(Primitive.Int.write(this.albumId));
1924
2061
  }
1925
2062
  if (this.title !== undefined) {
1926
- b.write((Primitive.String.write(this.title)));
2063
+ b.write(Primitive.String.write(this.title));
1927
2064
  }
1928
2065
  if (this.deleteStories) {
1929
- b.write((Primitive.Vector.write(this.deleteStories, Primitive.Int)));
2066
+ b.write(Primitive.Vector.write(this.deleteStories, Primitive.Int));
1930
2067
  }
1931
2068
  if (this.addStories) {
1932
- b.write((Primitive.Vector.write(this.addStories, Primitive.Int)));
2069
+ b.write(Primitive.Vector.write(this.addStories, Primitive.Int));
1933
2070
  }
1934
2071
  if (this.order) {
1935
- b.write((Primitive.Vector.write(this.order, Primitive.Int)));
2072
+ b.write(Primitive.Vector.write(this.order, Primitive.Int));
1936
2073
  }
1937
2074
  return b.buffer;
1938
2075
  }
@@ -1943,27 +2080,27 @@ export class ReorderAlbums extends TLObject {
1943
2080
  order;
1944
2081
  constructor(params) {
1945
2082
  super();
1946
- this.classType = "functions";
1947
- this.className = "stories.ReorderAlbums";
2083
+ this.classType = 'functions';
2084
+ this.className = 'stories.ReorderAlbums';
1948
2085
  this.constructorId = 0x8535fbd9;
1949
2086
  this.subclassOfId = 0xf5b399ac;
1950
- this._slots = ["peer", "order"];
2087
+ this._slots = ['peer', 'order'];
1951
2088
  this.peer = params.peer;
1952
2089
  this.order = params.order;
1953
2090
  }
1954
2091
  /**
1955
- * Generate the TLObject from buffer.
1956
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1957
- */
2092
+ * Generate the TLObject from buffer.
2093
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2094
+ */
1958
2095
  static async read(_data, ..._args) {
1959
2096
  // no flags
1960
2097
  let peer = await TLObject.read(_data);
1961
2098
  let order = await TLObject.read(_data, Primitive.Int);
1962
- return new ReorderAlbums({ "peer": peer, "order": order });
2099
+ return new ReorderAlbums({ peer: peer, order: order });
1963
2100
  }
1964
2101
  /**
1965
- * Generate buffer from TLObject.
1966
- */
2102
+ * Generate buffer from TLObject.
2103
+ */
1967
2104
  write() {
1968
2105
  const b = new BytesIO();
1969
2106
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1972,7 +2109,7 @@ export class ReorderAlbums extends TLObject {
1972
2109
  b.write(this.peer.write());
1973
2110
  }
1974
2111
  if (this.order) {
1975
- b.write((Primitive.Vector.write(this.order, Primitive.Int)));
2112
+ b.write(Primitive.Vector.write(this.order, Primitive.Int));
1976
2113
  }
1977
2114
  return b.buffer;
1978
2115
  }
@@ -1983,27 +2120,27 @@ export class DeleteAlbum extends TLObject {
1983
2120
  albumId;
1984
2121
  constructor(params) {
1985
2122
  super();
1986
- this.classType = "functions";
1987
- this.className = "stories.DeleteAlbum";
2123
+ this.classType = 'functions';
2124
+ this.className = 'stories.DeleteAlbum';
1988
2125
  this.constructorId = 0x8d3456d0;
1989
2126
  this.subclassOfId = 0xf5b399ac;
1990
- this._slots = ["peer", "albumId"];
2127
+ this._slots = ['peer', 'albumId'];
1991
2128
  this.peer = params.peer;
1992
2129
  this.albumId = params.albumId;
1993
2130
  }
1994
2131
  /**
1995
- * Generate the TLObject from buffer.
1996
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1997
- */
2132
+ * Generate the TLObject from buffer.
2133
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2134
+ */
1998
2135
  static async read(_data, ..._args) {
1999
2136
  // no flags
2000
2137
  let peer = await TLObject.read(_data);
2001
2138
  let albumId = await Primitive.Int.read(_data);
2002
- return new DeleteAlbum({ "peer": peer, "albumId": albumId });
2139
+ return new DeleteAlbum({ peer: peer, albumId: albumId });
2003
2140
  }
2004
2141
  /**
2005
- * Generate buffer from TLObject.
2006
- */
2142
+ * Generate buffer from TLObject.
2143
+ */
2007
2144
  write() {
2008
2145
  const b = new BytesIO();
2009
2146
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2012,7 +2149,7 @@ export class DeleteAlbum extends TLObject {
2012
2149
  b.write(this.peer.write());
2013
2150
  }
2014
2151
  if (this.albumId !== undefined) {
2015
- b.write((Primitive.Int.write(this.albumId)));
2152
+ b.write(Primitive.Int.write(this.albumId));
2016
2153
  }
2017
2154
  return b.buffer;
2018
2155
  }
@@ -2023,27 +2160,27 @@ export class GetAlbums extends TLObject {
2023
2160
  hash;
2024
2161
  constructor(params) {
2025
2162
  super();
2026
- this.classType = "functions";
2027
- this.className = "stories.GetAlbums";
2163
+ this.classType = 'functions';
2164
+ this.className = 'stories.GetAlbums';
2028
2165
  this.constructorId = 0x25b3eac7;
2029
2166
  this.subclassOfId = 0x5a73d39;
2030
- this._slots = ["peer", "hash"];
2167
+ this._slots = ['peer', 'hash'];
2031
2168
  this.peer = params.peer;
2032
2169
  this.hash = params.hash;
2033
2170
  }
2034
2171
  /**
2035
- * Generate the TLObject from buffer.
2036
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2037
- */
2172
+ * Generate the TLObject from buffer.
2173
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2174
+ */
2038
2175
  static async read(_data, ..._args) {
2039
2176
  // no flags
2040
2177
  let peer = await TLObject.read(_data);
2041
2178
  let hash = await Primitive.Long.read(_data);
2042
- return new GetAlbums({ "peer": peer, "hash": hash });
2179
+ return new GetAlbums({ peer: peer, hash: hash });
2043
2180
  }
2044
2181
  /**
2045
- * Generate buffer from TLObject.
2046
- */
2182
+ * Generate buffer from TLObject.
2183
+ */
2047
2184
  write() {
2048
2185
  const b = new BytesIO();
2049
2186
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2052,7 +2189,7 @@ export class GetAlbums extends TLObject {
2052
2189
  b.write(this.peer.write());
2053
2190
  }
2054
2191
  if (this.hash !== undefined) {
2055
- b.write((Primitive.Long.write(this.hash)));
2192
+ b.write(Primitive.Long.write(this.hash));
2056
2193
  }
2057
2194
  return b.buffer;
2058
2195
  }
@@ -2065,31 +2202,31 @@ export class GetAlbumStories extends TLObject {
2065
2202
  limit;
2066
2203
  constructor(params) {
2067
2204
  super();
2068
- this.classType = "functions";
2069
- this.className = "stories.GetAlbumStories";
2205
+ this.classType = 'functions';
2206
+ this.className = 'stories.GetAlbumStories';
2070
2207
  this.constructorId = 0xac806d61;
2071
2208
  this.subclassOfId = 0x251c0c2c;
2072
- this._slots = ["peer", "albumId", "offset", "limit"];
2209
+ this._slots = ['peer', 'albumId', 'offset', 'limit'];
2073
2210
  this.peer = params.peer;
2074
2211
  this.albumId = params.albumId;
2075
2212
  this.offset = params.offset;
2076
2213
  this.limit = params.limit;
2077
2214
  }
2078
2215
  /**
2079
- * Generate the TLObject from buffer.
2080
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2081
- */
2216
+ * Generate the TLObject from buffer.
2217
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2218
+ */
2082
2219
  static async read(_data, ..._args) {
2083
2220
  // no flags
2084
2221
  let peer = await TLObject.read(_data);
2085
2222
  let albumId = await Primitive.Int.read(_data);
2086
2223
  let offset = await Primitive.Int.read(_data);
2087
2224
  let limit = await Primitive.Int.read(_data);
2088
- return new GetAlbumStories({ "peer": peer, "albumId": albumId, "offset": offset, "limit": limit });
2225
+ return new GetAlbumStories({ peer: peer, albumId: albumId, offset: offset, limit: limit });
2089
2226
  }
2090
2227
  /**
2091
- * Generate buffer from TLObject.
2092
- */
2228
+ * Generate buffer from TLObject.
2229
+ */
2093
2230
  write() {
2094
2231
  const b = new BytesIO();
2095
2232
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2098,13 +2235,13 @@ export class GetAlbumStories extends TLObject {
2098
2235
  b.write(this.peer.write());
2099
2236
  }
2100
2237
  if (this.albumId !== undefined) {
2101
- b.write((Primitive.Int.write(this.albumId)));
2238
+ b.write(Primitive.Int.write(this.albumId));
2102
2239
  }
2103
2240
  if (this.offset !== undefined) {
2104
- b.write((Primitive.Int.write(this.offset)));
2241
+ b.write(Primitive.Int.write(this.offset));
2105
2242
  }
2106
2243
  if (this.limit !== undefined) {
2107
- b.write((Primitive.Int.write(this.limit)));
2244
+ b.write(Primitive.Int.write(this.limit));
2108
2245
  }
2109
2246
  return b.buffer;
2110
2247
  }
@@ -2123,11 +2260,22 @@ export class StartLive extends TLObject {
2123
2260
  sendPaidMessagesStars;
2124
2261
  constructor(params) {
2125
2262
  super();
2126
- this.classType = "functions";
2127
- this.className = "stories.StartLive";
2263
+ this.classType = 'functions';
2264
+ this.className = 'stories.StartLive';
2128
2265
  this.constructorId = 0xd069ccde;
2129
2266
  this.subclassOfId = 0x8af52aac;
2130
- this._slots = ["pinned", "noforwards", "rtmpStream", "peer", "caption", "entities", "privacyRules", "randomId", "messagesEnabled", "sendPaidMessagesStars"];
2267
+ this._slots = [
2268
+ 'pinned',
2269
+ 'noforwards',
2270
+ 'rtmpStream',
2271
+ 'peer',
2272
+ 'caption',
2273
+ 'entities',
2274
+ 'privacyRules',
2275
+ 'randomId',
2276
+ 'messagesEnabled',
2277
+ 'sendPaidMessagesStars',
2278
+ ];
2131
2279
  this.pinned = params.pinned;
2132
2280
  this.noforwards = params.noforwards;
2133
2281
  this.rtmpStream = params.rtmpStream;
@@ -2140,60 +2288,71 @@ export class StartLive extends TLObject {
2140
2288
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
2141
2289
  }
2142
2290
  /**
2143
- * Generate the TLObject from buffer.
2144
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2145
- */
2291
+ * Generate the TLObject from buffer.
2292
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2293
+ */
2146
2294
  static async read(_data, ..._args) {
2147
2295
  // @ts-ignore
2148
2296
  let flags = await Primitive.Int.read(_data);
2149
- let pinned = (flags & (1 << 2)) ? true : false;
2150
- let noforwards = (flags & (1 << 4)) ? true : false;
2151
- let rtmpStream = (flags & (1 << 5)) ? true : false;
2297
+ let pinned = flags & (1 << 2) ? true : false;
2298
+ let noforwards = flags & (1 << 4) ? true : false;
2299
+ let rtmpStream = flags & (1 << 5) ? true : false;
2152
2300
  let peer = await TLObject.read(_data);
2153
- let caption = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
2154
- let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
2301
+ let caption = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
2302
+ let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
2155
2303
  let privacyRules = await TLObject.read(_data);
2156
2304
  let randomId = await Primitive.Long.read(_data);
2157
- let messagesEnabled = (flags & (1 << 6)) ? await Primitive.Bool.read(_data) : undefined;
2158
- let sendPaidMessagesStars = (flags & (1 << 7)) ? await Primitive.Long.read(_data) : undefined;
2159
- return new StartLive({ "pinned": pinned, "noforwards": noforwards, "rtmpStream": rtmpStream, "peer": peer, "caption": caption, "entities": entities, "privacyRules": privacyRules, "randomId": randomId, "messagesEnabled": messagesEnabled, "sendPaidMessagesStars": sendPaidMessagesStars });
2160
- }
2161
- /**
2162
- * Generate buffer from TLObject.
2163
- */
2305
+ let messagesEnabled = flags & (1 << 6) ? await Primitive.Bool.read(_data) : undefined;
2306
+ let sendPaidMessagesStars = flags & (1 << 7) ? await Primitive.Long.read(_data) : undefined;
2307
+ return new StartLive({
2308
+ pinned: pinned,
2309
+ noforwards: noforwards,
2310
+ rtmpStream: rtmpStream,
2311
+ peer: peer,
2312
+ caption: caption,
2313
+ entities: entities,
2314
+ privacyRules: privacyRules,
2315
+ randomId: randomId,
2316
+ messagesEnabled: messagesEnabled,
2317
+ sendPaidMessagesStars: sendPaidMessagesStars,
2318
+ });
2319
+ }
2320
+ /**
2321
+ * Generate buffer from TLObject.
2322
+ */
2164
2323
  write() {
2165
2324
  const b = new BytesIO();
2166
2325
  b.write(Primitive.Int.write(this.constructorId, false));
2167
2326
  // @ts-ignore
2168
2327
  let flags = 0;
2169
- flags |= this.pinned ? (1 << 2) : 0;
2170
- flags |= this.noforwards ? (1 << 4) : 0;
2171
- flags |= this.rtmpStream ? (1 << 5) : 0;
2172
- flags |= this.caption !== undefined ? (1 << 0) : 0;
2173
- flags |= this.entities ? (1 << 1) : 0;
2174
- flags |= this.messagesEnabled !== undefined ? (1 << 6) : 0;
2175
- flags |= this.sendPaidMessagesStars !== undefined ? (1 << 7) : 0;
2176
- b.write((Primitive.Int.write(flags)));
2328
+ flags |= this.pinned ? 1 << 2 : 0;
2329
+ flags |= this.noforwards ? 1 << 4 : 0;
2330
+ flags |= this.rtmpStream ? 1 << 5 : 0;
2331
+ flags |= this.caption !== undefined ? 1 << 0 : 0;
2332
+ flags |= this.entities ? 1 << 1 : 0;
2333
+ flags |= this.messagesEnabled !== undefined ? 1 << 6 : 0;
2334
+ flags |= this.sendPaidMessagesStars !== undefined ? 1 << 7 : 0;
2335
+ b.write(Primitive.Int.write(flags));
2177
2336
  if (this.peer !== undefined) {
2178
2337
  b.write(this.peer.write());
2179
2338
  }
2180
2339
  if (this.caption !== undefined) {
2181
- b.write((Primitive.String.write(this.caption)));
2340
+ b.write(Primitive.String.write(this.caption));
2182
2341
  }
2183
2342
  if (this.entities) {
2184
- b.write((Primitive.Vector.write(this.entities)));
2343
+ b.write(Primitive.Vector.write(this.entities));
2185
2344
  }
2186
2345
  if (this.privacyRules) {
2187
- b.write((Primitive.Vector.write(this.privacyRules)));
2346
+ b.write(Primitive.Vector.write(this.privacyRules));
2188
2347
  }
2189
2348
  if (this.randomId !== undefined) {
2190
- b.write((Primitive.Long.write(this.randomId)));
2349
+ b.write(Primitive.Long.write(this.randomId));
2191
2350
  }
2192
2351
  if (this.messagesEnabled !== undefined) {
2193
- b.write((Primitive.Bool.write(this.messagesEnabled)));
2352
+ b.write(Primitive.Bool.write(this.messagesEnabled));
2194
2353
  }
2195
2354
  if (this.sendPaidMessagesStars !== undefined) {
2196
- b.write((Primitive.Long.write(this.sendPaidMessagesStars)));
2355
+ b.write(Primitive.Long.write(this.sendPaidMessagesStars));
2197
2356
  }
2198
2357
  return b.buffer;
2199
2358
  }