@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,30 +6,30 @@
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';
13
13
  export class TonesNotModified extends TLObject {
14
14
  constructor() {
15
15
  super();
16
- this.classType = "types";
17
- this.className = "aicompose.TonesNotModified";
16
+ this.classType = 'types';
17
+ this.className = 'aicompose.TonesNotModified';
18
18
  this.constructorId = 0xc1f46103;
19
19
  this.subclassOfId = 0xf25ffed9;
20
20
  this._slots = [];
21
21
  }
22
22
  /**
23
- * Generate the TLObject from buffer.
24
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
25
- */
23
+ * Generate the TLObject from buffer.
24
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
25
+ */
26
26
  static async read(_data, ..._args) {
27
27
  // no flags
28
28
  return new TonesNotModified();
29
29
  }
30
30
  /**
31
- * Generate buffer from TLObject.
32
- */
31
+ * Generate buffer from TLObject.
32
+ */
33
33
  write() {
34
34
  const b = new BytesIO();
35
35
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -43,41 +43,41 @@ export class Tones extends TLObject {
43
43
  users;
44
44
  constructor(params) {
45
45
  super();
46
- this.classType = "types";
47
- this.className = "aicompose.Tones";
46
+ this.classType = 'types';
47
+ this.className = 'aicompose.Tones';
48
48
  this.constructorId = 0x6c9d0efe;
49
49
  this.subclassOfId = 0xf25ffed9;
50
- this._slots = ["hash", "tones", "users"];
50
+ this._slots = ['hash', 'tones', 'users'];
51
51
  this.hash = params.hash;
52
52
  this.tones = params.tones;
53
53
  this.users = params.users;
54
54
  }
55
55
  /**
56
- * Generate the TLObject from buffer.
57
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
58
- */
56
+ * Generate the TLObject from buffer.
57
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
58
+ */
59
59
  static async read(_data, ..._args) {
60
60
  // no flags
61
61
  let hash = await Primitive.Long.read(_data);
62
62
  let tones = await TLObject.read(_data);
63
63
  let users = await TLObject.read(_data);
64
- return new Tones({ "hash": hash, "tones": tones, "users": users });
64
+ return new Tones({ hash: hash, tones: tones, users: users });
65
65
  }
66
66
  /**
67
- * Generate buffer from TLObject.
68
- */
67
+ * Generate buffer from TLObject.
68
+ */
69
69
  write() {
70
70
  const b = new BytesIO();
71
71
  b.write(Primitive.Int.write(this.constructorId, false));
72
72
  // no flags
73
73
  if (this.hash !== undefined) {
74
- b.write((Primitive.Long.write(this.hash)));
74
+ b.write(Primitive.Long.write(this.hash));
75
75
  }
76
76
  if (this.tones) {
77
- b.write((Primitive.Vector.write(this.tones)));
77
+ b.write(Primitive.Vector.write(this.tones));
78
78
  }
79
79
  if (this.users) {
80
- b.write((Primitive.Vector.write(this.users)));
80
+ b.write(Primitive.Vector.write(this.users));
81
81
  }
82
82
  return b.buffer;
83
83
  }
@@ -90,47 +90,52 @@ export class CreateTone extends TLObject {
90
90
  prompt;
91
91
  constructor(params) {
92
92
  super();
93
- this.classType = "functions";
94
- this.className = "aicompose.CreateTone";
93
+ this.classType = 'functions';
94
+ this.className = 'aicompose.CreateTone';
95
95
  this.constructorId = 0x4aa83913;
96
96
  this.subclassOfId = 0xd476f30d;
97
- this._slots = ["displayAuthor", "emojiId", "title", "prompt"];
97
+ this._slots = ['displayAuthor', 'emojiId', 'title', 'prompt'];
98
98
  this.displayAuthor = params.displayAuthor;
99
99
  this.emojiId = params.emojiId;
100
100
  this.title = params.title;
101
101
  this.prompt = params.prompt;
102
102
  }
103
103
  /**
104
- * Generate the TLObject from buffer.
105
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
106
- */
104
+ * Generate the TLObject from buffer.
105
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
106
+ */
107
107
  static async read(_data, ..._args) {
108
108
  // @ts-ignore
109
109
  let flags = await Primitive.Int.read(_data);
110
- let displayAuthor = (flags & (1 << 0)) ? true : false;
110
+ let displayAuthor = flags & (1 << 0) ? true : false;
111
111
  let emojiId = await Primitive.Long.read(_data);
112
112
  let title = await Primitive.String.read(_data);
113
113
  let prompt = await Primitive.String.read(_data);
114
- return new CreateTone({ "displayAuthor": displayAuthor, "emojiId": emojiId, "title": title, "prompt": prompt });
114
+ return new CreateTone({
115
+ displayAuthor: displayAuthor,
116
+ emojiId: emojiId,
117
+ title: title,
118
+ prompt: prompt,
119
+ });
115
120
  }
116
121
  /**
117
- * Generate buffer from TLObject.
118
- */
122
+ * Generate buffer from TLObject.
123
+ */
119
124
  write() {
120
125
  const b = new BytesIO();
121
126
  b.write(Primitive.Int.write(this.constructorId, false));
122
127
  // @ts-ignore
123
128
  let flags = 0;
124
- flags |= this.displayAuthor ? (1 << 0) : 0;
125
- b.write((Primitive.Int.write(flags)));
129
+ flags |= this.displayAuthor ? 1 << 0 : 0;
130
+ b.write(Primitive.Int.write(flags));
126
131
  if (this.emojiId !== undefined) {
127
- b.write((Primitive.Long.write(this.emojiId)));
132
+ b.write(Primitive.Long.write(this.emojiId));
128
133
  }
129
134
  if (this.title !== undefined) {
130
- b.write((Primitive.String.write(this.title)));
135
+ b.write(Primitive.String.write(this.title));
131
136
  }
132
137
  if (this.prompt !== undefined) {
133
- b.write((Primitive.String.write(this.prompt)));
138
+ b.write(Primitive.String.write(this.prompt));
134
139
  }
135
140
  return b.buffer;
136
141
  }
@@ -144,11 +149,11 @@ export class UpdateTone extends TLObject {
144
149
  prompt;
145
150
  constructor(params) {
146
151
  super();
147
- this.classType = "functions";
148
- this.className = "aicompose.UpdateTone";
152
+ this.classType = 'functions';
153
+ this.className = 'aicompose.UpdateTone';
149
154
  this.constructorId = 0x903bcf59;
150
155
  this.subclassOfId = 0xd476f30d;
151
- this._slots = ["tone", "displayAuthor", "emojiId", "title", "prompt"];
156
+ this._slots = ['tone', 'displayAuthor', 'emojiId', 'title', 'prompt'];
152
157
  this.tone = params.tone;
153
158
  this.displayAuthor = params.displayAuthor;
154
159
  this.emojiId = params.emojiId;
@@ -156,46 +161,52 @@ export class UpdateTone extends TLObject {
156
161
  this.prompt = params.prompt;
157
162
  }
158
163
  /**
159
- * Generate the TLObject from buffer.
160
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
161
- */
164
+ * Generate the TLObject from buffer.
165
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
166
+ */
162
167
  static async read(_data, ..._args) {
163
168
  // @ts-ignore
164
169
  let flags = await Primitive.Int.read(_data);
165
170
  let tone = await TLObject.read(_data);
166
- let displayAuthor = (flags & (1 << 0)) ? await Primitive.Bool.read(_data) : undefined;
167
- let emojiId = (flags & (1 << 1)) ? await Primitive.Long.read(_data) : undefined;
168
- let title = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
169
- let prompt = (flags & (1 << 3)) ? await Primitive.String.read(_data) : undefined;
170
- return new UpdateTone({ "tone": tone, "displayAuthor": displayAuthor, "emojiId": emojiId, "title": title, "prompt": prompt });
171
+ let displayAuthor = flags & (1 << 0) ? await Primitive.Bool.read(_data) : undefined;
172
+ let emojiId = flags & (1 << 1) ? await Primitive.Long.read(_data) : undefined;
173
+ let title = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
174
+ let prompt = flags & (1 << 3) ? await Primitive.String.read(_data) : undefined;
175
+ return new UpdateTone({
176
+ tone: tone,
177
+ displayAuthor: displayAuthor,
178
+ emojiId: emojiId,
179
+ title: title,
180
+ prompt: prompt,
181
+ });
171
182
  }
172
183
  /**
173
- * Generate buffer from TLObject.
174
- */
184
+ * Generate buffer from TLObject.
185
+ */
175
186
  write() {
176
187
  const b = new BytesIO();
177
188
  b.write(Primitive.Int.write(this.constructorId, false));
178
189
  // @ts-ignore
179
190
  let flags = 0;
180
- flags |= this.displayAuthor !== undefined ? (1 << 0) : 0;
181
- flags |= this.emojiId !== undefined ? (1 << 1) : 0;
182
- flags |= this.title !== undefined ? (1 << 2) : 0;
183
- flags |= this.prompt !== undefined ? (1 << 3) : 0;
184
- b.write((Primitive.Int.write(flags)));
191
+ flags |= this.displayAuthor !== undefined ? 1 << 0 : 0;
192
+ flags |= this.emojiId !== undefined ? 1 << 1 : 0;
193
+ flags |= this.title !== undefined ? 1 << 2 : 0;
194
+ flags |= this.prompt !== undefined ? 1 << 3 : 0;
195
+ b.write(Primitive.Int.write(flags));
185
196
  if (this.tone !== undefined) {
186
197
  b.write(this.tone.write());
187
198
  }
188
199
  if (this.displayAuthor !== undefined) {
189
- b.write((Primitive.Bool.write(this.displayAuthor)));
200
+ b.write(Primitive.Bool.write(this.displayAuthor));
190
201
  }
191
202
  if (this.emojiId !== undefined) {
192
- b.write((Primitive.Long.write(this.emojiId)));
203
+ b.write(Primitive.Long.write(this.emojiId));
193
204
  }
194
205
  if (this.title !== undefined) {
195
- b.write((Primitive.String.write(this.title)));
206
+ b.write(Primitive.String.write(this.title));
196
207
  }
197
208
  if (this.prompt !== undefined) {
198
- b.write((Primitive.String.write(this.prompt)));
209
+ b.write(Primitive.String.write(this.prompt));
199
210
  }
200
211
  return b.buffer;
201
212
  }
@@ -206,27 +217,27 @@ export class SaveTone extends TLObject {
206
217
  unsave;
207
218
  constructor(params) {
208
219
  super();
209
- this.classType = "functions";
210
- this.className = "aicompose.SaveTone";
220
+ this.classType = 'functions';
221
+ this.className = 'aicompose.SaveTone';
211
222
  this.constructorId = 0x1782cbb1;
212
223
  this.subclassOfId = 0xf5b399ac;
213
- this._slots = ["tone", "unsave"];
224
+ this._slots = ['tone', 'unsave'];
214
225
  this.tone = params.tone;
215
226
  this.unsave = params.unsave;
216
227
  }
217
228
  /**
218
- * Generate the TLObject from buffer.
219
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
220
- */
229
+ * Generate the TLObject from buffer.
230
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
231
+ */
221
232
  static async read(_data, ..._args) {
222
233
  // no flags
223
234
  let tone = await TLObject.read(_data);
224
235
  let unsave = await Primitive.Bool.read(_data);
225
- return new SaveTone({ "tone": tone, "unsave": unsave });
236
+ return new SaveTone({ tone: tone, unsave: unsave });
226
237
  }
227
238
  /**
228
- * Generate buffer from TLObject.
229
- */
239
+ * Generate buffer from TLObject.
240
+ */
230
241
  write() {
231
242
  const b = new BytesIO();
232
243
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -235,7 +246,7 @@ export class SaveTone extends TLObject {
235
246
  b.write(this.tone.write());
236
247
  }
237
248
  if (this.unsave !== undefined) {
238
- b.write((Primitive.Bool.write(this.unsave)));
249
+ b.write(Primitive.Bool.write(this.unsave));
239
250
  }
240
251
  return b.buffer;
241
252
  }
@@ -245,25 +256,25 @@ export class DeleteTone extends TLObject {
245
256
  tone;
246
257
  constructor(params) {
247
258
  super();
248
- this.classType = "functions";
249
- this.className = "aicompose.DeleteTone";
259
+ this.classType = 'functions';
260
+ this.className = 'aicompose.DeleteTone';
250
261
  this.constructorId = 0xdd39316a;
251
262
  this.subclassOfId = 0xf5b399ac;
252
- this._slots = ["tone"];
263
+ this._slots = ['tone'];
253
264
  this.tone = params.tone;
254
265
  }
255
266
  /**
256
- * Generate the TLObject from buffer.
257
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
258
- */
267
+ * Generate the TLObject from buffer.
268
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
269
+ */
259
270
  static async read(_data, ..._args) {
260
271
  // no flags
261
272
  let tone = await TLObject.read(_data);
262
- return new DeleteTone({ "tone": tone });
273
+ return new DeleteTone({ tone: tone });
263
274
  }
264
275
  /**
265
- * Generate buffer from TLObject.
266
- */
276
+ * Generate buffer from TLObject.
277
+ */
267
278
  write() {
268
279
  const b = new BytesIO();
269
280
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -279,25 +290,25 @@ export class GetTone extends TLObject {
279
290
  tone;
280
291
  constructor(params) {
281
292
  super();
282
- this.classType = "functions";
283
- this.className = "aicompose.GetTone";
293
+ this.classType = 'functions';
294
+ this.className = 'aicompose.GetTone';
284
295
  this.constructorId = 0xb2e8ba03;
285
296
  this.subclassOfId = 0xf25ffed9;
286
- this._slots = ["tone"];
297
+ this._slots = ['tone'];
287
298
  this.tone = params.tone;
288
299
  }
289
300
  /**
290
- * Generate the TLObject from buffer.
291
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
292
- */
301
+ * Generate the TLObject from buffer.
302
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
303
+ */
293
304
  static async read(_data, ..._args) {
294
305
  // no flags
295
306
  let tone = await TLObject.read(_data);
296
- return new GetTone({ "tone": tone });
307
+ return new GetTone({ tone: tone });
297
308
  }
298
309
  /**
299
- * Generate buffer from TLObject.
300
- */
310
+ * Generate buffer from TLObject.
311
+ */
301
312
  write() {
302
313
  const b = new BytesIO();
303
314
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -313,31 +324,31 @@ export class GetTones extends TLObject {
313
324
  hash;
314
325
  constructor(params) {
315
326
  super();
316
- this.classType = "functions";
317
- this.className = "aicompose.GetTones";
327
+ this.classType = 'functions';
328
+ this.className = 'aicompose.GetTones';
318
329
  this.constructorId = 0xabd59201;
319
330
  this.subclassOfId = 0xf25ffed9;
320
- this._slots = ["hash"];
331
+ this._slots = ['hash'];
321
332
  this.hash = params.hash;
322
333
  }
323
334
  /**
324
- * Generate the TLObject from buffer.
325
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
326
- */
335
+ * Generate the TLObject from buffer.
336
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
337
+ */
327
338
  static async read(_data, ..._args) {
328
339
  // no flags
329
340
  let hash = await Primitive.Long.read(_data);
330
- return new GetTones({ "hash": hash });
341
+ return new GetTones({ hash: hash });
331
342
  }
332
343
  /**
333
- * Generate buffer from TLObject.
334
- */
344
+ * Generate buffer from TLObject.
345
+ */
335
346
  write() {
336
347
  const b = new BytesIO();
337
348
  b.write(Primitive.Int.write(this.constructorId, false));
338
349
  // no flags
339
350
  if (this.hash !== undefined) {
340
- b.write((Primitive.Long.write(this.hash)));
351
+ b.write(Primitive.Long.write(this.hash));
341
352
  }
342
353
  return b.buffer;
343
354
  }
@@ -348,27 +359,27 @@ export class GetToneExample extends TLObject {
348
359
  num;
349
360
  constructor(params) {
350
361
  super();
351
- this.classType = "functions";
352
- this.className = "aicompose.GetToneExample";
362
+ this.classType = 'functions';
363
+ this.className = 'aicompose.GetToneExample';
353
364
  this.constructorId = 0xd1b4ab14;
354
365
  this.subclassOfId = 0x8c2493d5;
355
- this._slots = ["tone", "num"];
366
+ this._slots = ['tone', 'num'];
356
367
  this.tone = params.tone;
357
368
  this.num = params.num;
358
369
  }
359
370
  /**
360
- * Generate the TLObject from buffer.
361
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
362
- */
371
+ * Generate the TLObject from buffer.
372
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
373
+ */
363
374
  static async read(_data, ..._args) {
364
375
  // no flags
365
376
  let tone = await TLObject.read(_data);
366
377
  let num = await Primitive.Int.read(_data);
367
- return new GetToneExample({ "tone": tone, "num": num });
378
+ return new GetToneExample({ tone: tone, num: num });
368
379
  }
369
380
  /**
370
- * Generate buffer from TLObject.
371
- */
381
+ * Generate buffer from TLObject.
382
+ */
372
383
  write() {
373
384
  const b = new BytesIO();
374
385
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -377,7 +388,7 @@ export class GetToneExample extends TLObject {
377
388
  b.write(this.tone.write());
378
389
  }
379
390
  if (this.num !== undefined) {
380
- b.write((Primitive.Int.write(this.num)));
391
+ b.write(Primitive.Int.write(this.num));
381
392
  }
382
393
  return b.buffer;
383
394
  }
@@ -388,35 +399,35 @@ export class SetChatStyle extends TLObject {
388
399
  style;
389
400
  constructor(params) {
390
401
  super();
391
- this.classType = "functions";
392
- this.className = "aicompose.SetChatStyle";
402
+ this.classType = 'functions';
403
+ this.className = 'aicompose.SetChatStyle';
393
404
  this.constructorId = 0x5d9939c0;
394
405
  this.subclassOfId = 0xf5b399ac;
395
- this._slots = ["peer", "style"];
406
+ this._slots = ['peer', 'style'];
396
407
  this.peer = params.peer;
397
408
  this.style = params.style;
398
409
  }
399
410
  /**
400
- * Generate the TLObject from buffer.
401
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
402
- */
411
+ * Generate the TLObject from buffer.
412
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
413
+ */
403
414
  static async read(_data, ..._args) {
404
415
  // @ts-ignore
405
416
  let flags = await Primitive.Int.read(_data);
406
417
  let peer = await TLObject.read(_data);
407
- let style = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
408
- return new SetChatStyle({ "peer": peer, "style": style });
418
+ let style = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
419
+ return new SetChatStyle({ peer: peer, style: style });
409
420
  }
410
421
  /**
411
- * Generate buffer from TLObject.
412
- */
422
+ * Generate buffer from TLObject.
423
+ */
413
424
  write() {
414
425
  const b = new BytesIO();
415
426
  b.write(Primitive.Int.write(this.constructorId, false));
416
427
  // @ts-ignore
417
428
  let flags = 0;
418
- flags |= this.style !== undefined ? (1 << 0) : 0;
419
- b.write((Primitive.Int.write(flags)));
429
+ flags |= this.style !== undefined ? 1 << 0 : 0;
430
+ b.write(Primitive.Int.write(flags));
420
431
  if (this.peer !== undefined) {
421
432
  b.write(this.peer.write());
422
433
  }