@tgsnake/skema 3.1.0-browser.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2739 -2739
  5. package/dist/src/raw/class/Raw.d.ts +7516 -7516
  6. package/dist/src/raw/class/Raw.js +20426 -26448
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +231 -231
  14. package/dist/src/raw/class/tl/bots.js +504 -524
  15. package/dist/src/raw/class/tl/channels.d.ts +331 -331
  16. package/dist/src/raw/class/tl/channels.js +732 -823
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  26. package/dist/src/raw/class/tl/folders.js +11 -11
  27. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  28. package/dist/src/raw/class/tl/fragment.js +25 -32
  29. package/dist/src/raw/class/tl/help.d.ts +286 -286
  30. package/dist/src/raw/class/tl/help.js +618 -686
  31. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  32. package/dist/src/raw/class/tl/langpack.js +57 -57
  33. package/dist/src/raw/class/tl/messages.d.ts +1851 -1851
  34. package/dist/src/raw/class/tl/messages.js +4854 -5924
  35. package/dist/src/raw/class/tl/payments.d.ts +641 -641
  36. package/dist/src/raw/class/tl/payments.js +1734 -2198
  37. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  38. package/dist/src/raw/class/tl/phone.js +644 -779
  39. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  40. package/dist/src/raw/class/tl/photos.js +116 -139
  41. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  42. package/dist/src/raw/class/tl/premium.js +111 -133
  43. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  44. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  45. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  46. package/dist/src/raw/class/tl/stats.js +169 -268
  47. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  48. package/dist/src/raw/class/tl/stickers.js +144 -173
  49. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  50. package/dist/src/raw/class/tl/storage.js +71 -71
  51. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  52. package/dist/src/raw/class/tl/stories.js +622 -781
  53. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  54. package/dist/src/raw/class/tl/toncenter.js +47 -52
  55. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  56. package/dist/src/raw/class/tl/updates.js +175 -246
  57. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  58. package/dist/src/raw/class/tl/upload.js +155 -178
  59. package/dist/src/raw/class/tl/users.d.ts +61 -61
  60. package/dist/src/raw/class/tl/users.js +124 -124
  61. package/dist/src/raw/class/tl/wallet.d.ts +206 -206
  62. package/dist/src/raw/class/tl/wallet.js +525 -591
  63. package/dist/src/raw/class/types.d.ts +1 -1
  64. package/dist/src/raw/class/types.js +1 -1
  65. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -15,27 +15,27 @@ export class PhoneCall extends TLObject {
15
15
  users;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = 'types';
19
- this.className = 'phone.PhoneCall';
18
+ this.classType = "types";
19
+ this.className = "phone.PhoneCall";
20
20
  this.constructorId = 0xec82e140;
21
21
  this.subclassOfId = 0xd48afe4f;
22
- this._slots = ['phoneCall', 'users'];
22
+ this._slots = ["phoneCall", "users"];
23
23
  this.phoneCall = params.phoneCall;
24
24
  this.users = params.users;
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
  // no flags
32
32
  let phoneCall = await TLObject.read(_data);
33
33
  let users = await TLObject.read(_data);
34
- return new PhoneCall({ phoneCall: phoneCall, users: users });
34
+ return new PhoneCall({ "phoneCall": phoneCall, "users": users });
35
35
  }
36
36
  /**
37
- * Generate buffer from TLObject.
38
- */
37
+ * Generate buffer from TLObject.
38
+ */
39
39
  write() {
40
40
  const b = new BytesIO();
41
41
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -44,7 +44,7 @@ export class PhoneCall extends TLObject {
44
44
  b.write(this.phoneCall.write());
45
45
  }
46
46
  if (this.users) {
47
- b.write(Primitive.Vector.write(this.users));
47
+ b.write((Primitive.Vector.write(this.users)));
48
48
  }
49
49
  return b.buffer;
50
50
  }
@@ -57,11 +57,11 @@ export class GroupCall extends TLObject {
57
57
  users;
58
58
  constructor(params) {
59
59
  super();
60
- this.classType = 'types';
61
- this.className = 'phone.GroupCall';
60
+ this.classType = "types";
61
+ this.className = "phone.GroupCall";
62
62
  this.constructorId = 0x9e727aad;
63
63
  this.subclassOfId = 0x304116be;
64
- this._slots = ['call', 'participants', 'participantsNextOffset', 'chats', 'users'];
64
+ this._slots = ["call", "participants", "participantsNextOffset", "chats", "users"];
65
65
  this.call = params.call;
66
66
  this.participants = params.participants;
67
67
  this.participantsNextOffset = params.participantsNextOffset;
@@ -69,9 +69,9 @@ export class GroupCall extends TLObject {
69
69
  this.users = params.users;
70
70
  }
71
71
  /**
72
- * Generate the TLObject from buffer.
73
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
74
- */
72
+ * Generate the TLObject from buffer.
73
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
74
+ */
75
75
  static async read(_data, ..._args) {
76
76
  // no flags
77
77
  let call = await TLObject.read(_data);
@@ -79,17 +79,11 @@ export class GroupCall extends TLObject {
79
79
  let participantsNextOffset = await Primitive.String.read(_data);
80
80
  let chats = await TLObject.read(_data);
81
81
  let users = await TLObject.read(_data);
82
- return new GroupCall({
83
- call: call,
84
- participants: participants,
85
- participantsNextOffset: participantsNextOffset,
86
- chats: chats,
87
- users: users,
88
- });
82
+ return new GroupCall({ "call": call, "participants": participants, "participantsNextOffset": participantsNextOffset, "chats": chats, "users": users });
89
83
  }
90
84
  /**
91
- * Generate buffer from TLObject.
92
- */
85
+ * Generate buffer from TLObject.
86
+ */
93
87
  write() {
94
88
  const b = new BytesIO();
95
89
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -98,16 +92,16 @@ export class GroupCall extends TLObject {
98
92
  b.write(this.call.write());
99
93
  }
100
94
  if (this.participants) {
101
- b.write(Primitive.Vector.write(this.participants));
95
+ b.write((Primitive.Vector.write(this.participants)));
102
96
  }
103
97
  if (this.participantsNextOffset !== undefined) {
104
- b.write(Primitive.String.write(this.participantsNextOffset));
98
+ b.write((Primitive.String.write(this.participantsNextOffset)));
105
99
  }
106
100
  if (this.chats) {
107
- b.write(Primitive.Vector.write(this.chats));
101
+ b.write((Primitive.Vector.write(this.chats)));
108
102
  }
109
103
  if (this.users) {
110
- b.write(Primitive.Vector.write(this.users));
104
+ b.write((Primitive.Vector.write(this.users)));
111
105
  }
112
106
  return b.buffer;
113
107
  }
@@ -121,11 +115,11 @@ export class GroupParticipants extends TLObject {
121
115
  version;
122
116
  constructor(params) {
123
117
  super();
124
- this.classType = 'types';
125
- this.className = 'phone.GroupParticipants';
118
+ this.classType = "types";
119
+ this.className = "phone.GroupParticipants";
126
120
  this.constructorId = 0xf47751b6;
127
121
  this.subclassOfId = 0x72d304f4;
128
- this._slots = ['count', 'participants', 'nextOffset', 'chats', 'users', 'version'];
122
+ this._slots = ["count", "participants", "nextOffset", "chats", "users", "version"];
129
123
  this.count = params.count;
130
124
  this.participants = params.participants;
131
125
  this.nextOffset = params.nextOffset;
@@ -134,9 +128,9 @@ export class GroupParticipants extends TLObject {
134
128
  this.version = params.version;
135
129
  }
136
130
  /**
137
- * Generate the TLObject from buffer.
138
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
139
- */
131
+ * Generate the TLObject from buffer.
132
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
133
+ */
140
134
  static async read(_data, ..._args) {
141
135
  // no flags
142
136
  let count = await Primitive.Int.read(_data);
@@ -145,39 +139,32 @@ export class GroupParticipants extends TLObject {
145
139
  let chats = await TLObject.read(_data);
146
140
  let users = await TLObject.read(_data);
147
141
  let version = await Primitive.Int.read(_data);
148
- return new GroupParticipants({
149
- count: count,
150
- participants: participants,
151
- nextOffset: nextOffset,
152
- chats: chats,
153
- users: users,
154
- version: version,
155
- });
156
- }
157
- /**
158
- * Generate buffer from TLObject.
159
- */
142
+ return new GroupParticipants({ "count": count, "participants": participants, "nextOffset": nextOffset, "chats": chats, "users": users, "version": version });
143
+ }
144
+ /**
145
+ * Generate buffer from TLObject.
146
+ */
160
147
  write() {
161
148
  const b = new BytesIO();
162
149
  b.write(Primitive.Int.write(this.constructorId, false));
163
150
  // no flags
164
151
  if (this.count !== undefined) {
165
- b.write(Primitive.Int.write(this.count));
152
+ b.write((Primitive.Int.write(this.count)));
166
153
  }
167
154
  if (this.participants) {
168
- b.write(Primitive.Vector.write(this.participants));
155
+ b.write((Primitive.Vector.write(this.participants)));
169
156
  }
170
157
  if (this.nextOffset !== undefined) {
171
- b.write(Primitive.String.write(this.nextOffset));
158
+ b.write((Primitive.String.write(this.nextOffset)));
172
159
  }
173
160
  if (this.chats) {
174
- b.write(Primitive.Vector.write(this.chats));
161
+ b.write((Primitive.Vector.write(this.chats)));
175
162
  }
176
163
  if (this.users) {
177
- b.write(Primitive.Vector.write(this.users));
164
+ b.write((Primitive.Vector.write(this.users)));
178
165
  }
179
166
  if (this.version !== undefined) {
180
- b.write(Primitive.Int.write(this.version));
167
+ b.write((Primitive.Int.write(this.version)));
181
168
  }
182
169
  return b.buffer;
183
170
  }
@@ -188,41 +175,41 @@ export class JoinAsPeers extends TLObject {
188
175
  users;
189
176
  constructor(params) {
190
177
  super();
191
- this.classType = 'types';
192
- this.className = 'phone.JoinAsPeers';
178
+ this.classType = "types";
179
+ this.className = "phone.JoinAsPeers";
193
180
  this.constructorId = 0xafe5623f;
194
181
  this.subclassOfId = 0xb4b770fb;
195
- this._slots = ['peers', 'chats', 'users'];
182
+ this._slots = ["peers", "chats", "users"];
196
183
  this.peers = params.peers;
197
184
  this.chats = params.chats;
198
185
  this.users = params.users;
199
186
  }
200
187
  /**
201
- * Generate the TLObject from buffer.
202
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
203
- */
188
+ * Generate the TLObject from buffer.
189
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
190
+ */
204
191
  static async read(_data, ..._args) {
205
192
  // no flags
206
193
  let peers = await TLObject.read(_data);
207
194
  let chats = await TLObject.read(_data);
208
195
  let users = await TLObject.read(_data);
209
- return new JoinAsPeers({ peers: peers, chats: chats, users: users });
196
+ return new JoinAsPeers({ "peers": peers, "chats": chats, "users": users });
210
197
  }
211
198
  /**
212
- * Generate buffer from TLObject.
213
- */
199
+ * Generate buffer from TLObject.
200
+ */
214
201
  write() {
215
202
  const b = new BytesIO();
216
203
  b.write(Primitive.Int.write(this.constructorId, false));
217
204
  // no flags
218
205
  if (this.peers) {
219
- b.write(Primitive.Vector.write(this.peers));
206
+ b.write((Primitive.Vector.write(this.peers)));
220
207
  }
221
208
  if (this.chats) {
222
- b.write(Primitive.Vector.write(this.chats));
209
+ b.write((Primitive.Vector.write(this.chats)));
223
210
  }
224
211
  if (this.users) {
225
- b.write(Primitive.Vector.write(this.users));
212
+ b.write((Primitive.Vector.write(this.users)));
226
213
  }
227
214
  return b.buffer;
228
215
  }
@@ -231,31 +218,31 @@ export class ExportedGroupCallInvite extends TLObject {
231
218
  link;
232
219
  constructor(params) {
233
220
  super();
234
- this.classType = 'types';
235
- this.className = 'phone.ExportedGroupCallInvite';
221
+ this.classType = "types";
222
+ this.className = "phone.ExportedGroupCallInvite";
236
223
  this.constructorId = 0x204bd158;
237
224
  this.subclassOfId = 0x3b3bfe8f;
238
- this._slots = ['link'];
225
+ this._slots = ["link"];
239
226
  this.link = params.link;
240
227
  }
241
228
  /**
242
- * Generate the TLObject from buffer.
243
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
244
- */
229
+ * Generate the TLObject from buffer.
230
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
231
+ */
245
232
  static async read(_data, ..._args) {
246
233
  // no flags
247
234
  let link = await Primitive.String.read(_data);
248
- return new ExportedGroupCallInvite({ link: link });
235
+ return new ExportedGroupCallInvite({ "link": link });
249
236
  }
250
237
  /**
251
- * Generate buffer from TLObject.
252
- */
238
+ * Generate buffer from TLObject.
239
+ */
253
240
  write() {
254
241
  const b = new BytesIO();
255
242
  b.write(Primitive.Int.write(this.constructorId, false));
256
243
  // no flags
257
244
  if (this.link !== undefined) {
258
- b.write(Primitive.String.write(this.link));
245
+ b.write((Primitive.String.write(this.link)));
259
246
  }
260
247
  return b.buffer;
261
248
  }
@@ -264,31 +251,31 @@ export class GroupCallStreamChannels extends TLObject {
264
251
  channels;
265
252
  constructor(params) {
266
253
  super();
267
- this.classType = 'types';
268
- this.className = 'phone.GroupCallStreamChannels';
254
+ this.classType = "types";
255
+ this.className = "phone.GroupCallStreamChannels";
269
256
  this.constructorId = 0xd0e482b2;
270
257
  this.subclassOfId = 0x9157c5e4;
271
- this._slots = ['channels'];
258
+ this._slots = ["channels"];
272
259
  this.channels = params.channels;
273
260
  }
274
261
  /**
275
- * Generate the TLObject from buffer.
276
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
277
- */
262
+ * Generate the TLObject from buffer.
263
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
264
+ */
278
265
  static async read(_data, ..._args) {
279
266
  // no flags
280
267
  let channels = await TLObject.read(_data);
281
- return new GroupCallStreamChannels({ channels: channels });
268
+ return new GroupCallStreamChannels({ "channels": channels });
282
269
  }
283
270
  /**
284
- * Generate buffer from TLObject.
285
- */
271
+ * Generate buffer from TLObject.
272
+ */
286
273
  write() {
287
274
  const b = new BytesIO();
288
275
  b.write(Primitive.Int.write(this.constructorId, false));
289
276
  // no flags
290
277
  if (this.channels) {
291
- b.write(Primitive.Vector.write(this.channels));
278
+ b.write((Primitive.Vector.write(this.channels)));
292
279
  }
293
280
  return b.buffer;
294
281
  }
@@ -298,36 +285,36 @@ export class GroupCallStreamRtmpUrl extends TLObject {
298
285
  key;
299
286
  constructor(params) {
300
287
  super();
301
- this.classType = 'types';
302
- this.className = 'phone.GroupCallStreamRtmpUrl';
288
+ this.classType = "types";
289
+ this.className = "phone.GroupCallStreamRtmpUrl";
303
290
  this.constructorId = 0x2dbf3432;
304
291
  this.subclassOfId = 0xd1f515cb;
305
- this._slots = ['url', 'key'];
292
+ this._slots = ["url", "key"];
306
293
  this.url = params.url;
307
294
  this.key = params.key;
308
295
  }
309
296
  /**
310
- * Generate the TLObject from buffer.
311
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
312
- */
297
+ * Generate the TLObject from buffer.
298
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
299
+ */
313
300
  static async read(_data, ..._args) {
314
301
  // no flags
315
302
  let url = await Primitive.String.read(_data);
316
303
  let key = await Primitive.String.read(_data);
317
- return new GroupCallStreamRtmpUrl({ url: url, key: key });
304
+ return new GroupCallStreamRtmpUrl({ "url": url, "key": key });
318
305
  }
319
306
  /**
320
- * Generate buffer from TLObject.
321
- */
307
+ * Generate buffer from TLObject.
308
+ */
322
309
  write() {
323
310
  const b = new BytesIO();
324
311
  b.write(Primitive.Int.write(this.constructorId, false));
325
312
  // no flags
326
313
  if (this.url !== undefined) {
327
- b.write(Primitive.String.write(this.url));
314
+ b.write((Primitive.String.write(this.url)));
328
315
  }
329
316
  if (this.key !== undefined) {
330
- b.write(Primitive.String.write(this.key));
317
+ b.write((Primitive.String.write(this.key)));
331
318
  }
332
319
  return b.buffer;
333
320
  }
@@ -339,51 +326,46 @@ export class GroupCallStars extends TLObject {
339
326
  users;
340
327
  constructor(params) {
341
328
  super();
342
- this.classType = 'types';
343
- this.className = 'phone.GroupCallStars';
329
+ this.classType = "types";
330
+ this.className = "phone.GroupCallStars";
344
331
  this.constructorId = 0x9d1dbd26;
345
332
  this.subclassOfId = 0xb447801a;
346
- this._slots = ['totalStars', 'topDonors', 'chats', 'users'];
333
+ this._slots = ["totalStars", "topDonors", "chats", "users"];
347
334
  this.totalStars = params.totalStars;
348
335
  this.topDonors = params.topDonors;
349
336
  this.chats = params.chats;
350
337
  this.users = params.users;
351
338
  }
352
339
  /**
353
- * Generate the TLObject from buffer.
354
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
355
- */
340
+ * Generate the TLObject from buffer.
341
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
342
+ */
356
343
  static async read(_data, ..._args) {
357
344
  // no flags
358
345
  let totalStars = await Primitive.Long.read(_data);
359
346
  let topDonors = await TLObject.read(_data);
360
347
  let chats = await TLObject.read(_data);
361
348
  let users = await TLObject.read(_data);
362
- return new GroupCallStars({
363
- totalStars: totalStars,
364
- topDonors: topDonors,
365
- chats: chats,
366
- users: users,
367
- });
349
+ return new GroupCallStars({ "totalStars": totalStars, "topDonors": topDonors, "chats": chats, "users": users });
368
350
  }
369
351
  /**
370
- * Generate buffer from TLObject.
371
- */
352
+ * Generate buffer from TLObject.
353
+ */
372
354
  write() {
373
355
  const b = new BytesIO();
374
356
  b.write(Primitive.Int.write(this.constructorId, false));
375
357
  // no flags
376
358
  if (this.totalStars !== undefined) {
377
- b.write(Primitive.Long.write(this.totalStars));
359
+ b.write((Primitive.Long.write(this.totalStars)));
378
360
  }
379
361
  if (this.topDonors) {
380
- b.write(Primitive.Vector.write(this.topDonors));
362
+ b.write((Primitive.Vector.write(this.topDonors)));
381
363
  }
382
364
  if (this.chats) {
383
- b.write(Primitive.Vector.write(this.chats));
365
+ b.write((Primitive.Vector.write(this.chats)));
384
366
  }
385
367
  if (this.users) {
386
- b.write(Primitive.Vector.write(this.users));
368
+ b.write((Primitive.Vector.write(this.users)));
387
369
  }
388
370
  return b.buffer;
389
371
  }
@@ -392,23 +374,23 @@ export class GetCallConfig extends TLObject {
392
374
  __response__;
393
375
  constructor() {
394
376
  super();
395
- this.classType = 'functions';
396
- this.className = 'phone.GetCallConfig';
377
+ this.classType = "functions";
378
+ this.className = "phone.GetCallConfig";
397
379
  this.constructorId = 0x55451fa9;
398
380
  this.subclassOfId = 0xad0352e8;
399
381
  this._slots = [];
400
382
  }
401
383
  /**
402
- * Generate the TLObject from buffer.
403
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
404
- */
384
+ * Generate the TLObject from buffer.
385
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
386
+ */
405
387
  static async read(_data, ..._args) {
406
388
  // no flags
407
389
  return new GetCallConfig();
408
390
  }
409
391
  /**
410
- * Generate buffer from TLObject.
411
- */
392
+ * Generate buffer from TLObject.
393
+ */
412
394
  write() {
413
395
  const b = new BytesIO();
414
396
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -425,11 +407,11 @@ export class RequestCall extends TLObject {
425
407
  protocol;
426
408
  constructor(params) {
427
409
  super();
428
- this.classType = 'functions';
429
- this.className = 'phone.RequestCall';
410
+ this.classType = "functions";
411
+ this.className = "phone.RequestCall";
430
412
  this.constructorId = 0x42ff96ed;
431
413
  this.subclassOfId = 0xd48afe4f;
432
- this._slots = ['video', 'userId', 'randomId', 'gAHash', 'protocol'];
414
+ this._slots = ["video", "userId", "randomId", "gAHash", "protocol"];
433
415
  this.video = params.video;
434
416
  this.userId = params.userId;
435
417
  this.randomId = params.randomId;
@@ -437,43 +419,37 @@ export class RequestCall extends TLObject {
437
419
  this.protocol = params.protocol;
438
420
  }
439
421
  /**
440
- * Generate the TLObject from buffer.
441
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
442
- */
422
+ * Generate the TLObject from buffer.
423
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
424
+ */
443
425
  static async read(_data, ..._args) {
444
426
  // @ts-ignore
445
427
  let flags = await Primitive.Int.read(_data);
446
- let video = flags & (1 << 0) ? true : false;
428
+ let video = (flags & (1 << 0)) ? true : false;
447
429
  let userId = await TLObject.read(_data);
448
430
  let randomId = await Primitive.Int.read(_data);
449
431
  let gAHash = await Primitive.Bytes.read(_data);
450
432
  let protocol = await TLObject.read(_data);
451
- return new RequestCall({
452
- video: video,
453
- userId: userId,
454
- randomId: randomId,
455
- gAHash: gAHash,
456
- protocol: protocol,
457
- });
433
+ return new RequestCall({ "video": video, "userId": userId, "randomId": randomId, "gAHash": gAHash, "protocol": protocol });
458
434
  }
459
435
  /**
460
- * Generate buffer from TLObject.
461
- */
436
+ * Generate buffer from TLObject.
437
+ */
462
438
  write() {
463
439
  const b = new BytesIO();
464
440
  b.write(Primitive.Int.write(this.constructorId, false));
465
441
  // @ts-ignore
466
442
  let flags = 0;
467
- flags |= this.video ? 1 << 0 : 0;
468
- b.write(Primitive.Int.write(flags));
443
+ flags |= this.video ? (1 << 0) : 0;
444
+ b.write((Primitive.Int.write(flags)));
469
445
  if (this.userId !== undefined) {
470
446
  b.write(this.userId.write());
471
447
  }
472
448
  if (this.randomId !== undefined) {
473
- b.write(Primitive.Int.write(this.randomId));
449
+ b.write((Primitive.Int.write(this.randomId)));
474
450
  }
475
451
  if (this.gAHash !== undefined) {
476
- b.write(Primitive.Bytes.write(this.gAHash));
452
+ b.write((Primitive.Bytes.write(this.gAHash)));
477
453
  }
478
454
  if (this.protocol !== undefined) {
479
455
  b.write(this.protocol.write());
@@ -488,29 +464,29 @@ export class AcceptCall extends TLObject {
488
464
  protocol;
489
465
  constructor(params) {
490
466
  super();
491
- this.classType = 'functions';
492
- this.className = 'phone.AcceptCall';
467
+ this.classType = "functions";
468
+ this.className = "phone.AcceptCall";
493
469
  this.constructorId = 0x3bd2b4a0;
494
470
  this.subclassOfId = 0xd48afe4f;
495
- this._slots = ['peer', 'gB', 'protocol'];
471
+ this._slots = ["peer", "gB", "protocol"];
496
472
  this.peer = params.peer;
497
473
  this.gB = params.gB;
498
474
  this.protocol = params.protocol;
499
475
  }
500
476
  /**
501
- * Generate the TLObject from buffer.
502
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
503
- */
477
+ * Generate the TLObject from buffer.
478
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
479
+ */
504
480
  static async read(_data, ..._args) {
505
481
  // no flags
506
482
  let peer = await TLObject.read(_data);
507
483
  let gB = await Primitive.Bytes.read(_data);
508
484
  let protocol = await TLObject.read(_data);
509
- return new AcceptCall({ peer: peer, gB: gB, protocol: protocol });
485
+ return new AcceptCall({ "peer": peer, "gB": gB, "protocol": protocol });
510
486
  }
511
487
  /**
512
- * Generate buffer from TLObject.
513
- */
488
+ * Generate buffer from TLObject.
489
+ */
514
490
  write() {
515
491
  const b = new BytesIO();
516
492
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -519,7 +495,7 @@ export class AcceptCall extends TLObject {
519
495
  b.write(this.peer.write());
520
496
  }
521
497
  if (this.gB !== undefined) {
522
- b.write(Primitive.Bytes.write(this.gB));
498
+ b.write((Primitive.Bytes.write(this.gB)));
523
499
  }
524
500
  if (this.protocol !== undefined) {
525
501
  b.write(this.protocol.write());
@@ -535,36 +511,31 @@ export class ConfirmCall extends TLObject {
535
511
  protocol;
536
512
  constructor(params) {
537
513
  super();
538
- this.classType = 'functions';
539
- this.className = 'phone.ConfirmCall';
514
+ this.classType = "functions";
515
+ this.className = "phone.ConfirmCall";
540
516
  this.constructorId = 0x2efe1722;
541
517
  this.subclassOfId = 0xd48afe4f;
542
- this._slots = ['peer', 'gA', 'keyFingerprint', 'protocol'];
518
+ this._slots = ["peer", "gA", "keyFingerprint", "protocol"];
543
519
  this.peer = params.peer;
544
520
  this.gA = params.gA;
545
521
  this.keyFingerprint = params.keyFingerprint;
546
522
  this.protocol = params.protocol;
547
523
  }
548
524
  /**
549
- * Generate the TLObject from buffer.
550
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
551
- */
525
+ * Generate the TLObject from buffer.
526
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
527
+ */
552
528
  static async read(_data, ..._args) {
553
529
  // no flags
554
530
  let peer = await TLObject.read(_data);
555
531
  let gA = await Primitive.Bytes.read(_data);
556
532
  let keyFingerprint = await Primitive.Long.read(_data);
557
533
  let protocol = await TLObject.read(_data);
558
- return new ConfirmCall({
559
- peer: peer,
560
- gA: gA,
561
- keyFingerprint: keyFingerprint,
562
- protocol: protocol,
563
- });
534
+ return new ConfirmCall({ "peer": peer, "gA": gA, "keyFingerprint": keyFingerprint, "protocol": protocol });
564
535
  }
565
536
  /**
566
- * Generate buffer from TLObject.
567
- */
537
+ * Generate buffer from TLObject.
538
+ */
568
539
  write() {
569
540
  const b = new BytesIO();
570
541
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -573,10 +544,10 @@ export class ConfirmCall extends TLObject {
573
544
  b.write(this.peer.write());
574
545
  }
575
546
  if (this.gA !== undefined) {
576
- b.write(Primitive.Bytes.write(this.gA));
547
+ b.write((Primitive.Bytes.write(this.gA)));
577
548
  }
578
549
  if (this.keyFingerprint !== undefined) {
579
- b.write(Primitive.Long.write(this.keyFingerprint));
550
+ b.write((Primitive.Long.write(this.keyFingerprint)));
580
551
  }
581
552
  if (this.protocol !== undefined) {
582
553
  b.write(this.protocol.write());
@@ -589,25 +560,25 @@ export class ReceivedCall extends TLObject {
589
560
  peer;
590
561
  constructor(params) {
591
562
  super();
592
- this.classType = 'functions';
593
- this.className = 'phone.ReceivedCall';
563
+ this.classType = "functions";
564
+ this.className = "phone.ReceivedCall";
594
565
  this.constructorId = 0x17d54f61;
595
566
  this.subclassOfId = 0xf5b399ac;
596
- this._slots = ['peer'];
567
+ this._slots = ["peer"];
597
568
  this.peer = params.peer;
598
569
  }
599
570
  /**
600
- * Generate the TLObject from buffer.
601
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
602
- */
571
+ * Generate the TLObject from buffer.
572
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
573
+ */
603
574
  static async read(_data, ..._args) {
604
575
  // no flags
605
576
  let peer = await TLObject.read(_data);
606
- return new ReceivedCall({ peer: peer });
577
+ return new ReceivedCall({ "peer": peer });
607
578
  }
608
579
  /**
609
- * Generate buffer from TLObject.
610
- */
580
+ * Generate buffer from TLObject.
581
+ */
611
582
  write() {
612
583
  const b = new BytesIO();
613
584
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -627,11 +598,11 @@ export class DiscardCall extends TLObject {
627
598
  connectionId;
628
599
  constructor(params) {
629
600
  super();
630
- this.classType = 'functions';
631
- this.className = 'phone.DiscardCall';
601
+ this.classType = "functions";
602
+ this.className = "phone.DiscardCall";
632
603
  this.constructorId = 0xb2cbc1c0;
633
604
  this.subclassOfId = 0x8af52aac;
634
- this._slots = ['video', 'peer', 'duration', 'reason', 'connectionId'];
605
+ this._slots = ["video", "peer", "duration", "reason", "connectionId"];
635
606
  this.video = params.video;
636
607
  this.peer = params.peer;
637
608
  this.duration = params.duration;
@@ -639,46 +610,40 @@ export class DiscardCall extends TLObject {
639
610
  this.connectionId = params.connectionId;
640
611
  }
641
612
  /**
642
- * Generate the TLObject from buffer.
643
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
644
- */
613
+ * Generate the TLObject from buffer.
614
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
615
+ */
645
616
  static async read(_data, ..._args) {
646
617
  // @ts-ignore
647
618
  let flags = await Primitive.Int.read(_data);
648
- let video = flags & (1 << 0) ? true : false;
619
+ let video = (flags & (1 << 0)) ? true : false;
649
620
  let peer = await TLObject.read(_data);
650
621
  let duration = await Primitive.Int.read(_data);
651
622
  let reason = await TLObject.read(_data);
652
623
  let connectionId = await Primitive.Long.read(_data);
653
- return new DiscardCall({
654
- video: video,
655
- peer: peer,
656
- duration: duration,
657
- reason: reason,
658
- connectionId: connectionId,
659
- });
624
+ return new DiscardCall({ "video": video, "peer": peer, "duration": duration, "reason": reason, "connectionId": connectionId });
660
625
  }
661
626
  /**
662
- * Generate buffer from TLObject.
663
- */
627
+ * Generate buffer from TLObject.
628
+ */
664
629
  write() {
665
630
  const b = new BytesIO();
666
631
  b.write(Primitive.Int.write(this.constructorId, false));
667
632
  // @ts-ignore
668
633
  let flags = 0;
669
- flags |= this.video ? 1 << 0 : 0;
670
- b.write(Primitive.Int.write(flags));
634
+ flags |= this.video ? (1 << 0) : 0;
635
+ b.write((Primitive.Int.write(flags)));
671
636
  if (this.peer !== undefined) {
672
637
  b.write(this.peer.write());
673
638
  }
674
639
  if (this.duration !== undefined) {
675
- b.write(Primitive.Int.write(this.duration));
640
+ b.write((Primitive.Int.write(this.duration)));
676
641
  }
677
642
  if (this.reason !== undefined) {
678
643
  b.write(this.reason.write());
679
644
  }
680
645
  if (this.connectionId !== undefined) {
681
- b.write(Primitive.Long.write(this.connectionId));
646
+ b.write((Primitive.Long.write(this.connectionId)));
682
647
  }
683
648
  return b.buffer;
684
649
  }
@@ -691,52 +656,47 @@ export class SetCallRating extends TLObject {
691
656
  comment;
692
657
  constructor(params) {
693
658
  super();
694
- this.classType = 'functions';
695
- this.className = 'phone.SetCallRating';
659
+ this.classType = "functions";
660
+ this.className = "phone.SetCallRating";
696
661
  this.constructorId = 0x59ead627;
697
662
  this.subclassOfId = 0x8af52aac;
698
- this._slots = ['userInitiative', 'peer', 'rating', 'comment'];
663
+ this._slots = ["userInitiative", "peer", "rating", "comment"];
699
664
  this.userInitiative = params.userInitiative;
700
665
  this.peer = params.peer;
701
666
  this.rating = params.rating;
702
667
  this.comment = params.comment;
703
668
  }
704
669
  /**
705
- * Generate the TLObject from buffer.
706
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
707
- */
670
+ * Generate the TLObject from buffer.
671
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
672
+ */
708
673
  static async read(_data, ..._args) {
709
674
  // @ts-ignore
710
675
  let flags = await Primitive.Int.read(_data);
711
- let userInitiative = flags & (1 << 0) ? true : false;
676
+ let userInitiative = (flags & (1 << 0)) ? true : false;
712
677
  let peer = await TLObject.read(_data);
713
678
  let rating = await Primitive.Int.read(_data);
714
679
  let comment = await Primitive.String.read(_data);
715
- return new SetCallRating({
716
- userInitiative: userInitiative,
717
- peer: peer,
718
- rating: rating,
719
- comment: comment,
720
- });
680
+ return new SetCallRating({ "userInitiative": userInitiative, "peer": peer, "rating": rating, "comment": comment });
721
681
  }
722
682
  /**
723
- * Generate buffer from TLObject.
724
- */
683
+ * Generate buffer from TLObject.
684
+ */
725
685
  write() {
726
686
  const b = new BytesIO();
727
687
  b.write(Primitive.Int.write(this.constructorId, false));
728
688
  // @ts-ignore
729
689
  let flags = 0;
730
- flags |= this.userInitiative ? 1 << 0 : 0;
731
- b.write(Primitive.Int.write(flags));
690
+ flags |= this.userInitiative ? (1 << 0) : 0;
691
+ b.write((Primitive.Int.write(flags)));
732
692
  if (this.peer !== undefined) {
733
693
  b.write(this.peer.write());
734
694
  }
735
695
  if (this.rating !== undefined) {
736
- b.write(Primitive.Int.write(this.rating));
696
+ b.write((Primitive.Int.write(this.rating)));
737
697
  }
738
698
  if (this.comment !== undefined) {
739
- b.write(Primitive.String.write(this.comment));
699
+ b.write((Primitive.String.write(this.comment)));
740
700
  }
741
701
  return b.buffer;
742
702
  }
@@ -747,27 +707,27 @@ export class SaveCallDebug extends TLObject {
747
707
  debug;
748
708
  constructor(params) {
749
709
  super();
750
- this.classType = 'functions';
751
- this.className = 'phone.SaveCallDebug';
710
+ this.classType = "functions";
711
+ this.className = "phone.SaveCallDebug";
752
712
  this.constructorId = 0x277add7e;
753
713
  this.subclassOfId = 0xf5b399ac;
754
- this._slots = ['peer', 'debug'];
714
+ this._slots = ["peer", "debug"];
755
715
  this.peer = params.peer;
756
716
  this.debug = params.debug;
757
717
  }
758
718
  /**
759
- * Generate the TLObject from buffer.
760
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
761
- */
719
+ * Generate the TLObject from buffer.
720
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
721
+ */
762
722
  static async read(_data, ..._args) {
763
723
  // no flags
764
724
  let peer = await TLObject.read(_data);
765
725
  let debug = await TLObject.read(_data);
766
- return new SaveCallDebug({ peer: peer, debug: debug });
726
+ return new SaveCallDebug({ "peer": peer, "debug": debug });
767
727
  }
768
728
  /**
769
- * Generate buffer from TLObject.
770
- */
729
+ * Generate buffer from TLObject.
730
+ */
771
731
  write() {
772
732
  const b = new BytesIO();
773
733
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -787,27 +747,27 @@ export class SendSignalingData extends TLObject {
787
747
  data;
788
748
  constructor(params) {
789
749
  super();
790
- this.classType = 'functions';
791
- this.className = 'phone.SendSignalingData';
750
+ this.classType = "functions";
751
+ this.className = "phone.SendSignalingData";
792
752
  this.constructorId = 0xff7a9383;
793
753
  this.subclassOfId = 0xf5b399ac;
794
- this._slots = ['peer', 'data'];
754
+ this._slots = ["peer", "data"];
795
755
  this.peer = params.peer;
796
756
  this.data = params.data;
797
757
  }
798
758
  /**
799
- * Generate the TLObject from buffer.
800
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
801
- */
759
+ * Generate the TLObject from buffer.
760
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
761
+ */
802
762
  static async read(_data, ..._args) {
803
763
  // no flags
804
764
  let peer = await TLObject.read(_data);
805
765
  let data = await Primitive.Bytes.read(_data);
806
- return new SendSignalingData({ peer: peer, data: data });
766
+ return new SendSignalingData({ "peer": peer, "data": data });
807
767
  }
808
768
  /**
809
- * Generate buffer from TLObject.
810
- */
769
+ * Generate buffer from TLObject.
770
+ */
811
771
  write() {
812
772
  const b = new BytesIO();
813
773
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -816,7 +776,7 @@ export class SendSignalingData extends TLObject {
816
776
  b.write(this.peer.write());
817
777
  }
818
778
  if (this.data !== undefined) {
819
- b.write(Primitive.Bytes.write(this.data));
779
+ b.write((Primitive.Bytes.write(this.data)));
820
780
  }
821
781
  return b.buffer;
822
782
  }
@@ -830,11 +790,11 @@ export class CreateGroupCall extends TLObject {
830
790
  scheduleDate;
831
791
  constructor(params) {
832
792
  super();
833
- this.classType = 'functions';
834
- this.className = 'phone.CreateGroupCall';
793
+ this.classType = "functions";
794
+ this.className = "phone.CreateGroupCall";
835
795
  this.constructorId = 0x48cdc6d8;
836
796
  this.subclassOfId = 0x8af52aac;
837
- this._slots = ['rtmpStream', 'peer', 'randomId', 'title', 'scheduleDate'];
797
+ this._slots = ["rtmpStream", "peer", "randomId", "title", "scheduleDate"];
838
798
  this.rtmpStream = params.rtmpStream;
839
799
  this.peer = params.peer;
840
800
  this.randomId = params.randomId;
@@ -842,48 +802,42 @@ export class CreateGroupCall extends TLObject {
842
802
  this.scheduleDate = params.scheduleDate;
843
803
  }
844
804
  /**
845
- * Generate the TLObject from buffer.
846
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
847
- */
805
+ * Generate the TLObject from buffer.
806
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
807
+ */
848
808
  static async read(_data, ..._args) {
849
809
  // @ts-ignore
850
810
  let flags = await Primitive.Int.read(_data);
851
- let rtmpStream = flags & (1 << 2) ? true : false;
811
+ let rtmpStream = (flags & (1 << 2)) ? true : false;
852
812
  let peer = await TLObject.read(_data);
853
813
  let randomId = await Primitive.Int.read(_data);
854
- let title = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
855
- let scheduleDate = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
856
- return new CreateGroupCall({
857
- rtmpStream: rtmpStream,
858
- peer: peer,
859
- randomId: randomId,
860
- title: title,
861
- scheduleDate: scheduleDate,
862
- });
863
- }
864
- /**
865
- * Generate buffer from TLObject.
866
- */
814
+ let title = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
815
+ let scheduleDate = (flags & (1 << 1)) ? await Primitive.Int.read(_data) : undefined;
816
+ return new CreateGroupCall({ "rtmpStream": rtmpStream, "peer": peer, "randomId": randomId, "title": title, "scheduleDate": scheduleDate });
817
+ }
818
+ /**
819
+ * Generate buffer from TLObject.
820
+ */
867
821
  write() {
868
822
  const b = new BytesIO();
869
823
  b.write(Primitive.Int.write(this.constructorId, false));
870
824
  // @ts-ignore
871
825
  let flags = 0;
872
- flags |= this.rtmpStream ? 1 << 2 : 0;
873
- flags |= this.title !== undefined ? 1 << 0 : 0;
874
- flags |= this.scheduleDate !== undefined ? 1 << 1 : 0;
875
- b.write(Primitive.Int.write(flags));
826
+ flags |= this.rtmpStream ? (1 << 2) : 0;
827
+ flags |= this.title !== undefined ? (1 << 0) : 0;
828
+ flags |= this.scheduleDate !== undefined ? (1 << 1) : 0;
829
+ b.write((Primitive.Int.write(flags)));
876
830
  if (this.peer !== undefined) {
877
831
  b.write(this.peer.write());
878
832
  }
879
833
  if (this.randomId !== undefined) {
880
- b.write(Primitive.Int.write(this.randomId));
834
+ b.write((Primitive.Int.write(this.randomId)));
881
835
  }
882
836
  if (this.title !== undefined) {
883
- b.write(Primitive.String.write(this.title));
837
+ b.write((Primitive.String.write(this.title)));
884
838
  }
885
839
  if (this.scheduleDate !== undefined) {
886
- b.write(Primitive.Int.write(this.scheduleDate));
840
+ b.write((Primitive.Int.write(this.scheduleDate)));
887
841
  }
888
842
  return b.buffer;
889
843
  }
@@ -900,20 +854,11 @@ export class JoinGroupCall extends TLObject {
900
854
  params;
901
855
  constructor(params) {
902
856
  super();
903
- this.classType = 'functions';
904
- this.className = 'phone.JoinGroupCall';
857
+ this.classType = "functions";
858
+ this.className = "phone.JoinGroupCall";
905
859
  this.constructorId = 0x8fb53057;
906
860
  this.subclassOfId = 0x8af52aac;
907
- this._slots = [
908
- 'muted',
909
- 'videoStopped',
910
- 'call',
911
- 'joinAs',
912
- 'inviteHash',
913
- 'publicKey',
914
- 'block',
915
- 'params',
916
- ];
861
+ this._slots = ["muted", "videoStopped", "call", "joinAs", "inviteHash", "publicKey", "block", "params"];
917
862
  this.muted = params.muted;
918
863
  this.videoStopped = params.videoStopped;
919
864
  this.call = params.call;
@@ -924,45 +869,36 @@ export class JoinGroupCall extends TLObject {
924
869
  this.params = params.params;
925
870
  }
926
871
  /**
927
- * Generate the TLObject from buffer.
928
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
929
- */
872
+ * Generate the TLObject from buffer.
873
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
874
+ */
930
875
  static async read(_data, ..._args) {
931
876
  // @ts-ignore
932
877
  let flags = await Primitive.Int.read(_data);
933
- let muted = flags & (1 << 0) ? true : false;
934
- let videoStopped = flags & (1 << 2) ? true : false;
878
+ let muted = (flags & (1 << 0)) ? true : false;
879
+ let videoStopped = (flags & (1 << 2)) ? true : false;
935
880
  let call = await TLObject.read(_data);
936
881
  let joinAs = await TLObject.read(_data);
937
- let inviteHash = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
938
- let publicKey = flags & (1 << 3) ? await Primitive.Int256.read(_data) : undefined;
939
- let block = flags & (1 << 3) ? await Primitive.Bytes.read(_data) : undefined;
882
+ let inviteHash = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
883
+ let publicKey = (flags & (1 << 3)) ? await Primitive.Int256.read(_data) : undefined;
884
+ let block = (flags & (1 << 3)) ? await Primitive.Bytes.read(_data) : undefined;
940
885
  let params = await TLObject.read(_data);
941
- return new JoinGroupCall({
942
- muted: muted,
943
- videoStopped: videoStopped,
944
- call: call,
945
- joinAs: joinAs,
946
- inviteHash: inviteHash,
947
- publicKey: publicKey,
948
- block: block,
949
- params: params,
950
- });
951
- }
952
- /**
953
- * Generate buffer from TLObject.
954
- */
886
+ return new JoinGroupCall({ "muted": muted, "videoStopped": videoStopped, "call": call, "joinAs": joinAs, "inviteHash": inviteHash, "publicKey": publicKey, "block": block, "params": params });
887
+ }
888
+ /**
889
+ * Generate buffer from TLObject.
890
+ */
955
891
  write() {
956
892
  const b = new BytesIO();
957
893
  b.write(Primitive.Int.write(this.constructorId, false));
958
894
  // @ts-ignore
959
895
  let flags = 0;
960
- flags |= this.muted ? 1 << 0 : 0;
961
- flags |= this.videoStopped ? 1 << 2 : 0;
962
- flags |= this.inviteHash !== undefined ? 1 << 1 : 0;
963
- flags |= this.publicKey !== undefined ? 1 << 3 : 0;
964
- flags |= this.block !== undefined ? 1 << 3 : 0;
965
- b.write(Primitive.Int.write(flags));
896
+ flags |= this.muted ? (1 << 0) : 0;
897
+ flags |= this.videoStopped ? (1 << 2) : 0;
898
+ flags |= this.inviteHash !== undefined ? (1 << 1) : 0;
899
+ flags |= this.publicKey !== undefined ? (1 << 3) : 0;
900
+ flags |= this.block !== undefined ? (1 << 3) : 0;
901
+ b.write((Primitive.Int.write(flags)));
966
902
  if (this.call !== undefined) {
967
903
  b.write(this.call.write());
968
904
  }
@@ -970,13 +906,13 @@ export class JoinGroupCall extends TLObject {
970
906
  b.write(this.joinAs.write());
971
907
  }
972
908
  if (this.inviteHash !== undefined) {
973
- b.write(Primitive.String.write(this.inviteHash));
909
+ b.write((Primitive.String.write(this.inviteHash)));
974
910
  }
975
911
  if (this.publicKey !== undefined) {
976
- b.write(Primitive.Int256.write(this.publicKey));
912
+ b.write((Primitive.Int256.write(this.publicKey)));
977
913
  }
978
914
  if (this.block !== undefined) {
979
- b.write(Primitive.Bytes.write(this.block));
915
+ b.write((Primitive.Bytes.write(this.block)));
980
916
  }
981
917
  if (this.params !== undefined) {
982
918
  b.write(this.params.write());
@@ -990,27 +926,27 @@ export class LeaveGroupCall extends TLObject {
990
926
  source;
991
927
  constructor(params) {
992
928
  super();
993
- this.classType = 'functions';
994
- this.className = 'phone.LeaveGroupCall';
929
+ this.classType = "functions";
930
+ this.className = "phone.LeaveGroupCall";
995
931
  this.constructorId = 0x500377f9;
996
932
  this.subclassOfId = 0x8af52aac;
997
- this._slots = ['call', 'source'];
933
+ this._slots = ["call", "source"];
998
934
  this.call = params.call;
999
935
  this.source = params.source;
1000
936
  }
1001
937
  /**
1002
- * Generate the TLObject from buffer.
1003
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1004
- */
938
+ * Generate the TLObject from buffer.
939
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
940
+ */
1005
941
  static async read(_data, ..._args) {
1006
942
  // no flags
1007
943
  let call = await TLObject.read(_data);
1008
944
  let source = await Primitive.Int.read(_data);
1009
- return new LeaveGroupCall({ call: call, source: source });
945
+ return new LeaveGroupCall({ "call": call, "source": source });
1010
946
  }
1011
947
  /**
1012
- * Generate buffer from TLObject.
1013
- */
948
+ * Generate buffer from TLObject.
949
+ */
1014
950
  write() {
1015
951
  const b = new BytesIO();
1016
952
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1019,7 +955,7 @@ export class LeaveGroupCall extends TLObject {
1019
955
  b.write(this.call.write());
1020
956
  }
1021
957
  if (this.source !== undefined) {
1022
- b.write(Primitive.Int.write(this.source));
958
+ b.write((Primitive.Int.write(this.source)));
1023
959
  }
1024
960
  return b.buffer;
1025
961
  }
@@ -1030,27 +966,27 @@ export class InviteToGroupCall extends TLObject {
1030
966
  users;
1031
967
  constructor(params) {
1032
968
  super();
1033
- this.classType = 'functions';
1034
- this.className = 'phone.InviteToGroupCall';
969
+ this.classType = "functions";
970
+ this.className = "phone.InviteToGroupCall";
1035
971
  this.constructorId = 0x7b393160;
1036
972
  this.subclassOfId = 0x8af52aac;
1037
- this._slots = ['call', 'users'];
973
+ this._slots = ["call", "users"];
1038
974
  this.call = params.call;
1039
975
  this.users = params.users;
1040
976
  }
1041
977
  /**
1042
- * Generate the TLObject from buffer.
1043
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1044
- */
978
+ * Generate the TLObject from buffer.
979
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
980
+ */
1045
981
  static async read(_data, ..._args) {
1046
982
  // no flags
1047
983
  let call = await TLObject.read(_data);
1048
984
  let users = await TLObject.read(_data);
1049
- return new InviteToGroupCall({ call: call, users: users });
985
+ return new InviteToGroupCall({ "call": call, "users": users });
1050
986
  }
1051
987
  /**
1052
- * Generate buffer from TLObject.
1053
- */
988
+ * Generate buffer from TLObject.
989
+ */
1054
990
  write() {
1055
991
  const b = new BytesIO();
1056
992
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1059,7 +995,7 @@ export class InviteToGroupCall extends TLObject {
1059
995
  b.write(this.call.write());
1060
996
  }
1061
997
  if (this.users) {
1062
- b.write(Primitive.Vector.write(this.users));
998
+ b.write((Primitive.Vector.write(this.users)));
1063
999
  }
1064
1000
  return b.buffer;
1065
1001
  }
@@ -1069,25 +1005,25 @@ export class DiscardGroupCall extends TLObject {
1069
1005
  call;
1070
1006
  constructor(params) {
1071
1007
  super();
1072
- this.classType = 'functions';
1073
- this.className = 'phone.DiscardGroupCall';
1008
+ this.classType = "functions";
1009
+ this.className = "phone.DiscardGroupCall";
1074
1010
  this.constructorId = 0x7a777135;
1075
1011
  this.subclassOfId = 0x8af52aac;
1076
- this._slots = ['call'];
1012
+ this._slots = ["call"];
1077
1013
  this.call = params.call;
1078
1014
  }
1079
1015
  /**
1080
- * Generate the TLObject from buffer.
1081
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1082
- */
1016
+ * Generate the TLObject from buffer.
1017
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1018
+ */
1083
1019
  static async read(_data, ..._args) {
1084
1020
  // no flags
1085
1021
  let call = await TLObject.read(_data);
1086
- return new DiscardGroupCall({ call: call });
1022
+ return new DiscardGroupCall({ "call": call });
1087
1023
  }
1088
1024
  /**
1089
- * Generate buffer from TLObject.
1090
- */
1025
+ * Generate buffer from TLObject.
1026
+ */
1091
1027
  write() {
1092
1028
  const b = new BytesIO();
1093
1029
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1107,17 +1043,11 @@ export class ToggleGroupCallSettings extends TLObject {
1107
1043
  sendPaidMessagesStars;
1108
1044
  constructor(params) {
1109
1045
  super();
1110
- this.classType = 'functions';
1111
- this.className = 'phone.ToggleGroupCallSettings';
1046
+ this.classType = "functions";
1047
+ this.className = "phone.ToggleGroupCallSettings";
1112
1048
  this.constructorId = 0x974392f2;
1113
1049
  this.subclassOfId = 0x8af52aac;
1114
- this._slots = [
1115
- 'resetInviteHash',
1116
- 'call',
1117
- 'joinMuted',
1118
- 'messagesEnabled',
1119
- 'sendPaidMessagesStars',
1120
- ];
1050
+ this._slots = ["resetInviteHash", "call", "joinMuted", "messagesEnabled", "sendPaidMessagesStars"];
1121
1051
  this.resetInviteHash = params.resetInviteHash;
1122
1052
  this.call = params.call;
1123
1053
  this.joinMuted = params.joinMuted;
@@ -1125,49 +1055,43 @@ export class ToggleGroupCallSettings extends TLObject {
1125
1055
  this.sendPaidMessagesStars = params.sendPaidMessagesStars;
1126
1056
  }
1127
1057
  /**
1128
- * Generate the TLObject from buffer.
1129
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1130
- */
1058
+ * Generate the TLObject from buffer.
1059
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1060
+ */
1131
1061
  static async read(_data, ..._args) {
1132
1062
  // @ts-ignore
1133
1063
  let flags = await Primitive.Int.read(_data);
1134
- let resetInviteHash = flags & (1 << 1) ? true : false;
1064
+ let resetInviteHash = (flags & (1 << 1)) ? true : false;
1135
1065
  let call = await TLObject.read(_data);
1136
- let joinMuted = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
1137
- let messagesEnabled = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
1138
- let sendPaidMessagesStars = flags & (1 << 3) ? await Primitive.Long.read(_data) : undefined;
1139
- return new ToggleGroupCallSettings({
1140
- resetInviteHash: resetInviteHash,
1141
- call: call,
1142
- joinMuted: joinMuted,
1143
- messagesEnabled: messagesEnabled,
1144
- sendPaidMessagesStars: sendPaidMessagesStars,
1145
- });
1146
- }
1147
- /**
1148
- * Generate buffer from TLObject.
1149
- */
1066
+ let joinMuted = (flags & (1 << 0)) ? await Primitive.Bool.read(_data) : undefined;
1067
+ let messagesEnabled = (flags & (1 << 2)) ? await Primitive.Bool.read(_data) : undefined;
1068
+ let sendPaidMessagesStars = (flags & (1 << 3)) ? await Primitive.Long.read(_data) : undefined;
1069
+ return new ToggleGroupCallSettings({ "resetInviteHash": resetInviteHash, "call": call, "joinMuted": joinMuted, "messagesEnabled": messagesEnabled, "sendPaidMessagesStars": sendPaidMessagesStars });
1070
+ }
1071
+ /**
1072
+ * Generate buffer from TLObject.
1073
+ */
1150
1074
  write() {
1151
1075
  const b = new BytesIO();
1152
1076
  b.write(Primitive.Int.write(this.constructorId, false));
1153
1077
  // @ts-ignore
1154
1078
  let flags = 0;
1155
- flags |= this.resetInviteHash ? 1 << 1 : 0;
1156
- flags |= this.joinMuted !== undefined ? 1 << 0 : 0;
1157
- flags |= this.messagesEnabled !== undefined ? 1 << 2 : 0;
1158
- flags |= this.sendPaidMessagesStars !== undefined ? 1 << 3 : 0;
1159
- b.write(Primitive.Int.write(flags));
1079
+ flags |= this.resetInviteHash ? (1 << 1) : 0;
1080
+ flags |= this.joinMuted !== undefined ? (1 << 0) : 0;
1081
+ flags |= this.messagesEnabled !== undefined ? (1 << 2) : 0;
1082
+ flags |= this.sendPaidMessagesStars !== undefined ? (1 << 3) : 0;
1083
+ b.write((Primitive.Int.write(flags)));
1160
1084
  if (this.call !== undefined) {
1161
1085
  b.write(this.call.write());
1162
1086
  }
1163
1087
  if (this.joinMuted !== undefined) {
1164
- b.write(Primitive.Bool.write(this.joinMuted));
1088
+ b.write((Primitive.Bool.write(this.joinMuted)));
1165
1089
  }
1166
1090
  if (this.messagesEnabled !== undefined) {
1167
- b.write(Primitive.Bool.write(this.messagesEnabled));
1091
+ b.write((Primitive.Bool.write(this.messagesEnabled)));
1168
1092
  }
1169
1093
  if (this.sendPaidMessagesStars !== undefined) {
1170
- b.write(Primitive.Long.write(this.sendPaidMessagesStars));
1094
+ b.write((Primitive.Long.write(this.sendPaidMessagesStars)));
1171
1095
  }
1172
1096
  return b.buffer;
1173
1097
  }
@@ -1178,27 +1102,27 @@ export class GetGroupCall extends TLObject {
1178
1102
  limit;
1179
1103
  constructor(params) {
1180
1104
  super();
1181
- this.classType = 'functions';
1182
- this.className = 'phone.GetGroupCall';
1105
+ this.classType = "functions";
1106
+ this.className = "phone.GetGroupCall";
1183
1107
  this.constructorId = 0x41845db;
1184
1108
  this.subclassOfId = 0x304116be;
1185
- this._slots = ['call', 'limit'];
1109
+ this._slots = ["call", "limit"];
1186
1110
  this.call = params.call;
1187
1111
  this.limit = params.limit;
1188
1112
  }
1189
1113
  /**
1190
- * Generate the TLObject from buffer.
1191
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1192
- */
1114
+ * Generate the TLObject from buffer.
1115
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1116
+ */
1193
1117
  static async read(_data, ..._args) {
1194
1118
  // no flags
1195
1119
  let call = await TLObject.read(_data);
1196
1120
  let limit = await Primitive.Int.read(_data);
1197
- return new GetGroupCall({ call: call, limit: limit });
1121
+ return new GetGroupCall({ "call": call, "limit": limit });
1198
1122
  }
1199
1123
  /**
1200
- * Generate buffer from TLObject.
1201
- */
1124
+ * Generate buffer from TLObject.
1125
+ */
1202
1126
  write() {
1203
1127
  const b = new BytesIO();
1204
1128
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1207,7 +1131,7 @@ export class GetGroupCall extends TLObject {
1207
1131
  b.write(this.call.write());
1208
1132
  }
1209
1133
  if (this.limit !== undefined) {
1210
- b.write(Primitive.Int.write(this.limit));
1134
+ b.write((Primitive.Int.write(this.limit)));
1211
1135
  }
1212
1136
  return b.buffer;
1213
1137
  }
@@ -1221,11 +1145,11 @@ export class GetGroupParticipants extends TLObject {
1221
1145
  limit;
1222
1146
  constructor(params) {
1223
1147
  super();
1224
- this.classType = 'functions';
1225
- this.className = 'phone.GetGroupParticipants';
1148
+ this.classType = "functions";
1149
+ this.className = "phone.GetGroupParticipants";
1226
1150
  this.constructorId = 0xc558d8ab;
1227
1151
  this.subclassOfId = 0x72d304f4;
1228
- this._slots = ['call', 'ids', 'sources', 'offset', 'limit'];
1152
+ this._slots = ["call", "ids", "sources", "offset", "limit"];
1229
1153
  this.call = params.call;
1230
1154
  this.ids = params.ids;
1231
1155
  this.sources = params.sources;
@@ -1233,9 +1157,9 @@ export class GetGroupParticipants extends TLObject {
1233
1157
  this.limit = params.limit;
1234
1158
  }
1235
1159
  /**
1236
- * Generate the TLObject from buffer.
1237
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1238
- */
1160
+ * Generate the TLObject from buffer.
1161
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1162
+ */
1239
1163
  static async read(_data, ..._args) {
1240
1164
  // no flags
1241
1165
  let call = await TLObject.read(_data);
@@ -1243,17 +1167,11 @@ export class GetGroupParticipants extends TLObject {
1243
1167
  let sources = await TLObject.read(_data, Primitive.Int);
1244
1168
  let offset = await Primitive.String.read(_data);
1245
1169
  let limit = await Primitive.Int.read(_data);
1246
- return new GetGroupParticipants({
1247
- call: call,
1248
- ids: ids,
1249
- sources: sources,
1250
- offset: offset,
1251
- limit: limit,
1252
- });
1170
+ return new GetGroupParticipants({ "call": call, "ids": ids, "sources": sources, "offset": offset, "limit": limit });
1253
1171
  }
1254
1172
  /**
1255
- * Generate buffer from TLObject.
1256
- */
1173
+ * Generate buffer from TLObject.
1174
+ */
1257
1175
  write() {
1258
1176
  const b = new BytesIO();
1259
1177
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1262,16 +1180,16 @@ export class GetGroupParticipants extends TLObject {
1262
1180
  b.write(this.call.write());
1263
1181
  }
1264
1182
  if (this.ids) {
1265
- b.write(Primitive.Vector.write(this.ids));
1183
+ b.write((Primitive.Vector.write(this.ids)));
1266
1184
  }
1267
1185
  if (this.sources) {
1268
- b.write(Primitive.Vector.write(this.sources, Primitive.Int));
1186
+ b.write((Primitive.Vector.write(this.sources, Primitive.Int)));
1269
1187
  }
1270
1188
  if (this.offset !== undefined) {
1271
- b.write(Primitive.String.write(this.offset));
1189
+ b.write((Primitive.String.write(this.offset)));
1272
1190
  }
1273
1191
  if (this.limit !== undefined) {
1274
- b.write(Primitive.Int.write(this.limit));
1192
+ b.write((Primitive.Int.write(this.limit)));
1275
1193
  }
1276
1194
  return b.buffer;
1277
1195
  }
@@ -1282,27 +1200,27 @@ export class CheckGroupCall extends TLObject {
1282
1200
  sources;
1283
1201
  constructor(params) {
1284
1202
  super();
1285
- this.classType = 'functions';
1286
- this.className = 'phone.CheckGroupCall';
1203
+ this.classType = "functions";
1204
+ this.className = "phone.CheckGroupCall";
1287
1205
  this.constructorId = 0xb59cf977;
1288
1206
  this.subclassOfId = 0x5026710f;
1289
- this._slots = ['call', 'sources'];
1207
+ this._slots = ["call", "sources"];
1290
1208
  this.call = params.call;
1291
1209
  this.sources = params.sources;
1292
1210
  }
1293
1211
  /**
1294
- * Generate the TLObject from buffer.
1295
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1296
- */
1212
+ * Generate the TLObject from buffer.
1213
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1214
+ */
1297
1215
  static async read(_data, ..._args) {
1298
1216
  // no flags
1299
1217
  let call = await TLObject.read(_data);
1300
1218
  let sources = await TLObject.read(_data, Primitive.Int);
1301
- return new CheckGroupCall({ call: call, sources: sources });
1219
+ return new CheckGroupCall({ "call": call, "sources": sources });
1302
1220
  }
1303
1221
  /**
1304
- * Generate buffer from TLObject.
1305
- */
1222
+ * Generate buffer from TLObject.
1223
+ */
1306
1224
  write() {
1307
1225
  const b = new BytesIO();
1308
1226
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1311,7 +1229,7 @@ export class CheckGroupCall extends TLObject {
1311
1229
  b.write(this.call.write());
1312
1230
  }
1313
1231
  if (this.sources) {
1314
- b.write(Primitive.Vector.write(this.sources, Primitive.Int));
1232
+ b.write((Primitive.Vector.write(this.sources, Primitive.Int)));
1315
1233
  }
1316
1234
  return b.buffer;
1317
1235
  }
@@ -1325,11 +1243,11 @@ export class ToggleGroupCallRecord extends TLObject {
1325
1243
  videoPortrait;
1326
1244
  constructor(params) {
1327
1245
  super();
1328
- this.classType = 'functions';
1329
- this.className = 'phone.ToggleGroupCallRecord';
1246
+ this.classType = "functions";
1247
+ this.className = "phone.ToggleGroupCallRecord";
1330
1248
  this.constructorId = 0xf128c708;
1331
1249
  this.subclassOfId = 0x8af52aac;
1332
- this._slots = ['start', 'video', 'call', 'title', 'videoPortrait'];
1250
+ this._slots = ["start", "video", "call", "title", "videoPortrait"];
1333
1251
  this.start = params.start;
1334
1252
  this.video = params.video;
1335
1253
  this.call = params.call;
@@ -1337,46 +1255,40 @@ export class ToggleGroupCallRecord extends TLObject {
1337
1255
  this.videoPortrait = params.videoPortrait;
1338
1256
  }
1339
1257
  /**
1340
- * Generate the TLObject from buffer.
1341
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1342
- */
1258
+ * Generate the TLObject from buffer.
1259
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1260
+ */
1343
1261
  static async read(_data, ..._args) {
1344
1262
  // @ts-ignore
1345
1263
  let flags = await Primitive.Int.read(_data);
1346
- let start = flags & (1 << 0) ? true : false;
1347
- let video = flags & (1 << 2) ? true : false;
1264
+ let start = (flags & (1 << 0)) ? true : false;
1265
+ let video = (flags & (1 << 2)) ? true : false;
1348
1266
  let call = await TLObject.read(_data);
1349
- let title = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
1350
- let videoPortrait = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
1351
- return new ToggleGroupCallRecord({
1352
- start: start,
1353
- video: video,
1354
- call: call,
1355
- title: title,
1356
- videoPortrait: videoPortrait,
1357
- });
1358
- }
1359
- /**
1360
- * Generate buffer from TLObject.
1361
- */
1267
+ let title = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
1268
+ let videoPortrait = (flags & (1 << 2)) ? await Primitive.Bool.read(_data) : undefined;
1269
+ return new ToggleGroupCallRecord({ "start": start, "video": video, "call": call, "title": title, "videoPortrait": videoPortrait });
1270
+ }
1271
+ /**
1272
+ * Generate buffer from TLObject.
1273
+ */
1362
1274
  write() {
1363
1275
  const b = new BytesIO();
1364
1276
  b.write(Primitive.Int.write(this.constructorId, false));
1365
1277
  // @ts-ignore
1366
1278
  let flags = 0;
1367
- flags |= this.start ? 1 << 0 : 0;
1368
- flags |= this.video ? 1 << 2 : 0;
1369
- flags |= this.title !== undefined ? 1 << 1 : 0;
1370
- flags |= this.videoPortrait !== undefined ? 1 << 2 : 0;
1371
- b.write(Primitive.Int.write(flags));
1279
+ flags |= this.start ? (1 << 0) : 0;
1280
+ flags |= this.video ? (1 << 2) : 0;
1281
+ flags |= this.title !== undefined ? (1 << 1) : 0;
1282
+ flags |= this.videoPortrait !== undefined ? (1 << 2) : 0;
1283
+ b.write((Primitive.Int.write(flags)));
1372
1284
  if (this.call !== undefined) {
1373
1285
  b.write(this.call.write());
1374
1286
  }
1375
1287
  if (this.title !== undefined) {
1376
- b.write(Primitive.String.write(this.title));
1288
+ b.write((Primitive.String.write(this.title)));
1377
1289
  }
1378
1290
  if (this.videoPortrait !== undefined) {
1379
- b.write(Primitive.Bool.write(this.videoPortrait));
1291
+ b.write((Primitive.Bool.write(this.videoPortrait)));
1380
1292
  }
1381
1293
  return b.buffer;
1382
1294
  }
@@ -1393,20 +1305,11 @@ export class EditGroupCallParticipant extends TLObject {
1393
1305
  presentationPaused;
1394
1306
  constructor(params) {
1395
1307
  super();
1396
- this.classType = 'functions';
1397
- this.className = 'phone.EditGroupCallParticipant';
1308
+ this.classType = "functions";
1309
+ this.className = "phone.EditGroupCallParticipant";
1398
1310
  this.constructorId = 0xa5273abf;
1399
1311
  this.subclassOfId = 0x8af52aac;
1400
- this._slots = [
1401
- 'call',
1402
- 'participant',
1403
- 'muted',
1404
- 'volume',
1405
- 'raiseHand',
1406
- 'videoStopped',
1407
- 'videoPaused',
1408
- 'presentationPaused',
1409
- ];
1312
+ this._slots = ["call", "participant", "muted", "volume", "raiseHand", "videoStopped", "videoPaused", "presentationPaused"];
1410
1313
  this.call = params.call;
1411
1314
  this.participant = params.participant;
1412
1315
  this.muted = params.muted;
@@ -1417,46 +1320,37 @@ export class EditGroupCallParticipant extends TLObject {
1417
1320
  this.presentationPaused = params.presentationPaused;
1418
1321
  }
1419
1322
  /**
1420
- * Generate the TLObject from buffer.
1421
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1422
- */
1323
+ * Generate the TLObject from buffer.
1324
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1325
+ */
1423
1326
  static async read(_data, ..._args) {
1424
1327
  // @ts-ignore
1425
1328
  let flags = await Primitive.Int.read(_data);
1426
1329
  let call = await TLObject.read(_data);
1427
1330
  let participant = await TLObject.read(_data);
1428
- let muted = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
1429
- let volume = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
1430
- let raiseHand = flags & (1 << 2) ? await Primitive.Bool.read(_data) : undefined;
1431
- let videoStopped = flags & (1 << 3) ? await Primitive.Bool.read(_data) : undefined;
1432
- let videoPaused = flags & (1 << 4) ? await Primitive.Bool.read(_data) : undefined;
1433
- let presentationPaused = flags & (1 << 5) ? await Primitive.Bool.read(_data) : undefined;
1434
- return new EditGroupCallParticipant({
1435
- call: call,
1436
- participant: participant,
1437
- muted: muted,
1438
- volume: volume,
1439
- raiseHand: raiseHand,
1440
- videoStopped: videoStopped,
1441
- videoPaused: videoPaused,
1442
- presentationPaused: presentationPaused,
1443
- });
1444
- }
1445
- /**
1446
- * Generate buffer from TLObject.
1447
- */
1331
+ let muted = (flags & (1 << 0)) ? await Primitive.Bool.read(_data) : undefined;
1332
+ let volume = (flags & (1 << 1)) ? await Primitive.Int.read(_data) : undefined;
1333
+ let raiseHand = (flags & (1 << 2)) ? await Primitive.Bool.read(_data) : undefined;
1334
+ let videoStopped = (flags & (1 << 3)) ? await Primitive.Bool.read(_data) : undefined;
1335
+ let videoPaused = (flags & (1 << 4)) ? await Primitive.Bool.read(_data) : undefined;
1336
+ let presentationPaused = (flags & (1 << 5)) ? await Primitive.Bool.read(_data) : undefined;
1337
+ return new EditGroupCallParticipant({ "call": call, "participant": participant, "muted": muted, "volume": volume, "raiseHand": raiseHand, "videoStopped": videoStopped, "videoPaused": videoPaused, "presentationPaused": presentationPaused });
1338
+ }
1339
+ /**
1340
+ * Generate buffer from TLObject.
1341
+ */
1448
1342
  write() {
1449
1343
  const b = new BytesIO();
1450
1344
  b.write(Primitive.Int.write(this.constructorId, false));
1451
1345
  // @ts-ignore
1452
1346
  let flags = 0;
1453
- flags |= this.muted !== undefined ? 1 << 0 : 0;
1454
- flags |= this.volume !== undefined ? 1 << 1 : 0;
1455
- flags |= this.raiseHand !== undefined ? 1 << 2 : 0;
1456
- flags |= this.videoStopped !== undefined ? 1 << 3 : 0;
1457
- flags |= this.videoPaused !== undefined ? 1 << 4 : 0;
1458
- flags |= this.presentationPaused !== undefined ? 1 << 5 : 0;
1459
- b.write(Primitive.Int.write(flags));
1347
+ flags |= this.muted !== undefined ? (1 << 0) : 0;
1348
+ flags |= this.volume !== undefined ? (1 << 1) : 0;
1349
+ flags |= this.raiseHand !== undefined ? (1 << 2) : 0;
1350
+ flags |= this.videoStopped !== undefined ? (1 << 3) : 0;
1351
+ flags |= this.videoPaused !== undefined ? (1 << 4) : 0;
1352
+ flags |= this.presentationPaused !== undefined ? (1 << 5) : 0;
1353
+ b.write((Primitive.Int.write(flags)));
1460
1354
  if (this.call !== undefined) {
1461
1355
  b.write(this.call.write());
1462
1356
  }
@@ -1464,22 +1358,22 @@ export class EditGroupCallParticipant extends TLObject {
1464
1358
  b.write(this.participant.write());
1465
1359
  }
1466
1360
  if (this.muted !== undefined) {
1467
- b.write(Primitive.Bool.write(this.muted));
1361
+ b.write((Primitive.Bool.write(this.muted)));
1468
1362
  }
1469
1363
  if (this.volume !== undefined) {
1470
- b.write(Primitive.Int.write(this.volume));
1364
+ b.write((Primitive.Int.write(this.volume)));
1471
1365
  }
1472
1366
  if (this.raiseHand !== undefined) {
1473
- b.write(Primitive.Bool.write(this.raiseHand));
1367
+ b.write((Primitive.Bool.write(this.raiseHand)));
1474
1368
  }
1475
1369
  if (this.videoStopped !== undefined) {
1476
- b.write(Primitive.Bool.write(this.videoStopped));
1370
+ b.write((Primitive.Bool.write(this.videoStopped)));
1477
1371
  }
1478
1372
  if (this.videoPaused !== undefined) {
1479
- b.write(Primitive.Bool.write(this.videoPaused));
1373
+ b.write((Primitive.Bool.write(this.videoPaused)));
1480
1374
  }
1481
1375
  if (this.presentationPaused !== undefined) {
1482
- b.write(Primitive.Bool.write(this.presentationPaused));
1376
+ b.write((Primitive.Bool.write(this.presentationPaused)));
1483
1377
  }
1484
1378
  return b.buffer;
1485
1379
  }
@@ -1490,27 +1384,27 @@ export class EditGroupCallTitle extends TLObject {
1490
1384
  title;
1491
1385
  constructor(params) {
1492
1386
  super();
1493
- this.classType = 'functions';
1494
- this.className = 'phone.EditGroupCallTitle';
1387
+ this.classType = "functions";
1388
+ this.className = "phone.EditGroupCallTitle";
1495
1389
  this.constructorId = 0x1ca6ac0a;
1496
1390
  this.subclassOfId = 0x8af52aac;
1497
- this._slots = ['call', 'title'];
1391
+ this._slots = ["call", "title"];
1498
1392
  this.call = params.call;
1499
1393
  this.title = params.title;
1500
1394
  }
1501
1395
  /**
1502
- * Generate the TLObject from buffer.
1503
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1504
- */
1396
+ * Generate the TLObject from buffer.
1397
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1398
+ */
1505
1399
  static async read(_data, ..._args) {
1506
1400
  // no flags
1507
1401
  let call = await TLObject.read(_data);
1508
1402
  let title = await Primitive.String.read(_data);
1509
- return new EditGroupCallTitle({ call: call, title: title });
1403
+ return new EditGroupCallTitle({ "call": call, "title": title });
1510
1404
  }
1511
1405
  /**
1512
- * Generate buffer from TLObject.
1513
- */
1406
+ * Generate buffer from TLObject.
1407
+ */
1514
1408
  write() {
1515
1409
  const b = new BytesIO();
1516
1410
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1519,7 +1413,7 @@ export class EditGroupCallTitle extends TLObject {
1519
1413
  b.write(this.call.write());
1520
1414
  }
1521
1415
  if (this.title !== undefined) {
1522
- b.write(Primitive.String.write(this.title));
1416
+ b.write((Primitive.String.write(this.title)));
1523
1417
  }
1524
1418
  return b.buffer;
1525
1419
  }
@@ -1529,25 +1423,25 @@ export class GetGroupCallJoinAs extends TLObject {
1529
1423
  peer;
1530
1424
  constructor(params) {
1531
1425
  super();
1532
- this.classType = 'functions';
1533
- this.className = 'phone.GetGroupCallJoinAs';
1426
+ this.classType = "functions";
1427
+ this.className = "phone.GetGroupCallJoinAs";
1534
1428
  this.constructorId = 0xef7c213a;
1535
1429
  this.subclassOfId = 0xb4b770fb;
1536
- this._slots = ['peer'];
1430
+ this._slots = ["peer"];
1537
1431
  this.peer = params.peer;
1538
1432
  }
1539
1433
  /**
1540
- * Generate the TLObject from buffer.
1541
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1542
- */
1434
+ * Generate the TLObject from buffer.
1435
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1436
+ */
1543
1437
  static async read(_data, ..._args) {
1544
1438
  // no flags
1545
1439
  let peer = await TLObject.read(_data);
1546
- return new GetGroupCallJoinAs({ peer: peer });
1440
+ return new GetGroupCallJoinAs({ "peer": peer });
1547
1441
  }
1548
1442
  /**
1549
- * Generate buffer from TLObject.
1550
- */
1443
+ * Generate buffer from TLObject.
1444
+ */
1551
1445
  write() {
1552
1446
  const b = new BytesIO();
1553
1447
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1564,35 +1458,35 @@ export class ExportGroupCallInvite extends TLObject {
1564
1458
  call;
1565
1459
  constructor(params) {
1566
1460
  super();
1567
- this.classType = 'functions';
1568
- this.className = 'phone.ExportGroupCallInvite';
1461
+ this.classType = "functions";
1462
+ this.className = "phone.ExportGroupCallInvite";
1569
1463
  this.constructorId = 0xe6aa647f;
1570
1464
  this.subclassOfId = 0x3b3bfe8f;
1571
- this._slots = ['canSelfUnmute', 'call'];
1465
+ this._slots = ["canSelfUnmute", "call"];
1572
1466
  this.canSelfUnmute = params.canSelfUnmute;
1573
1467
  this.call = params.call;
1574
1468
  }
1575
1469
  /**
1576
- * Generate the TLObject from buffer.
1577
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1578
- */
1470
+ * Generate the TLObject from buffer.
1471
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1472
+ */
1579
1473
  static async read(_data, ..._args) {
1580
1474
  // @ts-ignore
1581
1475
  let flags = await Primitive.Int.read(_data);
1582
- let canSelfUnmute = flags & (1 << 0) ? true : false;
1476
+ let canSelfUnmute = (flags & (1 << 0)) ? true : false;
1583
1477
  let call = await TLObject.read(_data);
1584
- return new ExportGroupCallInvite({ canSelfUnmute: canSelfUnmute, call: call });
1478
+ return new ExportGroupCallInvite({ "canSelfUnmute": canSelfUnmute, "call": call });
1585
1479
  }
1586
1480
  /**
1587
- * Generate buffer from TLObject.
1588
- */
1481
+ * Generate buffer from TLObject.
1482
+ */
1589
1483
  write() {
1590
1484
  const b = new BytesIO();
1591
1485
  b.write(Primitive.Int.write(this.constructorId, false));
1592
1486
  // @ts-ignore
1593
1487
  let flags = 0;
1594
- flags |= this.canSelfUnmute ? 1 << 0 : 0;
1595
- b.write(Primitive.Int.write(flags));
1488
+ flags |= this.canSelfUnmute ? (1 << 0) : 0;
1489
+ b.write((Primitive.Int.write(flags)));
1596
1490
  if (this.call !== undefined) {
1597
1491
  b.write(this.call.write());
1598
1492
  }
@@ -1605,27 +1499,27 @@ export class ToggleGroupCallStartSubscription extends TLObject {
1605
1499
  subscribed;
1606
1500
  constructor(params) {
1607
1501
  super();
1608
- this.classType = 'functions';
1609
- this.className = 'phone.ToggleGroupCallStartSubscription';
1502
+ this.classType = "functions";
1503
+ this.className = "phone.ToggleGroupCallStartSubscription";
1610
1504
  this.constructorId = 0x219c34e6;
1611
1505
  this.subclassOfId = 0x8af52aac;
1612
- this._slots = ['call', 'subscribed'];
1506
+ this._slots = ["call", "subscribed"];
1613
1507
  this.call = params.call;
1614
1508
  this.subscribed = params.subscribed;
1615
1509
  }
1616
1510
  /**
1617
- * Generate the TLObject from buffer.
1618
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1619
- */
1511
+ * Generate the TLObject from buffer.
1512
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1513
+ */
1620
1514
  static async read(_data, ..._args) {
1621
1515
  // no flags
1622
1516
  let call = await TLObject.read(_data);
1623
1517
  let subscribed = await Primitive.Bool.read(_data);
1624
- return new ToggleGroupCallStartSubscription({ call: call, subscribed: subscribed });
1518
+ return new ToggleGroupCallStartSubscription({ "call": call, "subscribed": subscribed });
1625
1519
  }
1626
1520
  /**
1627
- * Generate buffer from TLObject.
1628
- */
1521
+ * Generate buffer from TLObject.
1522
+ */
1629
1523
  write() {
1630
1524
  const b = new BytesIO();
1631
1525
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1634,7 +1528,7 @@ export class ToggleGroupCallStartSubscription extends TLObject {
1634
1528
  b.write(this.call.write());
1635
1529
  }
1636
1530
  if (this.subscribed !== undefined) {
1637
- b.write(Primitive.Bool.write(this.subscribed));
1531
+ b.write((Primitive.Bool.write(this.subscribed)));
1638
1532
  }
1639
1533
  return b.buffer;
1640
1534
  }
@@ -1644,25 +1538,25 @@ export class StartScheduledGroupCall extends TLObject {
1644
1538
  call;
1645
1539
  constructor(params) {
1646
1540
  super();
1647
- this.classType = 'functions';
1648
- this.className = 'phone.StartScheduledGroupCall';
1541
+ this.classType = "functions";
1542
+ this.className = "phone.StartScheduledGroupCall";
1649
1543
  this.constructorId = 0x5680e342;
1650
1544
  this.subclassOfId = 0x8af52aac;
1651
- this._slots = ['call'];
1545
+ this._slots = ["call"];
1652
1546
  this.call = params.call;
1653
1547
  }
1654
1548
  /**
1655
- * Generate the TLObject from buffer.
1656
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1657
- */
1549
+ * Generate the TLObject from buffer.
1550
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1551
+ */
1658
1552
  static async read(_data, ..._args) {
1659
1553
  // no flags
1660
1554
  let call = await TLObject.read(_data);
1661
- return new StartScheduledGroupCall({ call: call });
1555
+ return new StartScheduledGroupCall({ "call": call });
1662
1556
  }
1663
1557
  /**
1664
- * Generate buffer from TLObject.
1665
- */
1558
+ * Generate buffer from TLObject.
1559
+ */
1666
1560
  write() {
1667
1561
  const b = new BytesIO();
1668
1562
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1679,27 +1573,27 @@ export class SaveDefaultGroupCallJoinAs extends TLObject {
1679
1573
  joinAs;
1680
1574
  constructor(params) {
1681
1575
  super();
1682
- this.classType = 'functions';
1683
- this.className = 'phone.SaveDefaultGroupCallJoinAs';
1576
+ this.classType = "functions";
1577
+ this.className = "phone.SaveDefaultGroupCallJoinAs";
1684
1578
  this.constructorId = 0x575e1f8c;
1685
1579
  this.subclassOfId = 0xf5b399ac;
1686
- this._slots = ['peer', 'joinAs'];
1580
+ this._slots = ["peer", "joinAs"];
1687
1581
  this.peer = params.peer;
1688
1582
  this.joinAs = params.joinAs;
1689
1583
  }
1690
1584
  /**
1691
- * Generate the TLObject from buffer.
1692
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1693
- */
1585
+ * Generate the TLObject from buffer.
1586
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1587
+ */
1694
1588
  static async read(_data, ..._args) {
1695
1589
  // no flags
1696
1590
  let peer = await TLObject.read(_data);
1697
1591
  let joinAs = await TLObject.read(_data);
1698
- return new SaveDefaultGroupCallJoinAs({ peer: peer, joinAs: joinAs });
1592
+ return new SaveDefaultGroupCallJoinAs({ "peer": peer, "joinAs": joinAs });
1699
1593
  }
1700
1594
  /**
1701
- * Generate buffer from TLObject.
1702
- */
1595
+ * Generate buffer from TLObject.
1596
+ */
1703
1597
  write() {
1704
1598
  const b = new BytesIO();
1705
1599
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1719,27 +1613,27 @@ export class JoinGroupCallPresentation extends TLObject {
1719
1613
  params;
1720
1614
  constructor(params) {
1721
1615
  super();
1722
- this.classType = 'functions';
1723
- this.className = 'phone.JoinGroupCallPresentation';
1616
+ this.classType = "functions";
1617
+ this.className = "phone.JoinGroupCallPresentation";
1724
1618
  this.constructorId = 0xcbea6bc4;
1725
1619
  this.subclassOfId = 0x8af52aac;
1726
- this._slots = ['call', 'params'];
1620
+ this._slots = ["call", "params"];
1727
1621
  this.call = params.call;
1728
1622
  this.params = params.params;
1729
1623
  }
1730
1624
  /**
1731
- * Generate the TLObject from buffer.
1732
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1733
- */
1625
+ * Generate the TLObject from buffer.
1626
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1627
+ */
1734
1628
  static async read(_data, ..._args) {
1735
1629
  // no flags
1736
1630
  let call = await TLObject.read(_data);
1737
1631
  let params = await TLObject.read(_data);
1738
- return new JoinGroupCallPresentation({ call: call, params: params });
1632
+ return new JoinGroupCallPresentation({ "call": call, "params": params });
1739
1633
  }
1740
1634
  /**
1741
- * Generate buffer from TLObject.
1742
- */
1635
+ * Generate buffer from TLObject.
1636
+ */
1743
1637
  write() {
1744
1638
  const b = new BytesIO();
1745
1639
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1758,25 +1652,25 @@ export class LeaveGroupCallPresentation extends TLObject {
1758
1652
  call;
1759
1653
  constructor(params) {
1760
1654
  super();
1761
- this.classType = 'functions';
1762
- this.className = 'phone.LeaveGroupCallPresentation';
1655
+ this.classType = "functions";
1656
+ this.className = "phone.LeaveGroupCallPresentation";
1763
1657
  this.constructorId = 0x1c50d144;
1764
1658
  this.subclassOfId = 0x8af52aac;
1765
- this._slots = ['call'];
1659
+ this._slots = ["call"];
1766
1660
  this.call = params.call;
1767
1661
  }
1768
1662
  /**
1769
- * Generate the TLObject from buffer.
1770
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1771
- */
1663
+ * Generate the TLObject from buffer.
1664
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1665
+ */
1772
1666
  static async read(_data, ..._args) {
1773
1667
  // no flags
1774
1668
  let call = await TLObject.read(_data);
1775
- return new LeaveGroupCallPresentation({ call: call });
1669
+ return new LeaveGroupCallPresentation({ "call": call });
1776
1670
  }
1777
1671
  /**
1778
- * Generate buffer from TLObject.
1779
- */
1672
+ * Generate buffer from TLObject.
1673
+ */
1780
1674
  write() {
1781
1675
  const b = new BytesIO();
1782
1676
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1792,25 +1686,25 @@ export class GetGroupCallStreamChannels extends TLObject {
1792
1686
  call;
1793
1687
  constructor(params) {
1794
1688
  super();
1795
- this.classType = 'functions';
1796
- this.className = 'phone.GetGroupCallStreamChannels';
1689
+ this.classType = "functions";
1690
+ this.className = "phone.GetGroupCallStreamChannels";
1797
1691
  this.constructorId = 0x1ab21940;
1798
1692
  this.subclassOfId = 0x9157c5e4;
1799
- this._slots = ['call'];
1693
+ this._slots = ["call"];
1800
1694
  this.call = params.call;
1801
1695
  }
1802
1696
  /**
1803
- * Generate the TLObject from buffer.
1804
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1805
- */
1697
+ * Generate the TLObject from buffer.
1698
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1699
+ */
1806
1700
  static async read(_data, ..._args) {
1807
1701
  // no flags
1808
1702
  let call = await TLObject.read(_data);
1809
- return new GetGroupCallStreamChannels({ call: call });
1703
+ return new GetGroupCallStreamChannels({ "call": call });
1810
1704
  }
1811
1705
  /**
1812
- * Generate buffer from TLObject.
1813
- */
1706
+ * Generate buffer from TLObject.
1707
+ */
1814
1708
  write() {
1815
1709
  const b = new BytesIO();
1816
1710
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1828,42 +1722,42 @@ export class GetGroupCallStreamRtmpUrl extends TLObject {
1828
1722
  revoke;
1829
1723
  constructor(params) {
1830
1724
  super();
1831
- this.classType = 'functions';
1832
- this.className = 'phone.GetGroupCallStreamRtmpUrl';
1725
+ this.classType = "functions";
1726
+ this.className = "phone.GetGroupCallStreamRtmpUrl";
1833
1727
  this.constructorId = 0x5af4c73a;
1834
1728
  this.subclassOfId = 0xd1f515cb;
1835
- this._slots = ['liveStory', 'peer', 'revoke'];
1729
+ this._slots = ["liveStory", "peer", "revoke"];
1836
1730
  this.liveStory = params.liveStory;
1837
1731
  this.peer = params.peer;
1838
1732
  this.revoke = params.revoke;
1839
1733
  }
1840
1734
  /**
1841
- * Generate the TLObject from buffer.
1842
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1843
- */
1735
+ * Generate the TLObject from buffer.
1736
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1737
+ */
1844
1738
  static async read(_data, ..._args) {
1845
1739
  // @ts-ignore
1846
1740
  let flags = await Primitive.Int.read(_data);
1847
- let liveStory = flags & (1 << 0) ? true : false;
1741
+ let liveStory = (flags & (1 << 0)) ? true : false;
1848
1742
  let peer = await TLObject.read(_data);
1849
1743
  let revoke = await Primitive.Bool.read(_data);
1850
- return new GetGroupCallStreamRtmpUrl({ liveStory: liveStory, peer: peer, revoke: revoke });
1744
+ return new GetGroupCallStreamRtmpUrl({ "liveStory": liveStory, "peer": peer, "revoke": revoke });
1851
1745
  }
1852
1746
  /**
1853
- * Generate buffer from TLObject.
1854
- */
1747
+ * Generate buffer from TLObject.
1748
+ */
1855
1749
  write() {
1856
1750
  const b = new BytesIO();
1857
1751
  b.write(Primitive.Int.write(this.constructorId, false));
1858
1752
  // @ts-ignore
1859
1753
  let flags = 0;
1860
- flags |= this.liveStory ? 1 << 0 : 0;
1861
- b.write(Primitive.Int.write(flags));
1754
+ flags |= this.liveStory ? (1 << 0) : 0;
1755
+ b.write((Primitive.Int.write(flags)));
1862
1756
  if (this.peer !== undefined) {
1863
1757
  b.write(this.peer.write());
1864
1758
  }
1865
1759
  if (this.revoke !== undefined) {
1866
- b.write(Primitive.Bool.write(this.revoke));
1760
+ b.write((Primitive.Bool.write(this.revoke)));
1867
1761
  }
1868
1762
  return b.buffer;
1869
1763
  }
@@ -1874,27 +1768,27 @@ export class SaveCallLog extends TLObject {
1874
1768
  file;
1875
1769
  constructor(params) {
1876
1770
  super();
1877
- this.classType = 'functions';
1878
- this.className = 'phone.SaveCallLog';
1771
+ this.classType = "functions";
1772
+ this.className = "phone.SaveCallLog";
1879
1773
  this.constructorId = 0x41248786;
1880
1774
  this.subclassOfId = 0xf5b399ac;
1881
- this._slots = ['peer', 'file'];
1775
+ this._slots = ["peer", "file"];
1882
1776
  this.peer = params.peer;
1883
1777
  this.file = params.file;
1884
1778
  }
1885
1779
  /**
1886
- * Generate the TLObject from buffer.
1887
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1888
- */
1780
+ * Generate the TLObject from buffer.
1781
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1782
+ */
1889
1783
  static async read(_data, ..._args) {
1890
1784
  // no flags
1891
1785
  let peer = await TLObject.read(_data);
1892
1786
  let file = await TLObject.read(_data);
1893
- return new SaveCallLog({ peer: peer, file: file });
1787
+ return new SaveCallLog({ "peer": peer, "file": file });
1894
1788
  }
1895
1789
  /**
1896
- * Generate buffer from TLObject.
1897
- */
1790
+ * Generate buffer from TLObject.
1791
+ */
1898
1792
  write() {
1899
1793
  const b = new BytesIO();
1900
1794
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1919,11 +1813,11 @@ export class CreateConferenceCall extends TLObject {
1919
1813
  params;
1920
1814
  constructor(params) {
1921
1815
  super();
1922
- this.classType = 'functions';
1923
- this.className = 'phone.CreateConferenceCall';
1816
+ this.classType = "functions";
1817
+ this.className = "phone.CreateConferenceCall";
1924
1818
  this.constructorId = 0x7d0444bb;
1925
1819
  this.subclassOfId = 0x8af52aac;
1926
- this._slots = ['muted', 'videoStopped', 'join', 'randomId', 'publicKey', 'block', 'params'];
1820
+ this._slots = ["muted", "videoStopped", "join", "randomId", "publicKey", "block", "params"];
1927
1821
  this.muted = params.muted;
1928
1822
  this.videoStopped = params.videoStopped;
1929
1823
  this.join = params.join;
@@ -1933,52 +1827,44 @@ export class CreateConferenceCall extends TLObject {
1933
1827
  this.params = params.params;
1934
1828
  }
1935
1829
  /**
1936
- * Generate the TLObject from buffer.
1937
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1938
- */
1830
+ * Generate the TLObject from buffer.
1831
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1832
+ */
1939
1833
  static async read(_data, ..._args) {
1940
1834
  // @ts-ignore
1941
1835
  let flags = await Primitive.Int.read(_data);
1942
- let muted = flags & (1 << 0) ? true : false;
1943
- let videoStopped = flags & (1 << 2) ? true : false;
1944
- let join = flags & (1 << 3) ? true : false;
1836
+ let muted = (flags & (1 << 0)) ? true : false;
1837
+ let videoStopped = (flags & (1 << 2)) ? true : false;
1838
+ let join = (flags & (1 << 3)) ? true : false;
1945
1839
  let randomId = await Primitive.Int.read(_data);
1946
- let publicKey = flags & (1 << 3) ? await Primitive.Int256.read(_data) : undefined;
1947
- let block = flags & (1 << 3) ? await Primitive.Bytes.read(_data) : undefined;
1948
- let params = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
1949
- return new CreateConferenceCall({
1950
- muted: muted,
1951
- videoStopped: videoStopped,
1952
- join: join,
1953
- randomId: randomId,
1954
- publicKey: publicKey,
1955
- block: block,
1956
- params: params,
1957
- });
1958
- }
1959
- /**
1960
- * Generate buffer from TLObject.
1961
- */
1840
+ let publicKey = (flags & (1 << 3)) ? await Primitive.Int256.read(_data) : undefined;
1841
+ let block = (flags & (1 << 3)) ? await Primitive.Bytes.read(_data) : undefined;
1842
+ let params = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
1843
+ return new CreateConferenceCall({ "muted": muted, "videoStopped": videoStopped, "join": join, "randomId": randomId, "publicKey": publicKey, "block": block, "params": params });
1844
+ }
1845
+ /**
1846
+ * Generate buffer from TLObject.
1847
+ */
1962
1848
  write() {
1963
1849
  const b = new BytesIO();
1964
1850
  b.write(Primitive.Int.write(this.constructorId, false));
1965
1851
  // @ts-ignore
1966
1852
  let flags = 0;
1967
- flags |= this.muted ? 1 << 0 : 0;
1968
- flags |= this.videoStopped ? 1 << 2 : 0;
1969
- flags |= this.join ? 1 << 3 : 0;
1970
- flags |= this.publicKey !== undefined ? 1 << 3 : 0;
1971
- flags |= this.block !== undefined ? 1 << 3 : 0;
1972
- flags |= this.params !== undefined ? 1 << 3 : 0;
1973
- b.write(Primitive.Int.write(flags));
1853
+ flags |= this.muted ? (1 << 0) : 0;
1854
+ flags |= this.videoStopped ? (1 << 2) : 0;
1855
+ flags |= this.join ? (1 << 3) : 0;
1856
+ flags |= this.publicKey !== undefined ? (1 << 3) : 0;
1857
+ flags |= this.block !== undefined ? (1 << 3) : 0;
1858
+ flags |= this.params !== undefined ? (1 << 3) : 0;
1859
+ b.write((Primitive.Int.write(flags)));
1974
1860
  if (this.randomId !== undefined) {
1975
- b.write(Primitive.Int.write(this.randomId));
1861
+ b.write((Primitive.Int.write(this.randomId)));
1976
1862
  }
1977
1863
  if (this.publicKey !== undefined) {
1978
- b.write(Primitive.Int256.write(this.publicKey));
1864
+ b.write((Primitive.Int256.write(this.publicKey)));
1979
1865
  }
1980
1866
  if (this.block !== undefined) {
1981
- b.write(Primitive.Bytes.write(this.block));
1867
+ b.write((Primitive.Bytes.write(this.block)));
1982
1868
  }
1983
1869
  if (this.params !== undefined) {
1984
1870
  b.write(this.params.write());
@@ -1995,11 +1881,11 @@ export class DeleteConferenceCallParticipants extends TLObject {
1995
1881
  block;
1996
1882
  constructor(params) {
1997
1883
  super();
1998
- this.classType = 'functions';
1999
- this.className = 'phone.DeleteConferenceCallParticipants';
1884
+ this.classType = "functions";
1885
+ this.className = "phone.DeleteConferenceCallParticipants";
2000
1886
  this.constructorId = 0x8ca60525;
2001
1887
  this.subclassOfId = 0x8af52aac;
2002
- this._slots = ['onlyLeft', 'kick', 'call', 'ids', 'block'];
1888
+ this._slots = ["onlyLeft", "kick", "call", "ids", "block"];
2003
1889
  this.onlyLeft = params.onlyLeft;
2004
1890
  this.kick = params.kick;
2005
1891
  this.call = params.call;
@@ -2007,44 +1893,38 @@ export class DeleteConferenceCallParticipants extends TLObject {
2007
1893
  this.block = params.block;
2008
1894
  }
2009
1895
  /**
2010
- * Generate the TLObject from buffer.
2011
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2012
- */
1896
+ * Generate the TLObject from buffer.
1897
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1898
+ */
2013
1899
  static async read(_data, ..._args) {
2014
1900
  // @ts-ignore
2015
1901
  let flags = await Primitive.Int.read(_data);
2016
- let onlyLeft = flags & (1 << 0) ? true : false;
2017
- let kick = flags & (1 << 1) ? true : false;
1902
+ let onlyLeft = (flags & (1 << 0)) ? true : false;
1903
+ let kick = (flags & (1 << 1)) ? true : false;
2018
1904
  let call = await TLObject.read(_data);
2019
1905
  let ids = await TLObject.read(_data, Primitive.Long);
2020
1906
  let block = await Primitive.Bytes.read(_data);
2021
- return new DeleteConferenceCallParticipants({
2022
- onlyLeft: onlyLeft,
2023
- kick: kick,
2024
- call: call,
2025
- ids: ids,
2026
- block: block,
2027
- });
1907
+ return new DeleteConferenceCallParticipants({ "onlyLeft": onlyLeft, "kick": kick, "call": call, "ids": ids, "block": block });
2028
1908
  }
2029
1909
  /**
2030
- * Generate buffer from TLObject.
2031
- */
1910
+ * Generate buffer from TLObject.
1911
+ */
2032
1912
  write() {
2033
1913
  const b = new BytesIO();
2034
1914
  b.write(Primitive.Int.write(this.constructorId, false));
2035
1915
  // @ts-ignore
2036
1916
  let flags = 0;
2037
- flags |= this.onlyLeft ? 1 << 0 : 0;
2038
- flags |= this.kick ? 1 << 1 : 0;
2039
- b.write(Primitive.Int.write(flags));
1917
+ flags |= this.onlyLeft ? (1 << 0) : 0;
1918
+ flags |= this.kick ? (1 << 1) : 0;
1919
+ b.write((Primitive.Int.write(flags)));
2040
1920
  if (this.call !== undefined) {
2041
1921
  b.write(this.call.write());
2042
1922
  }
2043
1923
  if (this.ids) {
2044
- b.write(Primitive.Vector.write(this.ids, Primitive.Long));
1924
+ b.write((Primitive.Vector.write(this.ids, Primitive.Long)));
2045
1925
  }
2046
1926
  if (this.block !== undefined) {
2047
- b.write(Primitive.Bytes.write(this.block));
1927
+ b.write((Primitive.Bytes.write(this.block)));
2048
1928
  }
2049
1929
  return b.buffer;
2050
1930
  }
@@ -2055,27 +1935,27 @@ export class SendConferenceCallBroadcast extends TLObject {
2055
1935
  block;
2056
1936
  constructor(params) {
2057
1937
  super();
2058
- this.classType = 'functions';
2059
- this.className = 'phone.SendConferenceCallBroadcast';
1938
+ this.classType = "functions";
1939
+ this.className = "phone.SendConferenceCallBroadcast";
2060
1940
  this.constructorId = 0xc6701900;
2061
1941
  this.subclassOfId = 0x8af52aac;
2062
- this._slots = ['call', 'block'];
1942
+ this._slots = ["call", "block"];
2063
1943
  this.call = params.call;
2064
1944
  this.block = params.block;
2065
1945
  }
2066
1946
  /**
2067
- * Generate the TLObject from buffer.
2068
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2069
- */
1947
+ * Generate the TLObject from buffer.
1948
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1949
+ */
2070
1950
  static async read(_data, ..._args) {
2071
1951
  // no flags
2072
1952
  let call = await TLObject.read(_data);
2073
1953
  let block = await Primitive.Bytes.read(_data);
2074
- return new SendConferenceCallBroadcast({ call: call, block: block });
1954
+ return new SendConferenceCallBroadcast({ "call": call, "block": block });
2075
1955
  }
2076
1956
  /**
2077
- * Generate buffer from TLObject.
2078
- */
1957
+ * Generate buffer from TLObject.
1958
+ */
2079
1959
  write() {
2080
1960
  const b = new BytesIO();
2081
1961
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2084,7 +1964,7 @@ export class SendConferenceCallBroadcast extends TLObject {
2084
1964
  b.write(this.call.write());
2085
1965
  }
2086
1966
  if (this.block !== undefined) {
2087
- b.write(Primitive.Bytes.write(this.block));
1967
+ b.write((Primitive.Bytes.write(this.block)));
2088
1968
  }
2089
1969
  return b.buffer;
2090
1970
  }
@@ -2096,37 +1976,37 @@ export class InviteConferenceCallParticipant extends TLObject {
2096
1976
  userId;
2097
1977
  constructor(params) {
2098
1978
  super();
2099
- this.classType = 'functions';
2100
- this.className = 'phone.InviteConferenceCallParticipant';
1979
+ this.classType = "functions";
1980
+ this.className = "phone.InviteConferenceCallParticipant";
2101
1981
  this.constructorId = 0xbcf22685;
2102
1982
  this.subclassOfId = 0x8af52aac;
2103
- this._slots = ['video', 'call', 'userId'];
1983
+ this._slots = ["video", "call", "userId"];
2104
1984
  this.video = params.video;
2105
1985
  this.call = params.call;
2106
1986
  this.userId = params.userId;
2107
1987
  }
2108
1988
  /**
2109
- * Generate the TLObject from buffer.
2110
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2111
- */
1989
+ * Generate the TLObject from buffer.
1990
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1991
+ */
2112
1992
  static async read(_data, ..._args) {
2113
1993
  // @ts-ignore
2114
1994
  let flags = await Primitive.Int.read(_data);
2115
- let video = flags & (1 << 0) ? true : false;
1995
+ let video = (flags & (1 << 0)) ? true : false;
2116
1996
  let call = await TLObject.read(_data);
2117
1997
  let userId = await TLObject.read(_data);
2118
- return new InviteConferenceCallParticipant({ video: video, call: call, userId: userId });
1998
+ return new InviteConferenceCallParticipant({ "video": video, "call": call, "userId": userId });
2119
1999
  }
2120
2000
  /**
2121
- * Generate buffer from TLObject.
2122
- */
2001
+ * Generate buffer from TLObject.
2002
+ */
2123
2003
  write() {
2124
2004
  const b = new BytesIO();
2125
2005
  b.write(Primitive.Int.write(this.constructorId, false));
2126
2006
  // @ts-ignore
2127
2007
  let flags = 0;
2128
- flags |= this.video ? 1 << 0 : 0;
2129
- b.write(Primitive.Int.write(flags));
2008
+ flags |= this.video ? (1 << 0) : 0;
2009
+ b.write((Primitive.Int.write(flags)));
2130
2010
  if (this.call !== undefined) {
2131
2011
  b.write(this.call.write());
2132
2012
  }
@@ -2141,31 +2021,31 @@ export class DeclineConferenceCallInvite extends TLObject {
2141
2021
  msgId;
2142
2022
  constructor(params) {
2143
2023
  super();
2144
- this.classType = 'functions';
2145
- this.className = 'phone.DeclineConferenceCallInvite';
2024
+ this.classType = "functions";
2025
+ this.className = "phone.DeclineConferenceCallInvite";
2146
2026
  this.constructorId = 0x3c479971;
2147
2027
  this.subclassOfId = 0x8af52aac;
2148
- this._slots = ['msgId'];
2028
+ this._slots = ["msgId"];
2149
2029
  this.msgId = params.msgId;
2150
2030
  }
2151
2031
  /**
2152
- * Generate the TLObject from buffer.
2153
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2154
- */
2032
+ * Generate the TLObject from buffer.
2033
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2034
+ */
2155
2035
  static async read(_data, ..._args) {
2156
2036
  // no flags
2157
2037
  let msgId = await Primitive.Int.read(_data);
2158
- return new DeclineConferenceCallInvite({ msgId: msgId });
2038
+ return new DeclineConferenceCallInvite({ "msgId": msgId });
2159
2039
  }
2160
2040
  /**
2161
- * Generate buffer from TLObject.
2162
- */
2041
+ * Generate buffer from TLObject.
2042
+ */
2163
2043
  write() {
2164
2044
  const b = new BytesIO();
2165
2045
  b.write(Primitive.Int.write(this.constructorId, false));
2166
2046
  // no flags
2167
2047
  if (this.msgId !== undefined) {
2168
- b.write(Primitive.Int.write(this.msgId));
2048
+ b.write((Primitive.Int.write(this.msgId)));
2169
2049
  }
2170
2050
  return b.buffer;
2171
2051
  }
@@ -2178,36 +2058,31 @@ export class GetGroupCallChainBlocks extends TLObject {
2178
2058
  limit;
2179
2059
  constructor(params) {
2180
2060
  super();
2181
- this.classType = 'functions';
2182
- this.className = 'phone.GetGroupCallChainBlocks';
2061
+ this.classType = "functions";
2062
+ this.className = "phone.GetGroupCallChainBlocks";
2183
2063
  this.constructorId = 0xee9f88a6;
2184
2064
  this.subclassOfId = 0x8af52aac;
2185
- this._slots = ['call', 'subChainId', 'offset', 'limit'];
2065
+ this._slots = ["call", "subChainId", "offset", "limit"];
2186
2066
  this.call = params.call;
2187
2067
  this.subChainId = params.subChainId;
2188
2068
  this.offset = params.offset;
2189
2069
  this.limit = params.limit;
2190
2070
  }
2191
2071
  /**
2192
- * Generate the TLObject from buffer.
2193
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2194
- */
2072
+ * Generate the TLObject from buffer.
2073
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2074
+ */
2195
2075
  static async read(_data, ..._args) {
2196
2076
  // no flags
2197
2077
  let call = await TLObject.read(_data);
2198
2078
  let subChainId = await Primitive.Int.read(_data);
2199
2079
  let offset = await Primitive.Int.read(_data);
2200
2080
  let limit = await Primitive.Int.read(_data);
2201
- return new GetGroupCallChainBlocks({
2202
- call: call,
2203
- subChainId: subChainId,
2204
- offset: offset,
2205
- limit: limit,
2206
- });
2081
+ return new GetGroupCallChainBlocks({ "call": call, "subChainId": subChainId, "offset": offset, "limit": limit });
2207
2082
  }
2208
2083
  /**
2209
- * Generate buffer from TLObject.
2210
- */
2084
+ * Generate buffer from TLObject.
2085
+ */
2211
2086
  write() {
2212
2087
  const b = new BytesIO();
2213
2088
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2216,13 +2091,13 @@ export class GetGroupCallChainBlocks extends TLObject {
2216
2091
  b.write(this.call.write());
2217
2092
  }
2218
2093
  if (this.subChainId !== undefined) {
2219
- b.write(Primitive.Int.write(this.subChainId));
2094
+ b.write((Primitive.Int.write(this.subChainId)));
2220
2095
  }
2221
2096
  if (this.offset !== undefined) {
2222
- b.write(Primitive.Int.write(this.offset));
2097
+ b.write((Primitive.Int.write(this.offset)));
2223
2098
  }
2224
2099
  if (this.limit !== undefined) {
2225
- b.write(Primitive.Int.write(this.limit));
2100
+ b.write((Primitive.Int.write(this.limit)));
2226
2101
  }
2227
2102
  return b.buffer;
2228
2103
  }
@@ -2236,11 +2111,11 @@ export class SendGroupCallMessage extends TLObject {
2236
2111
  sendAs;
2237
2112
  constructor(params) {
2238
2113
  super();
2239
- this.classType = 'functions';
2240
- this.className = 'phone.SendGroupCallMessage';
2114
+ this.classType = "functions";
2115
+ this.className = "phone.SendGroupCallMessage";
2241
2116
  this.constructorId = 0xb1d11410;
2242
2117
  this.subclassOfId = 0x8af52aac;
2243
- this._slots = ['call', 'randomId', 'message', 'allowPaidStars', 'sendAs'];
2118
+ this._slots = ["call", "randomId", "message", "allowPaidStars", "sendAs"];
2244
2119
  this.call = params.call;
2245
2120
  this.randomId = params.randomId;
2246
2121
  this.message = params.message;
@@ -2248,47 +2123,41 @@ export class SendGroupCallMessage extends TLObject {
2248
2123
  this.sendAs = params.sendAs;
2249
2124
  }
2250
2125
  /**
2251
- * Generate the TLObject from buffer.
2252
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2253
- */
2126
+ * Generate the TLObject from buffer.
2127
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2128
+ */
2254
2129
  static async read(_data, ..._args) {
2255
2130
  // @ts-ignore
2256
2131
  let flags = await Primitive.Int.read(_data);
2257
2132
  let call = await TLObject.read(_data);
2258
2133
  let randomId = await Primitive.Long.read(_data);
2259
2134
  let message = await TLObject.read(_data);
2260
- let allowPaidStars = flags & (1 << 0) ? await Primitive.Long.read(_data) : undefined;
2261
- let sendAs = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
2262
- return new SendGroupCallMessage({
2263
- call: call,
2264
- randomId: randomId,
2265
- message: message,
2266
- allowPaidStars: allowPaidStars,
2267
- sendAs: sendAs,
2268
- });
2269
- }
2270
- /**
2271
- * Generate buffer from TLObject.
2272
- */
2135
+ let allowPaidStars = (flags & (1 << 0)) ? await Primitive.Long.read(_data) : undefined;
2136
+ let sendAs = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
2137
+ return new SendGroupCallMessage({ "call": call, "randomId": randomId, "message": message, "allowPaidStars": allowPaidStars, "sendAs": sendAs });
2138
+ }
2139
+ /**
2140
+ * Generate buffer from TLObject.
2141
+ */
2273
2142
  write() {
2274
2143
  const b = new BytesIO();
2275
2144
  b.write(Primitive.Int.write(this.constructorId, false));
2276
2145
  // @ts-ignore
2277
2146
  let flags = 0;
2278
- flags |= this.allowPaidStars !== undefined ? 1 << 0 : 0;
2279
- flags |= this.sendAs !== undefined ? 1 << 1 : 0;
2280
- b.write(Primitive.Int.write(flags));
2147
+ flags |= this.allowPaidStars !== undefined ? (1 << 0) : 0;
2148
+ flags |= this.sendAs !== undefined ? (1 << 1) : 0;
2149
+ b.write((Primitive.Int.write(flags)));
2281
2150
  if (this.call !== undefined) {
2282
2151
  b.write(this.call.write());
2283
2152
  }
2284
2153
  if (this.randomId !== undefined) {
2285
- b.write(Primitive.Long.write(this.randomId));
2154
+ b.write((Primitive.Long.write(this.randomId)));
2286
2155
  }
2287
2156
  if (this.message !== undefined) {
2288
2157
  b.write(this.message.write());
2289
2158
  }
2290
2159
  if (this.allowPaidStars !== undefined) {
2291
- b.write(Primitive.Long.write(this.allowPaidStars));
2160
+ b.write((Primitive.Long.write(this.allowPaidStars)));
2292
2161
  }
2293
2162
  if (this.sendAs !== undefined) {
2294
2163
  b.write(this.sendAs.write());
@@ -2302,27 +2171,27 @@ export class SendGroupCallEncryptedMessage extends TLObject {
2302
2171
  encryptedMessage;
2303
2172
  constructor(params) {
2304
2173
  super();
2305
- this.classType = 'functions';
2306
- this.className = 'phone.SendGroupCallEncryptedMessage';
2174
+ this.classType = "functions";
2175
+ this.className = "phone.SendGroupCallEncryptedMessage";
2307
2176
  this.constructorId = 0xe5afa56d;
2308
2177
  this.subclassOfId = 0xf5b399ac;
2309
- this._slots = ['call', 'encryptedMessage'];
2178
+ this._slots = ["call", "encryptedMessage"];
2310
2179
  this.call = params.call;
2311
2180
  this.encryptedMessage = params.encryptedMessage;
2312
2181
  }
2313
2182
  /**
2314
- * Generate the TLObject from buffer.
2315
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2316
- */
2183
+ * Generate the TLObject from buffer.
2184
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2185
+ */
2317
2186
  static async read(_data, ..._args) {
2318
2187
  // no flags
2319
2188
  let call = await TLObject.read(_data);
2320
2189
  let encryptedMessage = await Primitive.Bytes.read(_data);
2321
- return new SendGroupCallEncryptedMessage({ call: call, encryptedMessage: encryptedMessage });
2190
+ return new SendGroupCallEncryptedMessage({ "call": call, "encryptedMessage": encryptedMessage });
2322
2191
  }
2323
2192
  /**
2324
- * Generate buffer from TLObject.
2325
- */
2193
+ * Generate buffer from TLObject.
2194
+ */
2326
2195
  write() {
2327
2196
  const b = new BytesIO();
2328
2197
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2331,7 +2200,7 @@ export class SendGroupCallEncryptedMessage extends TLObject {
2331
2200
  b.write(this.call.write());
2332
2201
  }
2333
2202
  if (this.encryptedMessage !== undefined) {
2334
- b.write(Primitive.Bytes.write(this.encryptedMessage));
2203
+ b.write((Primitive.Bytes.write(this.encryptedMessage)));
2335
2204
  }
2336
2205
  return b.buffer;
2337
2206
  }
@@ -2343,42 +2212,42 @@ export class DeleteGroupCallMessages extends TLObject {
2343
2212
  messages;
2344
2213
  constructor(params) {
2345
2214
  super();
2346
- this.classType = 'functions';
2347
- this.className = 'phone.DeleteGroupCallMessages';
2215
+ this.classType = "functions";
2216
+ this.className = "phone.DeleteGroupCallMessages";
2348
2217
  this.constructorId = 0xf64f54f7;
2349
2218
  this.subclassOfId = 0x8af52aac;
2350
- this._slots = ['reportSpam', 'call', 'messages'];
2219
+ this._slots = ["reportSpam", "call", "messages"];
2351
2220
  this.reportSpam = params.reportSpam;
2352
2221
  this.call = params.call;
2353
2222
  this.messages = params.messages;
2354
2223
  }
2355
2224
  /**
2356
- * Generate the TLObject from buffer.
2357
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2358
- */
2225
+ * Generate the TLObject from buffer.
2226
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2227
+ */
2359
2228
  static async read(_data, ..._args) {
2360
2229
  // @ts-ignore
2361
2230
  let flags = await Primitive.Int.read(_data);
2362
- let reportSpam = flags & (1 << 0) ? true : false;
2231
+ let reportSpam = (flags & (1 << 0)) ? true : false;
2363
2232
  let call = await TLObject.read(_data);
2364
2233
  let messages = await TLObject.read(_data, Primitive.Int);
2365
- return new DeleteGroupCallMessages({ reportSpam: reportSpam, call: call, messages: messages });
2234
+ return new DeleteGroupCallMessages({ "reportSpam": reportSpam, "call": call, "messages": messages });
2366
2235
  }
2367
2236
  /**
2368
- * Generate buffer from TLObject.
2369
- */
2237
+ * Generate buffer from TLObject.
2238
+ */
2370
2239
  write() {
2371
2240
  const b = new BytesIO();
2372
2241
  b.write(Primitive.Int.write(this.constructorId, false));
2373
2242
  // @ts-ignore
2374
2243
  let flags = 0;
2375
- flags |= this.reportSpam ? 1 << 0 : 0;
2376
- b.write(Primitive.Int.write(flags));
2244
+ flags |= this.reportSpam ? (1 << 0) : 0;
2245
+ b.write((Primitive.Int.write(flags)));
2377
2246
  if (this.call !== undefined) {
2378
2247
  b.write(this.call.write());
2379
2248
  }
2380
2249
  if (this.messages) {
2381
- b.write(Primitive.Vector.write(this.messages, Primitive.Int));
2250
+ b.write((Primitive.Vector.write(this.messages, Primitive.Int)));
2382
2251
  }
2383
2252
  return b.buffer;
2384
2253
  }
@@ -2390,41 +2259,37 @@ export class DeleteGroupCallParticipantMessages extends TLObject {
2390
2259
  participant;
2391
2260
  constructor(params) {
2392
2261
  super();
2393
- this.classType = 'functions';
2394
- this.className = 'phone.DeleteGroupCallParticipantMessages';
2262
+ this.classType = "functions";
2263
+ this.className = "phone.DeleteGroupCallParticipantMessages";
2395
2264
  this.constructorId = 0x1dbfeca0;
2396
2265
  this.subclassOfId = 0x8af52aac;
2397
- this._slots = ['reportSpam', 'call', 'participant'];
2266
+ this._slots = ["reportSpam", "call", "participant"];
2398
2267
  this.reportSpam = params.reportSpam;
2399
2268
  this.call = params.call;
2400
2269
  this.participant = params.participant;
2401
2270
  }
2402
2271
  /**
2403
- * Generate the TLObject from buffer.
2404
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2405
- */
2272
+ * Generate the TLObject from buffer.
2273
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2274
+ */
2406
2275
  static async read(_data, ..._args) {
2407
2276
  // @ts-ignore
2408
2277
  let flags = await Primitive.Int.read(_data);
2409
- let reportSpam = flags & (1 << 0) ? true : false;
2278
+ let reportSpam = (flags & (1 << 0)) ? true : false;
2410
2279
  let call = await TLObject.read(_data);
2411
2280
  let participant = await TLObject.read(_data);
2412
- return new DeleteGroupCallParticipantMessages({
2413
- reportSpam: reportSpam,
2414
- call: call,
2415
- participant: participant,
2416
- });
2281
+ return new DeleteGroupCallParticipantMessages({ "reportSpam": reportSpam, "call": call, "participant": participant });
2417
2282
  }
2418
2283
  /**
2419
- * Generate buffer from TLObject.
2420
- */
2284
+ * Generate buffer from TLObject.
2285
+ */
2421
2286
  write() {
2422
2287
  const b = new BytesIO();
2423
2288
  b.write(Primitive.Int.write(this.constructorId, false));
2424
2289
  // @ts-ignore
2425
2290
  let flags = 0;
2426
- flags |= this.reportSpam ? 1 << 0 : 0;
2427
- b.write(Primitive.Int.write(flags));
2291
+ flags |= this.reportSpam ? (1 << 0) : 0;
2292
+ b.write((Primitive.Int.write(flags)));
2428
2293
  if (this.call !== undefined) {
2429
2294
  b.write(this.call.write());
2430
2295
  }
@@ -2439,25 +2304,25 @@ export class GetGroupCallStars extends TLObject {
2439
2304
  call;
2440
2305
  constructor(params) {
2441
2306
  super();
2442
- this.classType = 'functions';
2443
- this.className = 'phone.GetGroupCallStars';
2307
+ this.classType = "functions";
2308
+ this.className = "phone.GetGroupCallStars";
2444
2309
  this.constructorId = 0x6f636302;
2445
2310
  this.subclassOfId = 0xb447801a;
2446
- this._slots = ['call'];
2311
+ this._slots = ["call"];
2447
2312
  this.call = params.call;
2448
2313
  }
2449
2314
  /**
2450
- * Generate the TLObject from buffer.
2451
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2452
- */
2315
+ * Generate the TLObject from buffer.
2316
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2317
+ */
2453
2318
  static async read(_data, ..._args) {
2454
2319
  // no flags
2455
2320
  let call = await TLObject.read(_data);
2456
- return new GetGroupCallStars({ call: call });
2321
+ return new GetGroupCallStars({ "call": call });
2457
2322
  }
2458
2323
  /**
2459
- * Generate buffer from TLObject.
2460
- */
2324
+ * Generate buffer from TLObject.
2325
+ */
2461
2326
  write() {
2462
2327
  const b = new BytesIO();
2463
2328
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2474,27 +2339,27 @@ export class SaveDefaultSendAs extends TLObject {
2474
2339
  sendAs;
2475
2340
  constructor(params) {
2476
2341
  super();
2477
- this.classType = 'functions';
2478
- this.className = 'phone.SaveDefaultSendAs';
2342
+ this.classType = "functions";
2343
+ this.className = "phone.SaveDefaultSendAs";
2479
2344
  this.constructorId = 0x4167add1;
2480
2345
  this.subclassOfId = 0xf5b399ac;
2481
- this._slots = ['call', 'sendAs'];
2346
+ this._slots = ["call", "sendAs"];
2482
2347
  this.call = params.call;
2483
2348
  this.sendAs = params.sendAs;
2484
2349
  }
2485
2350
  /**
2486
- * Generate the TLObject from buffer.
2487
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2488
- */
2351
+ * Generate the TLObject from buffer.
2352
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2353
+ */
2489
2354
  static async read(_data, ..._args) {
2490
2355
  // no flags
2491
2356
  let call = await TLObject.read(_data);
2492
2357
  let sendAs = await TLObject.read(_data);
2493
- return new SaveDefaultSendAs({ call: call, sendAs: sendAs });
2358
+ return new SaveDefaultSendAs({ "call": call, "sendAs": sendAs });
2494
2359
  }
2495
2360
  /**
2496
- * Generate buffer from TLObject.
2497
- */
2361
+ * Generate buffer from TLObject.
2362
+ */
2498
2363
  write() {
2499
2364
  const b = new BytesIO();
2500
2365
  b.write(Primitive.Int.write(this.constructorId, false));