@tgsnake/skema 3.2.1-browser.0 → 3.2.1

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