@tgsnake/skema 3.1.0-browser.0 → 3.1.0

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