@tgsnake/skema 3.1.0 → 3.2.1-browser.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/src/deps.d.ts +4 -3
  3. package/dist/src/deps.js +4 -4
  4. package/dist/src/errors/RpcError.js +3 -1
  5. package/dist/src/helpers.js +19 -34
  6. package/dist/src/raw/class/All.d.ts +49 -5
  7. package/dist/src/raw/class/All.js +2783 -2739
  8. package/dist/src/raw/class/Raw.d.ts +7856 -7518
  9. package/dist/src/raw/class/Raw.js +27367 -20433
  10. package/dist/src/raw/class/tl/account.d.ts +841 -841
  11. package/dist/src/raw/class/tl/account.js +1983 -1813
  12. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  13. package/dist/src/raw/class/tl/aicompose.js +128 -117
  14. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  15. package/dist/src/raw/class/tl/auth.js +849 -714
  16. package/dist/src/raw/class/tl/bots.d.ts +353 -232
  17. package/dist/src/raw/class/tl/bots.js +871 -504
  18. package/dist/src/raw/class/tl/channels.d.ts +351 -331
  19. package/dist/src/raw/class/tl/channels.js +873 -735
  20. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  21. package/dist/src/raw/class/tl/chatlists.js +196 -183
  22. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  23. package/dist/src/raw/class/tl/communities.js +159 -138
  24. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  25. package/dist/src/raw/class/tl/contacts.js +537 -492
  26. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  27. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  28. package/dist/src/raw/class/tl/feed.d.ts +278 -0
  29. package/dist/src/raw/class/tl/feed.js +671 -0
  30. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  31. package/dist/src/raw/class/tl/folders.js +11 -11
  32. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  33. package/dist/src/raw/class/tl/fragment.js +32 -25
  34. package/dist/src/raw/class/tl/help.d.ts +286 -286
  35. package/dist/src/raw/class/tl/help.js +686 -618
  36. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  37. package/dist/src/raw/class/tl/langpack.js +57 -57
  38. package/dist/src/raw/class/tl/messages.d.ts +1901 -1851
  39. package/dist/src/raw/class/tl/messages.js +6043 -4855
  40. package/dist/src/raw/class/tl/payments.d.ts +677 -641
  41. package/dist/src/raw/class/tl/payments.js +2312 -1734
  42. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  43. package/dist/src/raw/class/tl/phone.js +779 -644
  44. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  45. package/dist/src/raw/class/tl/photos.js +139 -116
  46. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  47. package/dist/src/raw/class/tl/premium.js +133 -111
  48. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  49. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  50. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  51. package/dist/src/raw/class/tl/stats.js +268 -169
  52. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  53. package/dist/src/raw/class/tl/stickers.js +173 -144
  54. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  55. package/dist/src/raw/class/tl/storage.js +71 -71
  56. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  57. package/dist/src/raw/class/tl/stories.js +781 -622
  58. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  59. package/dist/src/raw/class/tl/toncenter.js +52 -47
  60. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  61. package/dist/src/raw/class/tl/updates.js +246 -175
  62. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  63. package/dist/src/raw/class/tl/upload.js +178 -155
  64. package/dist/src/raw/class/tl/users.d.ts +61 -61
  65. package/dist/src/raw/class/tl/users.js +124 -124
  66. package/dist/src/raw/class/tl/wallet.d.ts +257 -206
  67. package/dist/src/raw/class/tl/wallet.js +701 -525
  68. package/dist/src/raw/class/types.d.ts +3 -2
  69. package/dist/src/raw/class/types.js +1 -1
  70. package/dist/src/raw/core/GzipPacked.d.ts +4 -0
  71. package/dist/src/raw/core/GzipPacked.js +9 -1
  72. package/dist/src/raw/core/primitive/Bytes.js +26 -4
  73. package/dist/src/raw/core/primitive/Vector.js +11 -3
  74. package/package.json +7 -5
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  // This file is auto generate. All change made in this file will be lost!
11
11
  import { TLObject, Primitive } from '../../core/index.js';
12
12
  import { BytesIO } from '../../../deps.js';
@@ -16,41 +16,41 @@ export class ConfigSimple extends TLObject {
16
16
  rules;
17
17
  constructor(params) {
18
18
  super();
19
- this.classType = "types";
20
- this.className = "help.ConfigSimple";
19
+ this.classType = 'types';
20
+ this.className = 'help.ConfigSimple';
21
21
  this.constructorId = 0x5a592a6c;
22
22
  this.subclassOfId = 0x29183ac4;
23
- this._slots = ["date", "expires", "rules"];
23
+ this._slots = ['date', 'expires', 'rules'];
24
24
  this.date = params.date;
25
25
  this.expires = params.expires;
26
26
  this.rules = params.rules;
27
27
  }
28
28
  /**
29
- * Generate the TLObject from buffer.
30
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
31
- */
29
+ * Generate the TLObject from buffer.
30
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
31
+ */
32
32
  static async read(_data, ..._args) {
33
33
  // no flags
34
34
  let date = await Primitive.Int.read(_data);
35
35
  let expires = await Primitive.Int.read(_data);
36
36
  let rules = await TLObject.read(_data);
37
- return new ConfigSimple({ "date": date, "expires": expires, "rules": rules });
37
+ return new ConfigSimple({ date: date, expires: expires, rules: rules });
38
38
  }
39
39
  /**
40
- * Generate buffer from TLObject.
41
- */
40
+ * Generate buffer from TLObject.
41
+ */
42
42
  write() {
43
43
  const b = new BytesIO();
44
44
  b.write(Primitive.Int.write(this.constructorId, false));
45
45
  // no flags
46
46
  if (this.date !== undefined) {
47
- b.write((Primitive.Int.write(this.date)));
47
+ b.write(Primitive.Int.write(this.date));
48
48
  }
49
49
  if (this.expires !== undefined) {
50
- b.write((Primitive.Int.write(this.expires)));
50
+ b.write(Primitive.Int.write(this.expires));
51
51
  }
52
52
  if (this.rules) {
53
- b.write((Primitive.Vector.write(this.rules)));
53
+ b.write(Primitive.Vector.write(this.rules));
54
54
  }
55
55
  return b.buffer;
56
56
  }
@@ -66,11 +66,11 @@ export class AppUpdate extends TLObject {
66
66
  sticker;
67
67
  constructor(params) {
68
68
  super();
69
- this.classType = "types";
70
- this.className = "help.AppUpdate";
69
+ this.classType = 'types';
70
+ this.className = 'help.AppUpdate';
71
71
  this.constructorId = 0xccbbce30;
72
72
  this.subclassOfId = 0x5897069e;
73
- this._slots = ["canNotSkip", "id", "version", "text", "entities", "document", "url", "sticker"];
73
+ this._slots = ['canNotSkip', 'id', 'version', 'text', 'entities', 'document', 'url', 'sticker'];
74
74
  this.canNotSkip = params.canNotSkip;
75
75
  this.id = params.id;
76
76
  this.version = params.version;
@@ -81,52 +81,61 @@ export class AppUpdate extends TLObject {
81
81
  this.sticker = params.sticker;
82
82
  }
83
83
  /**
84
- * Generate the TLObject from buffer.
85
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
86
- */
84
+ * Generate the TLObject from buffer.
85
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
86
+ */
87
87
  static async read(_data, ..._args) {
88
88
  // @ts-ignore
89
89
  let flags = await Primitive.Int.read(_data);
90
- let canNotSkip = (flags & (1 << 0)) ? true : false;
90
+ let canNotSkip = flags & (1 << 0) ? true : false;
91
91
  let id = await Primitive.Int.read(_data);
92
92
  let version = await Primitive.String.read(_data);
93
93
  let text = await Primitive.String.read(_data);
94
94
  let entities = await TLObject.read(_data);
95
- let document = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
96
- let url = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
97
- let sticker = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
98
- return new AppUpdate({ "canNotSkip": canNotSkip, "id": id, "version": version, "text": text, "entities": entities, "document": document, "url": url, "sticker": sticker });
99
- }
100
- /**
101
- * Generate buffer from TLObject.
102
- */
95
+ let document = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
96
+ let url = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
97
+ let sticker = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
98
+ return new AppUpdate({
99
+ canNotSkip: canNotSkip,
100
+ id: id,
101
+ version: version,
102
+ text: text,
103
+ entities: entities,
104
+ document: document,
105
+ url: url,
106
+ sticker: sticker,
107
+ });
108
+ }
109
+ /**
110
+ * Generate buffer from TLObject.
111
+ */
103
112
  write() {
104
113
  const b = new BytesIO();
105
114
  b.write(Primitive.Int.write(this.constructorId, false));
106
115
  // @ts-ignore
107
116
  let flags = 0;
108
- flags |= this.canNotSkip ? (1 << 0) : 0;
109
- flags |= this.document !== undefined ? (1 << 1) : 0;
110
- flags |= this.url !== undefined ? (1 << 2) : 0;
111
- flags |= this.sticker !== undefined ? (1 << 3) : 0;
112
- b.write((Primitive.Int.write(flags)));
117
+ flags |= this.canNotSkip ? 1 << 0 : 0;
118
+ flags |= this.document !== undefined ? 1 << 1 : 0;
119
+ flags |= this.url !== undefined ? 1 << 2 : 0;
120
+ flags |= this.sticker !== undefined ? 1 << 3 : 0;
121
+ b.write(Primitive.Int.write(flags));
113
122
  if (this.id !== undefined) {
114
- b.write((Primitive.Int.write(this.id)));
123
+ b.write(Primitive.Int.write(this.id));
115
124
  }
116
125
  if (this.version !== undefined) {
117
- b.write((Primitive.String.write(this.version)));
126
+ b.write(Primitive.String.write(this.version));
118
127
  }
119
128
  if (this.text !== undefined) {
120
- b.write((Primitive.String.write(this.text)));
129
+ b.write(Primitive.String.write(this.text));
121
130
  }
122
131
  if (this.entities) {
123
- b.write((Primitive.Vector.write(this.entities)));
132
+ b.write(Primitive.Vector.write(this.entities));
124
133
  }
125
134
  if (this.document !== undefined) {
126
135
  b.write(this.document.write());
127
136
  }
128
137
  if (this.url !== undefined) {
129
- b.write((Primitive.String.write(this.url)));
138
+ b.write(Primitive.String.write(this.url));
130
139
  }
131
140
  if (this.sticker !== undefined) {
132
141
  b.write(this.sticker.write());
@@ -137,23 +146,23 @@ export class AppUpdate extends TLObject {
137
146
  export class NoAppUpdate extends TLObject {
138
147
  constructor() {
139
148
  super();
140
- this.classType = "types";
141
- this.className = "help.NoAppUpdate";
149
+ this.classType = 'types';
150
+ this.className = 'help.NoAppUpdate';
142
151
  this.constructorId = 0xc45a6536;
143
152
  this.subclassOfId = 0x5897069e;
144
153
  this._slots = [];
145
154
  }
146
155
  /**
147
- * Generate the TLObject from buffer.
148
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
149
- */
156
+ * Generate the TLObject from buffer.
157
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
158
+ */
150
159
  static async read(_data, ..._args) {
151
160
  // no flags
152
161
  return new NoAppUpdate();
153
162
  }
154
163
  /**
155
- * Generate buffer from TLObject.
156
- */
164
+ * Generate buffer from TLObject.
165
+ */
157
166
  write() {
158
167
  const b = new BytesIO();
159
168
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -165,31 +174,31 @@ export class InviteText extends TLObject {
165
174
  message;
166
175
  constructor(params) {
167
176
  super();
168
- this.classType = "types";
169
- this.className = "help.InviteText";
177
+ this.classType = 'types';
178
+ this.className = 'help.InviteText';
170
179
  this.constructorId = 0x18cb9f78;
171
180
  this.subclassOfId = 0xcf70aa35;
172
- this._slots = ["message"];
181
+ this._slots = ['message'];
173
182
  this.message = params.message;
174
183
  }
175
184
  /**
176
- * Generate the TLObject from buffer.
177
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
178
- */
185
+ * Generate the TLObject from buffer.
186
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
187
+ */
179
188
  static async read(_data, ..._args) {
180
189
  // no flags
181
190
  let message = await Primitive.String.read(_data);
182
- return new InviteText({ "message": message });
191
+ return new InviteText({ message: message });
183
192
  }
184
193
  /**
185
- * Generate buffer from TLObject.
186
- */
194
+ * Generate buffer from TLObject.
195
+ */
187
196
  write() {
188
197
  const b = new BytesIO();
189
198
  b.write(Primitive.Int.write(this.constructorId, false));
190
199
  // no flags
191
200
  if (this.message !== undefined) {
192
- b.write((Primitive.String.write(this.message)));
201
+ b.write(Primitive.String.write(this.message));
193
202
  }
194
203
  return b.buffer;
195
204
  }
@@ -199,33 +208,33 @@ export class Support extends TLObject {
199
208
  user;
200
209
  constructor(params) {
201
210
  super();
202
- this.classType = "types";
203
- this.className = "help.Support";
211
+ this.classType = 'types';
212
+ this.className = 'help.Support';
204
213
  this.constructorId = 0x17c6b5f6;
205
214
  this.subclassOfId = 0x7159bceb;
206
- this._slots = ["phoneNumber", "user"];
215
+ this._slots = ['phoneNumber', 'user'];
207
216
  this.phoneNumber = params.phoneNumber;
208
217
  this.user = params.user;
209
218
  }
210
219
  /**
211
- * Generate the TLObject from buffer.
212
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
213
- */
220
+ * Generate the TLObject from buffer.
221
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
222
+ */
214
223
  static async read(_data, ..._args) {
215
224
  // no flags
216
225
  let phoneNumber = await Primitive.String.read(_data);
217
226
  let user = await TLObject.read(_data);
218
- return new Support({ "phoneNumber": phoneNumber, "user": user });
227
+ return new Support({ phoneNumber: phoneNumber, user: user });
219
228
  }
220
229
  /**
221
- * Generate buffer from TLObject.
222
- */
230
+ * Generate buffer from TLObject.
231
+ */
223
232
  write() {
224
233
  const b = new BytesIO();
225
234
  b.write(Primitive.Int.write(this.constructorId, false));
226
235
  // no flags
227
236
  if (this.phoneNumber !== undefined) {
228
- b.write((Primitive.String.write(this.phoneNumber)));
237
+ b.write(Primitive.String.write(this.phoneNumber));
229
238
  }
230
239
  if (this.user !== undefined) {
231
240
  b.write(this.user.write());
@@ -241,11 +250,11 @@ export class TermsOfService extends TLObject {
241
250
  minAgeConfirm;
242
251
  constructor(params) {
243
252
  super();
244
- this.classType = "types";
245
- this.className = "help.TermsOfService";
253
+ this.classType = 'types';
254
+ this.className = 'help.TermsOfService';
246
255
  this.constructorId = 0x780a0310;
247
256
  this.subclassOfId = 0x20ee8312;
248
- this._slots = ["popup", "id", "text", "entities", "minAgeConfirm"];
257
+ this._slots = ['popup', 'id', 'text', 'entities', 'minAgeConfirm'];
249
258
  this.popup = params.popup;
250
259
  this.id = params.id;
251
260
  this.text = params.text;
@@ -253,41 +262,47 @@ export class TermsOfService extends TLObject {
253
262
  this.minAgeConfirm = params.minAgeConfirm;
254
263
  }
255
264
  /**
256
- * Generate the TLObject from buffer.
257
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
258
- */
265
+ * Generate the TLObject from buffer.
266
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
267
+ */
259
268
  static async read(_data, ..._args) {
260
269
  // @ts-ignore
261
270
  let flags = await Primitive.Int.read(_data);
262
- let popup = (flags & (1 << 0)) ? true : false;
271
+ let popup = flags & (1 << 0) ? true : false;
263
272
  let id = await TLObject.read(_data);
264
273
  let text = await Primitive.String.read(_data);
265
274
  let entities = await TLObject.read(_data);
266
- let minAgeConfirm = (flags & (1 << 1)) ? await Primitive.Int.read(_data) : undefined;
267
- return new TermsOfService({ "popup": popup, "id": id, "text": text, "entities": entities, "minAgeConfirm": minAgeConfirm });
268
- }
269
- /**
270
- * Generate buffer from TLObject.
271
- */
275
+ let minAgeConfirm = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
276
+ return new TermsOfService({
277
+ popup: popup,
278
+ id: id,
279
+ text: text,
280
+ entities: entities,
281
+ minAgeConfirm: minAgeConfirm,
282
+ });
283
+ }
284
+ /**
285
+ * Generate buffer from TLObject.
286
+ */
272
287
  write() {
273
288
  const b = new BytesIO();
274
289
  b.write(Primitive.Int.write(this.constructorId, false));
275
290
  // @ts-ignore
276
291
  let flags = 0;
277
- flags |= this.popup ? (1 << 0) : 0;
278
- flags |= this.minAgeConfirm !== undefined ? (1 << 1) : 0;
279
- b.write((Primitive.Int.write(flags)));
292
+ flags |= this.popup ? 1 << 0 : 0;
293
+ flags |= this.minAgeConfirm !== undefined ? 1 << 1 : 0;
294
+ b.write(Primitive.Int.write(flags));
280
295
  if (this.id !== undefined) {
281
296
  b.write(this.id.write());
282
297
  }
283
298
  if (this.text !== undefined) {
284
- b.write((Primitive.String.write(this.text)));
299
+ b.write(Primitive.String.write(this.text));
285
300
  }
286
301
  if (this.entities) {
287
- b.write((Primitive.Vector.write(this.entities)));
302
+ b.write(Primitive.Vector.write(this.entities));
288
303
  }
289
304
  if (this.minAgeConfirm !== undefined) {
290
- b.write((Primitive.Int.write(this.minAgeConfirm)));
305
+ b.write(Primitive.Int.write(this.minAgeConfirm));
291
306
  }
292
307
  return b.buffer;
293
308
  }
@@ -298,41 +313,41 @@ export class RecentMeUrls extends TLObject {
298
313
  users;
299
314
  constructor(params) {
300
315
  super();
301
- this.classType = "types";
302
- this.className = "help.RecentMeUrls";
316
+ this.classType = 'types';
317
+ this.className = 'help.RecentMeUrls';
303
318
  this.constructorId = 0xe0310d7;
304
319
  this.subclassOfId = 0xf269c477;
305
- this._slots = ["urls", "chats", "users"];
320
+ this._slots = ['urls', 'chats', 'users'];
306
321
  this.urls = params.urls;
307
322
  this.chats = params.chats;
308
323
  this.users = params.users;
309
324
  }
310
325
  /**
311
- * Generate the TLObject from buffer.
312
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
313
- */
326
+ * Generate the TLObject from buffer.
327
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
328
+ */
314
329
  static async read(_data, ..._args) {
315
330
  // no flags
316
331
  let urls = await TLObject.read(_data);
317
332
  let chats = await TLObject.read(_data);
318
333
  let users = await TLObject.read(_data);
319
- return new RecentMeUrls({ "urls": urls, "chats": chats, "users": users });
334
+ return new RecentMeUrls({ urls: urls, chats: chats, users: users });
320
335
  }
321
336
  /**
322
- * Generate buffer from TLObject.
323
- */
337
+ * Generate buffer from TLObject.
338
+ */
324
339
  write() {
325
340
  const b = new BytesIO();
326
341
  b.write(Primitive.Int.write(this.constructorId, false));
327
342
  // no flags
328
343
  if (this.urls) {
329
- b.write((Primitive.Vector.write(this.urls)));
344
+ b.write(Primitive.Vector.write(this.urls));
330
345
  }
331
346
  if (this.chats) {
332
- b.write((Primitive.Vector.write(this.chats)));
347
+ b.write(Primitive.Vector.write(this.chats));
333
348
  }
334
349
  if (this.users) {
335
- b.write((Primitive.Vector.write(this.users)));
350
+ b.write(Primitive.Vector.write(this.users));
336
351
  }
337
352
  return b.buffer;
338
353
  }
@@ -341,31 +356,31 @@ export class TermsOfServiceUpdateEmpty extends TLObject {
341
356
  expires;
342
357
  constructor(params) {
343
358
  super();
344
- this.classType = "types";
345
- this.className = "help.TermsOfServiceUpdateEmpty";
359
+ this.classType = 'types';
360
+ this.className = 'help.TermsOfServiceUpdateEmpty';
346
361
  this.constructorId = 0xe3309f7f;
347
362
  this.subclassOfId = 0x293c2977;
348
- this._slots = ["expires"];
363
+ this._slots = ['expires'];
349
364
  this.expires = params.expires;
350
365
  }
351
366
  /**
352
- * Generate the TLObject from buffer.
353
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
354
- */
367
+ * Generate the TLObject from buffer.
368
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
369
+ */
355
370
  static async read(_data, ..._args) {
356
371
  // no flags
357
372
  let expires = await Primitive.Int.read(_data);
358
- return new TermsOfServiceUpdateEmpty({ "expires": expires });
373
+ return new TermsOfServiceUpdateEmpty({ expires: expires });
359
374
  }
360
375
  /**
361
- * Generate buffer from TLObject.
362
- */
376
+ * Generate buffer from TLObject.
377
+ */
363
378
  write() {
364
379
  const b = new BytesIO();
365
380
  b.write(Primitive.Int.write(this.constructorId, false));
366
381
  // no flags
367
382
  if (this.expires !== undefined) {
368
- b.write((Primitive.Int.write(this.expires)));
383
+ b.write(Primitive.Int.write(this.expires));
369
384
  }
370
385
  return b.buffer;
371
386
  }
@@ -375,33 +390,33 @@ export class TermsOfServiceUpdate extends TLObject {
375
390
  termsOfService;
376
391
  constructor(params) {
377
392
  super();
378
- this.classType = "types";
379
- this.className = "help.TermsOfServiceUpdate";
393
+ this.classType = 'types';
394
+ this.className = 'help.TermsOfServiceUpdate';
380
395
  this.constructorId = 0x28ecf961;
381
396
  this.subclassOfId = 0x293c2977;
382
- this._slots = ["expires", "termsOfService"];
397
+ this._slots = ['expires', 'termsOfService'];
383
398
  this.expires = params.expires;
384
399
  this.termsOfService = params.termsOfService;
385
400
  }
386
401
  /**
387
- * Generate the TLObject from buffer.
388
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
389
- */
402
+ * Generate the TLObject from buffer.
403
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
404
+ */
390
405
  static async read(_data, ..._args) {
391
406
  // no flags
392
407
  let expires = await Primitive.Int.read(_data);
393
408
  let termsOfService = await TLObject.read(_data);
394
- return new TermsOfServiceUpdate({ "expires": expires, "termsOfService": termsOfService });
409
+ return new TermsOfServiceUpdate({ expires: expires, termsOfService: termsOfService });
395
410
  }
396
411
  /**
397
- * Generate buffer from TLObject.
398
- */
412
+ * Generate buffer from TLObject.
413
+ */
399
414
  write() {
400
415
  const b = new BytesIO();
401
416
  b.write(Primitive.Int.write(this.constructorId, false));
402
417
  // no flags
403
418
  if (this.expires !== undefined) {
404
- b.write((Primitive.Int.write(this.expires)));
419
+ b.write(Primitive.Int.write(this.expires));
405
420
  }
406
421
  if (this.termsOfService !== undefined) {
407
422
  b.write(this.termsOfService.write());
@@ -412,23 +427,23 @@ export class TermsOfServiceUpdate extends TLObject {
412
427
  export class DeepLinkInfoEmpty extends TLObject {
413
428
  constructor() {
414
429
  super();
415
- this.classType = "types";
416
- this.className = "help.DeepLinkInfoEmpty";
430
+ this.classType = 'types';
431
+ this.className = 'help.DeepLinkInfoEmpty';
417
432
  this.constructorId = 0x66afa166;
418
433
  this.subclassOfId = 0x984aac38;
419
434
  this._slots = [];
420
435
  }
421
436
  /**
422
- * Generate the TLObject from buffer.
423
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
424
- */
437
+ * Generate the TLObject from buffer.
438
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
439
+ */
425
440
  static async read(_data, ..._args) {
426
441
  // no flags
427
442
  return new DeepLinkInfoEmpty();
428
443
  }
429
444
  /**
430
- * Generate buffer from TLObject.
431
- */
445
+ * Generate buffer from TLObject.
446
+ */
432
447
  write() {
433
448
  const b = new BytesIO();
434
449
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -442,43 +457,43 @@ export class DeepLinkInfo extends TLObject {
442
457
  entities;
443
458
  constructor(params) {
444
459
  super();
445
- this.classType = "types";
446
- this.className = "help.DeepLinkInfo";
460
+ this.classType = 'types';
461
+ this.className = 'help.DeepLinkInfo';
447
462
  this.constructorId = 0x6a4ee832;
448
463
  this.subclassOfId = 0x984aac38;
449
- this._slots = ["updateApp", "message", "entities"];
464
+ this._slots = ['updateApp', 'message', 'entities'];
450
465
  this.updateApp = params.updateApp;
451
466
  this.message = params.message;
452
467
  this.entities = params.entities;
453
468
  }
454
469
  /**
455
- * Generate the TLObject from buffer.
456
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
457
- */
470
+ * Generate the TLObject from buffer.
471
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
472
+ */
458
473
  static async read(_data, ..._args) {
459
474
  // @ts-ignore
460
475
  let flags = await Primitive.Int.read(_data);
461
- let updateApp = (flags & (1 << 0)) ? true : false;
476
+ let updateApp = flags & (1 << 0) ? true : false;
462
477
  let message = await Primitive.String.read(_data);
463
- let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
464
- return new DeepLinkInfo({ "updateApp": updateApp, "message": message, "entities": entities });
478
+ let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
479
+ return new DeepLinkInfo({ updateApp: updateApp, message: message, entities: entities });
465
480
  }
466
481
  /**
467
- * Generate buffer from TLObject.
468
- */
482
+ * Generate buffer from TLObject.
483
+ */
469
484
  write() {
470
485
  const b = new BytesIO();
471
486
  b.write(Primitive.Int.write(this.constructorId, false));
472
487
  // @ts-ignore
473
488
  let flags = 0;
474
- flags |= this.updateApp ? (1 << 0) : 0;
475
- flags |= this.entities ? (1 << 1) : 0;
476
- b.write((Primitive.Int.write(flags)));
489
+ flags |= this.updateApp ? 1 << 0 : 0;
490
+ flags |= this.entities ? 1 << 1 : 0;
491
+ b.write(Primitive.Int.write(flags));
477
492
  if (this.message !== undefined) {
478
- b.write((Primitive.String.write(this.message)));
493
+ b.write(Primitive.String.write(this.message));
479
494
  }
480
495
  if (this.entities) {
481
- b.write((Primitive.Vector.write(this.entities)));
496
+ b.write(Primitive.Vector.write(this.entities));
482
497
  }
483
498
  return b.buffer;
484
499
  }
@@ -486,23 +501,23 @@ export class DeepLinkInfo extends TLObject {
486
501
  export class PassportConfigNotModified extends TLObject {
487
502
  constructor() {
488
503
  super();
489
- this.classType = "types";
490
- this.className = "help.PassportConfigNotModified";
504
+ this.classType = 'types';
505
+ this.className = 'help.PassportConfigNotModified';
491
506
  this.constructorId = 0xbfb9f457;
492
507
  this.subclassOfId = 0xc666c0ad;
493
508
  this._slots = [];
494
509
  }
495
510
  /**
496
- * Generate the TLObject from buffer.
497
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
498
- */
511
+ * Generate the TLObject from buffer.
512
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
513
+ */
499
514
  static async read(_data, ..._args) {
500
515
  // no flags
501
516
  return new PassportConfigNotModified();
502
517
  }
503
518
  /**
504
- * Generate buffer from TLObject.
505
- */
519
+ * Generate buffer from TLObject.
520
+ */
506
521
  write() {
507
522
  const b = new BytesIO();
508
523
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -515,33 +530,33 @@ export class PassportConfig extends TLObject {
515
530
  countriesLangs;
516
531
  constructor(params) {
517
532
  super();
518
- this.classType = "types";
519
- this.className = "help.PassportConfig";
533
+ this.classType = 'types';
534
+ this.className = 'help.PassportConfig';
520
535
  this.constructorId = 0xa098d6af;
521
536
  this.subclassOfId = 0xc666c0ad;
522
- this._slots = ["hash", "countriesLangs"];
537
+ this._slots = ['hash', 'countriesLangs'];
523
538
  this.hash = params.hash;
524
539
  this.countriesLangs = params.countriesLangs;
525
540
  }
526
541
  /**
527
- * Generate the TLObject from buffer.
528
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
529
- */
542
+ * Generate the TLObject from buffer.
543
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
544
+ */
530
545
  static async read(_data, ..._args) {
531
546
  // no flags
532
547
  let hash = await Primitive.Int.read(_data);
533
548
  let countriesLangs = await TLObject.read(_data);
534
- return new PassportConfig({ "hash": hash, "countriesLangs": countriesLangs });
549
+ return new PassportConfig({ hash: hash, countriesLangs: countriesLangs });
535
550
  }
536
551
  /**
537
- * Generate buffer from TLObject.
538
- */
552
+ * Generate buffer from TLObject.
553
+ */
539
554
  write() {
540
555
  const b = new BytesIO();
541
556
  b.write(Primitive.Int.write(this.constructorId, false));
542
557
  // no flags
543
558
  if (this.hash !== undefined) {
544
- b.write((Primitive.Int.write(this.hash)));
559
+ b.write(Primitive.Int.write(this.hash));
545
560
  }
546
561
  if (this.countriesLangs !== undefined) {
547
562
  b.write(this.countriesLangs.write());
@@ -553,31 +568,31 @@ export class SupportName extends TLObject {
553
568
  name;
554
569
  constructor(params) {
555
570
  super();
556
- this.classType = "types";
557
- this.className = "help.SupportName";
571
+ this.classType = 'types';
572
+ this.className = 'help.SupportName';
558
573
  this.constructorId = 0x8c05f1c9;
559
574
  this.subclassOfId = 0x7f50b7c2;
560
- this._slots = ["name"];
575
+ this._slots = ['name'];
561
576
  this.name = params.name;
562
577
  }
563
578
  /**
564
- * Generate the TLObject from buffer.
565
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
566
- */
579
+ * Generate the TLObject from buffer.
580
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
581
+ */
567
582
  static async read(_data, ..._args) {
568
583
  // no flags
569
584
  let name = await Primitive.String.read(_data);
570
- return new SupportName({ "name": name });
585
+ return new SupportName({ name: name });
571
586
  }
572
587
  /**
573
- * Generate buffer from TLObject.
574
- */
588
+ * Generate buffer from TLObject.
589
+ */
575
590
  write() {
576
591
  const b = new BytesIO();
577
592
  b.write(Primitive.Int.write(this.constructorId, false));
578
593
  // no flags
579
594
  if (this.name !== undefined) {
580
- b.write((Primitive.String.write(this.name)));
595
+ b.write(Primitive.String.write(this.name));
581
596
  }
582
597
  return b.buffer;
583
598
  }
@@ -585,23 +600,23 @@ export class SupportName extends TLObject {
585
600
  export class UserInfoEmpty extends TLObject {
586
601
  constructor() {
587
602
  super();
588
- this.classType = "types";
589
- this.className = "help.UserInfoEmpty";
603
+ this.classType = 'types';
604
+ this.className = 'help.UserInfoEmpty';
590
605
  this.constructorId = 0xf3ae2eed;
591
606
  this.subclassOfId = 0x5c53d7d8;
592
607
  this._slots = [];
593
608
  }
594
609
  /**
595
- * Generate the TLObject from buffer.
596
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
597
- */
610
+ * Generate the TLObject from buffer.
611
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
612
+ */
598
613
  static async read(_data, ..._args) {
599
614
  // no flags
600
615
  return new UserInfoEmpty();
601
616
  }
602
617
  /**
603
- * Generate buffer from TLObject.
604
- */
618
+ * Generate buffer from TLObject.
619
+ */
605
620
  write() {
606
621
  const b = new BytesIO();
607
622
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -616,46 +631,46 @@ export class UserInfo extends TLObject {
616
631
  date;
617
632
  constructor(params) {
618
633
  super();
619
- this.classType = "types";
620
- this.className = "help.UserInfo";
634
+ this.classType = 'types';
635
+ this.className = 'help.UserInfo';
621
636
  this.constructorId = 0x1eb3758;
622
637
  this.subclassOfId = 0x5c53d7d8;
623
- this._slots = ["message", "entities", "author", "date"];
638
+ this._slots = ['message', 'entities', 'author', 'date'];
624
639
  this.message = params.message;
625
640
  this.entities = params.entities;
626
641
  this.author = params.author;
627
642
  this.date = params.date;
628
643
  }
629
644
  /**
630
- * Generate the TLObject from buffer.
631
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
632
- */
645
+ * Generate the TLObject from buffer.
646
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
647
+ */
633
648
  static async read(_data, ..._args) {
634
649
  // no flags
635
650
  let message = await Primitive.String.read(_data);
636
651
  let entities = await TLObject.read(_data);
637
652
  let author = await Primitive.String.read(_data);
638
653
  let date = await Primitive.Int.read(_data);
639
- return new UserInfo({ "message": message, "entities": entities, "author": author, "date": date });
654
+ return new UserInfo({ message: message, entities: entities, author: author, date: date });
640
655
  }
641
656
  /**
642
- * Generate buffer from TLObject.
643
- */
657
+ * Generate buffer from TLObject.
658
+ */
644
659
  write() {
645
660
  const b = new BytesIO();
646
661
  b.write(Primitive.Int.write(this.constructorId, false));
647
662
  // no flags
648
663
  if (this.message !== undefined) {
649
- b.write((Primitive.String.write(this.message)));
664
+ b.write(Primitive.String.write(this.message));
650
665
  }
651
666
  if (this.entities) {
652
- b.write((Primitive.Vector.write(this.entities)));
667
+ b.write(Primitive.Vector.write(this.entities));
653
668
  }
654
669
  if (this.author !== undefined) {
655
- b.write((Primitive.String.write(this.author)));
670
+ b.write(Primitive.String.write(this.author));
656
671
  }
657
672
  if (this.date !== undefined) {
658
- b.write((Primitive.Int.write(this.date)));
673
+ b.write(Primitive.Int.write(this.date));
659
674
  }
660
675
  return b.buffer;
661
676
  }
@@ -664,31 +679,31 @@ export class PromoDataEmpty extends TLObject {
664
679
  expires;
665
680
  constructor(params) {
666
681
  super();
667
- this.classType = "types";
668
- this.className = "help.PromoDataEmpty";
682
+ this.classType = 'types';
683
+ this.className = 'help.PromoDataEmpty';
669
684
  this.constructorId = 0x98f6ac75;
670
685
  this.subclassOfId = 0x9d595542;
671
- this._slots = ["expires"];
686
+ this._slots = ['expires'];
672
687
  this.expires = params.expires;
673
688
  }
674
689
  /**
675
- * Generate the TLObject from buffer.
676
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
677
- */
690
+ * Generate the TLObject from buffer.
691
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
692
+ */
678
693
  static async read(_data, ..._args) {
679
694
  // no flags
680
695
  let expires = await Primitive.Int.read(_data);
681
- return new PromoDataEmpty({ "expires": expires });
696
+ return new PromoDataEmpty({ expires: expires });
682
697
  }
683
698
  /**
684
- * Generate buffer from TLObject.
685
- */
699
+ * Generate buffer from TLObject.
700
+ */
686
701
  write() {
687
702
  const b = new BytesIO();
688
703
  b.write(Primitive.Int.write(this.constructorId, false));
689
704
  // no flags
690
705
  if (this.expires !== undefined) {
691
- b.write((Primitive.Int.write(this.expires)));
706
+ b.write(Primitive.Int.write(this.expires));
692
707
  }
693
708
  return b.buffer;
694
709
  }
@@ -706,11 +721,22 @@ export class PromoData extends TLObject {
706
721
  users;
707
722
  constructor(params) {
708
723
  super();
709
- this.classType = "types";
710
- this.className = "help.PromoData";
724
+ this.classType = 'types';
725
+ this.className = 'help.PromoData';
711
726
  this.constructorId = 0x8a4d87a;
712
727
  this.subclassOfId = 0x9d595542;
713
- this._slots = ["proxy", "expires", "peer", "psaType", "psaMessage", "pendingSuggestions", "dismissedSuggestions", "customPendingSuggestion", "chats", "users"];
728
+ this._slots = [
729
+ 'proxy',
730
+ 'expires',
731
+ 'peer',
732
+ 'psaType',
733
+ 'psaMessage',
734
+ 'pendingSuggestions',
735
+ 'dismissedSuggestions',
736
+ 'customPendingSuggestion',
737
+ 'chats',
738
+ 'users',
739
+ ];
714
740
  this.proxy = params.proxy;
715
741
  this.expires = params.expires;
716
742
  this.peer = params.peer;
@@ -723,64 +749,75 @@ export class PromoData extends TLObject {
723
749
  this.users = params.users;
724
750
  }
725
751
  /**
726
- * Generate the TLObject from buffer.
727
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
728
- */
752
+ * Generate the TLObject from buffer.
753
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
754
+ */
729
755
  static async read(_data, ..._args) {
730
756
  // @ts-ignore
731
757
  let flags = await Primitive.Int.read(_data);
732
- let proxy = (flags & (1 << 0)) ? true : false;
758
+ let proxy = flags & (1 << 0) ? true : false;
733
759
  let expires = await Primitive.Int.read(_data);
734
- let peer = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
735
- let psaType = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
736
- let psaMessage = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
760
+ let peer = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
761
+ let psaType = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
762
+ let psaMessage = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
737
763
  let pendingSuggestions = await TLObject.read(_data, Primitive.String);
738
764
  let dismissedSuggestions = await TLObject.read(_data, Primitive.String);
739
- let customPendingSuggestion = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
765
+ let customPendingSuggestion = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
740
766
  let chats = await TLObject.read(_data);
741
767
  let users = await TLObject.read(_data);
742
- return new PromoData({ "proxy": proxy, "expires": expires, "peer": peer, "psaType": psaType, "psaMessage": psaMessage, "pendingSuggestions": pendingSuggestions, "dismissedSuggestions": dismissedSuggestions, "customPendingSuggestion": customPendingSuggestion, "chats": chats, "users": users });
743
- }
744
- /**
745
- * Generate buffer from TLObject.
746
- */
768
+ return new PromoData({
769
+ proxy: proxy,
770
+ expires: expires,
771
+ peer: peer,
772
+ psaType: psaType,
773
+ psaMessage: psaMessage,
774
+ pendingSuggestions: pendingSuggestions,
775
+ dismissedSuggestions: dismissedSuggestions,
776
+ customPendingSuggestion: customPendingSuggestion,
777
+ chats: chats,
778
+ users: users,
779
+ });
780
+ }
781
+ /**
782
+ * Generate buffer from TLObject.
783
+ */
747
784
  write() {
748
785
  const b = new BytesIO();
749
786
  b.write(Primitive.Int.write(this.constructorId, false));
750
787
  // @ts-ignore
751
788
  let flags = 0;
752
- flags |= this.proxy ? (1 << 0) : 0;
753
- flags |= this.peer !== undefined ? (1 << 3) : 0;
754
- flags |= this.psaType !== undefined ? (1 << 1) : 0;
755
- flags |= this.psaMessage !== undefined ? (1 << 2) : 0;
756
- flags |= this.customPendingSuggestion !== undefined ? (1 << 4) : 0;
757
- b.write((Primitive.Int.write(flags)));
789
+ flags |= this.proxy ? 1 << 0 : 0;
790
+ flags |= this.peer !== undefined ? 1 << 3 : 0;
791
+ flags |= this.psaType !== undefined ? 1 << 1 : 0;
792
+ flags |= this.psaMessage !== undefined ? 1 << 2 : 0;
793
+ flags |= this.customPendingSuggestion !== undefined ? 1 << 4 : 0;
794
+ b.write(Primitive.Int.write(flags));
758
795
  if (this.expires !== undefined) {
759
- b.write((Primitive.Int.write(this.expires)));
796
+ b.write(Primitive.Int.write(this.expires));
760
797
  }
761
798
  if (this.peer !== undefined) {
762
799
  b.write(this.peer.write());
763
800
  }
764
801
  if (this.psaType !== undefined) {
765
- b.write((Primitive.String.write(this.psaType)));
802
+ b.write(Primitive.String.write(this.psaType));
766
803
  }
767
804
  if (this.psaMessage !== undefined) {
768
- b.write((Primitive.String.write(this.psaMessage)));
805
+ b.write(Primitive.String.write(this.psaMessage));
769
806
  }
770
807
  if (this.pendingSuggestions) {
771
- b.write((Primitive.Vector.write(this.pendingSuggestions, Primitive.String)));
808
+ b.write(Primitive.Vector.write(this.pendingSuggestions, Primitive.String));
772
809
  }
773
810
  if (this.dismissedSuggestions) {
774
- b.write((Primitive.Vector.write(this.dismissedSuggestions, Primitive.String)));
811
+ b.write(Primitive.Vector.write(this.dismissedSuggestions, Primitive.String));
775
812
  }
776
813
  if (this.customPendingSuggestion !== undefined) {
777
814
  b.write(this.customPendingSuggestion.write());
778
815
  }
779
816
  if (this.chats) {
780
- b.write((Primitive.Vector.write(this.chats)));
817
+ b.write(Primitive.Vector.write(this.chats));
781
818
  }
782
819
  if (this.users) {
783
- b.write((Primitive.Vector.write(this.users)));
820
+ b.write(Primitive.Vector.write(this.users));
784
821
  }
785
822
  return b.buffer;
786
823
  }
@@ -791,46 +828,46 @@ export class CountryCode extends TLObject {
791
828
  patterns;
792
829
  constructor(params) {
793
830
  super();
794
- this.classType = "types";
795
- this.className = "help.CountryCode";
831
+ this.classType = 'types';
832
+ this.className = 'help.CountryCode';
796
833
  this.constructorId = 0x4203c5ef;
797
834
  this.subclassOfId = 0x76f34665;
798
- this._slots = ["countryCode", "prefixes", "patterns"];
835
+ this._slots = ['countryCode', 'prefixes', 'patterns'];
799
836
  this.countryCode = params.countryCode;
800
837
  this.prefixes = params.prefixes;
801
838
  this.patterns = params.patterns;
802
839
  }
803
840
  /**
804
- * Generate the TLObject from buffer.
805
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
806
- */
841
+ * Generate the TLObject from buffer.
842
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
843
+ */
807
844
  static async read(_data, ..._args) {
808
845
  // @ts-ignore
809
846
  let flags = await Primitive.Int.read(_data);
810
847
  let countryCode = await Primitive.String.read(_data);
811
- let prefixes = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.String) : [];
812
- let patterns = (flags & (1 << 1)) ? await TLObject.read(_data, Primitive.String) : [];
813
- return new CountryCode({ "countryCode": countryCode, "prefixes": prefixes, "patterns": patterns });
848
+ let prefixes = flags & (1 << 0) ? await TLObject.read(_data, Primitive.String) : [];
849
+ let patterns = flags & (1 << 1) ? await TLObject.read(_data, Primitive.String) : [];
850
+ return new CountryCode({ countryCode: countryCode, prefixes: prefixes, patterns: patterns });
814
851
  }
815
852
  /**
816
- * Generate buffer from TLObject.
817
- */
853
+ * Generate buffer from TLObject.
854
+ */
818
855
  write() {
819
856
  const b = new BytesIO();
820
857
  b.write(Primitive.Int.write(this.constructorId, false));
821
858
  // @ts-ignore
822
859
  let flags = 0;
823
- flags |= this.prefixes ? (1 << 0) : 0;
824
- flags |= this.patterns ? (1 << 1) : 0;
825
- b.write((Primitive.Int.write(flags)));
860
+ flags |= this.prefixes ? 1 << 0 : 0;
861
+ flags |= this.patterns ? 1 << 1 : 0;
862
+ b.write(Primitive.Int.write(flags));
826
863
  if (this.countryCode !== undefined) {
827
- b.write((Primitive.String.write(this.countryCode)));
864
+ b.write(Primitive.String.write(this.countryCode));
828
865
  }
829
866
  if (this.prefixes) {
830
- b.write((Primitive.Vector.write(this.prefixes, Primitive.String)));
867
+ b.write(Primitive.Vector.write(this.prefixes, Primitive.String));
831
868
  }
832
869
  if (this.patterns) {
833
- b.write((Primitive.Vector.write(this.patterns, Primitive.String)));
870
+ b.write(Primitive.Vector.write(this.patterns, Primitive.String));
834
871
  }
835
872
  return b.buffer;
836
873
  }
@@ -843,11 +880,11 @@ export class Country extends TLObject {
843
880
  countryCodes;
844
881
  constructor(params) {
845
882
  super();
846
- this.classType = "types";
847
- this.className = "help.Country";
883
+ this.classType = 'types';
884
+ this.className = 'help.Country';
848
885
  this.constructorId = 0xc3878e23;
849
886
  this.subclassOfId = 0xa22e9e28;
850
- this._slots = ["hidden", "iso2", "defaultName", "name", "countryCodes"];
887
+ this._slots = ['hidden', 'iso2', 'defaultName', 'name', 'countryCodes'];
851
888
  this.hidden = params.hidden;
852
889
  this.iso2 = params.iso2;
853
890
  this.defaultName = params.defaultName;
@@ -855,41 +892,47 @@ export class Country extends TLObject {
855
892
  this.countryCodes = params.countryCodes;
856
893
  }
857
894
  /**
858
- * Generate the TLObject from buffer.
859
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
860
- */
895
+ * Generate the TLObject from buffer.
896
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
897
+ */
861
898
  static async read(_data, ..._args) {
862
899
  // @ts-ignore
863
900
  let flags = await Primitive.Int.read(_data);
864
- let hidden = (flags & (1 << 0)) ? true : false;
901
+ let hidden = flags & (1 << 0) ? true : false;
865
902
  let iso2 = await Primitive.String.read(_data);
866
903
  let defaultName = await Primitive.String.read(_data);
867
- let name = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
904
+ let name = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
868
905
  let countryCodes = await TLObject.read(_data);
869
- return new Country({ "hidden": hidden, "iso2": iso2, "defaultName": defaultName, "name": name, "countryCodes": countryCodes });
906
+ return new Country({
907
+ hidden: hidden,
908
+ iso2: iso2,
909
+ defaultName: defaultName,
910
+ name: name,
911
+ countryCodes: countryCodes,
912
+ });
870
913
  }
871
914
  /**
872
- * Generate buffer from TLObject.
873
- */
915
+ * Generate buffer from TLObject.
916
+ */
874
917
  write() {
875
918
  const b = new BytesIO();
876
919
  b.write(Primitive.Int.write(this.constructorId, false));
877
920
  // @ts-ignore
878
921
  let flags = 0;
879
- flags |= this.hidden ? (1 << 0) : 0;
880
- flags |= this.name !== undefined ? (1 << 1) : 0;
881
- b.write((Primitive.Int.write(flags)));
922
+ flags |= this.hidden ? 1 << 0 : 0;
923
+ flags |= this.name !== undefined ? 1 << 1 : 0;
924
+ b.write(Primitive.Int.write(flags));
882
925
  if (this.iso2 !== undefined) {
883
- b.write((Primitive.String.write(this.iso2)));
926
+ b.write(Primitive.String.write(this.iso2));
884
927
  }
885
928
  if (this.defaultName !== undefined) {
886
- b.write((Primitive.String.write(this.defaultName)));
929
+ b.write(Primitive.String.write(this.defaultName));
887
930
  }
888
931
  if (this.name !== undefined) {
889
- b.write((Primitive.String.write(this.name)));
932
+ b.write(Primitive.String.write(this.name));
890
933
  }
891
934
  if (this.countryCodes) {
892
- b.write((Primitive.Vector.write(this.countryCodes)));
935
+ b.write(Primitive.Vector.write(this.countryCodes));
893
936
  }
894
937
  return b.buffer;
895
938
  }
@@ -897,23 +940,23 @@ export class Country extends TLObject {
897
940
  export class CountriesListNotModified extends TLObject {
898
941
  constructor() {
899
942
  super();
900
- this.classType = "types";
901
- this.className = "help.CountriesListNotModified";
943
+ this.classType = 'types';
944
+ this.className = 'help.CountriesListNotModified';
902
945
  this.constructorId = 0x93cc1f32;
903
946
  this.subclassOfId = 0xea31fe88;
904
947
  this._slots = [];
905
948
  }
906
949
  /**
907
- * Generate the TLObject from buffer.
908
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
909
- */
950
+ * Generate the TLObject from buffer.
951
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
952
+ */
910
953
  static async read(_data, ..._args) {
911
954
  // no flags
912
955
  return new CountriesListNotModified();
913
956
  }
914
957
  /**
915
- * Generate buffer from TLObject.
916
- */
958
+ * Generate buffer from TLObject.
959
+ */
917
960
  write() {
918
961
  const b = new BytesIO();
919
962
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -926,36 +969,36 @@ export class CountriesList extends TLObject {
926
969
  hash;
927
970
  constructor(params) {
928
971
  super();
929
- this.classType = "types";
930
- this.className = "help.CountriesList";
972
+ this.classType = 'types';
973
+ this.className = 'help.CountriesList';
931
974
  this.constructorId = 0x87d0759e;
932
975
  this.subclassOfId = 0xea31fe88;
933
- this._slots = ["countries", "hash"];
976
+ this._slots = ['countries', 'hash'];
934
977
  this.countries = params.countries;
935
978
  this.hash = params.hash;
936
979
  }
937
980
  /**
938
- * Generate the TLObject from buffer.
939
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
940
- */
981
+ * Generate the TLObject from buffer.
982
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
983
+ */
941
984
  static async read(_data, ..._args) {
942
985
  // no flags
943
986
  let countries = await TLObject.read(_data);
944
987
  let hash = await Primitive.Int.read(_data);
945
- return new CountriesList({ "countries": countries, "hash": hash });
988
+ return new CountriesList({ countries: countries, hash: hash });
946
989
  }
947
990
  /**
948
- * Generate buffer from TLObject.
949
- */
991
+ * Generate buffer from TLObject.
992
+ */
950
993
  write() {
951
994
  const b = new BytesIO();
952
995
  b.write(Primitive.Int.write(this.constructorId, false));
953
996
  // no flags
954
997
  if (this.countries) {
955
- b.write((Primitive.Vector.write(this.countries)));
998
+ b.write(Primitive.Vector.write(this.countries));
956
999
  }
957
1000
  if (this.hash !== undefined) {
958
- b.write((Primitive.Int.write(this.hash)));
1001
+ b.write(Primitive.Int.write(this.hash));
959
1002
  }
960
1003
  return b.buffer;
961
1004
  }
@@ -969,11 +1012,18 @@ export class PremiumPromo extends TLObject {
969
1012
  users;
970
1013
  constructor(params) {
971
1014
  super();
972
- this.classType = "types";
973
- this.className = "help.PremiumPromo";
1015
+ this.classType = 'types';
1016
+ this.className = 'help.PremiumPromo';
974
1017
  this.constructorId = 0x5334759c;
975
1018
  this.subclassOfId = 0xc987a338;
976
- this._slots = ["statusText", "statusEntities", "videoSections", "videos", "periodOptions", "users"];
1019
+ this._slots = [
1020
+ 'statusText',
1021
+ 'statusEntities',
1022
+ 'videoSections',
1023
+ 'videos',
1024
+ 'periodOptions',
1025
+ 'users',
1026
+ ];
977
1027
  this.statusText = params.statusText;
978
1028
  this.statusEntities = params.statusEntities;
979
1029
  this.videoSections = params.videoSections;
@@ -982,9 +1032,9 @@ export class PremiumPromo extends TLObject {
982
1032
  this.users = params.users;
983
1033
  }
984
1034
  /**
985
- * Generate the TLObject from buffer.
986
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
987
- */
1035
+ * Generate the TLObject from buffer.
1036
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1037
+ */
988
1038
  static async read(_data, ..._args) {
989
1039
  // no flags
990
1040
  let statusText = await Primitive.String.read(_data);
@@ -993,32 +1043,39 @@ export class PremiumPromo extends TLObject {
993
1043
  let videos = await TLObject.read(_data);
994
1044
  let periodOptions = await TLObject.read(_data);
995
1045
  let users = await TLObject.read(_data);
996
- return new PremiumPromo({ "statusText": statusText, "statusEntities": statusEntities, "videoSections": videoSections, "videos": videos, "periodOptions": periodOptions, "users": users });
997
- }
998
- /**
999
- * Generate buffer from TLObject.
1000
- */
1046
+ return new PremiumPromo({
1047
+ statusText: statusText,
1048
+ statusEntities: statusEntities,
1049
+ videoSections: videoSections,
1050
+ videos: videos,
1051
+ periodOptions: periodOptions,
1052
+ users: users,
1053
+ });
1054
+ }
1055
+ /**
1056
+ * Generate buffer from TLObject.
1057
+ */
1001
1058
  write() {
1002
1059
  const b = new BytesIO();
1003
1060
  b.write(Primitive.Int.write(this.constructorId, false));
1004
1061
  // no flags
1005
1062
  if (this.statusText !== undefined) {
1006
- b.write((Primitive.String.write(this.statusText)));
1063
+ b.write(Primitive.String.write(this.statusText));
1007
1064
  }
1008
1065
  if (this.statusEntities) {
1009
- b.write((Primitive.Vector.write(this.statusEntities)));
1066
+ b.write(Primitive.Vector.write(this.statusEntities));
1010
1067
  }
1011
1068
  if (this.videoSections) {
1012
- b.write((Primitive.Vector.write(this.videoSections, Primitive.String)));
1069
+ b.write(Primitive.Vector.write(this.videoSections, Primitive.String));
1013
1070
  }
1014
1071
  if (this.videos) {
1015
- b.write((Primitive.Vector.write(this.videos)));
1072
+ b.write(Primitive.Vector.write(this.videos));
1016
1073
  }
1017
1074
  if (this.periodOptions) {
1018
- b.write((Primitive.Vector.write(this.periodOptions)));
1075
+ b.write(Primitive.Vector.write(this.periodOptions));
1019
1076
  }
1020
1077
  if (this.users) {
1021
- b.write((Primitive.Vector.write(this.users)));
1078
+ b.write(Primitive.Vector.write(this.users));
1022
1079
  }
1023
1080
  return b.buffer;
1024
1081
  }
@@ -1026,23 +1083,23 @@ export class PremiumPromo extends TLObject {
1026
1083
  export class AppConfigNotModified extends TLObject {
1027
1084
  constructor() {
1028
1085
  super();
1029
- this.classType = "types";
1030
- this.className = "help.AppConfigNotModified";
1086
+ this.classType = 'types';
1087
+ this.className = 'help.AppConfigNotModified';
1031
1088
  this.constructorId = 0x7cde641d;
1032
1089
  this.subclassOfId = 0x14381c9a;
1033
1090
  this._slots = [];
1034
1091
  }
1035
1092
  /**
1036
- * Generate the TLObject from buffer.
1037
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1038
- */
1093
+ * Generate the TLObject from buffer.
1094
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1095
+ */
1039
1096
  static async read(_data, ..._args) {
1040
1097
  // no flags
1041
1098
  return new AppConfigNotModified();
1042
1099
  }
1043
1100
  /**
1044
- * Generate buffer from TLObject.
1045
- */
1101
+ * Generate buffer from TLObject.
1102
+ */
1046
1103
  write() {
1047
1104
  const b = new BytesIO();
1048
1105
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1055,33 +1112,33 @@ export class AppConfig extends TLObject {
1055
1112
  config;
1056
1113
  constructor(params) {
1057
1114
  super();
1058
- this.classType = "types";
1059
- this.className = "help.AppConfig";
1115
+ this.classType = 'types';
1116
+ this.className = 'help.AppConfig';
1060
1117
  this.constructorId = 0xdd18782e;
1061
1118
  this.subclassOfId = 0x14381c9a;
1062
- this._slots = ["hash", "config"];
1119
+ this._slots = ['hash', 'config'];
1063
1120
  this.hash = params.hash;
1064
1121
  this.config = params.config;
1065
1122
  }
1066
1123
  /**
1067
- * Generate the TLObject from buffer.
1068
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1069
- */
1124
+ * Generate the TLObject from buffer.
1125
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1126
+ */
1070
1127
  static async read(_data, ..._args) {
1071
1128
  // no flags
1072
1129
  let hash = await Primitive.Int.read(_data);
1073
1130
  let config = await TLObject.read(_data);
1074
- return new AppConfig({ "hash": hash, "config": config });
1131
+ return new AppConfig({ hash: hash, config: config });
1075
1132
  }
1076
1133
  /**
1077
- * Generate buffer from TLObject.
1078
- */
1134
+ * Generate buffer from TLObject.
1135
+ */
1079
1136
  write() {
1080
1137
  const b = new BytesIO();
1081
1138
  b.write(Primitive.Int.write(this.constructorId, false));
1082
1139
  // no flags
1083
1140
  if (this.hash !== undefined) {
1084
- b.write((Primitive.Int.write(this.hash)));
1141
+ b.write(Primitive.Int.write(this.hash));
1085
1142
  }
1086
1143
  if (this.config !== undefined) {
1087
1144
  b.write(this.config.write());
@@ -1093,31 +1150,31 @@ export class PeerColorSet extends TLObject {
1093
1150
  colors;
1094
1151
  constructor(params) {
1095
1152
  super();
1096
- this.classType = "types";
1097
- this.className = "help.PeerColorSet";
1153
+ this.classType = 'types';
1154
+ this.className = 'help.PeerColorSet';
1098
1155
  this.constructorId = 0x26219a58;
1099
1156
  this.subclassOfId = 0x11cbe12c;
1100
- this._slots = ["colors"];
1157
+ this._slots = ['colors'];
1101
1158
  this.colors = params.colors;
1102
1159
  }
1103
1160
  /**
1104
- * Generate the TLObject from buffer.
1105
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1106
- */
1161
+ * Generate the TLObject from buffer.
1162
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1163
+ */
1107
1164
  static async read(_data, ..._args) {
1108
1165
  // no flags
1109
1166
  let colors = await TLObject.read(_data, Primitive.Int);
1110
- return new PeerColorSet({ "colors": colors });
1167
+ return new PeerColorSet({ colors: colors });
1111
1168
  }
1112
1169
  /**
1113
- * Generate buffer from TLObject.
1114
- */
1170
+ * Generate buffer from TLObject.
1171
+ */
1115
1172
  write() {
1116
1173
  const b = new BytesIO();
1117
1174
  b.write(Primitive.Int.write(this.constructorId, false));
1118
1175
  // no flags
1119
1176
  if (this.colors) {
1120
- b.write((Primitive.Vector.write(this.colors, Primitive.Int)));
1177
+ b.write(Primitive.Vector.write(this.colors, Primitive.Int));
1121
1178
  }
1122
1179
  return b.buffer;
1123
1180
  }
@@ -1128,41 +1185,45 @@ export class PeerColorProfileSet extends TLObject {
1128
1185
  storyColors;
1129
1186
  constructor(params) {
1130
1187
  super();
1131
- this.classType = "types";
1132
- this.className = "help.PeerColorProfileSet";
1188
+ this.classType = 'types';
1189
+ this.className = 'help.PeerColorProfileSet';
1133
1190
  this.constructorId = 0x767d61eb;
1134
1191
  this.subclassOfId = 0x11cbe12c;
1135
- this._slots = ["paletteColors", "bgColors", "storyColors"];
1192
+ this._slots = ['paletteColors', 'bgColors', 'storyColors'];
1136
1193
  this.paletteColors = params.paletteColors;
1137
1194
  this.bgColors = params.bgColors;
1138
1195
  this.storyColors = params.storyColors;
1139
1196
  }
1140
1197
  /**
1141
- * Generate the TLObject from buffer.
1142
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1143
- */
1198
+ * Generate the TLObject from buffer.
1199
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1200
+ */
1144
1201
  static async read(_data, ..._args) {
1145
1202
  // no flags
1146
1203
  let paletteColors = await TLObject.read(_data, Primitive.Int);
1147
1204
  let bgColors = await TLObject.read(_data, Primitive.Int);
1148
1205
  let storyColors = await TLObject.read(_data, Primitive.Int);
1149
- return new PeerColorProfileSet({ "paletteColors": paletteColors, "bgColors": bgColors, "storyColors": storyColors });
1206
+ return new PeerColorProfileSet({
1207
+ paletteColors: paletteColors,
1208
+ bgColors: bgColors,
1209
+ storyColors: storyColors,
1210
+ });
1150
1211
  }
1151
1212
  /**
1152
- * Generate buffer from TLObject.
1153
- */
1213
+ * Generate buffer from TLObject.
1214
+ */
1154
1215
  write() {
1155
1216
  const b = new BytesIO();
1156
1217
  b.write(Primitive.Int.write(this.constructorId, false));
1157
1218
  // no flags
1158
1219
  if (this.paletteColors) {
1159
- b.write((Primitive.Vector.write(this.paletteColors, Primitive.Int)));
1220
+ b.write(Primitive.Vector.write(this.paletteColors, Primitive.Int));
1160
1221
  }
1161
1222
  if (this.bgColors) {
1162
- b.write((Primitive.Vector.write(this.bgColors, Primitive.Int)));
1223
+ b.write(Primitive.Vector.write(this.bgColors, Primitive.Int));
1163
1224
  }
1164
1225
  if (this.storyColors) {
1165
- b.write((Primitive.Vector.write(this.storyColors, Primitive.Int)));
1226
+ b.write(Primitive.Vector.write(this.storyColors, Primitive.Int));
1166
1227
  }
1167
1228
  return b.buffer;
1168
1229
  }
@@ -1176,11 +1237,11 @@ export class PeerColorOption extends TLObject {
1176
1237
  groupMinLevel;
1177
1238
  constructor(params) {
1178
1239
  super();
1179
- this.classType = "types";
1180
- this.className = "help.PeerColorOption";
1240
+ this.classType = 'types';
1241
+ this.className = 'help.PeerColorOption';
1181
1242
  this.constructorId = 0xadec6ebe;
1182
1243
  this.subclassOfId = 0x56b8ae98;
1183
- this._slots = ["hidden", "colorId", "colors", "darkColors", "channelMinLevel", "groupMinLevel"];
1244
+ this._slots = ['hidden', 'colorId', 'colors', 'darkColors', 'channelMinLevel', 'groupMinLevel'];
1184
1245
  this.hidden = params.hidden;
1185
1246
  this.colorId = params.colorId;
1186
1247
  this.colors = params.colors;
@@ -1189,36 +1250,43 @@ export class PeerColorOption extends TLObject {
1189
1250
  this.groupMinLevel = params.groupMinLevel;
1190
1251
  }
1191
1252
  /**
1192
- * Generate the TLObject from buffer.
1193
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1194
- */
1253
+ * Generate the TLObject from buffer.
1254
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1255
+ */
1195
1256
  static async read(_data, ..._args) {
1196
1257
  // @ts-ignore
1197
1258
  let flags = await Primitive.Int.read(_data);
1198
- let hidden = (flags & (1 << 0)) ? true : false;
1259
+ let hidden = flags & (1 << 0) ? true : false;
1199
1260
  let colorId = await Primitive.Int.read(_data);
1200
- let colors = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
1201
- let darkColors = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
1202
- let channelMinLevel = (flags & (1 << 3)) ? await Primitive.Int.read(_data) : undefined;
1203
- let groupMinLevel = (flags & (1 << 4)) ? await Primitive.Int.read(_data) : undefined;
1204
- return new PeerColorOption({ "hidden": hidden, "colorId": colorId, "colors": colors, "darkColors": darkColors, "channelMinLevel": channelMinLevel, "groupMinLevel": groupMinLevel });
1205
- }
1206
- /**
1207
- * Generate buffer from TLObject.
1208
- */
1261
+ let colors = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
1262
+ let darkColors = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
1263
+ let channelMinLevel = flags & (1 << 3) ? await Primitive.Int.read(_data) : undefined;
1264
+ let groupMinLevel = flags & (1 << 4) ? await Primitive.Int.read(_data) : undefined;
1265
+ return new PeerColorOption({
1266
+ hidden: hidden,
1267
+ colorId: colorId,
1268
+ colors: colors,
1269
+ darkColors: darkColors,
1270
+ channelMinLevel: channelMinLevel,
1271
+ groupMinLevel: groupMinLevel,
1272
+ });
1273
+ }
1274
+ /**
1275
+ * Generate buffer from TLObject.
1276
+ */
1209
1277
  write() {
1210
1278
  const b = new BytesIO();
1211
1279
  b.write(Primitive.Int.write(this.constructorId, false));
1212
1280
  // @ts-ignore
1213
1281
  let flags = 0;
1214
- flags |= this.hidden ? (1 << 0) : 0;
1215
- flags |= this.colors !== undefined ? (1 << 1) : 0;
1216
- flags |= this.darkColors !== undefined ? (1 << 2) : 0;
1217
- flags |= this.channelMinLevel !== undefined ? (1 << 3) : 0;
1218
- flags |= this.groupMinLevel !== undefined ? (1 << 4) : 0;
1219
- b.write((Primitive.Int.write(flags)));
1282
+ flags |= this.hidden ? 1 << 0 : 0;
1283
+ flags |= this.colors !== undefined ? 1 << 1 : 0;
1284
+ flags |= this.darkColors !== undefined ? 1 << 2 : 0;
1285
+ flags |= this.channelMinLevel !== undefined ? 1 << 3 : 0;
1286
+ flags |= this.groupMinLevel !== undefined ? 1 << 4 : 0;
1287
+ b.write(Primitive.Int.write(flags));
1220
1288
  if (this.colorId !== undefined) {
1221
- b.write((Primitive.Int.write(this.colorId)));
1289
+ b.write(Primitive.Int.write(this.colorId));
1222
1290
  }
1223
1291
  if (this.colors !== undefined) {
1224
1292
  b.write(this.colors.write());
@@ -1227,10 +1295,10 @@ export class PeerColorOption extends TLObject {
1227
1295
  b.write(this.darkColors.write());
1228
1296
  }
1229
1297
  if (this.channelMinLevel !== undefined) {
1230
- b.write((Primitive.Int.write(this.channelMinLevel)));
1298
+ b.write(Primitive.Int.write(this.channelMinLevel));
1231
1299
  }
1232
1300
  if (this.groupMinLevel !== undefined) {
1233
- b.write((Primitive.Int.write(this.groupMinLevel)));
1301
+ b.write(Primitive.Int.write(this.groupMinLevel));
1234
1302
  }
1235
1303
  return b.buffer;
1236
1304
  }
@@ -1238,23 +1306,23 @@ export class PeerColorOption extends TLObject {
1238
1306
  export class PeerColorsNotModified extends TLObject {
1239
1307
  constructor() {
1240
1308
  super();
1241
- this.classType = "types";
1242
- this.className = "help.PeerColorsNotModified";
1309
+ this.classType = 'types';
1310
+ this.className = 'help.PeerColorsNotModified';
1243
1311
  this.constructorId = 0x2ba1f5ce;
1244
1312
  this.subclassOfId = 0xe3f6733;
1245
1313
  this._slots = [];
1246
1314
  }
1247
1315
  /**
1248
- * Generate the TLObject from buffer.
1249
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1250
- */
1316
+ * Generate the TLObject from buffer.
1317
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1318
+ */
1251
1319
  static async read(_data, ..._args) {
1252
1320
  // no flags
1253
1321
  return new PeerColorsNotModified();
1254
1322
  }
1255
1323
  /**
1256
- * Generate buffer from TLObject.
1257
- */
1324
+ * Generate buffer from TLObject.
1325
+ */
1258
1326
  write() {
1259
1327
  const b = new BytesIO();
1260
1328
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1267,36 +1335,36 @@ export class PeerColors extends TLObject {
1267
1335
  colors;
1268
1336
  constructor(params) {
1269
1337
  super();
1270
- this.classType = "types";
1271
- this.className = "help.PeerColors";
1338
+ this.classType = 'types';
1339
+ this.className = 'help.PeerColors';
1272
1340
  this.constructorId = 0xf8ed08;
1273
1341
  this.subclassOfId = 0xe3f6733;
1274
- this._slots = ["hash", "colors"];
1342
+ this._slots = ['hash', 'colors'];
1275
1343
  this.hash = params.hash;
1276
1344
  this.colors = params.colors;
1277
1345
  }
1278
1346
  /**
1279
- * Generate the TLObject from buffer.
1280
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1281
- */
1347
+ * Generate the TLObject from buffer.
1348
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1349
+ */
1282
1350
  static async read(_data, ..._args) {
1283
1351
  // no flags
1284
1352
  let hash = await Primitive.Int.read(_data);
1285
1353
  let colors = await TLObject.read(_data);
1286
- return new PeerColors({ "hash": hash, "colors": colors });
1354
+ return new PeerColors({ hash: hash, colors: colors });
1287
1355
  }
1288
1356
  /**
1289
- * Generate buffer from TLObject.
1290
- */
1357
+ * Generate buffer from TLObject.
1358
+ */
1291
1359
  write() {
1292
1360
  const b = new BytesIO();
1293
1361
  b.write(Primitive.Int.write(this.constructorId, false));
1294
1362
  // no flags
1295
1363
  if (this.hash !== undefined) {
1296
- b.write((Primitive.Int.write(this.hash)));
1364
+ b.write(Primitive.Int.write(this.hash));
1297
1365
  }
1298
1366
  if (this.colors) {
1299
- b.write((Primitive.Vector.write(this.colors)));
1367
+ b.write(Primitive.Vector.write(this.colors));
1300
1368
  }
1301
1369
  return b.buffer;
1302
1370
  }
@@ -1304,23 +1372,23 @@ export class PeerColors extends TLObject {
1304
1372
  export class TimezonesListNotModified extends TLObject {
1305
1373
  constructor() {
1306
1374
  super();
1307
- this.classType = "types";
1308
- this.className = "help.TimezonesListNotModified";
1375
+ this.classType = 'types';
1376
+ this.className = 'help.TimezonesListNotModified';
1309
1377
  this.constructorId = 0x970708cc;
1310
1378
  this.subclassOfId = 0xca76e475;
1311
1379
  this._slots = [];
1312
1380
  }
1313
1381
  /**
1314
- * Generate the TLObject from buffer.
1315
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1316
- */
1382
+ * Generate the TLObject from buffer.
1383
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1384
+ */
1317
1385
  static async read(_data, ..._args) {
1318
1386
  // no flags
1319
1387
  return new TimezonesListNotModified();
1320
1388
  }
1321
1389
  /**
1322
- * Generate buffer from TLObject.
1323
- */
1390
+ * Generate buffer from TLObject.
1391
+ */
1324
1392
  write() {
1325
1393
  const b = new BytesIO();
1326
1394
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1333,36 +1401,36 @@ export class TimezonesList extends TLObject {
1333
1401
  hash;
1334
1402
  constructor(params) {
1335
1403
  super();
1336
- this.classType = "types";
1337
- this.className = "help.TimezonesList";
1404
+ this.classType = 'types';
1405
+ this.className = 'help.TimezonesList';
1338
1406
  this.constructorId = 0x7b74ed71;
1339
1407
  this.subclassOfId = 0xca76e475;
1340
- this._slots = ["timezones", "hash"];
1408
+ this._slots = ['timezones', 'hash'];
1341
1409
  this.timezones = params.timezones;
1342
1410
  this.hash = params.hash;
1343
1411
  }
1344
1412
  /**
1345
- * Generate the TLObject from buffer.
1346
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1347
- */
1413
+ * Generate the TLObject from buffer.
1414
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1415
+ */
1348
1416
  static async read(_data, ..._args) {
1349
1417
  // no flags
1350
1418
  let timezones = await TLObject.read(_data);
1351
1419
  let hash = await Primitive.Int.read(_data);
1352
- return new TimezonesList({ "timezones": timezones, "hash": hash });
1420
+ return new TimezonesList({ timezones: timezones, hash: hash });
1353
1421
  }
1354
1422
  /**
1355
- * Generate buffer from TLObject.
1356
- */
1423
+ * Generate buffer from TLObject.
1424
+ */
1357
1425
  write() {
1358
1426
  const b = new BytesIO();
1359
1427
  b.write(Primitive.Int.write(this.constructorId, false));
1360
1428
  // no flags
1361
1429
  if (this.timezones) {
1362
- b.write((Primitive.Vector.write(this.timezones)));
1430
+ b.write(Primitive.Vector.write(this.timezones));
1363
1431
  }
1364
1432
  if (this.hash !== undefined) {
1365
- b.write((Primitive.Int.write(this.hash)));
1433
+ b.write(Primitive.Int.write(this.hash));
1366
1434
  }
1367
1435
  return b.buffer;
1368
1436
  }
@@ -1371,23 +1439,23 @@ export class GetConfig extends TLObject {
1371
1439
  __response__;
1372
1440
  constructor() {
1373
1441
  super();
1374
- this.classType = "functions";
1375
- this.className = "help.GetConfig";
1442
+ this.classType = 'functions';
1443
+ this.className = 'help.GetConfig';
1376
1444
  this.constructorId = 0xc4f9186b;
1377
1445
  this.subclassOfId = 0xd3262a4a;
1378
1446
  this._slots = [];
1379
1447
  }
1380
1448
  /**
1381
- * Generate the TLObject from buffer.
1382
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1383
- */
1449
+ * Generate the TLObject from buffer.
1450
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1451
+ */
1384
1452
  static async read(_data, ..._args) {
1385
1453
  // no flags
1386
1454
  return new GetConfig();
1387
1455
  }
1388
1456
  /**
1389
- * Generate buffer from TLObject.
1390
- */
1457
+ * Generate buffer from TLObject.
1458
+ */
1391
1459
  write() {
1392
1460
  const b = new BytesIO();
1393
1461
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1399,23 +1467,23 @@ export class GetNearestDc extends TLObject {
1399
1467
  __response__;
1400
1468
  constructor() {
1401
1469
  super();
1402
- this.classType = "functions";
1403
- this.className = "help.GetNearestDc";
1470
+ this.classType = 'functions';
1471
+ this.className = 'help.GetNearestDc';
1404
1472
  this.constructorId = 0x1fb33026;
1405
1473
  this.subclassOfId = 0x3877045f;
1406
1474
  this._slots = [];
1407
1475
  }
1408
1476
  /**
1409
- * Generate the TLObject from buffer.
1410
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1411
- */
1477
+ * Generate the TLObject from buffer.
1478
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1479
+ */
1412
1480
  static async read(_data, ..._args) {
1413
1481
  // no flags
1414
1482
  return new GetNearestDc();
1415
1483
  }
1416
1484
  /**
1417
- * Generate buffer from TLObject.
1418
- */
1485
+ * Generate buffer from TLObject.
1486
+ */
1419
1487
  write() {
1420
1488
  const b = new BytesIO();
1421
1489
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1428,31 +1496,31 @@ export class GetAppUpdate extends TLObject {
1428
1496
  source;
1429
1497
  constructor(params) {
1430
1498
  super();
1431
- this.classType = "functions";
1432
- this.className = "help.GetAppUpdate";
1499
+ this.classType = 'functions';
1500
+ this.className = 'help.GetAppUpdate';
1433
1501
  this.constructorId = 0x522d5a7d;
1434
1502
  this.subclassOfId = 0x5897069e;
1435
- this._slots = ["source"];
1503
+ this._slots = ['source'];
1436
1504
  this.source = params.source;
1437
1505
  }
1438
1506
  /**
1439
- * Generate the TLObject from buffer.
1440
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1441
- */
1507
+ * Generate the TLObject from buffer.
1508
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1509
+ */
1442
1510
  static async read(_data, ..._args) {
1443
1511
  // no flags
1444
1512
  let source = await Primitive.String.read(_data);
1445
- return new GetAppUpdate({ "source": source });
1513
+ return new GetAppUpdate({ source: source });
1446
1514
  }
1447
1515
  /**
1448
- * Generate buffer from TLObject.
1449
- */
1516
+ * Generate buffer from TLObject.
1517
+ */
1450
1518
  write() {
1451
1519
  const b = new BytesIO();
1452
1520
  b.write(Primitive.Int.write(this.constructorId, false));
1453
1521
  // no flags
1454
1522
  if (this.source !== undefined) {
1455
- b.write((Primitive.String.write(this.source)));
1523
+ b.write(Primitive.String.write(this.source));
1456
1524
  }
1457
1525
  return b.buffer;
1458
1526
  }
@@ -1461,23 +1529,23 @@ export class GetInviteText extends TLObject {
1461
1529
  __response__;
1462
1530
  constructor() {
1463
1531
  super();
1464
- this.classType = "functions";
1465
- this.className = "help.GetInviteText";
1532
+ this.classType = 'functions';
1533
+ this.className = 'help.GetInviteText';
1466
1534
  this.constructorId = 0x4d392343;
1467
1535
  this.subclassOfId = 0xcf70aa35;
1468
1536
  this._slots = [];
1469
1537
  }
1470
1538
  /**
1471
- * Generate the TLObject from buffer.
1472
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1473
- */
1539
+ * Generate the TLObject from buffer.
1540
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1541
+ */
1474
1542
  static async read(_data, ..._args) {
1475
1543
  // no flags
1476
1544
  return new GetInviteText();
1477
1545
  }
1478
1546
  /**
1479
- * Generate buffer from TLObject.
1480
- */
1547
+ * Generate buffer from TLObject.
1548
+ */
1481
1549
  write() {
1482
1550
  const b = new BytesIO();
1483
1551
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1489,23 +1557,23 @@ export class GetSupport extends TLObject {
1489
1557
  __response__;
1490
1558
  constructor() {
1491
1559
  super();
1492
- this.classType = "functions";
1493
- this.className = "help.GetSupport";
1560
+ this.classType = 'functions';
1561
+ this.className = 'help.GetSupport';
1494
1562
  this.constructorId = 0x9cdf08cd;
1495
1563
  this.subclassOfId = 0x7159bceb;
1496
1564
  this._slots = [];
1497
1565
  }
1498
1566
  /**
1499
- * Generate the TLObject from buffer.
1500
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1501
- */
1567
+ * Generate the TLObject from buffer.
1568
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1569
+ */
1502
1570
  static async read(_data, ..._args) {
1503
1571
  // no flags
1504
1572
  return new GetSupport();
1505
1573
  }
1506
1574
  /**
1507
- * Generate buffer from TLObject.
1508
- */
1575
+ * Generate buffer from TLObject.
1576
+ */
1509
1577
  write() {
1510
1578
  const b = new BytesIO();
1511
1579
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1519,36 +1587,36 @@ export class SetBotUpdatesStatus extends TLObject {
1519
1587
  message;
1520
1588
  constructor(params) {
1521
1589
  super();
1522
- this.classType = "functions";
1523
- this.className = "help.SetBotUpdatesStatus";
1590
+ this.classType = 'functions';
1591
+ this.className = 'help.SetBotUpdatesStatus';
1524
1592
  this.constructorId = 0xec22cfcd;
1525
1593
  this.subclassOfId = 0xf5b399ac;
1526
- this._slots = ["pendingUpdatesCount", "message"];
1594
+ this._slots = ['pendingUpdatesCount', 'message'];
1527
1595
  this.pendingUpdatesCount = params.pendingUpdatesCount;
1528
1596
  this.message = params.message;
1529
1597
  }
1530
1598
  /**
1531
- * Generate the TLObject from buffer.
1532
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1533
- */
1599
+ * Generate the TLObject from buffer.
1600
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1601
+ */
1534
1602
  static async read(_data, ..._args) {
1535
1603
  // no flags
1536
1604
  let pendingUpdatesCount = await Primitive.Int.read(_data);
1537
1605
  let message = await Primitive.String.read(_data);
1538
- return new SetBotUpdatesStatus({ "pendingUpdatesCount": pendingUpdatesCount, "message": message });
1606
+ return new SetBotUpdatesStatus({ pendingUpdatesCount: pendingUpdatesCount, message: message });
1539
1607
  }
1540
1608
  /**
1541
- * Generate buffer from TLObject.
1542
- */
1609
+ * Generate buffer from TLObject.
1610
+ */
1543
1611
  write() {
1544
1612
  const b = new BytesIO();
1545
1613
  b.write(Primitive.Int.write(this.constructorId, false));
1546
1614
  // no flags
1547
1615
  if (this.pendingUpdatesCount !== undefined) {
1548
- b.write((Primitive.Int.write(this.pendingUpdatesCount)));
1616
+ b.write(Primitive.Int.write(this.pendingUpdatesCount));
1549
1617
  }
1550
1618
  if (this.message !== undefined) {
1551
- b.write((Primitive.String.write(this.message)));
1619
+ b.write(Primitive.String.write(this.message));
1552
1620
  }
1553
1621
  return b.buffer;
1554
1622
  }
@@ -1557,23 +1625,23 @@ export class GetCdnConfig extends TLObject {
1557
1625
  __response__;
1558
1626
  constructor() {
1559
1627
  super();
1560
- this.classType = "functions";
1561
- this.className = "help.GetCdnConfig";
1628
+ this.classType = 'functions';
1629
+ this.className = 'help.GetCdnConfig';
1562
1630
  this.constructorId = 0x52029342;
1563
1631
  this.subclassOfId = 0xecda397c;
1564
1632
  this._slots = [];
1565
1633
  }
1566
1634
  /**
1567
- * Generate the TLObject from buffer.
1568
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1569
- */
1635
+ * Generate the TLObject from buffer.
1636
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1637
+ */
1570
1638
  static async read(_data, ..._args) {
1571
1639
  // no flags
1572
1640
  return new GetCdnConfig();
1573
1641
  }
1574
1642
  /**
1575
- * Generate buffer from TLObject.
1576
- */
1643
+ * Generate buffer from TLObject.
1644
+ */
1577
1645
  write() {
1578
1646
  const b = new BytesIO();
1579
1647
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1586,31 +1654,31 @@ export class GetRecentMeUrls extends TLObject {
1586
1654
  referer;
1587
1655
  constructor(params) {
1588
1656
  super();
1589
- this.classType = "functions";
1590
- this.className = "help.GetRecentMeUrls";
1657
+ this.classType = 'functions';
1658
+ this.className = 'help.GetRecentMeUrls';
1591
1659
  this.constructorId = 0x3dc0f114;
1592
1660
  this.subclassOfId = 0xf269c477;
1593
- this._slots = ["referer"];
1661
+ this._slots = ['referer'];
1594
1662
  this.referer = params.referer;
1595
1663
  }
1596
1664
  /**
1597
- * Generate the TLObject from buffer.
1598
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1599
- */
1665
+ * Generate the TLObject from buffer.
1666
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1667
+ */
1600
1668
  static async read(_data, ..._args) {
1601
1669
  // no flags
1602
1670
  let referer = await Primitive.String.read(_data);
1603
- return new GetRecentMeUrls({ "referer": referer });
1671
+ return new GetRecentMeUrls({ referer: referer });
1604
1672
  }
1605
1673
  /**
1606
- * Generate buffer from TLObject.
1607
- */
1674
+ * Generate buffer from TLObject.
1675
+ */
1608
1676
  write() {
1609
1677
  const b = new BytesIO();
1610
1678
  b.write(Primitive.Int.write(this.constructorId, false));
1611
1679
  // no flags
1612
1680
  if (this.referer !== undefined) {
1613
- b.write((Primitive.String.write(this.referer)));
1681
+ b.write(Primitive.String.write(this.referer));
1614
1682
  }
1615
1683
  return b.buffer;
1616
1684
  }
@@ -1619,23 +1687,23 @@ export class GetTermsOfServiceUpdate extends TLObject {
1619
1687
  __response__;
1620
1688
  constructor() {
1621
1689
  super();
1622
- this.classType = "functions";
1623
- this.className = "help.GetTermsOfServiceUpdate";
1690
+ this.classType = 'functions';
1691
+ this.className = 'help.GetTermsOfServiceUpdate';
1624
1692
  this.constructorId = 0x2ca51fd1;
1625
1693
  this.subclassOfId = 0x293c2977;
1626
1694
  this._slots = [];
1627
1695
  }
1628
1696
  /**
1629
- * Generate the TLObject from buffer.
1630
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1631
- */
1697
+ * Generate the TLObject from buffer.
1698
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1699
+ */
1632
1700
  static async read(_data, ..._args) {
1633
1701
  // no flags
1634
1702
  return new GetTermsOfServiceUpdate();
1635
1703
  }
1636
1704
  /**
1637
- * Generate buffer from TLObject.
1638
- */
1705
+ * Generate buffer from TLObject.
1706
+ */
1639
1707
  write() {
1640
1708
  const b = new BytesIO();
1641
1709
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1648,25 +1716,25 @@ export class AcceptTermsOfService extends TLObject {
1648
1716
  id;
1649
1717
  constructor(params) {
1650
1718
  super();
1651
- this.classType = "functions";
1652
- this.className = "help.AcceptTermsOfService";
1719
+ this.classType = 'functions';
1720
+ this.className = 'help.AcceptTermsOfService';
1653
1721
  this.constructorId = 0xee72f79a;
1654
1722
  this.subclassOfId = 0xf5b399ac;
1655
- this._slots = ["id"];
1723
+ this._slots = ['id'];
1656
1724
  this.id = params.id;
1657
1725
  }
1658
1726
  /**
1659
- * Generate the TLObject from buffer.
1660
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1661
- */
1727
+ * Generate the TLObject from buffer.
1728
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1729
+ */
1662
1730
  static async read(_data, ..._args) {
1663
1731
  // no flags
1664
1732
  let id = await TLObject.read(_data);
1665
- return new AcceptTermsOfService({ "id": id });
1733
+ return new AcceptTermsOfService({ id: id });
1666
1734
  }
1667
1735
  /**
1668
- * Generate buffer from TLObject.
1669
- */
1736
+ * Generate buffer from TLObject.
1737
+ */
1670
1738
  write() {
1671
1739
  const b = new BytesIO();
1672
1740
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1682,31 +1750,31 @@ export class GetDeepLinkInfo extends TLObject {
1682
1750
  path;
1683
1751
  constructor(params) {
1684
1752
  super();
1685
- this.classType = "functions";
1686
- this.className = "help.GetDeepLinkInfo";
1753
+ this.classType = 'functions';
1754
+ this.className = 'help.GetDeepLinkInfo';
1687
1755
  this.constructorId = 0x3fedc75f;
1688
1756
  this.subclassOfId = 0x984aac38;
1689
- this._slots = ["path"];
1757
+ this._slots = ['path'];
1690
1758
  this.path = params.path;
1691
1759
  }
1692
1760
  /**
1693
- * Generate the TLObject from buffer.
1694
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1695
- */
1761
+ * Generate the TLObject from buffer.
1762
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1763
+ */
1696
1764
  static async read(_data, ..._args) {
1697
1765
  // no flags
1698
1766
  let path = await Primitive.String.read(_data);
1699
- return new GetDeepLinkInfo({ "path": path });
1767
+ return new GetDeepLinkInfo({ path: path });
1700
1768
  }
1701
1769
  /**
1702
- * Generate buffer from TLObject.
1703
- */
1770
+ * Generate buffer from TLObject.
1771
+ */
1704
1772
  write() {
1705
1773
  const b = new BytesIO();
1706
1774
  b.write(Primitive.Int.write(this.constructorId, false));
1707
1775
  // no flags
1708
1776
  if (this.path !== undefined) {
1709
- b.write((Primitive.String.write(this.path)));
1777
+ b.write(Primitive.String.write(this.path));
1710
1778
  }
1711
1779
  return b.buffer;
1712
1780
  }
@@ -1716,31 +1784,31 @@ export class GetAppConfig extends TLObject {
1716
1784
  hash;
1717
1785
  constructor(params) {
1718
1786
  super();
1719
- this.classType = "functions";
1720
- this.className = "help.GetAppConfig";
1787
+ this.classType = 'functions';
1788
+ this.className = 'help.GetAppConfig';
1721
1789
  this.constructorId = 0x61e3f854;
1722
1790
  this.subclassOfId = 0x14381c9a;
1723
- this._slots = ["hash"];
1791
+ this._slots = ['hash'];
1724
1792
  this.hash = params.hash;
1725
1793
  }
1726
1794
  /**
1727
- * Generate the TLObject from buffer.
1728
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1729
- */
1795
+ * Generate the TLObject from buffer.
1796
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1797
+ */
1730
1798
  static async read(_data, ..._args) {
1731
1799
  // no flags
1732
1800
  let hash = await Primitive.Int.read(_data);
1733
- return new GetAppConfig({ "hash": hash });
1801
+ return new GetAppConfig({ hash: hash });
1734
1802
  }
1735
1803
  /**
1736
- * Generate buffer from TLObject.
1737
- */
1804
+ * Generate buffer from TLObject.
1805
+ */
1738
1806
  write() {
1739
1807
  const b = new BytesIO();
1740
1808
  b.write(Primitive.Int.write(this.constructorId, false));
1741
1809
  // no flags
1742
1810
  if (this.hash !== undefined) {
1743
- b.write((Primitive.Int.write(this.hash)));
1811
+ b.write(Primitive.Int.write(this.hash));
1744
1812
  }
1745
1813
  return b.buffer;
1746
1814
  }
@@ -1750,31 +1818,31 @@ export class SaveAppLog extends TLObject {
1750
1818
  events;
1751
1819
  constructor(params) {
1752
1820
  super();
1753
- this.classType = "functions";
1754
- this.className = "help.SaveAppLog";
1821
+ this.classType = 'functions';
1822
+ this.className = 'help.SaveAppLog';
1755
1823
  this.constructorId = 0x6f02f748;
1756
1824
  this.subclassOfId = 0xf5b399ac;
1757
- this._slots = ["events"];
1825
+ this._slots = ['events'];
1758
1826
  this.events = params.events;
1759
1827
  }
1760
1828
  /**
1761
- * Generate the TLObject from buffer.
1762
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1763
- */
1829
+ * Generate the TLObject from buffer.
1830
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1831
+ */
1764
1832
  static async read(_data, ..._args) {
1765
1833
  // no flags
1766
1834
  let events = await TLObject.read(_data);
1767
- return new SaveAppLog({ "events": events });
1835
+ return new SaveAppLog({ events: events });
1768
1836
  }
1769
1837
  /**
1770
- * Generate buffer from TLObject.
1771
- */
1838
+ * Generate buffer from TLObject.
1839
+ */
1772
1840
  write() {
1773
1841
  const b = new BytesIO();
1774
1842
  b.write(Primitive.Int.write(this.constructorId, false));
1775
1843
  // no flags
1776
1844
  if (this.events) {
1777
- b.write((Primitive.Vector.write(this.events)));
1845
+ b.write(Primitive.Vector.write(this.events));
1778
1846
  }
1779
1847
  return b.buffer;
1780
1848
  }
@@ -1784,31 +1852,31 @@ export class GetPassportConfig extends TLObject {
1784
1852
  hash;
1785
1853
  constructor(params) {
1786
1854
  super();
1787
- this.classType = "functions";
1788
- this.className = "help.GetPassportConfig";
1855
+ this.classType = 'functions';
1856
+ this.className = 'help.GetPassportConfig';
1789
1857
  this.constructorId = 0xc661ad08;
1790
1858
  this.subclassOfId = 0xc666c0ad;
1791
- this._slots = ["hash"];
1859
+ this._slots = ['hash'];
1792
1860
  this.hash = params.hash;
1793
1861
  }
1794
1862
  /**
1795
- * Generate the TLObject from buffer.
1796
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1797
- */
1863
+ * Generate the TLObject from buffer.
1864
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1865
+ */
1798
1866
  static async read(_data, ..._args) {
1799
1867
  // no flags
1800
1868
  let hash = await Primitive.Int.read(_data);
1801
- return new GetPassportConfig({ "hash": hash });
1869
+ return new GetPassportConfig({ hash: hash });
1802
1870
  }
1803
1871
  /**
1804
- * Generate buffer from TLObject.
1805
- */
1872
+ * Generate buffer from TLObject.
1873
+ */
1806
1874
  write() {
1807
1875
  const b = new BytesIO();
1808
1876
  b.write(Primitive.Int.write(this.constructorId, false));
1809
1877
  // no flags
1810
1878
  if (this.hash !== undefined) {
1811
- b.write((Primitive.Int.write(this.hash)));
1879
+ b.write(Primitive.Int.write(this.hash));
1812
1880
  }
1813
1881
  return b.buffer;
1814
1882
  }
@@ -1817,23 +1885,23 @@ export class GetSupportName extends TLObject {
1817
1885
  __response__;
1818
1886
  constructor() {
1819
1887
  super();
1820
- this.classType = "functions";
1821
- this.className = "help.GetSupportName";
1888
+ this.classType = 'functions';
1889
+ this.className = 'help.GetSupportName';
1822
1890
  this.constructorId = 0xd360e72c;
1823
1891
  this.subclassOfId = 0x7f50b7c2;
1824
1892
  this._slots = [];
1825
1893
  }
1826
1894
  /**
1827
- * Generate the TLObject from buffer.
1828
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1829
- */
1895
+ * Generate the TLObject from buffer.
1896
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1897
+ */
1830
1898
  static async read(_data, ..._args) {
1831
1899
  // no flags
1832
1900
  return new GetSupportName();
1833
1901
  }
1834
1902
  /**
1835
- * Generate buffer from TLObject.
1836
- */
1903
+ * Generate buffer from TLObject.
1904
+ */
1837
1905
  write() {
1838
1906
  const b = new BytesIO();
1839
1907
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1846,25 +1914,25 @@ export class GetUserInfo extends TLObject {
1846
1914
  userId;
1847
1915
  constructor(params) {
1848
1916
  super();
1849
- this.classType = "functions";
1850
- this.className = "help.GetUserInfo";
1917
+ this.classType = 'functions';
1918
+ this.className = 'help.GetUserInfo';
1851
1919
  this.constructorId = 0x38a08d3;
1852
1920
  this.subclassOfId = 0x5c53d7d8;
1853
- this._slots = ["userId"];
1921
+ this._slots = ['userId'];
1854
1922
  this.userId = params.userId;
1855
1923
  }
1856
1924
  /**
1857
- * Generate the TLObject from buffer.
1858
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1859
- */
1925
+ * Generate the TLObject from buffer.
1926
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1927
+ */
1860
1928
  static async read(_data, ..._args) {
1861
1929
  // no flags
1862
1930
  let userId = await TLObject.read(_data);
1863
- return new GetUserInfo({ "userId": userId });
1931
+ return new GetUserInfo({ userId: userId });
1864
1932
  }
1865
1933
  /**
1866
- * Generate buffer from TLObject.
1867
- */
1934
+ * Generate buffer from TLObject.
1935
+ */
1868
1936
  write() {
1869
1937
  const b = new BytesIO();
1870
1938
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1882,29 +1950,29 @@ export class EditUserInfo extends TLObject {
1882
1950
  entities;
1883
1951
  constructor(params) {
1884
1952
  super();
1885
- this.classType = "functions";
1886
- this.className = "help.EditUserInfo";
1953
+ this.classType = 'functions';
1954
+ this.className = 'help.EditUserInfo';
1887
1955
  this.constructorId = 0x66b91b70;
1888
1956
  this.subclassOfId = 0x5c53d7d8;
1889
- this._slots = ["userId", "message", "entities"];
1957
+ this._slots = ['userId', 'message', 'entities'];
1890
1958
  this.userId = params.userId;
1891
1959
  this.message = params.message;
1892
1960
  this.entities = params.entities;
1893
1961
  }
1894
1962
  /**
1895
- * Generate the TLObject from buffer.
1896
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1897
- */
1963
+ * Generate the TLObject from buffer.
1964
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1965
+ */
1898
1966
  static async read(_data, ..._args) {
1899
1967
  // no flags
1900
1968
  let userId = await TLObject.read(_data);
1901
1969
  let message = await Primitive.String.read(_data);
1902
1970
  let entities = await TLObject.read(_data);
1903
- return new EditUserInfo({ "userId": userId, "message": message, "entities": entities });
1971
+ return new EditUserInfo({ userId: userId, message: message, entities: entities });
1904
1972
  }
1905
1973
  /**
1906
- * Generate buffer from TLObject.
1907
- */
1974
+ * Generate buffer from TLObject.
1975
+ */
1908
1976
  write() {
1909
1977
  const b = new BytesIO();
1910
1978
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1913,10 +1981,10 @@ export class EditUserInfo extends TLObject {
1913
1981
  b.write(this.userId.write());
1914
1982
  }
1915
1983
  if (this.message !== undefined) {
1916
- b.write((Primitive.String.write(this.message)));
1984
+ b.write(Primitive.String.write(this.message));
1917
1985
  }
1918
1986
  if (this.entities) {
1919
- b.write((Primitive.Vector.write(this.entities)));
1987
+ b.write(Primitive.Vector.write(this.entities));
1920
1988
  }
1921
1989
  return b.buffer;
1922
1990
  }
@@ -1925,23 +1993,23 @@ export class GetPromoData extends TLObject {
1925
1993
  __response__;
1926
1994
  constructor() {
1927
1995
  super();
1928
- this.classType = "functions";
1929
- this.className = "help.GetPromoData";
1996
+ this.classType = 'functions';
1997
+ this.className = 'help.GetPromoData';
1930
1998
  this.constructorId = 0xc0977421;
1931
1999
  this.subclassOfId = 0x9d595542;
1932
2000
  this._slots = [];
1933
2001
  }
1934
2002
  /**
1935
- * Generate the TLObject from buffer.
1936
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1937
- */
2003
+ * Generate the TLObject from buffer.
2004
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2005
+ */
1938
2006
  static async read(_data, ..._args) {
1939
2007
  // no flags
1940
2008
  return new GetPromoData();
1941
2009
  }
1942
2010
  /**
1943
- * Generate buffer from TLObject.
1944
- */
2011
+ * Generate buffer from TLObject.
2012
+ */
1945
2013
  write() {
1946
2014
  const b = new BytesIO();
1947
2015
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1954,25 +2022,25 @@ export class HidePromoData extends TLObject {
1954
2022
  peer;
1955
2023
  constructor(params) {
1956
2024
  super();
1957
- this.classType = "functions";
1958
- this.className = "help.HidePromoData";
2025
+ this.classType = 'functions';
2026
+ this.className = 'help.HidePromoData';
1959
2027
  this.constructorId = 0x1e251c95;
1960
2028
  this.subclassOfId = 0xf5b399ac;
1961
- this._slots = ["peer"];
2029
+ this._slots = ['peer'];
1962
2030
  this.peer = params.peer;
1963
2031
  }
1964
2032
  /**
1965
- * Generate the TLObject from buffer.
1966
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
1967
- */
2033
+ * Generate the TLObject from buffer.
2034
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2035
+ */
1968
2036
  static async read(_data, ..._args) {
1969
2037
  // no flags
1970
2038
  let peer = await TLObject.read(_data);
1971
- return new HidePromoData({ "peer": peer });
2039
+ return new HidePromoData({ peer: peer });
1972
2040
  }
1973
2041
  /**
1974
- * Generate buffer from TLObject.
1975
- */
2042
+ * Generate buffer from TLObject.
2043
+ */
1976
2044
  write() {
1977
2045
  const b = new BytesIO();
1978
2046
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -1989,27 +2057,27 @@ export class DismissSuggestion extends TLObject {
1989
2057
  suggestion;
1990
2058
  constructor(params) {
1991
2059
  super();
1992
- this.classType = "functions";
1993
- this.className = "help.DismissSuggestion";
2060
+ this.classType = 'functions';
2061
+ this.className = 'help.DismissSuggestion';
1994
2062
  this.constructorId = 0xf50dbaa1;
1995
2063
  this.subclassOfId = 0xf5b399ac;
1996
- this._slots = ["peer", "suggestion"];
2064
+ this._slots = ['peer', 'suggestion'];
1997
2065
  this.peer = params.peer;
1998
2066
  this.suggestion = params.suggestion;
1999
2067
  }
2000
2068
  /**
2001
- * Generate the TLObject from buffer.
2002
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2003
- */
2069
+ * Generate the TLObject from buffer.
2070
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2071
+ */
2004
2072
  static async read(_data, ..._args) {
2005
2073
  // no flags
2006
2074
  let peer = await TLObject.read(_data);
2007
2075
  let suggestion = await Primitive.String.read(_data);
2008
- return new DismissSuggestion({ "peer": peer, "suggestion": suggestion });
2076
+ return new DismissSuggestion({ peer: peer, suggestion: suggestion });
2009
2077
  }
2010
2078
  /**
2011
- * Generate buffer from TLObject.
2012
- */
2079
+ * Generate buffer from TLObject.
2080
+ */
2013
2081
  write() {
2014
2082
  const b = new BytesIO();
2015
2083
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2018,7 +2086,7 @@ export class DismissSuggestion extends TLObject {
2018
2086
  b.write(this.peer.write());
2019
2087
  }
2020
2088
  if (this.suggestion !== undefined) {
2021
- b.write((Primitive.String.write(this.suggestion)));
2089
+ b.write(Primitive.String.write(this.suggestion));
2022
2090
  }
2023
2091
  return b.buffer;
2024
2092
  }
@@ -2029,36 +2097,36 @@ export class GetCountriesList extends TLObject {
2029
2097
  hash;
2030
2098
  constructor(params) {
2031
2099
  super();
2032
- this.classType = "functions";
2033
- this.className = "help.GetCountriesList";
2100
+ this.classType = 'functions';
2101
+ this.className = 'help.GetCountriesList';
2034
2102
  this.constructorId = 0x735787a8;
2035
2103
  this.subclassOfId = 0xea31fe88;
2036
- this._slots = ["langCode", "hash"];
2104
+ this._slots = ['langCode', 'hash'];
2037
2105
  this.langCode = params.langCode;
2038
2106
  this.hash = params.hash;
2039
2107
  }
2040
2108
  /**
2041
- * Generate the TLObject from buffer.
2042
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2043
- */
2109
+ * Generate the TLObject from buffer.
2110
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2111
+ */
2044
2112
  static async read(_data, ..._args) {
2045
2113
  // no flags
2046
2114
  let langCode = await Primitive.String.read(_data);
2047
2115
  let hash = await Primitive.Int.read(_data);
2048
- return new GetCountriesList({ "langCode": langCode, "hash": hash });
2116
+ return new GetCountriesList({ langCode: langCode, hash: hash });
2049
2117
  }
2050
2118
  /**
2051
- * Generate buffer from TLObject.
2052
- */
2119
+ * Generate buffer from TLObject.
2120
+ */
2053
2121
  write() {
2054
2122
  const b = new BytesIO();
2055
2123
  b.write(Primitive.Int.write(this.constructorId, false));
2056
2124
  // no flags
2057
2125
  if (this.langCode !== undefined) {
2058
- b.write((Primitive.String.write(this.langCode)));
2126
+ b.write(Primitive.String.write(this.langCode));
2059
2127
  }
2060
2128
  if (this.hash !== undefined) {
2061
- b.write((Primitive.Int.write(this.hash)));
2129
+ b.write(Primitive.Int.write(this.hash));
2062
2130
  }
2063
2131
  return b.buffer;
2064
2132
  }
@@ -2067,23 +2135,23 @@ export class GetPremiumPromo extends TLObject {
2067
2135
  __response__;
2068
2136
  constructor() {
2069
2137
  super();
2070
- this.classType = "functions";
2071
- this.className = "help.GetPremiumPromo";
2138
+ this.classType = 'functions';
2139
+ this.className = 'help.GetPremiumPromo';
2072
2140
  this.constructorId = 0xb81b93d4;
2073
2141
  this.subclassOfId = 0xc987a338;
2074
2142
  this._slots = [];
2075
2143
  }
2076
2144
  /**
2077
- * Generate the TLObject from buffer.
2078
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2079
- */
2145
+ * Generate the TLObject from buffer.
2146
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2147
+ */
2080
2148
  static async read(_data, ..._args) {
2081
2149
  // no flags
2082
2150
  return new GetPremiumPromo();
2083
2151
  }
2084
2152
  /**
2085
- * Generate buffer from TLObject.
2086
- */
2153
+ * Generate buffer from TLObject.
2154
+ */
2087
2155
  write() {
2088
2156
  const b = new BytesIO();
2089
2157
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -2096,31 +2164,31 @@ export class GetPeerColors extends TLObject {
2096
2164
  hash;
2097
2165
  constructor(params) {
2098
2166
  super();
2099
- this.classType = "functions";
2100
- this.className = "help.GetPeerColors";
2167
+ this.classType = 'functions';
2168
+ this.className = 'help.GetPeerColors';
2101
2169
  this.constructorId = 0xda80f42f;
2102
2170
  this.subclassOfId = 0xe3f6733;
2103
- this._slots = ["hash"];
2171
+ this._slots = ['hash'];
2104
2172
  this.hash = params.hash;
2105
2173
  }
2106
2174
  /**
2107
- * Generate the TLObject from buffer.
2108
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2109
- */
2175
+ * Generate the TLObject from buffer.
2176
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2177
+ */
2110
2178
  static async read(_data, ..._args) {
2111
2179
  // no flags
2112
2180
  let hash = await Primitive.Int.read(_data);
2113
- return new GetPeerColors({ "hash": hash });
2181
+ return new GetPeerColors({ hash: hash });
2114
2182
  }
2115
2183
  /**
2116
- * Generate buffer from TLObject.
2117
- */
2184
+ * Generate buffer from TLObject.
2185
+ */
2118
2186
  write() {
2119
2187
  const b = new BytesIO();
2120
2188
  b.write(Primitive.Int.write(this.constructorId, false));
2121
2189
  // no flags
2122
2190
  if (this.hash !== undefined) {
2123
- b.write((Primitive.Int.write(this.hash)));
2191
+ b.write(Primitive.Int.write(this.hash));
2124
2192
  }
2125
2193
  return b.buffer;
2126
2194
  }
@@ -2130,31 +2198,31 @@ export class GetPeerProfileColors extends TLObject {
2130
2198
  hash;
2131
2199
  constructor(params) {
2132
2200
  super();
2133
- this.classType = "functions";
2134
- this.className = "help.GetPeerProfileColors";
2201
+ this.classType = 'functions';
2202
+ this.className = 'help.GetPeerProfileColors';
2135
2203
  this.constructorId = 0xabcfa9fd;
2136
2204
  this.subclassOfId = 0xe3f6733;
2137
- this._slots = ["hash"];
2205
+ this._slots = ['hash'];
2138
2206
  this.hash = params.hash;
2139
2207
  }
2140
2208
  /**
2141
- * Generate the TLObject from buffer.
2142
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2143
- */
2209
+ * Generate the TLObject from buffer.
2210
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2211
+ */
2144
2212
  static async read(_data, ..._args) {
2145
2213
  // no flags
2146
2214
  let hash = await Primitive.Int.read(_data);
2147
- return new GetPeerProfileColors({ "hash": hash });
2215
+ return new GetPeerProfileColors({ hash: hash });
2148
2216
  }
2149
2217
  /**
2150
- * Generate buffer from TLObject.
2151
- */
2218
+ * Generate buffer from TLObject.
2219
+ */
2152
2220
  write() {
2153
2221
  const b = new BytesIO();
2154
2222
  b.write(Primitive.Int.write(this.constructorId, false));
2155
2223
  // no flags
2156
2224
  if (this.hash !== undefined) {
2157
- b.write((Primitive.Int.write(this.hash)));
2225
+ b.write(Primitive.Int.write(this.hash));
2158
2226
  }
2159
2227
  return b.buffer;
2160
2228
  }
@@ -2164,31 +2232,31 @@ export class GetTimezonesList extends TLObject {
2164
2232
  hash;
2165
2233
  constructor(params) {
2166
2234
  super();
2167
- this.classType = "functions";
2168
- this.className = "help.GetTimezonesList";
2235
+ this.classType = 'functions';
2236
+ this.className = 'help.GetTimezonesList';
2169
2237
  this.constructorId = 0x49b30240;
2170
2238
  this.subclassOfId = 0xca76e475;
2171
- this._slots = ["hash"];
2239
+ this._slots = ['hash'];
2172
2240
  this.hash = params.hash;
2173
2241
  }
2174
2242
  /**
2175
- * Generate the TLObject from buffer.
2176
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2177
- */
2243
+ * Generate the TLObject from buffer.
2244
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
2245
+ */
2178
2246
  static async read(_data, ..._args) {
2179
2247
  // no flags
2180
2248
  let hash = await Primitive.Int.read(_data);
2181
- return new GetTimezonesList({ "hash": hash });
2249
+ return new GetTimezonesList({ hash: hash });
2182
2250
  }
2183
2251
  /**
2184
- * Generate buffer from TLObject.
2185
- */
2252
+ * Generate buffer from TLObject.
2253
+ */
2186
2254
  write() {
2187
2255
  const b = new BytesIO();
2188
2256
  b.write(Primitive.Int.write(this.constructorId, false));
2189
2257
  // no flags
2190
2258
  if (this.hash !== undefined) {
2191
- b.write((Primitive.Int.write(this.hash)));
2259
+ b.write(Primitive.Int.write(this.hash));
2192
2260
  }
2193
2261
  return b.buffer;
2194
2262
  }