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