@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,30 +6,30 @@
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';
13
13
  export class ContactsNotModified extends TLObject {
14
14
  constructor() {
15
15
  super();
16
- this.classType = 'types';
17
- this.className = 'contacts.ContactsNotModified';
16
+ this.classType = "types";
17
+ this.className = "contacts.ContactsNotModified";
18
18
  this.constructorId = 0xb74ba9d2;
19
19
  this.subclassOfId = 0x38be25f6;
20
20
  this._slots = [];
21
21
  }
22
22
  /**
23
- * Generate the TLObject from buffer.
24
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
25
- */
23
+ * Generate the TLObject from buffer.
24
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
25
+ */
26
26
  static async read(_data, ..._args) {
27
27
  // no flags
28
28
  return new ContactsNotModified();
29
29
  }
30
30
  /**
31
- * Generate buffer from TLObject.
32
- */
31
+ * Generate buffer from TLObject.
32
+ */
33
33
  write() {
34
34
  const b = new BytesIO();
35
35
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -43,41 +43,41 @@ export class Contacts extends TLObject {
43
43
  users;
44
44
  constructor(params) {
45
45
  super();
46
- this.classType = 'types';
47
- this.className = 'contacts.Contacts';
46
+ this.classType = "types";
47
+ this.className = "contacts.Contacts";
48
48
  this.constructorId = 0xeae87e42;
49
49
  this.subclassOfId = 0x38be25f6;
50
- this._slots = ['contacts', 'savedCount', 'users'];
50
+ this._slots = ["contacts", "savedCount", "users"];
51
51
  this.contacts = params.contacts;
52
52
  this.savedCount = params.savedCount;
53
53
  this.users = params.users;
54
54
  }
55
55
  /**
56
- * Generate the TLObject from buffer.
57
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
58
- */
56
+ * Generate the TLObject from buffer.
57
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
58
+ */
59
59
  static async read(_data, ..._args) {
60
60
  // no flags
61
61
  let contacts = await TLObject.read(_data);
62
62
  let savedCount = await Primitive.Int.read(_data);
63
63
  let users = await TLObject.read(_data);
64
- return new Contacts({ contacts: contacts, savedCount: savedCount, users: users });
64
+ return new Contacts({ "contacts": contacts, "savedCount": savedCount, "users": users });
65
65
  }
66
66
  /**
67
- * Generate buffer from TLObject.
68
- */
67
+ * Generate buffer from TLObject.
68
+ */
69
69
  write() {
70
70
  const b = new BytesIO();
71
71
  b.write(Primitive.Int.write(this.constructorId, false));
72
72
  // no flags
73
73
  if (this.contacts) {
74
- b.write(Primitive.Vector.write(this.contacts));
74
+ b.write((Primitive.Vector.write(this.contacts)));
75
75
  }
76
76
  if (this.savedCount !== undefined) {
77
- b.write(Primitive.Int.write(this.savedCount));
77
+ b.write((Primitive.Int.write(this.savedCount)));
78
78
  }
79
79
  if (this.users) {
80
- b.write(Primitive.Vector.write(this.users));
80
+ b.write((Primitive.Vector.write(this.users)));
81
81
  }
82
82
  return b.buffer;
83
83
  }
@@ -89,51 +89,46 @@ export class ImportedContacts extends TLObject {
89
89
  users;
90
90
  constructor(params) {
91
91
  super();
92
- this.classType = 'types';
93
- this.className = 'contacts.ImportedContacts';
92
+ this.classType = "types";
93
+ this.className = "contacts.ImportedContacts";
94
94
  this.constructorId = 0x77d01c3b;
95
95
  this.subclassOfId = 0x8172ad93;
96
- this._slots = ['imported', 'popularInvites', 'retryContacts', 'users'];
96
+ this._slots = ["imported", "popularInvites", "retryContacts", "users"];
97
97
  this.imported = params.imported;
98
98
  this.popularInvites = params.popularInvites;
99
99
  this.retryContacts = params.retryContacts;
100
100
  this.users = params.users;
101
101
  }
102
102
  /**
103
- * Generate the TLObject from buffer.
104
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
105
- */
103
+ * Generate the TLObject from buffer.
104
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
105
+ */
106
106
  static async read(_data, ..._args) {
107
107
  // no flags
108
108
  let imported = await TLObject.read(_data);
109
109
  let popularInvites = await TLObject.read(_data);
110
110
  let retryContacts = await TLObject.read(_data, Primitive.Long);
111
111
  let users = await TLObject.read(_data);
112
- return new ImportedContacts({
113
- imported: imported,
114
- popularInvites: popularInvites,
115
- retryContacts: retryContacts,
116
- users: users,
117
- });
112
+ return new ImportedContacts({ "imported": imported, "popularInvites": popularInvites, "retryContacts": retryContacts, "users": users });
118
113
  }
119
114
  /**
120
- * Generate buffer from TLObject.
121
- */
115
+ * Generate buffer from TLObject.
116
+ */
122
117
  write() {
123
118
  const b = new BytesIO();
124
119
  b.write(Primitive.Int.write(this.constructorId, false));
125
120
  // no flags
126
121
  if (this.imported) {
127
- b.write(Primitive.Vector.write(this.imported));
122
+ b.write((Primitive.Vector.write(this.imported)));
128
123
  }
129
124
  if (this.popularInvites) {
130
- b.write(Primitive.Vector.write(this.popularInvites));
125
+ b.write((Primitive.Vector.write(this.popularInvites)));
131
126
  }
132
127
  if (this.retryContacts) {
133
- b.write(Primitive.Vector.write(this.retryContacts, Primitive.Long));
128
+ b.write((Primitive.Vector.write(this.retryContacts, Primitive.Long)));
134
129
  }
135
130
  if (this.users) {
136
- b.write(Primitive.Vector.write(this.users));
131
+ b.write((Primitive.Vector.write(this.users)));
137
132
  }
138
133
  return b.buffer;
139
134
  }
@@ -144,41 +139,41 @@ export class Blocked extends TLObject {
144
139
  users;
145
140
  constructor(params) {
146
141
  super();
147
- this.classType = 'types';
148
- this.className = 'contacts.Blocked';
142
+ this.classType = "types";
143
+ this.className = "contacts.Blocked";
149
144
  this.constructorId = 0xade1591;
150
145
  this.subclassOfId = 0xffba4f4f;
151
- this._slots = ['blocked', 'chats', 'users'];
146
+ this._slots = ["blocked", "chats", "users"];
152
147
  this.blocked = params.blocked;
153
148
  this.chats = params.chats;
154
149
  this.users = params.users;
155
150
  }
156
151
  /**
157
- * Generate the TLObject from buffer.
158
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
159
- */
152
+ * Generate the TLObject from buffer.
153
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
154
+ */
160
155
  static async read(_data, ..._args) {
161
156
  // no flags
162
157
  let blocked = await TLObject.read(_data);
163
158
  let chats = await TLObject.read(_data);
164
159
  let users = await TLObject.read(_data);
165
- return new Blocked({ blocked: blocked, chats: chats, users: users });
160
+ return new Blocked({ "blocked": blocked, "chats": chats, "users": users });
166
161
  }
167
162
  /**
168
- * Generate buffer from TLObject.
169
- */
163
+ * Generate buffer from TLObject.
164
+ */
170
165
  write() {
171
166
  const b = new BytesIO();
172
167
  b.write(Primitive.Int.write(this.constructorId, false));
173
168
  // no flags
174
169
  if (this.blocked) {
175
- b.write(Primitive.Vector.write(this.blocked));
170
+ b.write((Primitive.Vector.write(this.blocked)));
176
171
  }
177
172
  if (this.chats) {
178
- b.write(Primitive.Vector.write(this.chats));
173
+ b.write((Primitive.Vector.write(this.chats)));
179
174
  }
180
175
  if (this.users) {
181
- b.write(Primitive.Vector.write(this.users));
176
+ b.write((Primitive.Vector.write(this.users)));
182
177
  }
183
178
  return b.buffer;
184
179
  }
@@ -190,46 +185,46 @@ export class BlockedSlice extends TLObject {
190
185
  users;
191
186
  constructor(params) {
192
187
  super();
193
- this.classType = 'types';
194
- this.className = 'contacts.BlockedSlice';
188
+ this.classType = "types";
189
+ this.className = "contacts.BlockedSlice";
195
190
  this.constructorId = 0xe1664194;
196
191
  this.subclassOfId = 0xffba4f4f;
197
- this._slots = ['count', 'blocked', 'chats', 'users'];
192
+ this._slots = ["count", "blocked", "chats", "users"];
198
193
  this.count = params.count;
199
194
  this.blocked = params.blocked;
200
195
  this.chats = params.chats;
201
196
  this.users = params.users;
202
197
  }
203
198
  /**
204
- * Generate the TLObject from buffer.
205
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
206
- */
199
+ * Generate the TLObject from buffer.
200
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
201
+ */
207
202
  static async read(_data, ..._args) {
208
203
  // no flags
209
204
  let count = await Primitive.Int.read(_data);
210
205
  let blocked = await TLObject.read(_data);
211
206
  let chats = await TLObject.read(_data);
212
207
  let users = await TLObject.read(_data);
213
- return new BlockedSlice({ count: count, blocked: blocked, chats: chats, users: users });
208
+ return new BlockedSlice({ "count": count, "blocked": blocked, "chats": chats, "users": users });
214
209
  }
215
210
  /**
216
- * Generate buffer from TLObject.
217
- */
211
+ * Generate buffer from TLObject.
212
+ */
218
213
  write() {
219
214
  const b = new BytesIO();
220
215
  b.write(Primitive.Int.write(this.constructorId, false));
221
216
  // no flags
222
217
  if (this.count !== undefined) {
223
- b.write(Primitive.Int.write(this.count));
218
+ b.write((Primitive.Int.write(this.count)));
224
219
  }
225
220
  if (this.blocked) {
226
- b.write(Primitive.Vector.write(this.blocked));
221
+ b.write((Primitive.Vector.write(this.blocked)));
227
222
  }
228
223
  if (this.chats) {
229
- b.write(Primitive.Vector.write(this.chats));
224
+ b.write((Primitive.Vector.write(this.chats)));
230
225
  }
231
226
  if (this.users) {
232
- b.write(Primitive.Vector.write(this.users));
227
+ b.write((Primitive.Vector.write(this.users)));
233
228
  }
234
229
  return b.buffer;
235
230
  }
@@ -241,46 +236,46 @@ export class Found extends TLObject {
241
236
  users;
242
237
  constructor(params) {
243
238
  super();
244
- this.classType = 'types';
245
- this.className = 'contacts.Found';
239
+ this.classType = "types";
240
+ this.className = "contacts.Found";
246
241
  this.constructorId = 0xb3134d9d;
247
242
  this.subclassOfId = 0x4386a2e3;
248
- this._slots = ['myResults', 'results', 'chats', 'users'];
243
+ this._slots = ["myResults", "results", "chats", "users"];
249
244
  this.myResults = params.myResults;
250
245
  this.results = params.results;
251
246
  this.chats = params.chats;
252
247
  this.users = params.users;
253
248
  }
254
249
  /**
255
- * Generate the TLObject from buffer.
256
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
257
- */
250
+ * Generate the TLObject from buffer.
251
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
252
+ */
258
253
  static async read(_data, ..._args) {
259
254
  // no flags
260
255
  let myResults = await TLObject.read(_data);
261
256
  let results = await TLObject.read(_data);
262
257
  let chats = await TLObject.read(_data);
263
258
  let users = await TLObject.read(_data);
264
- return new Found({ myResults: myResults, results: results, chats: chats, users: users });
259
+ return new Found({ "myResults": myResults, "results": results, "chats": chats, "users": users });
265
260
  }
266
261
  /**
267
- * Generate buffer from TLObject.
268
- */
262
+ * Generate buffer from TLObject.
263
+ */
269
264
  write() {
270
265
  const b = new BytesIO();
271
266
  b.write(Primitive.Int.write(this.constructorId, false));
272
267
  // no flags
273
268
  if (this.myResults) {
274
- b.write(Primitive.Vector.write(this.myResults));
269
+ b.write((Primitive.Vector.write(this.myResults)));
275
270
  }
276
271
  if (this.results) {
277
- b.write(Primitive.Vector.write(this.results));
272
+ b.write((Primitive.Vector.write(this.results)));
278
273
  }
279
274
  if (this.chats) {
280
- b.write(Primitive.Vector.write(this.chats));
275
+ b.write((Primitive.Vector.write(this.chats)));
281
276
  }
282
277
  if (this.users) {
283
- b.write(Primitive.Vector.write(this.users));
278
+ b.write((Primitive.Vector.write(this.users)));
284
279
  }
285
280
  return b.buffer;
286
281
  }
@@ -291,29 +286,29 @@ export class ResolvedPeer extends TLObject {
291
286
  users;
292
287
  constructor(params) {
293
288
  super();
294
- this.classType = 'types';
295
- this.className = 'contacts.ResolvedPeer';
289
+ this.classType = "types";
290
+ this.className = "contacts.ResolvedPeer";
296
291
  this.constructorId = 0x7f077ad9;
297
292
  this.subclassOfId = 0xf065b3a8;
298
- this._slots = ['peer', 'chats', 'users'];
293
+ this._slots = ["peer", "chats", "users"];
299
294
  this.peer = params.peer;
300
295
  this.chats = params.chats;
301
296
  this.users = params.users;
302
297
  }
303
298
  /**
304
- * Generate the TLObject from buffer.
305
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
306
- */
299
+ * Generate the TLObject from buffer.
300
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
301
+ */
307
302
  static async read(_data, ..._args) {
308
303
  // no flags
309
304
  let peer = await TLObject.read(_data);
310
305
  let chats = await TLObject.read(_data);
311
306
  let users = await TLObject.read(_data);
312
- return new ResolvedPeer({ peer: peer, chats: chats, users: users });
307
+ return new ResolvedPeer({ "peer": peer, "chats": chats, "users": users });
313
308
  }
314
309
  /**
315
- * Generate buffer from TLObject.
316
- */
310
+ * Generate buffer from TLObject.
311
+ */
317
312
  write() {
318
313
  const b = new BytesIO();
319
314
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -322,10 +317,10 @@ export class ResolvedPeer extends TLObject {
322
317
  b.write(this.peer.write());
323
318
  }
324
319
  if (this.chats) {
325
- b.write(Primitive.Vector.write(this.chats));
320
+ b.write((Primitive.Vector.write(this.chats)));
326
321
  }
327
322
  if (this.users) {
328
- b.write(Primitive.Vector.write(this.users));
323
+ b.write((Primitive.Vector.write(this.users)));
329
324
  }
330
325
  return b.buffer;
331
326
  }
@@ -333,23 +328,23 @@ export class ResolvedPeer extends TLObject {
333
328
  export class TopPeersNotModified extends TLObject {
334
329
  constructor() {
335
330
  super();
336
- this.classType = 'types';
337
- this.className = 'contacts.TopPeersNotModified';
331
+ this.classType = "types";
332
+ this.className = "contacts.TopPeersNotModified";
338
333
  this.constructorId = 0xde266ef5;
339
334
  this.subclassOfId = 0x9ee8bb88;
340
335
  this._slots = [];
341
336
  }
342
337
  /**
343
- * Generate the TLObject from buffer.
344
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
345
- */
338
+ * Generate the TLObject from buffer.
339
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
340
+ */
346
341
  static async read(_data, ..._args) {
347
342
  // no flags
348
343
  return new TopPeersNotModified();
349
344
  }
350
345
  /**
351
- * Generate buffer from TLObject.
352
- */
346
+ * Generate buffer from TLObject.
347
+ */
353
348
  write() {
354
349
  const b = new BytesIO();
355
350
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -363,41 +358,41 @@ export class TopPeers extends TLObject {
363
358
  users;
364
359
  constructor(params) {
365
360
  super();
366
- this.classType = 'types';
367
- this.className = 'contacts.TopPeers';
361
+ this.classType = "types";
362
+ this.className = "contacts.TopPeers";
368
363
  this.constructorId = 0x70b772a8;
369
364
  this.subclassOfId = 0x9ee8bb88;
370
- this._slots = ['categories', 'chats', 'users'];
365
+ this._slots = ["categories", "chats", "users"];
371
366
  this.categories = params.categories;
372
367
  this.chats = params.chats;
373
368
  this.users = params.users;
374
369
  }
375
370
  /**
376
- * Generate the TLObject from buffer.
377
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
378
- */
371
+ * Generate the TLObject from buffer.
372
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
373
+ */
379
374
  static async read(_data, ..._args) {
380
375
  // no flags
381
376
  let categories = await TLObject.read(_data);
382
377
  let chats = await TLObject.read(_data);
383
378
  let users = await TLObject.read(_data);
384
- return new TopPeers({ categories: categories, chats: chats, users: users });
379
+ return new TopPeers({ "categories": categories, "chats": chats, "users": users });
385
380
  }
386
381
  /**
387
- * Generate buffer from TLObject.
388
- */
382
+ * Generate buffer from TLObject.
383
+ */
389
384
  write() {
390
385
  const b = new BytesIO();
391
386
  b.write(Primitive.Int.write(this.constructorId, false));
392
387
  // no flags
393
388
  if (this.categories) {
394
- b.write(Primitive.Vector.write(this.categories));
389
+ b.write((Primitive.Vector.write(this.categories)));
395
390
  }
396
391
  if (this.chats) {
397
- b.write(Primitive.Vector.write(this.chats));
392
+ b.write((Primitive.Vector.write(this.chats)));
398
393
  }
399
394
  if (this.users) {
400
- b.write(Primitive.Vector.write(this.users));
395
+ b.write((Primitive.Vector.write(this.users)));
401
396
  }
402
397
  return b.buffer;
403
398
  }
@@ -405,23 +400,23 @@ export class TopPeers extends TLObject {
405
400
  export class TopPeersDisabled extends TLObject {
406
401
  constructor() {
407
402
  super();
408
- this.classType = 'types';
409
- this.className = 'contacts.TopPeersDisabled';
403
+ this.classType = "types";
404
+ this.className = "contacts.TopPeersDisabled";
410
405
  this.constructorId = 0xb52c939d;
411
406
  this.subclassOfId = 0x9ee8bb88;
412
407
  this._slots = [];
413
408
  }
414
409
  /**
415
- * Generate the TLObject from buffer.
416
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
417
- */
410
+ * Generate the TLObject from buffer.
411
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
412
+ */
418
413
  static async read(_data, ..._args) {
419
414
  // no flags
420
415
  return new TopPeersDisabled();
421
416
  }
422
417
  /**
423
- * Generate buffer from TLObject.
424
- */
418
+ * Generate buffer from TLObject.
419
+ */
425
420
  write() {
426
421
  const b = new BytesIO();
427
422
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -434,36 +429,36 @@ export class ContactBirthdays extends TLObject {
434
429
  users;
435
430
  constructor(params) {
436
431
  super();
437
- this.classType = 'types';
438
- this.className = 'contacts.ContactBirthdays';
432
+ this.classType = "types";
433
+ this.className = "contacts.ContactBirthdays";
439
434
  this.constructorId = 0x114ff30d;
440
435
  this.subclassOfId = 0xe7aabff;
441
- this._slots = ['contacts', 'users'];
436
+ this._slots = ["contacts", "users"];
442
437
  this.contacts = params.contacts;
443
438
  this.users = params.users;
444
439
  }
445
440
  /**
446
- * Generate the TLObject from buffer.
447
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
448
- */
441
+ * Generate the TLObject from buffer.
442
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
443
+ */
449
444
  static async read(_data, ..._args) {
450
445
  // no flags
451
446
  let contacts = await TLObject.read(_data);
452
447
  let users = await TLObject.read(_data);
453
- return new ContactBirthdays({ contacts: contacts, users: users });
448
+ return new ContactBirthdays({ "contacts": contacts, "users": users });
454
449
  }
455
450
  /**
456
- * Generate buffer from TLObject.
457
- */
451
+ * Generate buffer from TLObject.
452
+ */
458
453
  write() {
459
454
  const b = new BytesIO();
460
455
  b.write(Primitive.Int.write(this.constructorId, false));
461
456
  // no flags
462
457
  if (this.contacts) {
463
- b.write(Primitive.Vector.write(this.contacts));
458
+ b.write((Primitive.Vector.write(this.contacts)));
464
459
  }
465
460
  if (this.users) {
466
- b.write(Primitive.Vector.write(this.users));
461
+ b.write((Primitive.Vector.write(this.users)));
467
462
  }
468
463
  return b.buffer;
469
464
  }
@@ -471,23 +466,23 @@ export class ContactBirthdays extends TLObject {
471
466
  export class SponsoredPeersEmpty extends TLObject {
472
467
  constructor() {
473
468
  super();
474
- this.classType = 'types';
475
- this.className = 'contacts.SponsoredPeersEmpty';
469
+ this.classType = "types";
470
+ this.className = "contacts.SponsoredPeersEmpty";
476
471
  this.constructorId = 0xea32b4b1;
477
472
  this.subclassOfId = 0xb45d5ccc;
478
473
  this._slots = [];
479
474
  }
480
475
  /**
481
- * Generate the TLObject from buffer.
482
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
483
- */
476
+ * Generate the TLObject from buffer.
477
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
478
+ */
484
479
  static async read(_data, ..._args) {
485
480
  // no flags
486
481
  return new SponsoredPeersEmpty();
487
482
  }
488
483
  /**
489
- * Generate buffer from TLObject.
490
- */
484
+ * Generate buffer from TLObject.
485
+ */
491
486
  write() {
492
487
  const b = new BytesIO();
493
488
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -501,41 +496,41 @@ export class SponsoredPeers extends TLObject {
501
496
  users;
502
497
  constructor(params) {
503
498
  super();
504
- this.classType = 'types';
505
- this.className = 'contacts.SponsoredPeers';
499
+ this.classType = "types";
500
+ this.className = "contacts.SponsoredPeers";
506
501
  this.constructorId = 0xeb032884;
507
502
  this.subclassOfId = 0xb45d5ccc;
508
- this._slots = ['peers', 'chats', 'users'];
503
+ this._slots = ["peers", "chats", "users"];
509
504
  this.peers = params.peers;
510
505
  this.chats = params.chats;
511
506
  this.users = params.users;
512
507
  }
513
508
  /**
514
- * Generate the TLObject from buffer.
515
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
516
- */
509
+ * Generate the TLObject from buffer.
510
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
511
+ */
517
512
  static async read(_data, ..._args) {
518
513
  // no flags
519
514
  let peers = await TLObject.read(_data);
520
515
  let chats = await TLObject.read(_data);
521
516
  let users = await TLObject.read(_data);
522
- return new SponsoredPeers({ peers: peers, chats: chats, users: users });
517
+ return new SponsoredPeers({ "peers": peers, "chats": chats, "users": users });
523
518
  }
524
519
  /**
525
- * Generate buffer from TLObject.
526
- */
520
+ * Generate buffer from TLObject.
521
+ */
527
522
  write() {
528
523
  const b = new BytesIO();
529
524
  b.write(Primitive.Int.write(this.constructorId, false));
530
525
  // no flags
531
526
  if (this.peers) {
532
- b.write(Primitive.Vector.write(this.peers));
527
+ b.write((Primitive.Vector.write(this.peers)));
533
528
  }
534
529
  if (this.chats) {
535
- b.write(Primitive.Vector.write(this.chats));
530
+ b.write((Primitive.Vector.write(this.chats)));
536
531
  }
537
532
  if (this.users) {
538
- b.write(Primitive.Vector.write(this.users));
533
+ b.write((Primitive.Vector.write(this.users)));
539
534
  }
540
535
  return b.buffer;
541
536
  }
@@ -545,31 +540,31 @@ export class GetContactIDs extends TLObject {
545
540
  hash;
546
541
  constructor(params) {
547
542
  super();
548
- this.classType = 'functions';
549
- this.className = 'contacts.GetContactIDs';
543
+ this.classType = "functions";
544
+ this.className = "contacts.GetContactIDs";
550
545
  this.constructorId = 0x7adc669d;
551
546
  this.subclassOfId = 0x5026710f;
552
- this._slots = ['hash'];
547
+ this._slots = ["hash"];
553
548
  this.hash = params.hash;
554
549
  }
555
550
  /**
556
- * Generate the TLObject from buffer.
557
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
558
- */
551
+ * Generate the TLObject from buffer.
552
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
553
+ */
559
554
  static async read(_data, ..._args) {
560
555
  // no flags
561
556
  let hash = await Primitive.Long.read(_data);
562
- return new GetContactIDs({ hash: hash });
557
+ return new GetContactIDs({ "hash": hash });
563
558
  }
564
559
  /**
565
- * Generate buffer from TLObject.
566
- */
560
+ * Generate buffer from TLObject.
561
+ */
567
562
  write() {
568
563
  const b = new BytesIO();
569
564
  b.write(Primitive.Int.write(this.constructorId, false));
570
565
  // no flags
571
566
  if (this.hash !== undefined) {
572
- b.write(Primitive.Long.write(this.hash));
567
+ b.write((Primitive.Long.write(this.hash)));
573
568
  }
574
569
  return b.buffer;
575
570
  }
@@ -578,23 +573,23 @@ export class GetStatuses extends TLObject {
578
573
  __response__;
579
574
  constructor() {
580
575
  super();
581
- this.classType = 'functions';
582
- this.className = 'contacts.GetStatuses';
576
+ this.classType = "functions";
577
+ this.className = "contacts.GetStatuses";
583
578
  this.constructorId = 0xc4a353ee;
584
579
  this.subclassOfId = 0xdf815c90;
585
580
  this._slots = [];
586
581
  }
587
582
  /**
588
- * Generate the TLObject from buffer.
589
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
590
- */
583
+ * Generate the TLObject from buffer.
584
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
585
+ */
591
586
  static async read(_data, ..._args) {
592
587
  // no flags
593
588
  return new GetStatuses();
594
589
  }
595
590
  /**
596
- * Generate buffer from TLObject.
597
- */
591
+ * Generate buffer from TLObject.
592
+ */
598
593
  write() {
599
594
  const b = new BytesIO();
600
595
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -607,31 +602,31 @@ export class GetContacts extends TLObject {
607
602
  hash;
608
603
  constructor(params) {
609
604
  super();
610
- this.classType = 'functions';
611
- this.className = 'contacts.GetContacts';
605
+ this.classType = "functions";
606
+ this.className = "contacts.GetContacts";
612
607
  this.constructorId = 0x5dd69e12;
613
608
  this.subclassOfId = 0x38be25f6;
614
- this._slots = ['hash'];
609
+ this._slots = ["hash"];
615
610
  this.hash = params.hash;
616
611
  }
617
612
  /**
618
- * Generate the TLObject from buffer.
619
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
620
- */
613
+ * Generate the TLObject from buffer.
614
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
615
+ */
621
616
  static async read(_data, ..._args) {
622
617
  // no flags
623
618
  let hash = await Primitive.Long.read(_data);
624
- return new GetContacts({ hash: hash });
619
+ return new GetContacts({ "hash": hash });
625
620
  }
626
621
  /**
627
- * Generate buffer from TLObject.
628
- */
622
+ * Generate buffer from TLObject.
623
+ */
629
624
  write() {
630
625
  const b = new BytesIO();
631
626
  b.write(Primitive.Int.write(this.constructorId, false));
632
627
  // no flags
633
628
  if (this.hash !== undefined) {
634
- b.write(Primitive.Long.write(this.hash));
629
+ b.write((Primitive.Long.write(this.hash)));
635
630
  }
636
631
  return b.buffer;
637
632
  }
@@ -641,31 +636,31 @@ export class ImportContacts extends TLObject {
641
636
  contacts;
642
637
  constructor(params) {
643
638
  super();
644
- this.classType = 'functions';
645
- this.className = 'contacts.ImportContacts';
639
+ this.classType = "functions";
640
+ this.className = "contacts.ImportContacts";
646
641
  this.constructorId = 0x2c800be5;
647
642
  this.subclassOfId = 0x8172ad93;
648
- this._slots = ['contacts'];
643
+ this._slots = ["contacts"];
649
644
  this.contacts = params.contacts;
650
645
  }
651
646
  /**
652
- * Generate the TLObject from buffer.
653
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
654
- */
647
+ * Generate the TLObject from buffer.
648
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
649
+ */
655
650
  static async read(_data, ..._args) {
656
651
  // no flags
657
652
  let contacts = await TLObject.read(_data);
658
- return new ImportContacts({ contacts: contacts });
653
+ return new ImportContacts({ "contacts": contacts });
659
654
  }
660
655
  /**
661
- * Generate buffer from TLObject.
662
- */
656
+ * Generate buffer from TLObject.
657
+ */
663
658
  write() {
664
659
  const b = new BytesIO();
665
660
  b.write(Primitive.Int.write(this.constructorId, false));
666
661
  // no flags
667
662
  if (this.contacts) {
668
- b.write(Primitive.Vector.write(this.contacts));
663
+ b.write((Primitive.Vector.write(this.contacts)));
669
664
  }
670
665
  return b.buffer;
671
666
  }
@@ -675,31 +670,31 @@ export class DeleteContacts extends TLObject {
675
670
  id;
676
671
  constructor(params) {
677
672
  super();
678
- this.classType = 'functions';
679
- this.className = 'contacts.DeleteContacts';
673
+ this.classType = "functions";
674
+ this.className = "contacts.DeleteContacts";
680
675
  this.constructorId = 0x96a0e00;
681
676
  this.subclassOfId = 0x8af52aac;
682
- this._slots = ['id'];
677
+ this._slots = ["id"];
683
678
  this.id = params.id;
684
679
  }
685
680
  /**
686
- * Generate the TLObject from buffer.
687
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
688
- */
681
+ * Generate the TLObject from buffer.
682
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
683
+ */
689
684
  static async read(_data, ..._args) {
690
685
  // no flags
691
686
  let id = await TLObject.read(_data);
692
- return new DeleteContacts({ id: id });
687
+ return new DeleteContacts({ "id": id });
693
688
  }
694
689
  /**
695
- * Generate buffer from TLObject.
696
- */
690
+ * Generate buffer from TLObject.
691
+ */
697
692
  write() {
698
693
  const b = new BytesIO();
699
694
  b.write(Primitive.Int.write(this.constructorId, false));
700
695
  // no flags
701
696
  if (this.id) {
702
- b.write(Primitive.Vector.write(this.id));
697
+ b.write((Primitive.Vector.write(this.id)));
703
698
  }
704
699
  return b.buffer;
705
700
  }
@@ -709,31 +704,31 @@ export class DeleteByPhones extends TLObject {
709
704
  phones;
710
705
  constructor(params) {
711
706
  super();
712
- this.classType = 'functions';
713
- this.className = 'contacts.DeleteByPhones';
707
+ this.classType = "functions";
708
+ this.className = "contacts.DeleteByPhones";
714
709
  this.constructorId = 0x1013fd9e;
715
710
  this.subclassOfId = 0xf5b399ac;
716
- this._slots = ['phones'];
711
+ this._slots = ["phones"];
717
712
  this.phones = params.phones;
718
713
  }
719
714
  /**
720
- * Generate the TLObject from buffer.
721
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
722
- */
715
+ * Generate the TLObject from buffer.
716
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
717
+ */
723
718
  static async read(_data, ..._args) {
724
719
  // no flags
725
720
  let phones = await TLObject.read(_data, Primitive.String);
726
- return new DeleteByPhones({ phones: phones });
721
+ return new DeleteByPhones({ "phones": phones });
727
722
  }
728
723
  /**
729
- * Generate buffer from TLObject.
730
- */
724
+ * Generate buffer from TLObject.
725
+ */
731
726
  write() {
732
727
  const b = new BytesIO();
733
728
  b.write(Primitive.Int.write(this.constructorId, false));
734
729
  // no flags
735
730
  if (this.phones) {
736
- b.write(Primitive.Vector.write(this.phones, Primitive.String));
731
+ b.write((Primitive.Vector.write(this.phones, Primitive.String)));
737
732
  }
738
733
  return b.buffer;
739
734
  }
@@ -744,35 +739,35 @@ export class Block extends TLObject {
744
739
  id;
745
740
  constructor(params) {
746
741
  super();
747
- this.classType = 'functions';
748
- this.className = 'contacts.Block';
742
+ this.classType = "functions";
743
+ this.className = "contacts.Block";
749
744
  this.constructorId = 0x2e2e8734;
750
745
  this.subclassOfId = 0xf5b399ac;
751
- this._slots = ['myStoriesFrom', 'id'];
746
+ this._slots = ["myStoriesFrom", "id"];
752
747
  this.myStoriesFrom = params.myStoriesFrom;
753
748
  this.id = params.id;
754
749
  }
755
750
  /**
756
- * Generate the TLObject from buffer.
757
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
758
- */
751
+ * Generate the TLObject from buffer.
752
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
753
+ */
759
754
  static async read(_data, ..._args) {
760
755
  // @ts-ignore
761
756
  let flags = await Primitive.Int.read(_data);
762
- let myStoriesFrom = flags & (1 << 0) ? true : false;
757
+ let myStoriesFrom = (flags & (1 << 0)) ? true : false;
763
758
  let id = await TLObject.read(_data);
764
- return new Block({ myStoriesFrom: myStoriesFrom, id: id });
759
+ return new Block({ "myStoriesFrom": myStoriesFrom, "id": id });
765
760
  }
766
761
  /**
767
- * Generate buffer from TLObject.
768
- */
762
+ * Generate buffer from TLObject.
763
+ */
769
764
  write() {
770
765
  const b = new BytesIO();
771
766
  b.write(Primitive.Int.write(this.constructorId, false));
772
767
  // @ts-ignore
773
768
  let flags = 0;
774
- flags |= this.myStoriesFrom ? 1 << 0 : 0;
775
- b.write(Primitive.Int.write(flags));
769
+ flags |= this.myStoriesFrom ? (1 << 0) : 0;
770
+ b.write((Primitive.Int.write(flags)));
776
771
  if (this.id !== undefined) {
777
772
  b.write(this.id.write());
778
773
  }
@@ -785,35 +780,35 @@ export class Unblock extends TLObject {
785
780
  id;
786
781
  constructor(params) {
787
782
  super();
788
- this.classType = 'functions';
789
- this.className = 'contacts.Unblock';
783
+ this.classType = "functions";
784
+ this.className = "contacts.Unblock";
790
785
  this.constructorId = 0xb550d328;
791
786
  this.subclassOfId = 0xf5b399ac;
792
- this._slots = ['myStoriesFrom', 'id'];
787
+ this._slots = ["myStoriesFrom", "id"];
793
788
  this.myStoriesFrom = params.myStoriesFrom;
794
789
  this.id = params.id;
795
790
  }
796
791
  /**
797
- * Generate the TLObject from buffer.
798
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
799
- */
792
+ * Generate the TLObject from buffer.
793
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
794
+ */
800
795
  static async read(_data, ..._args) {
801
796
  // @ts-ignore
802
797
  let flags = await Primitive.Int.read(_data);
803
- let myStoriesFrom = flags & (1 << 0) ? true : false;
798
+ let myStoriesFrom = (flags & (1 << 0)) ? true : false;
804
799
  let id = await TLObject.read(_data);
805
- return new Unblock({ myStoriesFrom: myStoriesFrom, id: id });
800
+ return new Unblock({ "myStoriesFrom": myStoriesFrom, "id": id });
806
801
  }
807
802
  /**
808
- * Generate buffer from TLObject.
809
- */
803
+ * Generate buffer from TLObject.
804
+ */
810
805
  write() {
811
806
  const b = new BytesIO();
812
807
  b.write(Primitive.Int.write(this.constructorId, false));
813
808
  // @ts-ignore
814
809
  let flags = 0;
815
- flags |= this.myStoriesFrom ? 1 << 0 : 0;
816
- b.write(Primitive.Int.write(flags));
810
+ flags |= this.myStoriesFrom ? (1 << 0) : 0;
811
+ b.write((Primitive.Int.write(flags)));
817
812
  if (this.id !== undefined) {
818
813
  b.write(this.id.write());
819
814
  }
@@ -827,42 +822,42 @@ export class GetBlocked extends TLObject {
827
822
  limit;
828
823
  constructor(params) {
829
824
  super();
830
- this.classType = 'functions';
831
- this.className = 'contacts.GetBlocked';
825
+ this.classType = "functions";
826
+ this.className = "contacts.GetBlocked";
832
827
  this.constructorId = 0x9a868f80;
833
828
  this.subclassOfId = 0xffba4f4f;
834
- this._slots = ['myStoriesFrom', 'offset', 'limit'];
829
+ this._slots = ["myStoriesFrom", "offset", "limit"];
835
830
  this.myStoriesFrom = params.myStoriesFrom;
836
831
  this.offset = params.offset;
837
832
  this.limit = params.limit;
838
833
  }
839
834
  /**
840
- * Generate the TLObject from buffer.
841
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
842
- */
835
+ * Generate the TLObject from buffer.
836
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
837
+ */
843
838
  static async read(_data, ..._args) {
844
839
  // @ts-ignore
845
840
  let flags = await Primitive.Int.read(_data);
846
- let myStoriesFrom = flags & (1 << 0) ? true : false;
841
+ let myStoriesFrom = (flags & (1 << 0)) ? true : false;
847
842
  let offset = await Primitive.Int.read(_data);
848
843
  let limit = await Primitive.Int.read(_data);
849
- return new GetBlocked({ myStoriesFrom: myStoriesFrom, offset: offset, limit: limit });
844
+ return new GetBlocked({ "myStoriesFrom": myStoriesFrom, "offset": offset, "limit": limit });
850
845
  }
851
846
  /**
852
- * Generate buffer from TLObject.
853
- */
847
+ * Generate buffer from TLObject.
848
+ */
854
849
  write() {
855
850
  const b = new BytesIO();
856
851
  b.write(Primitive.Int.write(this.constructorId, false));
857
852
  // @ts-ignore
858
853
  let flags = 0;
859
- flags |= this.myStoriesFrom ? 1 << 0 : 0;
860
- b.write(Primitive.Int.write(flags));
854
+ flags |= this.myStoriesFrom ? (1 << 0) : 0;
855
+ b.write((Primitive.Int.write(flags)));
861
856
  if (this.offset !== undefined) {
862
- b.write(Primitive.Int.write(this.offset));
857
+ b.write((Primitive.Int.write(this.offset)));
863
858
  }
864
859
  if (this.limit !== undefined) {
865
- b.write(Primitive.Int.write(this.limit));
860
+ b.write((Primitive.Int.write(this.limit)));
866
861
  }
867
862
  return b.buffer;
868
863
  }
@@ -875,45 +870,45 @@ export class Search extends TLObject {
875
870
  limit;
876
871
  constructor(params) {
877
872
  super();
878
- this.classType = 'functions';
879
- this.className = 'contacts.Search';
873
+ this.classType = "functions";
874
+ this.className = "contacts.Search";
880
875
  this.constructorId = 0x5f58d0f;
881
876
  this.subclassOfId = 0x4386a2e3;
882
- this._slots = ['broadcasts', 'bots', 'q', 'limit'];
877
+ this._slots = ["broadcasts", "bots", "q", "limit"];
883
878
  this.broadcasts = params.broadcasts;
884
879
  this.bots = params.bots;
885
880
  this.q = params.q;
886
881
  this.limit = params.limit;
887
882
  }
888
883
  /**
889
- * Generate the TLObject from buffer.
890
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
891
- */
884
+ * Generate the TLObject from buffer.
885
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
886
+ */
892
887
  static async read(_data, ..._args) {
893
888
  // @ts-ignore
894
889
  let flags = await Primitive.Int.read(_data);
895
- let broadcasts = flags & (1 << 0) ? true : false;
896
- let bots = flags & (1 << 1) ? true : false;
890
+ let broadcasts = (flags & (1 << 0)) ? true : false;
891
+ let bots = (flags & (1 << 1)) ? true : false;
897
892
  let q = await Primitive.String.read(_data);
898
893
  let limit = await Primitive.Int.read(_data);
899
- return new Search({ broadcasts: broadcasts, bots: bots, q: q, limit: limit });
894
+ return new Search({ "broadcasts": broadcasts, "bots": bots, "q": q, "limit": limit });
900
895
  }
901
896
  /**
902
- * Generate buffer from TLObject.
903
- */
897
+ * Generate buffer from TLObject.
898
+ */
904
899
  write() {
905
900
  const b = new BytesIO();
906
901
  b.write(Primitive.Int.write(this.constructorId, false));
907
902
  // @ts-ignore
908
903
  let flags = 0;
909
- flags |= this.broadcasts ? 1 << 0 : 0;
910
- flags |= this.bots ? 1 << 1 : 0;
911
- b.write(Primitive.Int.write(flags));
904
+ flags |= this.broadcasts ? (1 << 0) : 0;
905
+ flags |= this.bots ? (1 << 1) : 0;
906
+ b.write((Primitive.Int.write(flags)));
912
907
  if (this.q !== undefined) {
913
- b.write(Primitive.String.write(this.q));
908
+ b.write((Primitive.String.write(this.q)));
914
909
  }
915
910
  if (this.limit !== undefined) {
916
- b.write(Primitive.Int.write(this.limit));
911
+ b.write((Primitive.Int.write(this.limit)));
917
912
  }
918
913
  return b.buffer;
919
914
  }
@@ -924,40 +919,40 @@ export class ResolveUsername extends TLObject {
924
919
  referer;
925
920
  constructor(params) {
926
921
  super();
927
- this.classType = 'functions';
928
- this.className = 'contacts.ResolveUsername';
922
+ this.classType = "functions";
923
+ this.className = "contacts.ResolveUsername";
929
924
  this.constructorId = 0x725afbbc;
930
925
  this.subclassOfId = 0xf065b3a8;
931
- this._slots = ['username', 'referer'];
926
+ this._slots = ["username", "referer"];
932
927
  this.username = params.username;
933
928
  this.referer = params.referer;
934
929
  }
935
930
  /**
936
- * Generate the TLObject from buffer.
937
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
938
- */
931
+ * Generate the TLObject from buffer.
932
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
933
+ */
939
934
  static async read(_data, ..._args) {
940
935
  // @ts-ignore
941
936
  let flags = await Primitive.Int.read(_data);
942
937
  let username = await Primitive.String.read(_data);
943
- let referer = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
944
- return new ResolveUsername({ username: username, referer: referer });
938
+ let referer = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
939
+ return new ResolveUsername({ "username": username, "referer": referer });
945
940
  }
946
941
  /**
947
- * Generate buffer from TLObject.
948
- */
942
+ * Generate buffer from TLObject.
943
+ */
949
944
  write() {
950
945
  const b = new BytesIO();
951
946
  b.write(Primitive.Int.write(this.constructorId, false));
952
947
  // @ts-ignore
953
948
  let flags = 0;
954
- flags |= this.referer !== undefined ? 1 << 0 : 0;
955
- b.write(Primitive.Int.write(flags));
949
+ flags |= this.referer !== undefined ? (1 << 0) : 0;
950
+ b.write((Primitive.Int.write(flags)));
956
951
  if (this.username !== undefined) {
957
- b.write(Primitive.String.write(this.username));
952
+ b.write((Primitive.String.write(this.username)));
958
953
  }
959
954
  if (this.referer !== undefined) {
960
- b.write(Primitive.String.write(this.referer));
955
+ b.write((Primitive.String.write(this.referer)));
961
956
  }
962
957
  return b.buffer;
963
958
  }
@@ -979,25 +974,11 @@ export class GetTopPeers extends TLObject {
979
974
  hash;
980
975
  constructor(params) {
981
976
  super();
982
- this.classType = 'functions';
983
- this.className = 'contacts.GetTopPeers';
977
+ this.classType = "functions";
978
+ this.className = "contacts.GetTopPeers";
984
979
  this.constructorId = 0x973478b6;
985
980
  this.subclassOfId = 0x9ee8bb88;
986
- this._slots = [
987
- 'correspondents',
988
- 'botsPm',
989
- 'botsInline',
990
- 'phoneCalls',
991
- 'forwardUsers',
992
- 'forwardChats',
993
- 'groups',
994
- 'channels',
995
- 'botsApp',
996
- 'botsGuestchat',
997
- 'offset',
998
- 'limit',
999
- 'hash',
1000
- ];
981
+ this._slots = ["correspondents", "botsPm", "botsInline", "phoneCalls", "forwardUsers", "forwardChats", "groups", "channels", "botsApp", "botsGuestchat", "offset", "limit", "hash"];
1001
982
  this.correspondents = params.correspondents;
1002
983
  this.botsPm = params.botsPm;
1003
984
  this.botsInline = params.botsInline;
@@ -1013,68 +994,54 @@ export class GetTopPeers extends TLObject {
1013
994
  this.hash = params.hash;
1014
995
  }
1015
996
  /**
1016
- * Generate the TLObject from buffer.
1017
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1018
- */
997
+ * Generate the TLObject from buffer.
998
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
999
+ */
1019
1000
  static async read(_data, ..._args) {
1020
1001
  // @ts-ignore
1021
1002
  let flags = await Primitive.Int.read(_data);
1022
- let correspondents = flags & (1 << 0) ? true : false;
1023
- let botsPm = flags & (1 << 1) ? true : false;
1024
- let botsInline = flags & (1 << 2) ? true : false;
1025
- let phoneCalls = flags & (1 << 3) ? true : false;
1026
- let forwardUsers = flags & (1 << 4) ? true : false;
1027
- let forwardChats = flags & (1 << 5) ? true : false;
1028
- let groups = flags & (1 << 10) ? true : false;
1029
- let channels = flags & (1 << 15) ? true : false;
1030
- let botsApp = flags & (1 << 16) ? true : false;
1031
- let botsGuestchat = flags & (1 << 17) ? true : false;
1003
+ let correspondents = (flags & (1 << 0)) ? true : false;
1004
+ let botsPm = (flags & (1 << 1)) ? true : false;
1005
+ let botsInline = (flags & (1 << 2)) ? true : false;
1006
+ let phoneCalls = (flags & (1 << 3)) ? true : false;
1007
+ let forwardUsers = (flags & (1 << 4)) ? true : false;
1008
+ let forwardChats = (flags & (1 << 5)) ? true : false;
1009
+ let groups = (flags & (1 << 10)) ? true : false;
1010
+ let channels = (flags & (1 << 15)) ? true : false;
1011
+ let botsApp = (flags & (1 << 16)) ? true : false;
1012
+ let botsGuestchat = (flags & (1 << 17)) ? true : false;
1032
1013
  let offset = await Primitive.Int.read(_data);
1033
1014
  let limit = await Primitive.Int.read(_data);
1034
1015
  let hash = await Primitive.Long.read(_data);
1035
- return new GetTopPeers({
1036
- correspondents: correspondents,
1037
- botsPm: botsPm,
1038
- botsInline: botsInline,
1039
- phoneCalls: phoneCalls,
1040
- forwardUsers: forwardUsers,
1041
- forwardChats: forwardChats,
1042
- groups: groups,
1043
- channels: channels,
1044
- botsApp: botsApp,
1045
- botsGuestchat: botsGuestchat,
1046
- offset: offset,
1047
- limit: limit,
1048
- hash: hash,
1049
- });
1050
- }
1051
- /**
1052
- * Generate buffer from TLObject.
1053
- */
1016
+ return new GetTopPeers({ "correspondents": correspondents, "botsPm": botsPm, "botsInline": botsInline, "phoneCalls": phoneCalls, "forwardUsers": forwardUsers, "forwardChats": forwardChats, "groups": groups, "channels": channels, "botsApp": botsApp, "botsGuestchat": botsGuestchat, "offset": offset, "limit": limit, "hash": hash });
1017
+ }
1018
+ /**
1019
+ * Generate buffer from TLObject.
1020
+ */
1054
1021
  write() {
1055
1022
  const b = new BytesIO();
1056
1023
  b.write(Primitive.Int.write(this.constructorId, false));
1057
1024
  // @ts-ignore
1058
1025
  let flags = 0;
1059
- flags |= this.correspondents ? 1 << 0 : 0;
1060
- flags |= this.botsPm ? 1 << 1 : 0;
1061
- flags |= this.botsInline ? 1 << 2 : 0;
1062
- flags |= this.phoneCalls ? 1 << 3 : 0;
1063
- flags |= this.forwardUsers ? 1 << 4 : 0;
1064
- flags |= this.forwardChats ? 1 << 5 : 0;
1065
- flags |= this.groups ? 1 << 10 : 0;
1066
- flags |= this.channels ? 1 << 15 : 0;
1067
- flags |= this.botsApp ? 1 << 16 : 0;
1068
- flags |= this.botsGuestchat ? 1 << 17 : 0;
1069
- b.write(Primitive.Int.write(flags));
1026
+ flags |= this.correspondents ? (1 << 0) : 0;
1027
+ flags |= this.botsPm ? (1 << 1) : 0;
1028
+ flags |= this.botsInline ? (1 << 2) : 0;
1029
+ flags |= this.phoneCalls ? (1 << 3) : 0;
1030
+ flags |= this.forwardUsers ? (1 << 4) : 0;
1031
+ flags |= this.forwardChats ? (1 << 5) : 0;
1032
+ flags |= this.groups ? (1 << 10) : 0;
1033
+ flags |= this.channels ? (1 << 15) : 0;
1034
+ flags |= this.botsApp ? (1 << 16) : 0;
1035
+ flags |= this.botsGuestchat ? (1 << 17) : 0;
1036
+ b.write((Primitive.Int.write(flags)));
1070
1037
  if (this.offset !== undefined) {
1071
- b.write(Primitive.Int.write(this.offset));
1038
+ b.write((Primitive.Int.write(this.offset)));
1072
1039
  }
1073
1040
  if (this.limit !== undefined) {
1074
- b.write(Primitive.Int.write(this.limit));
1041
+ b.write((Primitive.Int.write(this.limit)));
1075
1042
  }
1076
1043
  if (this.hash !== undefined) {
1077
- b.write(Primitive.Long.write(this.hash));
1044
+ b.write((Primitive.Long.write(this.hash)));
1078
1045
  }
1079
1046
  return b.buffer;
1080
1047
  }
@@ -1085,27 +1052,27 @@ export class ResetTopPeerRating extends TLObject {
1085
1052
  peer;
1086
1053
  constructor(params) {
1087
1054
  super();
1088
- this.classType = 'functions';
1089
- this.className = 'contacts.ResetTopPeerRating';
1055
+ this.classType = "functions";
1056
+ this.className = "contacts.ResetTopPeerRating";
1090
1057
  this.constructorId = 0x1ae373ac;
1091
1058
  this.subclassOfId = 0xf5b399ac;
1092
- this._slots = ['category', 'peer'];
1059
+ this._slots = ["category", "peer"];
1093
1060
  this.category = params.category;
1094
1061
  this.peer = params.peer;
1095
1062
  }
1096
1063
  /**
1097
- * Generate the TLObject from buffer.
1098
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1099
- */
1064
+ * Generate the TLObject from buffer.
1065
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1066
+ */
1100
1067
  static async read(_data, ..._args) {
1101
1068
  // no flags
1102
1069
  let category = await TLObject.read(_data);
1103
1070
  let peer = await TLObject.read(_data);
1104
- return new ResetTopPeerRating({ category: category, peer: peer });
1071
+ return new ResetTopPeerRating({ "category": category, "peer": peer });
1105
1072
  }
1106
1073
  /**
1107
- * Generate buffer from TLObject.
1108
- */
1074
+ * Generate buffer from TLObject.
1075
+ */
1109
1076
  write() {
1110
1077
  const b = new BytesIO();
1111
1078
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1123,23 +1090,23 @@ export class ResetSaved extends TLObject {
1123
1090
  __response__;
1124
1091
  constructor() {
1125
1092
  super();
1126
- this.classType = 'functions';
1127
- this.className = 'contacts.ResetSaved';
1093
+ this.classType = "functions";
1094
+ this.className = "contacts.ResetSaved";
1128
1095
  this.constructorId = 0x879537f1;
1129
1096
  this.subclassOfId = 0xf5b399ac;
1130
1097
  this._slots = [];
1131
1098
  }
1132
1099
  /**
1133
- * Generate the TLObject from buffer.
1134
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1135
- */
1100
+ * Generate the TLObject from buffer.
1101
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1102
+ */
1136
1103
  static async read(_data, ..._args) {
1137
1104
  // no flags
1138
1105
  return new ResetSaved();
1139
1106
  }
1140
1107
  /**
1141
- * Generate buffer from TLObject.
1142
- */
1108
+ * Generate buffer from TLObject.
1109
+ */
1143
1110
  write() {
1144
1111
  const b = new BytesIO();
1145
1112
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1151,23 +1118,23 @@ export class GetSaved extends TLObject {
1151
1118
  __response__;
1152
1119
  constructor() {
1153
1120
  super();
1154
- this.classType = 'functions';
1155
- this.className = 'contacts.GetSaved';
1121
+ this.classType = "functions";
1122
+ this.className = "contacts.GetSaved";
1156
1123
  this.constructorId = 0x82f1e39f;
1157
1124
  this.subclassOfId = 0x975dbef;
1158
1125
  this._slots = [];
1159
1126
  }
1160
1127
  /**
1161
- * Generate the TLObject from buffer.
1162
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1163
- */
1128
+ * Generate the TLObject from buffer.
1129
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1130
+ */
1164
1131
  static async read(_data, ..._args) {
1165
1132
  // no flags
1166
1133
  return new GetSaved();
1167
1134
  }
1168
1135
  /**
1169
- * Generate buffer from TLObject.
1170
- */
1136
+ * Generate buffer from TLObject.
1137
+ */
1171
1138
  write() {
1172
1139
  const b = new BytesIO();
1173
1140
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1180,31 +1147,31 @@ export class ToggleTopPeers extends TLObject {
1180
1147
  enabled;
1181
1148
  constructor(params) {
1182
1149
  super();
1183
- this.classType = 'functions';
1184
- this.className = 'contacts.ToggleTopPeers';
1150
+ this.classType = "functions";
1151
+ this.className = "contacts.ToggleTopPeers";
1185
1152
  this.constructorId = 0x8514bdda;
1186
1153
  this.subclassOfId = 0xf5b399ac;
1187
- this._slots = ['enabled'];
1154
+ this._slots = ["enabled"];
1188
1155
  this.enabled = params.enabled;
1189
1156
  }
1190
1157
  /**
1191
- * Generate the TLObject from buffer.
1192
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1193
- */
1158
+ * Generate the TLObject from buffer.
1159
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1160
+ */
1194
1161
  static async read(_data, ..._args) {
1195
1162
  // no flags
1196
1163
  let enabled = await Primitive.Bool.read(_data);
1197
- return new ToggleTopPeers({ enabled: enabled });
1164
+ return new ToggleTopPeers({ "enabled": enabled });
1198
1165
  }
1199
1166
  /**
1200
- * Generate buffer from TLObject.
1201
- */
1167
+ * Generate buffer from TLObject.
1168
+ */
1202
1169
  write() {
1203
1170
  const b = new BytesIO();
1204
1171
  b.write(Primitive.Int.write(this.constructorId, false));
1205
1172
  // no flags
1206
1173
  if (this.enabled !== undefined) {
1207
- b.write(Primitive.Bool.write(this.enabled));
1174
+ b.write((Primitive.Bool.write(this.enabled)));
1208
1175
  }
1209
1176
  return b.buffer;
1210
1177
  }
@@ -1219,11 +1186,11 @@ export class AddContact extends TLObject {
1219
1186
  note;
1220
1187
  constructor(params) {
1221
1188
  super();
1222
- this.classType = 'functions';
1223
- this.className = 'contacts.AddContact';
1189
+ this.classType = "functions";
1190
+ this.className = "contacts.AddContact";
1224
1191
  this.constructorId = 0xd9ba2e54;
1225
1192
  this.subclassOfId = 0x8af52aac;
1226
- this._slots = ['addPhonePrivacyException', 'id', 'firstName', 'lastName', 'phone', 'note'];
1193
+ this._slots = ["addPhonePrivacyException", "id", "firstName", "lastName", "phone", "note"];
1227
1194
  this.addPhonePrivacyException = params.addPhonePrivacyException;
1228
1195
  this.id = params.id;
1229
1196
  this.firstName = params.firstName;
@@ -1232,49 +1199,42 @@ export class AddContact extends TLObject {
1232
1199
  this.note = params.note;
1233
1200
  }
1234
1201
  /**
1235
- * Generate the TLObject from buffer.
1236
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1237
- */
1202
+ * Generate the TLObject from buffer.
1203
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1204
+ */
1238
1205
  static async read(_data, ..._args) {
1239
1206
  // @ts-ignore
1240
1207
  let flags = await Primitive.Int.read(_data);
1241
- let addPhonePrivacyException = flags & (1 << 0) ? true : false;
1208
+ let addPhonePrivacyException = (flags & (1 << 0)) ? true : false;
1242
1209
  let id = await TLObject.read(_data);
1243
1210
  let firstName = await Primitive.String.read(_data);
1244
1211
  let lastName = await Primitive.String.read(_data);
1245
1212
  let phone = await Primitive.String.read(_data);
1246
- let note = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
1247
- return new AddContact({
1248
- addPhonePrivacyException: addPhonePrivacyException,
1249
- id: id,
1250
- firstName: firstName,
1251
- lastName: lastName,
1252
- phone: phone,
1253
- note: note,
1254
- });
1255
- }
1256
- /**
1257
- * Generate buffer from TLObject.
1258
- */
1213
+ let note = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
1214
+ return new AddContact({ "addPhonePrivacyException": addPhonePrivacyException, "id": id, "firstName": firstName, "lastName": lastName, "phone": phone, "note": note });
1215
+ }
1216
+ /**
1217
+ * Generate buffer from TLObject.
1218
+ */
1259
1219
  write() {
1260
1220
  const b = new BytesIO();
1261
1221
  b.write(Primitive.Int.write(this.constructorId, false));
1262
1222
  // @ts-ignore
1263
1223
  let flags = 0;
1264
- flags |= this.addPhonePrivacyException ? 1 << 0 : 0;
1265
- flags |= this.note !== undefined ? 1 << 1 : 0;
1266
- b.write(Primitive.Int.write(flags));
1224
+ flags |= this.addPhonePrivacyException ? (1 << 0) : 0;
1225
+ flags |= this.note !== undefined ? (1 << 1) : 0;
1226
+ b.write((Primitive.Int.write(flags)));
1267
1227
  if (this.id !== undefined) {
1268
1228
  b.write(this.id.write());
1269
1229
  }
1270
1230
  if (this.firstName !== undefined) {
1271
- b.write(Primitive.String.write(this.firstName));
1231
+ b.write((Primitive.String.write(this.firstName)));
1272
1232
  }
1273
1233
  if (this.lastName !== undefined) {
1274
- b.write(Primitive.String.write(this.lastName));
1234
+ b.write((Primitive.String.write(this.lastName)));
1275
1235
  }
1276
1236
  if (this.phone !== undefined) {
1277
- b.write(Primitive.String.write(this.phone));
1237
+ b.write((Primitive.String.write(this.phone)));
1278
1238
  }
1279
1239
  if (this.note !== undefined) {
1280
1240
  b.write(this.note.write());
@@ -1287,25 +1247,25 @@ export class AcceptContact extends TLObject {
1287
1247
  id;
1288
1248
  constructor(params) {
1289
1249
  super();
1290
- this.classType = 'functions';
1291
- this.className = 'contacts.AcceptContact';
1250
+ this.classType = "functions";
1251
+ this.className = "contacts.AcceptContact";
1292
1252
  this.constructorId = 0xf831a20f;
1293
1253
  this.subclassOfId = 0x8af52aac;
1294
- this._slots = ['id'];
1254
+ this._slots = ["id"];
1295
1255
  this.id = params.id;
1296
1256
  }
1297
1257
  /**
1298
- * Generate the TLObject from buffer.
1299
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1300
- */
1258
+ * Generate the TLObject from buffer.
1259
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1260
+ */
1301
1261
  static async read(_data, ..._args) {
1302
1262
  // no flags
1303
1263
  let id = await TLObject.read(_data);
1304
- return new AcceptContact({ id: id });
1264
+ return new AcceptContact({ "id": id });
1305
1265
  }
1306
1266
  /**
1307
- * Generate buffer from TLObject.
1308
- */
1267
+ * Generate buffer from TLObject.
1268
+ */
1309
1269
  write() {
1310
1270
  const b = new BytesIO();
1311
1271
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1323,43 +1283,43 @@ export class GetLocated extends TLObject {
1323
1283
  selfExpires;
1324
1284
  constructor(params) {
1325
1285
  super();
1326
- this.classType = 'functions';
1327
- this.className = 'contacts.GetLocated';
1286
+ this.classType = "functions";
1287
+ this.className = "contacts.GetLocated";
1328
1288
  this.constructorId = 0xd348bc44;
1329
1289
  this.subclassOfId = 0x8af52aac;
1330
- this._slots = ['background', 'geoPoint', 'selfExpires'];
1290
+ this._slots = ["background", "geoPoint", "selfExpires"];
1331
1291
  this.background = params.background;
1332
1292
  this.geoPoint = params.geoPoint;
1333
1293
  this.selfExpires = params.selfExpires;
1334
1294
  }
1335
1295
  /**
1336
- * Generate the TLObject from buffer.
1337
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1338
- */
1296
+ * Generate the TLObject from buffer.
1297
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1298
+ */
1339
1299
  static async read(_data, ..._args) {
1340
1300
  // @ts-ignore
1341
1301
  let flags = await Primitive.Int.read(_data);
1342
- let background = flags & (1 << 1) ? true : false;
1302
+ let background = (flags & (1 << 1)) ? true : false;
1343
1303
  let geoPoint = await TLObject.read(_data);
1344
- let selfExpires = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
1345
- return new GetLocated({ background: background, geoPoint: geoPoint, selfExpires: selfExpires });
1304
+ let selfExpires = (flags & (1 << 0)) ? await Primitive.Int.read(_data) : undefined;
1305
+ return new GetLocated({ "background": background, "geoPoint": geoPoint, "selfExpires": selfExpires });
1346
1306
  }
1347
1307
  /**
1348
- * Generate buffer from TLObject.
1349
- */
1308
+ * Generate buffer from TLObject.
1309
+ */
1350
1310
  write() {
1351
1311
  const b = new BytesIO();
1352
1312
  b.write(Primitive.Int.write(this.constructorId, false));
1353
1313
  // @ts-ignore
1354
1314
  let flags = 0;
1355
- flags |= this.background ? 1 << 1 : 0;
1356
- flags |= this.selfExpires !== undefined ? 1 << 0 : 0;
1357
- b.write(Primitive.Int.write(flags));
1315
+ flags |= this.background ? (1 << 1) : 0;
1316
+ flags |= this.selfExpires !== undefined ? (1 << 0) : 0;
1317
+ b.write((Primitive.Int.write(flags)));
1358
1318
  if (this.geoPoint !== undefined) {
1359
1319
  b.write(this.geoPoint.write());
1360
1320
  }
1361
1321
  if (this.selfExpires !== undefined) {
1362
- b.write(Primitive.Int.write(this.selfExpires));
1322
+ b.write((Primitive.Int.write(this.selfExpires)));
1363
1323
  }
1364
1324
  return b.buffer;
1365
1325
  }
@@ -1372,48 +1332,43 @@ export class BlockFromReplies extends TLObject {
1372
1332
  msgId;
1373
1333
  constructor(params) {
1374
1334
  super();
1375
- this.classType = 'functions';
1376
- this.className = 'contacts.BlockFromReplies';
1335
+ this.classType = "functions";
1336
+ this.className = "contacts.BlockFromReplies";
1377
1337
  this.constructorId = 0x29a8962c;
1378
1338
  this.subclassOfId = 0x8af52aac;
1379
- this._slots = ['deleteMessage', 'deleteHistory', 'reportSpam', 'msgId'];
1339
+ this._slots = ["deleteMessage", "deleteHistory", "reportSpam", "msgId"];
1380
1340
  this.deleteMessage = params.deleteMessage;
1381
1341
  this.deleteHistory = params.deleteHistory;
1382
1342
  this.reportSpam = params.reportSpam;
1383
1343
  this.msgId = params.msgId;
1384
1344
  }
1385
1345
  /**
1386
- * Generate the TLObject from buffer.
1387
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1388
- */
1346
+ * Generate the TLObject from buffer.
1347
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1348
+ */
1389
1349
  static async read(_data, ..._args) {
1390
1350
  // @ts-ignore
1391
1351
  let flags = await Primitive.Int.read(_data);
1392
- let deleteMessage = flags & (1 << 0) ? true : false;
1393
- let deleteHistory = flags & (1 << 1) ? true : false;
1394
- let reportSpam = flags & (1 << 2) ? true : false;
1352
+ let deleteMessage = (flags & (1 << 0)) ? true : false;
1353
+ let deleteHistory = (flags & (1 << 1)) ? true : false;
1354
+ let reportSpam = (flags & (1 << 2)) ? true : false;
1395
1355
  let msgId = await Primitive.Int.read(_data);
1396
- return new BlockFromReplies({
1397
- deleteMessage: deleteMessage,
1398
- deleteHistory: deleteHistory,
1399
- reportSpam: reportSpam,
1400
- msgId: msgId,
1401
- });
1356
+ return new BlockFromReplies({ "deleteMessage": deleteMessage, "deleteHistory": deleteHistory, "reportSpam": reportSpam, "msgId": msgId });
1402
1357
  }
1403
1358
  /**
1404
- * Generate buffer from TLObject.
1405
- */
1359
+ * Generate buffer from TLObject.
1360
+ */
1406
1361
  write() {
1407
1362
  const b = new BytesIO();
1408
1363
  b.write(Primitive.Int.write(this.constructorId, false));
1409
1364
  // @ts-ignore
1410
1365
  let flags = 0;
1411
- flags |= this.deleteMessage ? 1 << 0 : 0;
1412
- flags |= this.deleteHistory ? 1 << 1 : 0;
1413
- flags |= this.reportSpam ? 1 << 2 : 0;
1414
- b.write(Primitive.Int.write(flags));
1366
+ flags |= this.deleteMessage ? (1 << 0) : 0;
1367
+ flags |= this.deleteHistory ? (1 << 1) : 0;
1368
+ flags |= this.reportSpam ? (1 << 2) : 0;
1369
+ b.write((Primitive.Int.write(flags)));
1415
1370
  if (this.msgId !== undefined) {
1416
- b.write(Primitive.Int.write(this.msgId));
1371
+ b.write((Primitive.Int.write(this.msgId)));
1417
1372
  }
1418
1373
  return b.buffer;
1419
1374
  }
@@ -1423,31 +1378,31 @@ export class ResolvePhone extends TLObject {
1423
1378
  phone;
1424
1379
  constructor(params) {
1425
1380
  super();
1426
- this.classType = 'functions';
1427
- this.className = 'contacts.ResolvePhone';
1381
+ this.classType = "functions";
1382
+ this.className = "contacts.ResolvePhone";
1428
1383
  this.constructorId = 0x8af94344;
1429
1384
  this.subclassOfId = 0xf065b3a8;
1430
- this._slots = ['phone'];
1385
+ this._slots = ["phone"];
1431
1386
  this.phone = params.phone;
1432
1387
  }
1433
1388
  /**
1434
- * Generate the TLObject from buffer.
1435
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1436
- */
1389
+ * Generate the TLObject from buffer.
1390
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1391
+ */
1437
1392
  static async read(_data, ..._args) {
1438
1393
  // no flags
1439
1394
  let phone = await Primitive.String.read(_data);
1440
- return new ResolvePhone({ phone: phone });
1395
+ return new ResolvePhone({ "phone": phone });
1441
1396
  }
1442
1397
  /**
1443
- * Generate buffer from TLObject.
1444
- */
1398
+ * Generate buffer from TLObject.
1399
+ */
1445
1400
  write() {
1446
1401
  const b = new BytesIO();
1447
1402
  b.write(Primitive.Int.write(this.constructorId, false));
1448
1403
  // no flags
1449
1404
  if (this.phone !== undefined) {
1450
- b.write(Primitive.String.write(this.phone));
1405
+ b.write((Primitive.String.write(this.phone)));
1451
1406
  }
1452
1407
  return b.buffer;
1453
1408
  }
@@ -1456,23 +1411,23 @@ export class ExportContactToken extends TLObject {
1456
1411
  __response__;
1457
1412
  constructor() {
1458
1413
  super();
1459
- this.classType = 'functions';
1460
- this.className = 'contacts.ExportContactToken';
1414
+ this.classType = "functions";
1415
+ this.className = "contacts.ExportContactToken";
1461
1416
  this.constructorId = 0xf8654027;
1462
1417
  this.subclassOfId = 0x86ddbed1;
1463
1418
  this._slots = [];
1464
1419
  }
1465
1420
  /**
1466
- * Generate the TLObject from buffer.
1467
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1468
- */
1421
+ * Generate the TLObject from buffer.
1422
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1423
+ */
1469
1424
  static async read(_data, ..._args) {
1470
1425
  // no flags
1471
1426
  return new ExportContactToken();
1472
1427
  }
1473
1428
  /**
1474
- * Generate buffer from TLObject.
1475
- */
1429
+ * Generate buffer from TLObject.
1430
+ */
1476
1431
  write() {
1477
1432
  const b = new BytesIO();
1478
1433
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1485,31 +1440,31 @@ export class ImportContactToken extends TLObject {
1485
1440
  token;
1486
1441
  constructor(params) {
1487
1442
  super();
1488
- this.classType = 'functions';
1489
- this.className = 'contacts.ImportContactToken';
1443
+ this.classType = "functions";
1444
+ this.className = "contacts.ImportContactToken";
1490
1445
  this.constructorId = 0x13005788;
1491
1446
  this.subclassOfId = 0x2da17977;
1492
- this._slots = ['token'];
1447
+ this._slots = ["token"];
1493
1448
  this.token = params.token;
1494
1449
  }
1495
1450
  /**
1496
- * Generate the TLObject from buffer.
1497
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1498
- */
1451
+ * Generate the TLObject from buffer.
1452
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1453
+ */
1499
1454
  static async read(_data, ..._args) {
1500
1455
  // no flags
1501
1456
  let token = await Primitive.String.read(_data);
1502
- return new ImportContactToken({ token: token });
1457
+ return new ImportContactToken({ "token": token });
1503
1458
  }
1504
1459
  /**
1505
- * Generate buffer from TLObject.
1506
- */
1460
+ * Generate buffer from TLObject.
1461
+ */
1507
1462
  write() {
1508
1463
  const b = new BytesIO();
1509
1464
  b.write(Primitive.Int.write(this.constructorId, false));
1510
1465
  // no flags
1511
1466
  if (this.token !== undefined) {
1512
- b.write(Primitive.String.write(this.token));
1467
+ b.write((Primitive.String.write(this.token)));
1513
1468
  }
1514
1469
  return b.buffer;
1515
1470
  }
@@ -1519,31 +1474,31 @@ export class EditCloseFriends extends TLObject {
1519
1474
  id;
1520
1475
  constructor(params) {
1521
1476
  super();
1522
- this.classType = 'functions';
1523
- this.className = 'contacts.EditCloseFriends';
1477
+ this.classType = "functions";
1478
+ this.className = "contacts.EditCloseFriends";
1524
1479
  this.constructorId = 0xba6705f0;
1525
1480
  this.subclassOfId = 0xf5b399ac;
1526
- this._slots = ['id'];
1481
+ this._slots = ["id"];
1527
1482
  this.id = params.id;
1528
1483
  }
1529
1484
  /**
1530
- * Generate the TLObject from buffer.
1531
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1532
- */
1485
+ * Generate the TLObject from buffer.
1486
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1487
+ */
1533
1488
  static async read(_data, ..._args) {
1534
1489
  // no flags
1535
1490
  let id = await TLObject.read(_data, Primitive.Long);
1536
- return new EditCloseFriends({ id: id });
1491
+ return new EditCloseFriends({ "id": id });
1537
1492
  }
1538
1493
  /**
1539
- * Generate buffer from TLObject.
1540
- */
1494
+ * Generate buffer from TLObject.
1495
+ */
1541
1496
  write() {
1542
1497
  const b = new BytesIO();
1543
1498
  b.write(Primitive.Int.write(this.constructorId, false));
1544
1499
  // no flags
1545
1500
  if (this.id) {
1546
- b.write(Primitive.Vector.write(this.id, Primitive.Long));
1501
+ b.write((Primitive.Vector.write(this.id, Primitive.Long)));
1547
1502
  }
1548
1503
  return b.buffer;
1549
1504
  }
@@ -1555,42 +1510,42 @@ export class SetBlocked extends TLObject {
1555
1510
  limit;
1556
1511
  constructor(params) {
1557
1512
  super();
1558
- this.classType = 'functions';
1559
- this.className = 'contacts.SetBlocked';
1513
+ this.classType = "functions";
1514
+ this.className = "contacts.SetBlocked";
1560
1515
  this.constructorId = 0x94c65c76;
1561
1516
  this.subclassOfId = 0xf5b399ac;
1562
- this._slots = ['myStoriesFrom', 'id', 'limit'];
1517
+ this._slots = ["myStoriesFrom", "id", "limit"];
1563
1518
  this.myStoriesFrom = params.myStoriesFrom;
1564
1519
  this.id = params.id;
1565
1520
  this.limit = params.limit;
1566
1521
  }
1567
1522
  /**
1568
- * Generate the TLObject from buffer.
1569
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1570
- */
1523
+ * Generate the TLObject from buffer.
1524
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1525
+ */
1571
1526
  static async read(_data, ..._args) {
1572
1527
  // @ts-ignore
1573
1528
  let flags = await Primitive.Int.read(_data);
1574
- let myStoriesFrom = flags & (1 << 0) ? true : false;
1529
+ let myStoriesFrom = (flags & (1 << 0)) ? true : false;
1575
1530
  let id = await TLObject.read(_data);
1576
1531
  let limit = await Primitive.Int.read(_data);
1577
- return new SetBlocked({ myStoriesFrom: myStoriesFrom, id: id, limit: limit });
1532
+ return new SetBlocked({ "myStoriesFrom": myStoriesFrom, "id": id, "limit": limit });
1578
1533
  }
1579
1534
  /**
1580
- * Generate buffer from TLObject.
1581
- */
1535
+ * Generate buffer from TLObject.
1536
+ */
1582
1537
  write() {
1583
1538
  const b = new BytesIO();
1584
1539
  b.write(Primitive.Int.write(this.constructorId, false));
1585
1540
  // @ts-ignore
1586
1541
  let flags = 0;
1587
- flags |= this.myStoriesFrom ? 1 << 0 : 0;
1588
- b.write(Primitive.Int.write(flags));
1542
+ flags |= this.myStoriesFrom ? (1 << 0) : 0;
1543
+ b.write((Primitive.Int.write(flags)));
1589
1544
  if (this.id) {
1590
- b.write(Primitive.Vector.write(this.id));
1545
+ b.write((Primitive.Vector.write(this.id)));
1591
1546
  }
1592
1547
  if (this.limit !== undefined) {
1593
- b.write(Primitive.Int.write(this.limit));
1548
+ b.write((Primitive.Int.write(this.limit)));
1594
1549
  }
1595
1550
  return b.buffer;
1596
1551
  }
@@ -1599,23 +1554,23 @@ export class GetBirthdays extends TLObject {
1599
1554
  __response__;
1600
1555
  constructor() {
1601
1556
  super();
1602
- this.classType = 'functions';
1603
- this.className = 'contacts.GetBirthdays';
1557
+ this.classType = "functions";
1558
+ this.className = "contacts.GetBirthdays";
1604
1559
  this.constructorId = 0xdaeda864;
1605
1560
  this.subclassOfId = 0xe7aabff;
1606
1561
  this._slots = [];
1607
1562
  }
1608
1563
  /**
1609
- * Generate the TLObject from buffer.
1610
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1611
- */
1564
+ * Generate the TLObject from buffer.
1565
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1566
+ */
1612
1567
  static async read(_data, ..._args) {
1613
1568
  // no flags
1614
1569
  return new GetBirthdays();
1615
1570
  }
1616
1571
  /**
1617
- * Generate buffer from TLObject.
1618
- */
1572
+ * Generate buffer from TLObject.
1573
+ */
1619
1574
  write() {
1620
1575
  const b = new BytesIO();
1621
1576
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1628,31 +1583,31 @@ export class GetSponsoredPeers extends TLObject {
1628
1583
  q;
1629
1584
  constructor(params) {
1630
1585
  super();
1631
- this.classType = 'functions';
1632
- this.className = 'contacts.GetSponsoredPeers';
1586
+ this.classType = "functions";
1587
+ this.className = "contacts.GetSponsoredPeers";
1633
1588
  this.constructorId = 0xb6c8c393;
1634
1589
  this.subclassOfId = 0xb45d5ccc;
1635
- this._slots = ['q'];
1590
+ this._slots = ["q"];
1636
1591
  this.q = params.q;
1637
1592
  }
1638
1593
  /**
1639
- * Generate the TLObject from buffer.
1640
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1641
- */
1594
+ * Generate the TLObject from buffer.
1595
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1596
+ */
1642
1597
  static async read(_data, ..._args) {
1643
1598
  // no flags
1644
1599
  let q = await Primitive.String.read(_data);
1645
- return new GetSponsoredPeers({ q: q });
1600
+ return new GetSponsoredPeers({ "q": q });
1646
1601
  }
1647
1602
  /**
1648
- * Generate buffer from TLObject.
1649
- */
1603
+ * Generate buffer from TLObject.
1604
+ */
1650
1605
  write() {
1651
1606
  const b = new BytesIO();
1652
1607
  b.write(Primitive.Int.write(this.constructorId, false));
1653
1608
  // no flags
1654
1609
  if (this.q !== undefined) {
1655
- b.write(Primitive.String.write(this.q));
1610
+ b.write((Primitive.String.write(this.q)));
1656
1611
  }
1657
1612
  return b.buffer;
1658
1613
  }
@@ -1663,27 +1618,27 @@ export class UpdateContactNote extends TLObject {
1663
1618
  note;
1664
1619
  constructor(params) {
1665
1620
  super();
1666
- this.classType = 'functions';
1667
- this.className = 'contacts.UpdateContactNote';
1621
+ this.classType = "functions";
1622
+ this.className = "contacts.UpdateContactNote";
1668
1623
  this.constructorId = 0x139f63fb;
1669
1624
  this.subclassOfId = 0xf5b399ac;
1670
- this._slots = ['id', 'note'];
1625
+ this._slots = ["id", "note"];
1671
1626
  this.id = params.id;
1672
1627
  this.note = params.note;
1673
1628
  }
1674
1629
  /**
1675
- * Generate the TLObject from buffer.
1676
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1677
- */
1630
+ * Generate the TLObject from buffer.
1631
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1632
+ */
1678
1633
  static async read(_data, ..._args) {
1679
1634
  // no flags
1680
1635
  let id = await TLObject.read(_data);
1681
1636
  let note = await TLObject.read(_data);
1682
- return new UpdateContactNote({ id: id, note: note });
1637
+ return new UpdateContactNote({ "id": id, "note": note });
1683
1638
  }
1684
1639
  /**
1685
- * Generate buffer from TLObject.
1686
- */
1640
+ * Generate buffer from TLObject.
1641
+ */
1687
1642
  write() {
1688
1643
  const b = new BytesIO();
1689
1644
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1703,36 +1658,36 @@ export class ExportNoPaidMessagesToken extends TLObject {
1703
1658
  temporary;
1704
1659
  constructor(params) {
1705
1660
  super();
1706
- this.classType = 'functions';
1707
- this.className = 'contacts.ExportNoPaidMessagesToken';
1661
+ this.classType = "functions";
1662
+ this.className = "contacts.ExportNoPaidMessagesToken";
1708
1663
  this.constructorId = 0x83c586ae;
1709
1664
  this.subclassOfId = 0xa13294f0;
1710
- this._slots = ['revoke', 'temporary'];
1665
+ this._slots = ["revoke", "temporary"];
1711
1666
  this.revoke = params.revoke;
1712
1667
  this.temporary = params.temporary;
1713
1668
  }
1714
1669
  /**
1715
- * Generate the TLObject from buffer.
1716
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1717
- */
1670
+ * Generate the TLObject from buffer.
1671
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1672
+ */
1718
1673
  static async read(_data, ..._args) {
1719
1674
  // @ts-ignore
1720
1675
  let flags = await Primitive.Int.read(_data);
1721
- let revoke = flags & (1 << 0) ? true : false;
1722
- let temporary = flags & (1 << 1) ? true : false;
1723
- return new ExportNoPaidMessagesToken({ revoke: revoke, temporary: temporary });
1676
+ let revoke = (flags & (1 << 0)) ? true : false;
1677
+ let temporary = (flags & (1 << 1)) ? true : false;
1678
+ return new ExportNoPaidMessagesToken({ "revoke": revoke, "temporary": temporary });
1724
1679
  }
1725
1680
  /**
1726
- * Generate buffer from TLObject.
1727
- */
1681
+ * Generate buffer from TLObject.
1682
+ */
1728
1683
  write() {
1729
1684
  const b = new BytesIO();
1730
1685
  b.write(Primitive.Int.write(this.constructorId, false));
1731
1686
  // @ts-ignore
1732
1687
  let flags = 0;
1733
- flags |= this.revoke ? 1 << 0 : 0;
1734
- flags |= this.temporary ? 1 << 1 : 0;
1735
- b.write(Primitive.Int.write(flags));
1688
+ flags |= this.revoke ? (1 << 0) : 0;
1689
+ flags |= this.temporary ? (1 << 1) : 0;
1690
+ b.write((Primitive.Int.write(flags)));
1736
1691
  return b.buffer;
1737
1692
  }
1738
1693
  }
@@ -1742,27 +1697,27 @@ export class ImportNoPaidMessagesToken extends TLObject {
1742
1697
  token;
1743
1698
  constructor(params) {
1744
1699
  super();
1745
- this.classType = 'functions';
1746
- this.className = 'contacts.ImportNoPaidMessagesToken';
1700
+ this.classType = "functions";
1701
+ this.className = "contacts.ImportNoPaidMessagesToken";
1747
1702
  this.constructorId = 0x35a7c6ca;
1748
1703
  this.subclassOfId = 0x2da17977;
1749
- this._slots = ['userId', 'token'];
1704
+ this._slots = ["userId", "token"];
1750
1705
  this.userId = params.userId;
1751
1706
  this.token = params.token;
1752
1707
  }
1753
1708
  /**
1754
- * Generate the TLObject from buffer.
1755
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1756
- */
1709
+ * Generate the TLObject from buffer.
1710
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1711
+ */
1757
1712
  static async read(_data, ..._args) {
1758
1713
  // no flags
1759
1714
  let userId = await TLObject.read(_data);
1760
1715
  let token = await Primitive.String.read(_data);
1761
- return new ImportNoPaidMessagesToken({ userId: userId, token: token });
1716
+ return new ImportNoPaidMessagesToken({ "userId": userId, "token": token });
1762
1717
  }
1763
1718
  /**
1764
- * Generate buffer from TLObject.
1765
- */
1719
+ * Generate buffer from TLObject.
1720
+ */
1766
1721
  write() {
1767
1722
  const b = new BytesIO();
1768
1723
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1771,7 +1726,7 @@ export class ImportNoPaidMessagesToken extends TLObject {
1771
1726
  b.write(this.userId.write());
1772
1727
  }
1773
1728
  if (this.token !== undefined) {
1774
- b.write(Primitive.String.write(this.token));
1729
+ b.write((Primitive.String.write(this.token)));
1775
1730
  }
1776
1731
  return b.buffer;
1777
1732
  }