@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';
@@ -14,31 +14,31 @@ export class SuggestedShortName extends TLObject {
14
14
  shortName;
15
15
  constructor(params) {
16
16
  super();
17
- this.classType = "types";
18
- this.className = "stickers.SuggestedShortName";
17
+ this.classType = 'types';
18
+ this.className = 'stickers.SuggestedShortName';
19
19
  this.constructorId = 0x85fea03f;
20
20
  this.subclassOfId = 0xc44a4b21;
21
- this._slots = ["shortName"];
21
+ this._slots = ['shortName'];
22
22
  this.shortName = params.shortName;
23
23
  }
24
24
  /**
25
- * Generate the TLObject from buffer.
26
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
27
- */
25
+ * Generate the TLObject from buffer.
26
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
27
+ */
28
28
  static async read(_data, ..._args) {
29
29
  // no flags
30
30
  let shortName = await Primitive.String.read(_data);
31
- return new SuggestedShortName({ "shortName": shortName });
31
+ return new SuggestedShortName({ shortName: shortName });
32
32
  }
33
33
  /**
34
- * Generate buffer from TLObject.
35
- */
34
+ * Generate buffer from TLObject.
35
+ */
36
36
  write() {
37
37
  const b = new BytesIO();
38
38
  b.write(Primitive.Int.write(this.constructorId, false));
39
39
  // no flags
40
40
  if (this.shortName !== undefined) {
41
- b.write((Primitive.String.write(this.shortName)));
41
+ b.write(Primitive.String.write(this.shortName));
42
42
  }
43
43
  return b.buffer;
44
44
  }
@@ -56,11 +56,21 @@ export class CreateStickerSet extends TLObject {
56
56
  software;
57
57
  constructor(params) {
58
58
  super();
59
- this.classType = "functions";
60
- this.className = "stickers.CreateStickerSet";
59
+ this.classType = 'functions';
60
+ this.className = 'stickers.CreateStickerSet';
61
61
  this.constructorId = 0x9021ab67;
62
62
  this.subclassOfId = 0x9b704a5a;
63
- this._slots = ["masks", "emojis", "textColor", "userId", "title", "shortName", "thumb", "stickers", "software"];
63
+ this._slots = [
64
+ 'masks',
65
+ 'emojis',
66
+ 'textColor',
67
+ 'userId',
68
+ 'title',
69
+ 'shortName',
70
+ 'thumb',
71
+ 'stickers',
72
+ 'software',
73
+ ];
64
74
  this.masks = params.masks;
65
75
  this.emojis = params.emojis;
66
76
  this.textColor = params.textColor;
@@ -72,54 +82,64 @@ export class CreateStickerSet extends TLObject {
72
82
  this.software = params.software;
73
83
  }
74
84
  /**
75
- * Generate the TLObject from buffer.
76
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
77
- */
85
+ * Generate the TLObject from buffer.
86
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
87
+ */
78
88
  static async read(_data, ..._args) {
79
89
  // @ts-ignore
80
90
  let flags = await Primitive.Int.read(_data);
81
- let masks = (flags & (1 << 0)) ? true : false;
82
- let emojis = (flags & (1 << 5)) ? true : false;
83
- let textColor = (flags & (1 << 6)) ? true : false;
91
+ let masks = flags & (1 << 0) ? true : false;
92
+ let emojis = flags & (1 << 5) ? true : false;
93
+ let textColor = flags & (1 << 6) ? true : false;
84
94
  let userId = await TLObject.read(_data);
85
95
  let title = await Primitive.String.read(_data);
86
96
  let shortName = await Primitive.String.read(_data);
87
- let thumb = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
97
+ let thumb = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
88
98
  let stickers = await TLObject.read(_data);
89
- let software = (flags & (1 << 3)) ? await Primitive.String.read(_data) : undefined;
90
- return new CreateStickerSet({ "masks": masks, "emojis": emojis, "textColor": textColor, "userId": userId, "title": title, "shortName": shortName, "thumb": thumb, "stickers": stickers, "software": software });
99
+ let software = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
100
+ return new CreateStickerSet({
101
+ masks: masks,
102
+ emojis: emojis,
103
+ textColor: textColor,
104
+ userId: userId,
105
+ title: title,
106
+ shortName: shortName,
107
+ thumb: thumb,
108
+ stickers: stickers,
109
+ software: software,
110
+ });
91
111
  }
92
112
  /**
93
- * Generate buffer from TLObject.
94
- */
113
+ * Generate buffer from TLObject.
114
+ */
95
115
  write() {
96
116
  const b = new BytesIO();
97
117
  b.write(Primitive.Int.write(this.constructorId, false));
98
118
  // @ts-ignore
99
119
  let flags = 0;
100
- flags |= this.masks ? (1 << 0) : 0;
101
- flags |= this.emojis ? (1 << 5) : 0;
102
- flags |= this.textColor ? (1 << 6) : 0;
103
- flags |= this.thumb !== undefined ? (1 << 2) : 0;
104
- flags |= this.software !== undefined ? (1 << 3) : 0;
105
- b.write((Primitive.Int.write(flags)));
120
+ flags |= this.masks ? 1 << 0 : 0;
121
+ flags |= this.emojis ? 1 << 5 : 0;
122
+ flags |= this.textColor ? 1 << 6 : 0;
123
+ flags |= this.thumb !== undefined ? 1 << 2 : 0;
124
+ flags |= this.software !== undefined ? 1 << 3 : 0;
125
+ b.write(Primitive.Int.write(flags));
106
126
  if (this.userId !== undefined) {
107
127
  b.write(this.userId.write());
108
128
  }
109
129
  if (this.title !== undefined) {
110
- b.write((Primitive.String.write(this.title)));
130
+ b.write(Primitive.String.write(this.title));
111
131
  }
112
132
  if (this.shortName !== undefined) {
113
- b.write((Primitive.String.write(this.shortName)));
133
+ b.write(Primitive.String.write(this.shortName));
114
134
  }
115
135
  if (this.thumb !== undefined) {
116
136
  b.write(this.thumb.write());
117
137
  }
118
138
  if (this.stickers) {
119
- b.write((Primitive.Vector.write(this.stickers)));
139
+ b.write(Primitive.Vector.write(this.stickers));
120
140
  }
121
141
  if (this.software !== undefined) {
122
- b.write((Primitive.String.write(this.software)));
142
+ b.write(Primitive.String.write(this.software));
123
143
  }
124
144
  return b.buffer;
125
145
  }
@@ -129,25 +149,25 @@ export class RemoveStickerFromSet extends TLObject {
129
149
  sticker;
130
150
  constructor(params) {
131
151
  super();
132
- this.classType = "functions";
133
- this.className = "stickers.RemoveStickerFromSet";
152
+ this.classType = 'functions';
153
+ this.className = 'stickers.RemoveStickerFromSet';
134
154
  this.constructorId = 0xf7760f51;
135
155
  this.subclassOfId = 0x9b704a5a;
136
- this._slots = ["sticker"];
156
+ this._slots = ['sticker'];
137
157
  this.sticker = params.sticker;
138
158
  }
139
159
  /**
140
- * Generate the TLObject from buffer.
141
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
142
- */
160
+ * Generate the TLObject from buffer.
161
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
162
+ */
143
163
  static async read(_data, ..._args) {
144
164
  // no flags
145
165
  let sticker = await TLObject.read(_data);
146
- return new RemoveStickerFromSet({ "sticker": sticker });
166
+ return new RemoveStickerFromSet({ sticker: sticker });
147
167
  }
148
168
  /**
149
- * Generate buffer from TLObject.
150
- */
169
+ * Generate buffer from TLObject.
170
+ */
151
171
  write() {
152
172
  const b = new BytesIO();
153
173
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -164,27 +184,27 @@ export class ChangeStickerPosition extends TLObject {
164
184
  position;
165
185
  constructor(params) {
166
186
  super();
167
- this.classType = "functions";
168
- this.className = "stickers.ChangeStickerPosition";
187
+ this.classType = 'functions';
188
+ this.className = 'stickers.ChangeStickerPosition';
169
189
  this.constructorId = 0xffb6d4ca;
170
190
  this.subclassOfId = 0x9b704a5a;
171
- this._slots = ["sticker", "position"];
191
+ this._slots = ['sticker', 'position'];
172
192
  this.sticker = params.sticker;
173
193
  this.position = params.position;
174
194
  }
175
195
  /**
176
- * Generate the TLObject from buffer.
177
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
178
- */
196
+ * Generate the TLObject from buffer.
197
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
198
+ */
179
199
  static async read(_data, ..._args) {
180
200
  // no flags
181
201
  let sticker = await TLObject.read(_data);
182
202
  let position = await Primitive.Int.read(_data);
183
- return new ChangeStickerPosition({ "sticker": sticker, "position": position });
203
+ return new ChangeStickerPosition({ sticker: sticker, position: position });
184
204
  }
185
205
  /**
186
- * Generate buffer from TLObject.
187
- */
206
+ * Generate buffer from TLObject.
207
+ */
188
208
  write() {
189
209
  const b = new BytesIO();
190
210
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -193,7 +213,7 @@ export class ChangeStickerPosition extends TLObject {
193
213
  b.write(this.sticker.write());
194
214
  }
195
215
  if (this.position !== undefined) {
196
- b.write((Primitive.Int.write(this.position)));
216
+ b.write(Primitive.Int.write(this.position));
197
217
  }
198
218
  return b.buffer;
199
219
  }
@@ -204,27 +224,27 @@ export class AddStickerToSet extends TLObject {
204
224
  sticker;
205
225
  constructor(params) {
206
226
  super();
207
- this.classType = "functions";
208
- this.className = "stickers.AddStickerToSet";
227
+ this.classType = 'functions';
228
+ this.className = 'stickers.AddStickerToSet';
209
229
  this.constructorId = 0x8653febe;
210
230
  this.subclassOfId = 0x9b704a5a;
211
- this._slots = ["stickerset", "sticker"];
231
+ this._slots = ['stickerset', 'sticker'];
212
232
  this.stickerset = params.stickerset;
213
233
  this.sticker = params.sticker;
214
234
  }
215
235
  /**
216
- * Generate the TLObject from buffer.
217
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
218
- */
236
+ * Generate the TLObject from buffer.
237
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
238
+ */
219
239
  static async read(_data, ..._args) {
220
240
  // no flags
221
241
  let stickerset = await TLObject.read(_data);
222
242
  let sticker = await TLObject.read(_data);
223
- return new AddStickerToSet({ "stickerset": stickerset, "sticker": sticker });
243
+ return new AddStickerToSet({ stickerset: stickerset, sticker: sticker });
224
244
  }
225
245
  /**
226
- * Generate buffer from TLObject.
227
- */
246
+ * Generate buffer from TLObject.
247
+ */
228
248
  write() {
229
249
  const b = new BytesIO();
230
250
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -245,38 +265,42 @@ export class SetStickerSetThumb extends TLObject {
245
265
  thumbDocumentId;
246
266
  constructor(params) {
247
267
  super();
248
- this.classType = "functions";
249
- this.className = "stickers.SetStickerSetThumb";
268
+ this.classType = 'functions';
269
+ this.className = 'stickers.SetStickerSetThumb';
250
270
  this.constructorId = 0xa76a5392;
251
271
  this.subclassOfId = 0x9b704a5a;
252
- this._slots = ["stickerset", "thumb", "thumbDocumentId"];
272
+ this._slots = ['stickerset', 'thumb', 'thumbDocumentId'];
253
273
  this.stickerset = params.stickerset;
254
274
  this.thumb = params.thumb;
255
275
  this.thumbDocumentId = params.thumbDocumentId;
256
276
  }
257
277
  /**
258
- * Generate the TLObject from buffer.
259
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
260
- */
278
+ * Generate the TLObject from buffer.
279
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
280
+ */
261
281
  static async read(_data, ..._args) {
262
282
  // @ts-ignore
263
283
  let flags = await Primitive.Int.read(_data);
264
284
  let stickerset = await TLObject.read(_data);
265
- let thumb = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
266
- let thumbDocumentId = (flags & (1 << 1)) ? await Primitive.Long.read(_data) : undefined;
267
- return new SetStickerSetThumb({ "stickerset": stickerset, "thumb": thumb, "thumbDocumentId": thumbDocumentId });
285
+ let thumb = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
286
+ let thumbDocumentId = flags & (1 << 1) ? await Primitive.Long.read(_data) : undefined;
287
+ return new SetStickerSetThumb({
288
+ stickerset: stickerset,
289
+ thumb: thumb,
290
+ thumbDocumentId: thumbDocumentId,
291
+ });
268
292
  }
269
293
  /**
270
- * Generate buffer from TLObject.
271
- */
294
+ * Generate buffer from TLObject.
295
+ */
272
296
  write() {
273
297
  const b = new BytesIO();
274
298
  b.write(Primitive.Int.write(this.constructorId, false));
275
299
  // @ts-ignore
276
300
  let flags = 0;
277
- flags |= this.thumb !== undefined ? (1 << 0) : 0;
278
- flags |= this.thumbDocumentId !== undefined ? (1 << 1) : 0;
279
- b.write((Primitive.Int.write(flags)));
301
+ flags |= this.thumb !== undefined ? 1 << 0 : 0;
302
+ flags |= this.thumbDocumentId !== undefined ? 1 << 1 : 0;
303
+ b.write(Primitive.Int.write(flags));
280
304
  if (this.stickerset !== undefined) {
281
305
  b.write(this.stickerset.write());
282
306
  }
@@ -284,7 +308,7 @@ export class SetStickerSetThumb extends TLObject {
284
308
  b.write(this.thumb.write());
285
309
  }
286
310
  if (this.thumbDocumentId !== undefined) {
287
- b.write((Primitive.Long.write(this.thumbDocumentId)));
311
+ b.write(Primitive.Long.write(this.thumbDocumentId));
288
312
  }
289
313
  return b.buffer;
290
314
  }
@@ -294,31 +318,31 @@ export class CheckShortName extends TLObject {
294
318
  shortName;
295
319
  constructor(params) {
296
320
  super();
297
- this.classType = "functions";
298
- this.className = "stickers.CheckShortName";
321
+ this.classType = 'functions';
322
+ this.className = 'stickers.CheckShortName';
299
323
  this.constructorId = 0x284b3639;
300
324
  this.subclassOfId = 0xf5b399ac;
301
- this._slots = ["shortName"];
325
+ this._slots = ['shortName'];
302
326
  this.shortName = params.shortName;
303
327
  }
304
328
  /**
305
- * Generate the TLObject from buffer.
306
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
307
- */
329
+ * Generate the TLObject from buffer.
330
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
331
+ */
308
332
  static async read(_data, ..._args) {
309
333
  // no flags
310
334
  let shortName = await Primitive.String.read(_data);
311
- return new CheckShortName({ "shortName": shortName });
335
+ return new CheckShortName({ shortName: shortName });
312
336
  }
313
337
  /**
314
- * Generate buffer from TLObject.
315
- */
338
+ * Generate buffer from TLObject.
339
+ */
316
340
  write() {
317
341
  const b = new BytesIO();
318
342
  b.write(Primitive.Int.write(this.constructorId, false));
319
343
  // no flags
320
344
  if (this.shortName !== undefined) {
321
- b.write((Primitive.String.write(this.shortName)));
345
+ b.write(Primitive.String.write(this.shortName));
322
346
  }
323
347
  return b.buffer;
324
348
  }
@@ -328,31 +352,31 @@ export class SuggestShortName extends TLObject {
328
352
  title;
329
353
  constructor(params) {
330
354
  super();
331
- this.classType = "functions";
332
- this.className = "stickers.SuggestShortName";
355
+ this.classType = 'functions';
356
+ this.className = 'stickers.SuggestShortName';
333
357
  this.constructorId = 0x4dafc503;
334
358
  this.subclassOfId = 0xc44a4b21;
335
- this._slots = ["title"];
359
+ this._slots = ['title'];
336
360
  this.title = params.title;
337
361
  }
338
362
  /**
339
- * Generate the TLObject from buffer.
340
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
341
- */
363
+ * Generate the TLObject from buffer.
364
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
365
+ */
342
366
  static async read(_data, ..._args) {
343
367
  // no flags
344
368
  let title = await Primitive.String.read(_data);
345
- return new SuggestShortName({ "title": title });
369
+ return new SuggestShortName({ title: title });
346
370
  }
347
371
  /**
348
- * Generate buffer from TLObject.
349
- */
372
+ * Generate buffer from TLObject.
373
+ */
350
374
  write() {
351
375
  const b = new BytesIO();
352
376
  b.write(Primitive.Int.write(this.constructorId, false));
353
377
  // no flags
354
378
  if (this.title !== undefined) {
355
- b.write((Primitive.String.write(this.title)));
379
+ b.write(Primitive.String.write(this.title));
356
380
  }
357
381
  return b.buffer;
358
382
  }
@@ -365,52 +389,57 @@ export class ChangeSticker extends TLObject {
365
389
  keywords;
366
390
  constructor(params) {
367
391
  super();
368
- this.classType = "functions";
369
- this.className = "stickers.ChangeSticker";
392
+ this.classType = 'functions';
393
+ this.className = 'stickers.ChangeSticker';
370
394
  this.constructorId = 0xf5537ebc;
371
395
  this.subclassOfId = 0x9b704a5a;
372
- this._slots = ["sticker", "emoji", "maskCoords", "keywords"];
396
+ this._slots = ['sticker', 'emoji', 'maskCoords', 'keywords'];
373
397
  this.sticker = params.sticker;
374
398
  this.emoji = params.emoji;
375
399
  this.maskCoords = params.maskCoords;
376
400
  this.keywords = params.keywords;
377
401
  }
378
402
  /**
379
- * Generate the TLObject from buffer.
380
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
381
- */
403
+ * Generate the TLObject from buffer.
404
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
405
+ */
382
406
  static async read(_data, ..._args) {
383
407
  // @ts-ignore
384
408
  let flags = await Primitive.Int.read(_data);
385
409
  let sticker = await TLObject.read(_data);
386
- let emoji = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
387
- let maskCoords = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
388
- let keywords = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
389
- return new ChangeSticker({ "sticker": sticker, "emoji": emoji, "maskCoords": maskCoords, "keywords": keywords });
410
+ let emoji = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
411
+ let maskCoords = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
412
+ let keywords = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
413
+ return new ChangeSticker({
414
+ sticker: sticker,
415
+ emoji: emoji,
416
+ maskCoords: maskCoords,
417
+ keywords: keywords,
418
+ });
390
419
  }
391
420
  /**
392
- * Generate buffer from TLObject.
393
- */
421
+ * Generate buffer from TLObject.
422
+ */
394
423
  write() {
395
424
  const b = new BytesIO();
396
425
  b.write(Primitive.Int.write(this.constructorId, false));
397
426
  // @ts-ignore
398
427
  let flags = 0;
399
- flags |= this.emoji !== undefined ? (1 << 0) : 0;
400
- flags |= this.maskCoords !== undefined ? (1 << 1) : 0;
401
- flags |= this.keywords !== undefined ? (1 << 2) : 0;
402
- b.write((Primitive.Int.write(flags)));
428
+ flags |= this.emoji !== undefined ? 1 << 0 : 0;
429
+ flags |= this.maskCoords !== undefined ? 1 << 1 : 0;
430
+ flags |= this.keywords !== undefined ? 1 << 2 : 0;
431
+ b.write(Primitive.Int.write(flags));
403
432
  if (this.sticker !== undefined) {
404
433
  b.write(this.sticker.write());
405
434
  }
406
435
  if (this.emoji !== undefined) {
407
- b.write((Primitive.String.write(this.emoji)));
436
+ b.write(Primitive.String.write(this.emoji));
408
437
  }
409
438
  if (this.maskCoords !== undefined) {
410
439
  b.write(this.maskCoords.write());
411
440
  }
412
441
  if (this.keywords !== undefined) {
413
- b.write((Primitive.String.write(this.keywords)));
442
+ b.write(Primitive.String.write(this.keywords));
414
443
  }
415
444
  return b.buffer;
416
445
  }
@@ -421,27 +450,27 @@ export class RenameStickerSet extends TLObject {
421
450
  title;
422
451
  constructor(params) {
423
452
  super();
424
- this.classType = "functions";
425
- this.className = "stickers.RenameStickerSet";
453
+ this.classType = 'functions';
454
+ this.className = 'stickers.RenameStickerSet';
426
455
  this.constructorId = 0x124b1c00;
427
456
  this.subclassOfId = 0x9b704a5a;
428
- this._slots = ["stickerset", "title"];
457
+ this._slots = ['stickerset', 'title'];
429
458
  this.stickerset = params.stickerset;
430
459
  this.title = params.title;
431
460
  }
432
461
  /**
433
- * Generate the TLObject from buffer.
434
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
435
- */
462
+ * Generate the TLObject from buffer.
463
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
464
+ */
436
465
  static async read(_data, ..._args) {
437
466
  // no flags
438
467
  let stickerset = await TLObject.read(_data);
439
468
  let title = await Primitive.String.read(_data);
440
- return new RenameStickerSet({ "stickerset": stickerset, "title": title });
469
+ return new RenameStickerSet({ stickerset: stickerset, title: title });
441
470
  }
442
471
  /**
443
- * Generate buffer from TLObject.
444
- */
472
+ * Generate buffer from TLObject.
473
+ */
445
474
  write() {
446
475
  const b = new BytesIO();
447
476
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -450,7 +479,7 @@ export class RenameStickerSet extends TLObject {
450
479
  b.write(this.stickerset.write());
451
480
  }
452
481
  if (this.title !== undefined) {
453
- b.write((Primitive.String.write(this.title)));
482
+ b.write(Primitive.String.write(this.title));
454
483
  }
455
484
  return b.buffer;
456
485
  }
@@ -460,25 +489,25 @@ export class DeleteStickerSet extends TLObject {
460
489
  stickerset;
461
490
  constructor(params) {
462
491
  super();
463
- this.classType = "functions";
464
- this.className = "stickers.DeleteStickerSet";
492
+ this.classType = 'functions';
493
+ this.className = 'stickers.DeleteStickerSet';
465
494
  this.constructorId = 0x87704394;
466
495
  this.subclassOfId = 0xf5b399ac;
467
- this._slots = ["stickerset"];
496
+ this._slots = ['stickerset'];
468
497
  this.stickerset = params.stickerset;
469
498
  }
470
499
  /**
471
- * Generate the TLObject from buffer.
472
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
473
- */
500
+ * Generate the TLObject from buffer.
501
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
502
+ */
474
503
  static async read(_data, ..._args) {
475
504
  // no flags
476
505
  let stickerset = await TLObject.read(_data);
477
- return new DeleteStickerSet({ "stickerset": stickerset });
506
+ return new DeleteStickerSet({ stickerset: stickerset });
478
507
  }
479
508
  /**
480
- * Generate buffer from TLObject.
481
- */
509
+ * Generate buffer from TLObject.
510
+ */
482
511
  write() {
483
512
  const b = new BytesIO();
484
513
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -495,27 +524,27 @@ export class ReplaceSticker extends TLObject {
495
524
  newSticker;
496
525
  constructor(params) {
497
526
  super();
498
- this.classType = "functions";
499
- this.className = "stickers.ReplaceSticker";
527
+ this.classType = 'functions';
528
+ this.className = 'stickers.ReplaceSticker';
500
529
  this.constructorId = 0x4696459a;
501
530
  this.subclassOfId = 0x9b704a5a;
502
- this._slots = ["sticker", "newSticker"];
531
+ this._slots = ['sticker', 'newSticker'];
503
532
  this.sticker = params.sticker;
504
533
  this.newSticker = params.newSticker;
505
534
  }
506
535
  /**
507
- * Generate the TLObject from buffer.
508
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
509
- */
536
+ * Generate the TLObject from buffer.
537
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
538
+ */
510
539
  static async read(_data, ..._args) {
511
540
  // no flags
512
541
  let sticker = await TLObject.read(_data);
513
542
  let newSticker = await TLObject.read(_data);
514
- return new ReplaceSticker({ "sticker": sticker, "newSticker": newSticker });
543
+ return new ReplaceSticker({ sticker: sticker, newSticker: newSticker });
515
544
  }
516
545
  /**
517
- * Generate buffer from TLObject.
518
- */
546
+ * Generate buffer from TLObject.
547
+ */
519
548
  write() {
520
549
  const b = new BytesIO();
521
550
  b.write(Primitive.Int.write(this.constructorId, false));