@tgsnake/skema 3.1.0 → 3.2.1-browser.0

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