@tgsnake/skema 3.2.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 (67) hide show
  1. package/dist/src/deps.d.ts +4 -3
  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 +26781 -20676
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1983 -1813
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +128 -117
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +849 -714
  13. package/dist/src/raw/class/tl/bots.d.ts +256 -256
  14. package/dist/src/raw/class/tl/bots.js +661 -607
  15. package/dist/src/raw/class/tl/channels.d.ts +336 -336
  16. package/dist/src/raw/class/tl/channels.js +836 -745
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +196 -183
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +159 -138
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +537 -492
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  25. package/dist/src/raw/class/tl/feed.d.ts +71 -71
  26. package/dist/src/raw/class/tl/feed.js +214 -179
  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 +32 -25
  31. package/dist/src/raw/class/tl/help.d.ts +286 -286
  32. package/dist/src/raw/class/tl/help.js +686 -618
  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 +5965 -4886
  37. package/dist/src/raw/class/tl/payments.d.ts +646 -646
  38. package/dist/src/raw/class/tl/payments.js +2254 -1766
  39. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  40. package/dist/src/raw/class/tl/phone.js +779 -644
  41. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  42. package/dist/src/raw/class/tl/photos.js +139 -116
  43. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  44. package/dist/src/raw/class/tl/premium.js +133 -111
  45. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  46. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  47. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  48. package/dist/src/raw/class/tl/stats.js +268 -169
  49. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  50. package/dist/src/raw/class/tl/stickers.js +173 -144
  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 +781 -622
  55. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  56. package/dist/src/raw/class/tl/toncenter.js +52 -47
  57. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  58. package/dist/src/raw/class/tl/updates.js +246 -175
  59. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  60. package/dist/src/raw/class/tl/upload.js +178 -155
  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 +624 -558
  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 +6 -4
@@ -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,29 +16,29 @@ export class File extends TLObject {
16
16
  bytes;
17
17
  constructor(params) {
18
18
  super();
19
- this.classType = "types";
20
- this.className = "upload.File";
19
+ this.classType = 'types';
20
+ this.className = 'upload.File';
21
21
  this.constructorId = 0x96a18d5;
22
22
  this.subclassOfId = 0x6c9bd728;
23
- this._slots = ["type", "mtime", "bytes"];
23
+ this._slots = ['type', 'mtime', 'bytes'];
24
24
  this.type = params.type;
25
25
  this.mtime = params.mtime;
26
26
  this.bytes = params.bytes;
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 type = await TLObject.read(_data);
35
35
  let mtime = await Primitive.Int.read(_data);
36
36
  let bytes = await Primitive.Bytes.read(_data);
37
- return new File({ "type": type, "mtime": mtime, "bytes": bytes });
37
+ return new File({ type: type, mtime: mtime, bytes: bytes });
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));
@@ -47,10 +47,10 @@ export class File extends TLObject {
47
47
  b.write(this.type.write());
48
48
  }
49
49
  if (this.mtime !== undefined) {
50
- b.write((Primitive.Int.write(this.mtime)));
50
+ b.write(Primitive.Int.write(this.mtime));
51
51
  }
52
52
  if (this.bytes !== undefined) {
53
- b.write((Primitive.Bytes.write(this.bytes)));
53
+ b.write(Primitive.Bytes.write(this.bytes));
54
54
  }
55
55
  return b.buffer;
56
56
  }
@@ -63,11 +63,11 @@ export class FileCdnRedirect extends TLObject {
63
63
  fileHashes;
64
64
  constructor(params) {
65
65
  super();
66
- this.classType = "types";
67
- this.className = "upload.FileCdnRedirect";
66
+ this.classType = 'types';
67
+ this.className = 'upload.FileCdnRedirect';
68
68
  this.constructorId = 0xf18cda44;
69
69
  this.subclassOfId = 0x6c9bd728;
70
- this._slots = ["dcId", "fileToken", "encryptionKey", "encryptionIv", "fileHashes"];
70
+ this._slots = ['dcId', 'fileToken', 'encryptionKey', 'encryptionIv', 'fileHashes'];
71
71
  this.dcId = params.dcId;
72
72
  this.fileToken = params.fileToken;
73
73
  this.encryptionKey = params.encryptionKey;
@@ -75,9 +75,9 @@ export class FileCdnRedirect extends TLObject {
75
75
  this.fileHashes = params.fileHashes;
76
76
  }
77
77
  /**
78
- * Generate the TLObject from buffer.
79
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
80
- */
78
+ * Generate the TLObject from buffer.
79
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
80
+ */
81
81
  static async read(_data, ..._args) {
82
82
  // no flags
83
83
  let dcId = await Primitive.Int.read(_data);
@@ -85,29 +85,35 @@ export class FileCdnRedirect extends TLObject {
85
85
  let encryptionKey = await Primitive.Bytes.read(_data);
86
86
  let encryptionIv = await Primitive.Bytes.read(_data);
87
87
  let fileHashes = await TLObject.read(_data);
88
- return new FileCdnRedirect({ "dcId": dcId, "fileToken": fileToken, "encryptionKey": encryptionKey, "encryptionIv": encryptionIv, "fileHashes": fileHashes });
88
+ return new FileCdnRedirect({
89
+ dcId: dcId,
90
+ fileToken: fileToken,
91
+ encryptionKey: encryptionKey,
92
+ encryptionIv: encryptionIv,
93
+ fileHashes: fileHashes,
94
+ });
89
95
  }
90
96
  /**
91
- * Generate buffer from TLObject.
92
- */
97
+ * Generate buffer from TLObject.
98
+ */
93
99
  write() {
94
100
  const b = new BytesIO();
95
101
  b.write(Primitive.Int.write(this.constructorId, false));
96
102
  // no flags
97
103
  if (this.dcId !== undefined) {
98
- b.write((Primitive.Int.write(this.dcId)));
104
+ b.write(Primitive.Int.write(this.dcId));
99
105
  }
100
106
  if (this.fileToken !== undefined) {
101
- b.write((Primitive.Bytes.write(this.fileToken)));
107
+ b.write(Primitive.Bytes.write(this.fileToken));
102
108
  }
103
109
  if (this.encryptionKey !== undefined) {
104
- b.write((Primitive.Bytes.write(this.encryptionKey)));
110
+ b.write(Primitive.Bytes.write(this.encryptionKey));
105
111
  }
106
112
  if (this.encryptionIv !== undefined) {
107
- b.write((Primitive.Bytes.write(this.encryptionIv)));
113
+ b.write(Primitive.Bytes.write(this.encryptionIv));
108
114
  }
109
115
  if (this.fileHashes) {
110
- b.write((Primitive.Vector.write(this.fileHashes)));
116
+ b.write(Primitive.Vector.write(this.fileHashes));
111
117
  }
112
118
  return b.buffer;
113
119
  }
@@ -120,11 +126,11 @@ export class WebFile extends TLObject {
120
126
  bytes;
121
127
  constructor(params) {
122
128
  super();
123
- this.classType = "types";
124
- this.className = "upload.WebFile";
129
+ this.classType = 'types';
130
+ this.className = 'upload.WebFile';
125
131
  this.constructorId = 0x21e753bc;
126
132
  this.subclassOfId = 0x68f17f51;
127
- this._slots = ["size", "mimeType", "fileType", "mtime", "bytes"];
133
+ this._slots = ['size', 'mimeType', 'fileType', 'mtime', 'bytes'];
128
134
  this.size = params.size;
129
135
  this.mimeType = params.mimeType;
130
136
  this.fileType = params.fileType;
@@ -132,9 +138,9 @@ export class WebFile extends TLObject {
132
138
  this.bytes = params.bytes;
133
139
  }
134
140
  /**
135
- * Generate the TLObject from buffer.
136
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
137
- */
141
+ * Generate the TLObject from buffer.
142
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
143
+ */
138
144
  static async read(_data, ..._args) {
139
145
  // no flags
140
146
  let size = await Primitive.Int.read(_data);
@@ -142,29 +148,35 @@ export class WebFile extends TLObject {
142
148
  let fileType = await TLObject.read(_data);
143
149
  let mtime = await Primitive.Int.read(_data);
144
150
  let bytes = await Primitive.Bytes.read(_data);
145
- return new WebFile({ "size": size, "mimeType": mimeType, "fileType": fileType, "mtime": mtime, "bytes": bytes });
151
+ return new WebFile({
152
+ size: size,
153
+ mimeType: mimeType,
154
+ fileType: fileType,
155
+ mtime: mtime,
156
+ bytes: bytes,
157
+ });
146
158
  }
147
159
  /**
148
- * Generate buffer from TLObject.
149
- */
160
+ * Generate buffer from TLObject.
161
+ */
150
162
  write() {
151
163
  const b = new BytesIO();
152
164
  b.write(Primitive.Int.write(this.constructorId, false));
153
165
  // no flags
154
166
  if (this.size !== undefined) {
155
- b.write((Primitive.Int.write(this.size)));
167
+ b.write(Primitive.Int.write(this.size));
156
168
  }
157
169
  if (this.mimeType !== undefined) {
158
- b.write((Primitive.String.write(this.mimeType)));
170
+ b.write(Primitive.String.write(this.mimeType));
159
171
  }
160
172
  if (this.fileType !== undefined) {
161
173
  b.write(this.fileType.write());
162
174
  }
163
175
  if (this.mtime !== undefined) {
164
- b.write((Primitive.Int.write(this.mtime)));
176
+ b.write(Primitive.Int.write(this.mtime));
165
177
  }
166
178
  if (this.bytes !== undefined) {
167
- b.write((Primitive.Bytes.write(this.bytes)));
179
+ b.write(Primitive.Bytes.write(this.bytes));
168
180
  }
169
181
  return b.buffer;
170
182
  }
@@ -173,31 +185,31 @@ export class CdnFileReuploadNeeded extends TLObject {
173
185
  requestToken;
174
186
  constructor(params) {
175
187
  super();
176
- this.classType = "types";
177
- this.className = "upload.CdnFileReuploadNeeded";
188
+ this.classType = 'types';
189
+ this.className = 'upload.CdnFileReuploadNeeded';
178
190
  this.constructorId = 0xeea8e46e;
179
191
  this.subclassOfId = 0xf5ccf928;
180
- this._slots = ["requestToken"];
192
+ this._slots = ['requestToken'];
181
193
  this.requestToken = params.requestToken;
182
194
  }
183
195
  /**
184
- * Generate the TLObject from buffer.
185
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
186
- */
196
+ * Generate the TLObject from buffer.
197
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
198
+ */
187
199
  static async read(_data, ..._args) {
188
200
  // no flags
189
201
  let requestToken = await Primitive.Bytes.read(_data);
190
- return new CdnFileReuploadNeeded({ "requestToken": requestToken });
202
+ return new CdnFileReuploadNeeded({ requestToken: requestToken });
191
203
  }
192
204
  /**
193
- * Generate buffer from TLObject.
194
- */
205
+ * Generate buffer from TLObject.
206
+ */
195
207
  write() {
196
208
  const b = new BytesIO();
197
209
  b.write(Primitive.Int.write(this.constructorId, false));
198
210
  // no flags
199
211
  if (this.requestToken !== undefined) {
200
- b.write((Primitive.Bytes.write(this.requestToken)));
212
+ b.write(Primitive.Bytes.write(this.requestToken));
201
213
  }
202
214
  return b.buffer;
203
215
  }
@@ -206,31 +218,31 @@ export class CdnFile extends TLObject {
206
218
  bytes;
207
219
  constructor(params) {
208
220
  super();
209
- this.classType = "types";
210
- this.className = "upload.CdnFile";
221
+ this.classType = 'types';
222
+ this.className = 'upload.CdnFile';
211
223
  this.constructorId = 0xa99fca4f;
212
224
  this.subclassOfId = 0xf5ccf928;
213
- this._slots = ["bytes"];
225
+ this._slots = ['bytes'];
214
226
  this.bytes = params.bytes;
215
227
  }
216
228
  /**
217
- * Generate the TLObject from buffer.
218
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
219
- */
229
+ * Generate the TLObject from buffer.
230
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
231
+ */
220
232
  static async read(_data, ..._args) {
221
233
  // no flags
222
234
  let bytes = await Primitive.Bytes.read(_data);
223
- return new CdnFile({ "bytes": bytes });
235
+ return new CdnFile({ bytes: bytes });
224
236
  }
225
237
  /**
226
- * Generate buffer from TLObject.
227
- */
238
+ * Generate buffer from TLObject.
239
+ */
228
240
  write() {
229
241
  const b = new BytesIO();
230
242
  b.write(Primitive.Int.write(this.constructorId, false));
231
243
  // no flags
232
244
  if (this.bytes !== undefined) {
233
- b.write((Primitive.Bytes.write(this.bytes)));
245
+ b.write(Primitive.Bytes.write(this.bytes));
234
246
  }
235
247
  return b.buffer;
236
248
  }
@@ -242,41 +254,41 @@ export class SaveFilePart extends TLObject {
242
254
  bytes;
243
255
  constructor(params) {
244
256
  super();
245
- this.classType = "functions";
246
- this.className = "upload.SaveFilePart";
257
+ this.classType = 'functions';
258
+ this.className = 'upload.SaveFilePart';
247
259
  this.constructorId = 0xb304a621;
248
260
  this.subclassOfId = 0xf5b399ac;
249
- this._slots = ["fileId", "filePart", "bytes"];
261
+ this._slots = ['fileId', 'filePart', 'bytes'];
250
262
  this.fileId = params.fileId;
251
263
  this.filePart = params.filePart;
252
264
  this.bytes = params.bytes;
253
265
  }
254
266
  /**
255
- * Generate the TLObject from buffer.
256
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
257
- */
267
+ * Generate the TLObject from buffer.
268
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
269
+ */
258
270
  static async read(_data, ..._args) {
259
271
  // no flags
260
272
  let fileId = await Primitive.Long.read(_data);
261
273
  let filePart = await Primitive.Int.read(_data);
262
274
  let bytes = await Primitive.Bytes.read(_data);
263
- return new SaveFilePart({ "fileId": fileId, "filePart": filePart, "bytes": bytes });
275
+ return new SaveFilePart({ fileId: fileId, filePart: filePart, bytes: bytes });
264
276
  }
265
277
  /**
266
- * Generate buffer from TLObject.
267
- */
278
+ * Generate buffer from TLObject.
279
+ */
268
280
  write() {
269
281
  const b = new BytesIO();
270
282
  b.write(Primitive.Int.write(this.constructorId, false));
271
283
  // no flags
272
284
  if (this.fileId !== undefined) {
273
- b.write((Primitive.Long.write(this.fileId)));
285
+ b.write(Primitive.Long.write(this.fileId));
274
286
  }
275
287
  if (this.filePart !== undefined) {
276
- b.write((Primitive.Int.write(this.filePart)));
288
+ b.write(Primitive.Int.write(this.filePart));
277
289
  }
278
290
  if (this.bytes !== undefined) {
279
- b.write((Primitive.Bytes.write(this.bytes)));
291
+ b.write(Primitive.Bytes.write(this.bytes));
280
292
  }
281
293
  return b.buffer;
282
294
  }
@@ -290,11 +302,11 @@ export class GetFile extends TLObject {
290
302
  limit;
291
303
  constructor(params) {
292
304
  super();
293
- this.classType = "functions";
294
- this.className = "upload.GetFile";
305
+ this.classType = 'functions';
306
+ this.className = 'upload.GetFile';
295
307
  this.constructorId = 0xbe5335be;
296
308
  this.subclassOfId = 0x6c9bd728;
297
- this._slots = ["precise", "cdnSupported", "location", "offset", "limit"];
309
+ this._slots = ['precise', 'cdnSupported', 'location', 'offset', 'limit'];
298
310
  this.precise = params.precise;
299
311
  this.cdnSupported = params.cdnSupported;
300
312
  this.location = params.location;
@@ -302,38 +314,44 @@ export class GetFile extends TLObject {
302
314
  this.limit = params.limit;
303
315
  }
304
316
  /**
305
- * Generate the TLObject from buffer.
306
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
307
- */
317
+ * Generate the TLObject from buffer.
318
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
319
+ */
308
320
  static async read(_data, ..._args) {
309
321
  // @ts-ignore
310
322
  let flags = await Primitive.Int.read(_data);
311
- let precise = (flags & (1 << 0)) ? true : false;
312
- let cdnSupported = (flags & (1 << 1)) ? true : false;
323
+ let precise = flags & (1 << 0) ? true : false;
324
+ let cdnSupported = flags & (1 << 1) ? true : false;
313
325
  let location = await TLObject.read(_data);
314
326
  let offset = await Primitive.Long.read(_data);
315
327
  let limit = await Primitive.Int.read(_data);
316
- return new GetFile({ "precise": precise, "cdnSupported": cdnSupported, "location": location, "offset": offset, "limit": limit });
328
+ return new GetFile({
329
+ precise: precise,
330
+ cdnSupported: cdnSupported,
331
+ location: location,
332
+ offset: offset,
333
+ limit: limit,
334
+ });
317
335
  }
318
336
  /**
319
- * Generate buffer from TLObject.
320
- */
337
+ * Generate buffer from TLObject.
338
+ */
321
339
  write() {
322
340
  const b = new BytesIO();
323
341
  b.write(Primitive.Int.write(this.constructorId, false));
324
342
  // @ts-ignore
325
343
  let flags = 0;
326
- flags |= this.precise ? (1 << 0) : 0;
327
- flags |= this.cdnSupported ? (1 << 1) : 0;
328
- b.write((Primitive.Int.write(flags)));
344
+ flags |= this.precise ? 1 << 0 : 0;
345
+ flags |= this.cdnSupported ? 1 << 1 : 0;
346
+ b.write(Primitive.Int.write(flags));
329
347
  if (this.location !== undefined) {
330
348
  b.write(this.location.write());
331
349
  }
332
350
  if (this.offset !== undefined) {
333
- b.write((Primitive.Long.write(this.offset)));
351
+ b.write(Primitive.Long.write(this.offset));
334
352
  }
335
353
  if (this.limit !== undefined) {
336
- b.write((Primitive.Int.write(this.limit)));
354
+ b.write(Primitive.Int.write(this.limit));
337
355
  }
338
356
  return b.buffer;
339
357
  }
@@ -346,46 +364,51 @@ export class SaveBigFilePart extends TLObject {
346
364
  bytes;
347
365
  constructor(params) {
348
366
  super();
349
- this.classType = "functions";
350
- this.className = "upload.SaveBigFilePart";
367
+ this.classType = 'functions';
368
+ this.className = 'upload.SaveBigFilePart';
351
369
  this.constructorId = 0xde7b673d;
352
370
  this.subclassOfId = 0xf5b399ac;
353
- this._slots = ["fileId", "filePart", "fileTotalParts", "bytes"];
371
+ this._slots = ['fileId', 'filePart', 'fileTotalParts', 'bytes'];
354
372
  this.fileId = params.fileId;
355
373
  this.filePart = params.filePart;
356
374
  this.fileTotalParts = params.fileTotalParts;
357
375
  this.bytes = params.bytes;
358
376
  }
359
377
  /**
360
- * Generate the TLObject from buffer.
361
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
362
- */
378
+ * Generate the TLObject from buffer.
379
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
380
+ */
363
381
  static async read(_data, ..._args) {
364
382
  // no flags
365
383
  let fileId = await Primitive.Long.read(_data);
366
384
  let filePart = await Primitive.Int.read(_data);
367
385
  let fileTotalParts = await Primitive.Int.read(_data);
368
386
  let bytes = await Primitive.Bytes.read(_data);
369
- return new SaveBigFilePart({ "fileId": fileId, "filePart": filePart, "fileTotalParts": fileTotalParts, "bytes": bytes });
387
+ return new SaveBigFilePart({
388
+ fileId: fileId,
389
+ filePart: filePart,
390
+ fileTotalParts: fileTotalParts,
391
+ bytes: bytes,
392
+ });
370
393
  }
371
394
  /**
372
- * Generate buffer from TLObject.
373
- */
395
+ * Generate buffer from TLObject.
396
+ */
374
397
  write() {
375
398
  const b = new BytesIO();
376
399
  b.write(Primitive.Int.write(this.constructorId, false));
377
400
  // no flags
378
401
  if (this.fileId !== undefined) {
379
- b.write((Primitive.Long.write(this.fileId)));
402
+ b.write(Primitive.Long.write(this.fileId));
380
403
  }
381
404
  if (this.filePart !== undefined) {
382
- b.write((Primitive.Int.write(this.filePart)));
405
+ b.write(Primitive.Int.write(this.filePart));
383
406
  }
384
407
  if (this.fileTotalParts !== undefined) {
385
- b.write((Primitive.Int.write(this.fileTotalParts)));
408
+ b.write(Primitive.Int.write(this.fileTotalParts));
386
409
  }
387
410
  if (this.bytes !== undefined) {
388
- b.write((Primitive.Bytes.write(this.bytes)));
411
+ b.write(Primitive.Bytes.write(this.bytes));
389
412
  }
390
413
  return b.buffer;
391
414
  }
@@ -397,29 +420,29 @@ export class GetWebFile extends TLObject {
397
420
  limit;
398
421
  constructor(params) {
399
422
  super();
400
- this.classType = "functions";
401
- this.className = "upload.GetWebFile";
423
+ this.classType = 'functions';
424
+ this.className = 'upload.GetWebFile';
402
425
  this.constructorId = 0x24e6818d;
403
426
  this.subclassOfId = 0x68f17f51;
404
- this._slots = ["location", "offset", "limit"];
427
+ this._slots = ['location', 'offset', 'limit'];
405
428
  this.location = params.location;
406
429
  this.offset = params.offset;
407
430
  this.limit = params.limit;
408
431
  }
409
432
  /**
410
- * Generate the TLObject from buffer.
411
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
412
- */
433
+ * Generate the TLObject from buffer.
434
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
435
+ */
413
436
  static async read(_data, ..._args) {
414
437
  // no flags
415
438
  let location = await TLObject.read(_data);
416
439
  let offset = await Primitive.Int.read(_data);
417
440
  let limit = await Primitive.Int.read(_data);
418
- return new GetWebFile({ "location": location, "offset": offset, "limit": limit });
441
+ return new GetWebFile({ location: location, offset: offset, limit: limit });
419
442
  }
420
443
  /**
421
- * Generate buffer from TLObject.
422
- */
444
+ * Generate buffer from TLObject.
445
+ */
423
446
  write() {
424
447
  const b = new BytesIO();
425
448
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -428,10 +451,10 @@ export class GetWebFile extends TLObject {
428
451
  b.write(this.location.write());
429
452
  }
430
453
  if (this.offset !== undefined) {
431
- b.write((Primitive.Int.write(this.offset)));
454
+ b.write(Primitive.Int.write(this.offset));
432
455
  }
433
456
  if (this.limit !== undefined) {
434
- b.write((Primitive.Int.write(this.limit)));
457
+ b.write(Primitive.Int.write(this.limit));
435
458
  }
436
459
  return b.buffer;
437
460
  }
@@ -443,41 +466,41 @@ export class GetCdnFile extends TLObject {
443
466
  limit;
444
467
  constructor(params) {
445
468
  super();
446
- this.classType = "functions";
447
- this.className = "upload.GetCdnFile";
469
+ this.classType = 'functions';
470
+ this.className = 'upload.GetCdnFile';
448
471
  this.constructorId = 0x395f69da;
449
472
  this.subclassOfId = 0xf5ccf928;
450
- this._slots = ["fileToken", "offset", "limit"];
473
+ this._slots = ['fileToken', 'offset', 'limit'];
451
474
  this.fileToken = params.fileToken;
452
475
  this.offset = params.offset;
453
476
  this.limit = params.limit;
454
477
  }
455
478
  /**
456
- * Generate the TLObject from buffer.
457
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
458
- */
479
+ * Generate the TLObject from buffer.
480
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
481
+ */
459
482
  static async read(_data, ..._args) {
460
483
  // no flags
461
484
  let fileToken = await Primitive.Bytes.read(_data);
462
485
  let offset = await Primitive.Long.read(_data);
463
486
  let limit = await Primitive.Int.read(_data);
464
- return new GetCdnFile({ "fileToken": fileToken, "offset": offset, "limit": limit });
487
+ return new GetCdnFile({ fileToken: fileToken, offset: offset, limit: limit });
465
488
  }
466
489
  /**
467
- * Generate buffer from TLObject.
468
- */
490
+ * Generate buffer from TLObject.
491
+ */
469
492
  write() {
470
493
  const b = new BytesIO();
471
494
  b.write(Primitive.Int.write(this.constructorId, false));
472
495
  // no flags
473
496
  if (this.fileToken !== undefined) {
474
- b.write((Primitive.Bytes.write(this.fileToken)));
497
+ b.write(Primitive.Bytes.write(this.fileToken));
475
498
  }
476
499
  if (this.offset !== undefined) {
477
- b.write((Primitive.Long.write(this.offset)));
500
+ b.write(Primitive.Long.write(this.offset));
478
501
  }
479
502
  if (this.limit !== undefined) {
480
- b.write((Primitive.Int.write(this.limit)));
503
+ b.write(Primitive.Int.write(this.limit));
481
504
  }
482
505
  return b.buffer;
483
506
  }
@@ -488,36 +511,36 @@ export class ReuploadCdnFile extends TLObject {
488
511
  requestToken;
489
512
  constructor(params) {
490
513
  super();
491
- this.classType = "functions";
492
- this.className = "upload.ReuploadCdnFile";
514
+ this.classType = 'functions';
515
+ this.className = 'upload.ReuploadCdnFile';
493
516
  this.constructorId = 0x9b2754a8;
494
517
  this.subclassOfId = 0xa5940726;
495
- this._slots = ["fileToken", "requestToken"];
518
+ this._slots = ['fileToken', 'requestToken'];
496
519
  this.fileToken = params.fileToken;
497
520
  this.requestToken = params.requestToken;
498
521
  }
499
522
  /**
500
- * Generate the TLObject from buffer.
501
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
502
- */
523
+ * Generate the TLObject from buffer.
524
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
525
+ */
503
526
  static async read(_data, ..._args) {
504
527
  // no flags
505
528
  let fileToken = await Primitive.Bytes.read(_data);
506
529
  let requestToken = await Primitive.Bytes.read(_data);
507
- return new ReuploadCdnFile({ "fileToken": fileToken, "requestToken": requestToken });
530
+ return new ReuploadCdnFile({ fileToken: fileToken, requestToken: requestToken });
508
531
  }
509
532
  /**
510
- * Generate buffer from TLObject.
511
- */
533
+ * Generate buffer from TLObject.
534
+ */
512
535
  write() {
513
536
  const b = new BytesIO();
514
537
  b.write(Primitive.Int.write(this.constructorId, false));
515
538
  // no flags
516
539
  if (this.fileToken !== undefined) {
517
- b.write((Primitive.Bytes.write(this.fileToken)));
540
+ b.write(Primitive.Bytes.write(this.fileToken));
518
541
  }
519
542
  if (this.requestToken !== undefined) {
520
- b.write((Primitive.Bytes.write(this.requestToken)));
543
+ b.write(Primitive.Bytes.write(this.requestToken));
521
544
  }
522
545
  return b.buffer;
523
546
  }
@@ -528,36 +551,36 @@ export class GetCdnFileHashes extends TLObject {
528
551
  offset;
529
552
  constructor(params) {
530
553
  super();
531
- this.classType = "functions";
532
- this.className = "upload.GetCdnFileHashes";
554
+ this.classType = 'functions';
555
+ this.className = 'upload.GetCdnFileHashes';
533
556
  this.constructorId = 0x91dc3f31;
534
557
  this.subclassOfId = 0xa5940726;
535
- this._slots = ["fileToken", "offset"];
558
+ this._slots = ['fileToken', 'offset'];
536
559
  this.fileToken = params.fileToken;
537
560
  this.offset = params.offset;
538
561
  }
539
562
  /**
540
- * Generate the TLObject from buffer.
541
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
542
- */
563
+ * Generate the TLObject from buffer.
564
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
565
+ */
543
566
  static async read(_data, ..._args) {
544
567
  // no flags
545
568
  let fileToken = await Primitive.Bytes.read(_data);
546
569
  let offset = await Primitive.Long.read(_data);
547
- return new GetCdnFileHashes({ "fileToken": fileToken, "offset": offset });
570
+ return new GetCdnFileHashes({ fileToken: fileToken, offset: offset });
548
571
  }
549
572
  /**
550
- * Generate buffer from TLObject.
551
- */
573
+ * Generate buffer from TLObject.
574
+ */
552
575
  write() {
553
576
  const b = new BytesIO();
554
577
  b.write(Primitive.Int.write(this.constructorId, false));
555
578
  // no flags
556
579
  if (this.fileToken !== undefined) {
557
- b.write((Primitive.Bytes.write(this.fileToken)));
580
+ b.write(Primitive.Bytes.write(this.fileToken));
558
581
  }
559
582
  if (this.offset !== undefined) {
560
- b.write((Primitive.Long.write(this.offset)));
583
+ b.write(Primitive.Long.write(this.offset));
561
584
  }
562
585
  return b.buffer;
563
586
  }
@@ -568,27 +591,27 @@ export class GetFileHashes extends TLObject {
568
591
  offset;
569
592
  constructor(params) {
570
593
  super();
571
- this.classType = "functions";
572
- this.className = "upload.GetFileHashes";
594
+ this.classType = 'functions';
595
+ this.className = 'upload.GetFileHashes';
573
596
  this.constructorId = 0x9156982a;
574
597
  this.subclassOfId = 0xa5940726;
575
- this._slots = ["location", "offset"];
598
+ this._slots = ['location', 'offset'];
576
599
  this.location = params.location;
577
600
  this.offset = params.offset;
578
601
  }
579
602
  /**
580
- * Generate the TLObject from buffer.
581
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
582
- */
603
+ * Generate the TLObject from buffer.
604
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
605
+ */
583
606
  static async read(_data, ..._args) {
584
607
  // no flags
585
608
  let location = await TLObject.read(_data);
586
609
  let offset = await Primitive.Long.read(_data);
587
- return new GetFileHashes({ "location": location, "offset": offset });
610
+ return new GetFileHashes({ location: location, offset: offset });
588
611
  }
589
612
  /**
590
- * Generate buffer from TLObject.
591
- */
613
+ * Generate buffer from TLObject.
614
+ */
592
615
  write() {
593
616
  const b = new BytesIO();
594
617
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -597,7 +620,7 @@ export class GetFileHashes extends TLObject {
597
620
  b.write(this.location.write());
598
621
  }
599
622
  if (this.offset !== undefined) {
600
- b.write((Primitive.Long.write(this.offset)));
623
+ b.write(Primitive.Long.write(this.offset));
601
624
  }
602
625
  return b.buffer;
603
626
  }