@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';
@@ -15,27 +15,27 @@ export class ExportedChatlistInvite extends TLObject {
15
15
  invite;
16
16
  constructor(params) {
17
17
  super();
18
- this.classType = "types";
19
- this.className = "chatlists.ExportedChatlistInvite";
18
+ this.classType = 'types';
19
+ this.className = 'chatlists.ExportedChatlistInvite';
20
20
  this.constructorId = 0x10e6e3a6;
21
21
  this.subclassOfId = 0xc2694ee9;
22
- this._slots = ["filter", "invite"];
22
+ this._slots = ['filter', 'invite'];
23
23
  this.filter = params.filter;
24
24
  this.invite = params.invite;
25
25
  }
26
26
  /**
27
- * Generate the TLObject from buffer.
28
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
- */
27
+ * Generate the TLObject from buffer.
28
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
29
+ */
30
30
  static async read(_data, ..._args) {
31
31
  // no flags
32
32
  let filter = await TLObject.read(_data);
33
33
  let invite = await TLObject.read(_data);
34
- return new ExportedChatlistInvite({ "filter": filter, "invite": invite });
34
+ return new ExportedChatlistInvite({ filter: filter, invite: invite });
35
35
  }
36
36
  /**
37
- * Generate buffer from TLObject.
38
- */
37
+ * Generate buffer from TLObject.
38
+ */
39
39
  write() {
40
40
  const b = new BytesIO();
41
41
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -55,41 +55,41 @@ export class ExportedInvites extends TLObject {
55
55
  users;
56
56
  constructor(params) {
57
57
  super();
58
- this.classType = "types";
59
- this.className = "chatlists.ExportedInvites";
58
+ this.classType = 'types';
59
+ this.className = 'chatlists.ExportedInvites';
60
60
  this.constructorId = 0x10ab6dc7;
61
61
  this.subclassOfId = 0xe6c209c0;
62
- this._slots = ["invites", "chats", "users"];
62
+ this._slots = ['invites', 'chats', 'users'];
63
63
  this.invites = params.invites;
64
64
  this.chats = params.chats;
65
65
  this.users = params.users;
66
66
  }
67
67
  /**
68
- * Generate the TLObject from buffer.
69
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
70
- */
68
+ * Generate the TLObject from buffer.
69
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
70
+ */
71
71
  static async read(_data, ..._args) {
72
72
  // no flags
73
73
  let invites = await TLObject.read(_data);
74
74
  let chats = await TLObject.read(_data);
75
75
  let users = await TLObject.read(_data);
76
- return new ExportedInvites({ "invites": invites, "chats": chats, "users": users });
76
+ return new ExportedInvites({ invites: invites, chats: chats, users: users });
77
77
  }
78
78
  /**
79
- * Generate buffer from TLObject.
80
- */
79
+ * Generate buffer from TLObject.
80
+ */
81
81
  write() {
82
82
  const b = new BytesIO();
83
83
  b.write(Primitive.Int.write(this.constructorId, false));
84
84
  // no flags
85
85
  if (this.invites) {
86
- b.write((Primitive.Vector.write(this.invites)));
86
+ b.write(Primitive.Vector.write(this.invites));
87
87
  }
88
88
  if (this.chats) {
89
- b.write((Primitive.Vector.write(this.chats)));
89
+ b.write(Primitive.Vector.write(this.chats));
90
90
  }
91
91
  if (this.users) {
92
- b.write((Primitive.Vector.write(this.users)));
92
+ b.write(Primitive.Vector.write(this.users));
93
93
  }
94
94
  return b.buffer;
95
95
  }
@@ -102,11 +102,11 @@ export class ChatlistInviteAlready extends TLObject {
102
102
  users;
103
103
  constructor(params) {
104
104
  super();
105
- this.classType = "types";
106
- this.className = "chatlists.ChatlistInviteAlready";
105
+ this.classType = 'types';
106
+ this.className = 'chatlists.ChatlistInviteAlready';
107
107
  this.constructorId = 0xfa87f659;
108
108
  this.subclassOfId = 0x41720e75;
109
- this._slots = ["filterId", "missingPeers", "alreadyPeers", "chats", "users"];
109
+ this._slots = ['filterId', 'missingPeers', 'alreadyPeers', 'chats', 'users'];
110
110
  this.filterId = params.filterId;
111
111
  this.missingPeers = params.missingPeers;
112
112
  this.alreadyPeers = params.alreadyPeers;
@@ -114,9 +114,9 @@ export class ChatlistInviteAlready extends TLObject {
114
114
  this.users = params.users;
115
115
  }
116
116
  /**
117
- * Generate the TLObject from buffer.
118
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
119
- */
117
+ * Generate the TLObject from buffer.
118
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
119
+ */
120
120
  static async read(_data, ..._args) {
121
121
  // no flags
122
122
  let filterId = await Primitive.Int.read(_data);
@@ -124,29 +124,35 @@ export class ChatlistInviteAlready extends TLObject {
124
124
  let alreadyPeers = await TLObject.read(_data);
125
125
  let chats = await TLObject.read(_data);
126
126
  let users = await TLObject.read(_data);
127
- return new ChatlistInviteAlready({ "filterId": filterId, "missingPeers": missingPeers, "alreadyPeers": alreadyPeers, "chats": chats, "users": users });
127
+ return new ChatlistInviteAlready({
128
+ filterId: filterId,
129
+ missingPeers: missingPeers,
130
+ alreadyPeers: alreadyPeers,
131
+ chats: chats,
132
+ users: users,
133
+ });
128
134
  }
129
135
  /**
130
- * Generate buffer from TLObject.
131
- */
136
+ * Generate buffer from TLObject.
137
+ */
132
138
  write() {
133
139
  const b = new BytesIO();
134
140
  b.write(Primitive.Int.write(this.constructorId, false));
135
141
  // no flags
136
142
  if (this.filterId !== undefined) {
137
- b.write((Primitive.Int.write(this.filterId)));
143
+ b.write(Primitive.Int.write(this.filterId));
138
144
  }
139
145
  if (this.missingPeers) {
140
- b.write((Primitive.Vector.write(this.missingPeers)));
146
+ b.write(Primitive.Vector.write(this.missingPeers));
141
147
  }
142
148
  if (this.alreadyPeers) {
143
- b.write((Primitive.Vector.write(this.alreadyPeers)));
149
+ b.write(Primitive.Vector.write(this.alreadyPeers));
144
150
  }
145
151
  if (this.chats) {
146
- b.write((Primitive.Vector.write(this.chats)));
152
+ b.write(Primitive.Vector.write(this.chats));
147
153
  }
148
154
  if (this.users) {
149
- b.write((Primitive.Vector.write(this.users)));
155
+ b.write(Primitive.Vector.write(this.users));
150
156
  }
151
157
  return b.buffer;
152
158
  }
@@ -160,11 +166,11 @@ export class ChatlistInvite extends TLObject {
160
166
  users;
161
167
  constructor(params) {
162
168
  super();
163
- this.classType = "types";
164
- this.className = "chatlists.ChatlistInvite";
169
+ this.classType = 'types';
170
+ this.className = 'chatlists.ChatlistInvite';
165
171
  this.constructorId = 0xf10ece2f;
166
172
  this.subclassOfId = 0x41720e75;
167
- this._slots = ["titleNoanimate", "title", "emoticon", "peers", "chats", "users"];
173
+ this._slots = ['titleNoanimate', 'title', 'emoticon', 'peers', 'chats', 'users'];
168
174
  this.titleNoanimate = params.titleNoanimate;
169
175
  this.title = params.title;
170
176
  this.emoticon = params.emoticon;
@@ -173,45 +179,52 @@ export class ChatlistInvite extends TLObject {
173
179
  this.users = params.users;
174
180
  }
175
181
  /**
176
- * Generate the TLObject from buffer.
177
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
178
- */
182
+ * Generate the TLObject from buffer.
183
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
184
+ */
179
185
  static async read(_data, ..._args) {
180
186
  // @ts-ignore
181
187
  let flags = await Primitive.Int.read(_data);
182
- let titleNoanimate = (flags & (1 << 1)) ? true : false;
188
+ let titleNoanimate = flags & (1 << 1) ? true : false;
183
189
  let title = await TLObject.read(_data);
184
- let emoticon = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
190
+ let emoticon = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
185
191
  let peers = await TLObject.read(_data);
186
192
  let chats = await TLObject.read(_data);
187
193
  let users = await TLObject.read(_data);
188
- return new ChatlistInvite({ "titleNoanimate": titleNoanimate, "title": title, "emoticon": emoticon, "peers": peers, "chats": chats, "users": users });
189
- }
190
- /**
191
- * Generate buffer from TLObject.
192
- */
194
+ return new ChatlistInvite({
195
+ titleNoanimate: titleNoanimate,
196
+ title: title,
197
+ emoticon: emoticon,
198
+ peers: peers,
199
+ chats: chats,
200
+ users: users,
201
+ });
202
+ }
203
+ /**
204
+ * Generate buffer from TLObject.
205
+ */
193
206
  write() {
194
207
  const b = new BytesIO();
195
208
  b.write(Primitive.Int.write(this.constructorId, false));
196
209
  // @ts-ignore
197
210
  let flags = 0;
198
- flags |= this.titleNoanimate ? (1 << 1) : 0;
199
- flags |= this.emoticon !== undefined ? (1 << 0) : 0;
200
- b.write((Primitive.Int.write(flags)));
211
+ flags |= this.titleNoanimate ? 1 << 1 : 0;
212
+ flags |= this.emoticon !== undefined ? 1 << 0 : 0;
213
+ b.write(Primitive.Int.write(flags));
201
214
  if (this.title !== undefined) {
202
215
  b.write(this.title.write());
203
216
  }
204
217
  if (this.emoticon !== undefined) {
205
- b.write((Primitive.String.write(this.emoticon)));
218
+ b.write(Primitive.String.write(this.emoticon));
206
219
  }
207
220
  if (this.peers) {
208
- b.write((Primitive.Vector.write(this.peers)));
221
+ b.write(Primitive.Vector.write(this.peers));
209
222
  }
210
223
  if (this.chats) {
211
- b.write((Primitive.Vector.write(this.chats)));
224
+ b.write(Primitive.Vector.write(this.chats));
212
225
  }
213
226
  if (this.users) {
214
- b.write((Primitive.Vector.write(this.users)));
227
+ b.write(Primitive.Vector.write(this.users));
215
228
  }
216
229
  return b.buffer;
217
230
  }
@@ -222,41 +235,41 @@ export class ChatlistUpdates extends TLObject {
222
235
  users;
223
236
  constructor(params) {
224
237
  super();
225
- this.classType = "types";
226
- this.className = "chatlists.ChatlistUpdates";
238
+ this.classType = 'types';
239
+ this.className = 'chatlists.ChatlistUpdates';
227
240
  this.constructorId = 0x93bd878d;
228
241
  this.subclassOfId = 0x7d1641ea;
229
- this._slots = ["missingPeers", "chats", "users"];
242
+ this._slots = ['missingPeers', 'chats', 'users'];
230
243
  this.missingPeers = params.missingPeers;
231
244
  this.chats = params.chats;
232
245
  this.users = params.users;
233
246
  }
234
247
  /**
235
- * Generate the TLObject from buffer.
236
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
237
- */
248
+ * Generate the TLObject from buffer.
249
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
250
+ */
238
251
  static async read(_data, ..._args) {
239
252
  // no flags
240
253
  let missingPeers = await TLObject.read(_data);
241
254
  let chats = await TLObject.read(_data);
242
255
  let users = await TLObject.read(_data);
243
- return new ChatlistUpdates({ "missingPeers": missingPeers, "chats": chats, "users": users });
256
+ return new ChatlistUpdates({ missingPeers: missingPeers, chats: chats, users: users });
244
257
  }
245
258
  /**
246
- * Generate buffer from TLObject.
247
- */
259
+ * Generate buffer from TLObject.
260
+ */
248
261
  write() {
249
262
  const b = new BytesIO();
250
263
  b.write(Primitive.Int.write(this.constructorId, false));
251
264
  // no flags
252
265
  if (this.missingPeers) {
253
- b.write((Primitive.Vector.write(this.missingPeers)));
266
+ b.write(Primitive.Vector.write(this.missingPeers));
254
267
  }
255
268
  if (this.chats) {
256
- b.write((Primitive.Vector.write(this.chats)));
269
+ b.write(Primitive.Vector.write(this.chats));
257
270
  }
258
271
  if (this.users) {
259
- b.write((Primitive.Vector.write(this.users)));
272
+ b.write(Primitive.Vector.write(this.users));
260
273
  }
261
274
  return b.buffer;
262
275
  }
@@ -268,29 +281,29 @@ export class ExportChatlistInvite extends TLObject {
268
281
  peers;
269
282
  constructor(params) {
270
283
  super();
271
- this.classType = "functions";
272
- this.className = "chatlists.ExportChatlistInvite";
284
+ this.classType = 'functions';
285
+ this.className = 'chatlists.ExportChatlistInvite';
273
286
  this.constructorId = 0x8472478e;
274
287
  this.subclassOfId = 0xc2694ee9;
275
- this._slots = ["chatlist", "title", "peers"];
288
+ this._slots = ['chatlist', 'title', 'peers'];
276
289
  this.chatlist = params.chatlist;
277
290
  this.title = params.title;
278
291
  this.peers = params.peers;
279
292
  }
280
293
  /**
281
- * Generate the TLObject from buffer.
282
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
283
- */
294
+ * Generate the TLObject from buffer.
295
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
296
+ */
284
297
  static async read(_data, ..._args) {
285
298
  // no flags
286
299
  let chatlist = await TLObject.read(_data);
287
300
  let title = await Primitive.String.read(_data);
288
301
  let peers = await TLObject.read(_data);
289
- return new ExportChatlistInvite({ "chatlist": chatlist, "title": title, "peers": peers });
302
+ return new ExportChatlistInvite({ chatlist: chatlist, title: title, peers: peers });
290
303
  }
291
304
  /**
292
- * Generate buffer from TLObject.
293
- */
305
+ * Generate buffer from TLObject.
306
+ */
294
307
  write() {
295
308
  const b = new BytesIO();
296
309
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -299,10 +312,10 @@ export class ExportChatlistInvite extends TLObject {
299
312
  b.write(this.chatlist.write());
300
313
  }
301
314
  if (this.title !== undefined) {
302
- b.write((Primitive.String.write(this.title)));
315
+ b.write(Primitive.String.write(this.title));
303
316
  }
304
317
  if (this.peers) {
305
- b.write((Primitive.Vector.write(this.peers)));
318
+ b.write(Primitive.Vector.write(this.peers));
306
319
  }
307
320
  return b.buffer;
308
321
  }
@@ -313,27 +326,27 @@ export class DeleteExportedInvite extends TLObject {
313
326
  slug;
314
327
  constructor(params) {
315
328
  super();
316
- this.classType = "functions";
317
- this.className = "chatlists.DeleteExportedInvite";
329
+ this.classType = 'functions';
330
+ this.className = 'chatlists.DeleteExportedInvite';
318
331
  this.constructorId = 0x719c5c5e;
319
332
  this.subclassOfId = 0xf5b399ac;
320
- this._slots = ["chatlist", "slug"];
333
+ this._slots = ['chatlist', 'slug'];
321
334
  this.chatlist = params.chatlist;
322
335
  this.slug = params.slug;
323
336
  }
324
337
  /**
325
- * Generate the TLObject from buffer.
326
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
327
- */
338
+ * Generate the TLObject from buffer.
339
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
340
+ */
328
341
  static async read(_data, ..._args) {
329
342
  // no flags
330
343
  let chatlist = await TLObject.read(_data);
331
344
  let slug = await Primitive.String.read(_data);
332
- return new DeleteExportedInvite({ "chatlist": chatlist, "slug": slug });
345
+ return new DeleteExportedInvite({ chatlist: chatlist, slug: slug });
333
346
  }
334
347
  /**
335
- * Generate buffer from TLObject.
336
- */
348
+ * Generate buffer from TLObject.
349
+ */
337
350
  write() {
338
351
  const b = new BytesIO();
339
352
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -342,7 +355,7 @@ export class DeleteExportedInvite extends TLObject {
342
355
  b.write(this.chatlist.write());
343
356
  }
344
357
  if (this.slug !== undefined) {
345
- b.write((Primitive.String.write(this.slug)));
358
+ b.write(Primitive.String.write(this.slug));
346
359
  }
347
360
  return b.buffer;
348
361
  }
@@ -355,51 +368,51 @@ export class EditExportedInvite extends TLObject {
355
368
  peers;
356
369
  constructor(params) {
357
370
  super();
358
- this.classType = "functions";
359
- this.className = "chatlists.EditExportedInvite";
371
+ this.classType = 'functions';
372
+ this.className = 'chatlists.EditExportedInvite';
360
373
  this.constructorId = 0x653db63d;
361
374
  this.subclassOfId = 0x7711f8ff;
362
- this._slots = ["chatlist", "slug", "title", "peers"];
375
+ this._slots = ['chatlist', 'slug', 'title', 'peers'];
363
376
  this.chatlist = params.chatlist;
364
377
  this.slug = params.slug;
365
378
  this.title = params.title;
366
379
  this.peers = params.peers;
367
380
  }
368
381
  /**
369
- * Generate the TLObject from buffer.
370
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
371
- */
382
+ * Generate the TLObject from buffer.
383
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
384
+ */
372
385
  static async read(_data, ..._args) {
373
386
  // @ts-ignore
374
387
  let flags = await Primitive.Int.read(_data);
375
388
  let chatlist = await TLObject.read(_data);
376
389
  let slug = await Primitive.String.read(_data);
377
- let title = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
378
- let peers = (flags & (1 << 2)) ? await TLObject.read(_data) : [];
379
- return new EditExportedInvite({ "chatlist": chatlist, "slug": slug, "title": title, "peers": peers });
390
+ let title = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
391
+ let peers = flags & (1 << 2) ? await TLObject.read(_data) : [];
392
+ return new EditExportedInvite({ chatlist: chatlist, slug: slug, title: title, peers: peers });
380
393
  }
381
394
  /**
382
- * Generate buffer from TLObject.
383
- */
395
+ * Generate buffer from TLObject.
396
+ */
384
397
  write() {
385
398
  const b = new BytesIO();
386
399
  b.write(Primitive.Int.write(this.constructorId, false));
387
400
  // @ts-ignore
388
401
  let flags = 0;
389
- flags |= this.title !== undefined ? (1 << 1) : 0;
390
- flags |= this.peers ? (1 << 2) : 0;
391
- b.write((Primitive.Int.write(flags)));
402
+ flags |= this.title !== undefined ? 1 << 1 : 0;
403
+ flags |= this.peers ? 1 << 2 : 0;
404
+ b.write(Primitive.Int.write(flags));
392
405
  if (this.chatlist !== undefined) {
393
406
  b.write(this.chatlist.write());
394
407
  }
395
408
  if (this.slug !== undefined) {
396
- b.write((Primitive.String.write(this.slug)));
409
+ b.write(Primitive.String.write(this.slug));
397
410
  }
398
411
  if (this.title !== undefined) {
399
- b.write((Primitive.String.write(this.title)));
412
+ b.write(Primitive.String.write(this.title));
400
413
  }
401
414
  if (this.peers) {
402
- b.write((Primitive.Vector.write(this.peers)));
415
+ b.write(Primitive.Vector.write(this.peers));
403
416
  }
404
417
  return b.buffer;
405
418
  }
@@ -409,25 +422,25 @@ export class GetExportedInvites extends TLObject {
409
422
  chatlist;
410
423
  constructor(params) {
411
424
  super();
412
- this.classType = "functions";
413
- this.className = "chatlists.GetExportedInvites";
425
+ this.classType = 'functions';
426
+ this.className = 'chatlists.GetExportedInvites';
414
427
  this.constructorId = 0xce03da83;
415
428
  this.subclassOfId = 0xe6c209c0;
416
- this._slots = ["chatlist"];
429
+ this._slots = ['chatlist'];
417
430
  this.chatlist = params.chatlist;
418
431
  }
419
432
  /**
420
- * Generate the TLObject from buffer.
421
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
422
- */
433
+ * Generate the TLObject from buffer.
434
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
435
+ */
423
436
  static async read(_data, ..._args) {
424
437
  // no flags
425
438
  let chatlist = await TLObject.read(_data);
426
- return new GetExportedInvites({ "chatlist": chatlist });
439
+ return new GetExportedInvites({ chatlist: chatlist });
427
440
  }
428
441
  /**
429
- * Generate buffer from TLObject.
430
- */
442
+ * Generate buffer from TLObject.
443
+ */
431
444
  write() {
432
445
  const b = new BytesIO();
433
446
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -443,31 +456,31 @@ export class CheckChatlistInvite extends TLObject {
443
456
  slug;
444
457
  constructor(params) {
445
458
  super();
446
- this.classType = "functions";
447
- this.className = "chatlists.CheckChatlistInvite";
459
+ this.classType = 'functions';
460
+ this.className = 'chatlists.CheckChatlistInvite';
448
461
  this.constructorId = 0x41c10fff;
449
462
  this.subclassOfId = 0x41720e75;
450
- this._slots = ["slug"];
463
+ this._slots = ['slug'];
451
464
  this.slug = params.slug;
452
465
  }
453
466
  /**
454
- * Generate the TLObject from buffer.
455
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
456
- */
467
+ * Generate the TLObject from buffer.
468
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
469
+ */
457
470
  static async read(_data, ..._args) {
458
471
  // no flags
459
472
  let slug = await Primitive.String.read(_data);
460
- return new CheckChatlistInvite({ "slug": slug });
473
+ return new CheckChatlistInvite({ slug: slug });
461
474
  }
462
475
  /**
463
- * Generate buffer from TLObject.
464
- */
476
+ * Generate buffer from TLObject.
477
+ */
465
478
  write() {
466
479
  const b = new BytesIO();
467
480
  b.write(Primitive.Int.write(this.constructorId, false));
468
481
  // no flags
469
482
  if (this.slug !== undefined) {
470
- b.write((Primitive.String.write(this.slug)));
483
+ b.write(Primitive.String.write(this.slug));
471
484
  }
472
485
  return b.buffer;
473
486
  }
@@ -478,36 +491,36 @@ export class JoinChatlistInvite extends TLObject {
478
491
  peers;
479
492
  constructor(params) {
480
493
  super();
481
- this.classType = "functions";
482
- this.className = "chatlists.JoinChatlistInvite";
494
+ this.classType = 'functions';
495
+ this.className = 'chatlists.JoinChatlistInvite';
483
496
  this.constructorId = 0xa6b1e39a;
484
497
  this.subclassOfId = 0x8af52aac;
485
- this._slots = ["slug", "peers"];
498
+ this._slots = ['slug', 'peers'];
486
499
  this.slug = params.slug;
487
500
  this.peers = params.peers;
488
501
  }
489
502
  /**
490
- * Generate the TLObject from buffer.
491
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
492
- */
503
+ * Generate the TLObject from buffer.
504
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
505
+ */
493
506
  static async read(_data, ..._args) {
494
507
  // no flags
495
508
  let slug = await Primitive.String.read(_data);
496
509
  let peers = await TLObject.read(_data);
497
- return new JoinChatlistInvite({ "slug": slug, "peers": peers });
510
+ return new JoinChatlistInvite({ slug: slug, peers: peers });
498
511
  }
499
512
  /**
500
- * Generate buffer from TLObject.
501
- */
513
+ * Generate buffer from TLObject.
514
+ */
502
515
  write() {
503
516
  const b = new BytesIO();
504
517
  b.write(Primitive.Int.write(this.constructorId, false));
505
518
  // no flags
506
519
  if (this.slug !== undefined) {
507
- b.write((Primitive.String.write(this.slug)));
520
+ b.write(Primitive.String.write(this.slug));
508
521
  }
509
522
  if (this.peers) {
510
- b.write((Primitive.Vector.write(this.peers)));
523
+ b.write(Primitive.Vector.write(this.peers));
511
524
  }
512
525
  return b.buffer;
513
526
  }
@@ -517,25 +530,25 @@ export class GetChatlistUpdates extends TLObject {
517
530
  chatlist;
518
531
  constructor(params) {
519
532
  super();
520
- this.classType = "functions";
521
- this.className = "chatlists.GetChatlistUpdates";
533
+ this.classType = 'functions';
534
+ this.className = 'chatlists.GetChatlistUpdates';
522
535
  this.constructorId = 0x89419521;
523
536
  this.subclassOfId = 0x7d1641ea;
524
- this._slots = ["chatlist"];
537
+ this._slots = ['chatlist'];
525
538
  this.chatlist = params.chatlist;
526
539
  }
527
540
  /**
528
- * Generate the TLObject from buffer.
529
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
530
- */
541
+ * Generate the TLObject from buffer.
542
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
543
+ */
531
544
  static async read(_data, ..._args) {
532
545
  // no flags
533
546
  let chatlist = await TLObject.read(_data);
534
- return new GetChatlistUpdates({ "chatlist": chatlist });
547
+ return new GetChatlistUpdates({ chatlist: chatlist });
535
548
  }
536
549
  /**
537
- * Generate buffer from TLObject.
538
- */
550
+ * Generate buffer from TLObject.
551
+ */
539
552
  write() {
540
553
  const b = new BytesIO();
541
554
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -552,27 +565,27 @@ export class JoinChatlistUpdates extends TLObject {
552
565
  peers;
553
566
  constructor(params) {
554
567
  super();
555
- this.classType = "functions";
556
- this.className = "chatlists.JoinChatlistUpdates";
568
+ this.classType = 'functions';
569
+ this.className = 'chatlists.JoinChatlistUpdates';
557
570
  this.constructorId = 0xe089f8f5;
558
571
  this.subclassOfId = 0x8af52aac;
559
- this._slots = ["chatlist", "peers"];
572
+ this._slots = ['chatlist', 'peers'];
560
573
  this.chatlist = params.chatlist;
561
574
  this.peers = params.peers;
562
575
  }
563
576
  /**
564
- * Generate the TLObject from buffer.
565
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
566
- */
577
+ * Generate the TLObject from buffer.
578
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
579
+ */
567
580
  static async read(_data, ..._args) {
568
581
  // no flags
569
582
  let chatlist = await TLObject.read(_data);
570
583
  let peers = await TLObject.read(_data);
571
- return new JoinChatlistUpdates({ "chatlist": chatlist, "peers": peers });
584
+ return new JoinChatlistUpdates({ chatlist: chatlist, peers: peers });
572
585
  }
573
586
  /**
574
- * Generate buffer from TLObject.
575
- */
587
+ * Generate buffer from TLObject.
588
+ */
576
589
  write() {
577
590
  const b = new BytesIO();
578
591
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -581,7 +594,7 @@ export class JoinChatlistUpdates extends TLObject {
581
594
  b.write(this.chatlist.write());
582
595
  }
583
596
  if (this.peers) {
584
- b.write((Primitive.Vector.write(this.peers)));
597
+ b.write(Primitive.Vector.write(this.peers));
585
598
  }
586
599
  return b.buffer;
587
600
  }
@@ -591,25 +604,25 @@ export class HideChatlistUpdates extends TLObject {
591
604
  chatlist;
592
605
  constructor(params) {
593
606
  super();
594
- this.classType = "functions";
595
- this.className = "chatlists.HideChatlistUpdates";
607
+ this.classType = 'functions';
608
+ this.className = 'chatlists.HideChatlistUpdates';
596
609
  this.constructorId = 0x66e486fb;
597
610
  this.subclassOfId = 0xf5b399ac;
598
- this._slots = ["chatlist"];
611
+ this._slots = ['chatlist'];
599
612
  this.chatlist = params.chatlist;
600
613
  }
601
614
  /**
602
- * Generate the TLObject from buffer.
603
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
604
- */
615
+ * Generate the TLObject from buffer.
616
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
617
+ */
605
618
  static async read(_data, ..._args) {
606
619
  // no flags
607
620
  let chatlist = await TLObject.read(_data);
608
- return new HideChatlistUpdates({ "chatlist": chatlist });
621
+ return new HideChatlistUpdates({ chatlist: chatlist });
609
622
  }
610
623
  /**
611
- * Generate buffer from TLObject.
612
- */
624
+ * Generate buffer from TLObject.
625
+ */
613
626
  write() {
614
627
  const b = new BytesIO();
615
628
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -625,25 +638,25 @@ export class GetLeaveChatlistSuggestions extends TLObject {
625
638
  chatlist;
626
639
  constructor(params) {
627
640
  super();
628
- this.classType = "functions";
629
- this.className = "chatlists.GetLeaveChatlistSuggestions";
641
+ this.classType = 'functions';
642
+ this.className = 'chatlists.GetLeaveChatlistSuggestions';
630
643
  this.constructorId = 0xfdbcd714;
631
644
  this.subclassOfId = 0xb9945d7e;
632
- this._slots = ["chatlist"];
645
+ this._slots = ['chatlist'];
633
646
  this.chatlist = params.chatlist;
634
647
  }
635
648
  /**
636
- * Generate the TLObject from buffer.
637
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
638
- */
649
+ * Generate the TLObject from buffer.
650
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
651
+ */
639
652
  static async read(_data, ..._args) {
640
653
  // no flags
641
654
  let chatlist = await TLObject.read(_data);
642
- return new GetLeaveChatlistSuggestions({ "chatlist": chatlist });
655
+ return new GetLeaveChatlistSuggestions({ chatlist: chatlist });
643
656
  }
644
657
  /**
645
- * Generate buffer from TLObject.
646
- */
658
+ * Generate buffer from TLObject.
659
+ */
647
660
  write() {
648
661
  const b = new BytesIO();
649
662
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -660,27 +673,27 @@ export class LeaveChatlist extends TLObject {
660
673
  peers;
661
674
  constructor(params) {
662
675
  super();
663
- this.classType = "functions";
664
- this.className = "chatlists.LeaveChatlist";
676
+ this.classType = 'functions';
677
+ this.className = 'chatlists.LeaveChatlist';
665
678
  this.constructorId = 0x74fae13a;
666
679
  this.subclassOfId = 0x8af52aac;
667
- this._slots = ["chatlist", "peers"];
680
+ this._slots = ['chatlist', 'peers'];
668
681
  this.chatlist = params.chatlist;
669
682
  this.peers = params.peers;
670
683
  }
671
684
  /**
672
- * Generate the TLObject from buffer.
673
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
674
- */
685
+ * Generate the TLObject from buffer.
686
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
687
+ */
675
688
  static async read(_data, ..._args) {
676
689
  // no flags
677
690
  let chatlist = await TLObject.read(_data);
678
691
  let peers = await TLObject.read(_data);
679
- return new LeaveChatlist({ "chatlist": chatlist, "peers": peers });
692
+ return new LeaveChatlist({ chatlist: chatlist, peers: peers });
680
693
  }
681
694
  /**
682
- * Generate buffer from TLObject.
683
- */
695
+ * Generate buffer from TLObject.
696
+ */
684
697
  write() {
685
698
  const b = new BytesIO();
686
699
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -689,7 +702,7 @@ export class LeaveChatlist extends TLObject {
689
702
  b.write(this.chatlist.write());
690
703
  }
691
704
  if (this.peers) {
692
- b.write((Primitive.Vector.write(this.peers)));
705
+ b.write(Primitive.Vector.write(this.peers));
693
706
  }
694
707
  return b.buffer;
695
708
  }