@tgsnake/skema 3.2.1-browser.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/src/deps.d.ts +3 -4
  2. package/dist/src/deps.js +4 -4
  3. package/dist/src/raw/class/All.d.ts +1 -1
  4. package/dist/src/raw/class/All.js +2783 -2783
  5. package/dist/src/raw/class/Raw.d.ts +7601 -7601
  6. package/dist/src/raw/class/Raw.js +20676 -26781
  7. package/dist/src/raw/class/tl/account.d.ts +841 -841
  8. package/dist/src/raw/class/tl/account.js +1813 -1983
  9. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  10. package/dist/src/raw/class/tl/aicompose.js +117 -128
  11. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  12. package/dist/src/raw/class/tl/auth.js +714 -849
  13. package/dist/src/raw/class/tl/bots.d.ts +256 -256
  14. package/dist/src/raw/class/tl/bots.js +607 -661
  15. package/dist/src/raw/class/tl/channels.d.ts +336 -336
  16. package/dist/src/raw/class/tl/channels.js +745 -836
  17. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  18. package/dist/src/raw/class/tl/chatlists.js +183 -196
  19. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  20. package/dist/src/raw/class/tl/communities.js +138 -159
  21. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  22. package/dist/src/raw/class/tl/contacts.js +492 -537
  23. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  24. package/dist/src/raw/class/tl/ephemeral.js +152 -204
  25. package/dist/src/raw/class/tl/feed.d.ts +71 -71
  26. package/dist/src/raw/class/tl/feed.js +179 -214
  27. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  28. package/dist/src/raw/class/tl/folders.js +11 -11
  29. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  30. package/dist/src/raw/class/tl/fragment.js +25 -32
  31. package/dist/src/raw/class/tl/help.d.ts +286 -286
  32. package/dist/src/raw/class/tl/help.js +618 -686
  33. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  34. package/dist/src/raw/class/tl/langpack.js +57 -57
  35. package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
  36. package/dist/src/raw/class/tl/messages.js +4886 -5965
  37. package/dist/src/raw/class/tl/payments.d.ts +646 -646
  38. package/dist/src/raw/class/tl/payments.js +1766 -2254
  39. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  40. package/dist/src/raw/class/tl/phone.js +644 -779
  41. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  42. package/dist/src/raw/class/tl/photos.js +116 -139
  43. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  44. package/dist/src/raw/class/tl/premium.js +111 -133
  45. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  46. package/dist/src/raw/class/tl/smsjobs.js +97 -115
  47. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  48. package/dist/src/raw/class/tl/stats.js +169 -268
  49. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  50. package/dist/src/raw/class/tl/stickers.js +144 -173
  51. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  52. package/dist/src/raw/class/tl/storage.js +71 -71
  53. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  54. package/dist/src/raw/class/tl/stories.js +622 -781
  55. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  56. package/dist/src/raw/class/tl/toncenter.js +47 -52
  57. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  58. package/dist/src/raw/class/tl/updates.js +175 -246
  59. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  60. package/dist/src/raw/class/tl/upload.js +155 -178
  61. package/dist/src/raw/class/tl/users.d.ts +61 -61
  62. package/dist/src/raw/class/tl/users.js +124 -124
  63. package/dist/src/raw/class/tl/wallet.d.ts +221 -221
  64. package/dist/src/raw/class/tl/wallet.js +558 -624
  65. package/dist/src/raw/class/types.d.ts +1 -1
  66. package/dist/src/raw/class/types.js +1 -1
  67. package/package.json +4 -6
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * tgsnake is a free software: you can redistribute it and/or modify
8
8
  * it under the terms of the MIT License as published.
9
- */
9
+ */
10
10
  import { TLObject } from '../../core/index.js';
11
11
  import { Buffer, BytesIO } from '../../../deps.js';
12
12
  import type { Vector, int } from '../types.js';
@@ -26,13 +26,13 @@ export declare class BoostsList extends TLObject {
26
26
  users: Vector<raw.TypeUser>;
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 read(_data: BytesIO, ..._args: Array<any>): Promise<BoostsList>;
33
33
  /**
34
- * Generate buffer from TLObject.
35
- */
34
+ * Generate buffer from TLObject.
35
+ */
36
36
  write(): Buffer;
37
37
  }
38
38
  export declare class MyBoosts extends TLObject {
@@ -45,13 +45,13 @@ export declare class MyBoosts extends TLObject {
45
45
  users: Vector<raw.TypeUser>;
46
46
  });
47
47
  /**
48
- * Generate the TLObject from buffer.
49
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
50
- */
48
+ * Generate the TLObject from buffer.
49
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
50
+ */
51
51
  static read(_data: BytesIO, ..._args: Array<any>): Promise<MyBoosts>;
52
52
  /**
53
- * Generate buffer from TLObject.
54
- */
53
+ * Generate buffer from TLObject.
54
+ */
55
55
  write(): Buffer;
56
56
  }
57
57
  export declare class BoostsStatus extends TLObject {
@@ -78,13 +78,13 @@ export declare class BoostsStatus extends TLObject {
78
78
  myBoostSlots?: Vector<int>;
79
79
  });
80
80
  /**
81
- * Generate the TLObject from buffer.
82
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
83
- */
81
+ * Generate the TLObject from buffer.
82
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
83
+ */
84
84
  static read(_data: BytesIO, ..._args: Array<any>): Promise<BoostsStatus>;
85
85
  /**
86
- * Generate buffer from TLObject.
87
- */
86
+ * Generate buffer from TLObject.
87
+ */
88
88
  write(): Buffer;
89
89
  }
90
90
  export declare class GetBoostsList extends TLObject {
@@ -100,26 +100,26 @@ export declare class GetBoostsList extends TLObject {
100
100
  limit: int;
101
101
  });
102
102
  /**
103
- * Generate the TLObject from buffer.
104
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
105
- */
103
+ * Generate the TLObject from buffer.
104
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
105
+ */
106
106
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetBoostsList>;
107
107
  /**
108
- * Generate buffer from TLObject.
109
- */
108
+ * Generate buffer from TLObject.
109
+ */
110
110
  write(): Buffer;
111
111
  }
112
112
  export declare class GetMyBoosts extends TLObject {
113
113
  __response__: TypeMyBoosts;
114
114
  constructor();
115
115
  /**
116
- * Generate the TLObject from buffer.
117
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
118
- */
116
+ * Generate the TLObject from buffer.
117
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
118
+ */
119
119
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetMyBoosts>;
120
120
  /**
121
- * Generate buffer from TLObject.
122
- */
121
+ * Generate buffer from TLObject.
122
+ */
123
123
  write(): Buffer;
124
124
  }
125
125
  export declare class ApplyBoost extends TLObject {
@@ -131,13 +131,13 @@ export declare class ApplyBoost extends TLObject {
131
131
  peer: raw.TypeInputPeer;
132
132
  });
133
133
  /**
134
- * Generate the TLObject from buffer.
135
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
136
- */
134
+ * Generate the TLObject from buffer.
135
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
136
+ */
137
137
  static read(_data: BytesIO, ..._args: Array<any>): Promise<ApplyBoost>;
138
138
  /**
139
- * Generate buffer from TLObject.
140
- */
139
+ * Generate buffer from TLObject.
140
+ */
141
141
  write(): Buffer;
142
142
  }
143
143
  export declare class GetBoostsStatus extends TLObject {
@@ -147,13 +147,13 @@ export declare class GetBoostsStatus extends TLObject {
147
147
  peer: raw.TypeInputPeer;
148
148
  });
149
149
  /**
150
- * Generate the TLObject from buffer.
151
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
152
- */
150
+ * Generate the TLObject from buffer.
151
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
152
+ */
153
153
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetBoostsStatus>;
154
154
  /**
155
- * Generate buffer from TLObject.
156
- */
155
+ * Generate buffer from TLObject.
156
+ */
157
157
  write(): Buffer;
158
158
  }
159
159
  export declare class GetUserBoosts extends TLObject {
@@ -165,12 +165,12 @@ export declare class GetUserBoosts extends TLObject {
165
165
  userId: raw.TypeInputUser;
166
166
  });
167
167
  /**
168
- * Generate the TLObject from buffer.
169
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
170
- */
168
+ * Generate the TLObject from buffer.
169
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
170
+ */
171
171
  static read(_data: BytesIO, ..._args: Array<any>): Promise<GetUserBoosts>;
172
172
  /**
173
- * Generate buffer from TLObject.
174
- */
173
+ * Generate buffer from TLObject.
174
+ */
175
175
  write(): Buffer;
176
176
  }
@@ -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';
@@ -17,50 +17,50 @@ export class BoostsList extends TLObject {
17
17
  users;
18
18
  constructor(params) {
19
19
  super();
20
- this.classType = 'types';
21
- this.className = 'premium.BoostsList';
20
+ this.classType = "types";
21
+ this.className = "premium.BoostsList";
22
22
  this.constructorId = 0x86f8613c;
23
23
  this.subclassOfId = 0x2235a8bd;
24
- this._slots = ['count', 'boosts', 'nextOffset', 'users'];
24
+ this._slots = ["count", "boosts", "nextOffset", "users"];
25
25
  this.count = params.count;
26
26
  this.boosts = params.boosts;
27
27
  this.nextOffset = params.nextOffset;
28
28
  this.users = params.users;
29
29
  }
30
30
  /**
31
- * Generate the TLObject from buffer.
32
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
- */
31
+ * Generate the TLObject from buffer.
32
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
33
+ */
34
34
  static async read(_data, ..._args) {
35
35
  // @ts-ignore
36
36
  let flags = await Primitive.Int.read(_data);
37
37
  let count = await Primitive.Int.read(_data);
38
38
  let boosts = await TLObject.read(_data);
39
- let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
39
+ let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
40
40
  let users = await TLObject.read(_data);
41
- return new BoostsList({ count: count, boosts: boosts, nextOffset: nextOffset, users: users });
41
+ return new BoostsList({ "count": count, "boosts": boosts, "nextOffset": nextOffset, "users": users });
42
42
  }
43
43
  /**
44
- * Generate buffer from TLObject.
45
- */
44
+ * Generate buffer from TLObject.
45
+ */
46
46
  write() {
47
47
  const b = new BytesIO();
48
48
  b.write(Primitive.Int.write(this.constructorId, false));
49
49
  // @ts-ignore
50
50
  let flags = 0;
51
- flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
52
- b.write(Primitive.Int.write(flags));
51
+ flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
52
+ b.write((Primitive.Int.write(flags)));
53
53
  if (this.count !== undefined) {
54
- b.write(Primitive.Int.write(this.count));
54
+ b.write((Primitive.Int.write(this.count)));
55
55
  }
56
56
  if (this.boosts) {
57
- b.write(Primitive.Vector.write(this.boosts));
57
+ b.write((Primitive.Vector.write(this.boosts)));
58
58
  }
59
59
  if (this.nextOffset !== undefined) {
60
- b.write(Primitive.String.write(this.nextOffset));
60
+ b.write((Primitive.String.write(this.nextOffset)));
61
61
  }
62
62
  if (this.users) {
63
- b.write(Primitive.Vector.write(this.users));
63
+ b.write((Primitive.Vector.write(this.users)));
64
64
  }
65
65
  return b.buffer;
66
66
  }
@@ -71,41 +71,41 @@ export class MyBoosts extends TLObject {
71
71
  users;
72
72
  constructor(params) {
73
73
  super();
74
- this.classType = 'types';
75
- this.className = 'premium.MyBoosts';
74
+ this.classType = "types";
75
+ this.className = "premium.MyBoosts";
76
76
  this.constructorId = 0x9ae228e2;
77
77
  this.subclassOfId = 0xad3512db;
78
- this._slots = ['myBoosts', 'chats', 'users'];
78
+ this._slots = ["myBoosts", "chats", "users"];
79
79
  this.myBoosts = params.myBoosts;
80
80
  this.chats = params.chats;
81
81
  this.users = params.users;
82
82
  }
83
83
  /**
84
- * Generate the TLObject from buffer.
85
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
86
- */
84
+ * Generate the TLObject from buffer.
85
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
86
+ */
87
87
  static async read(_data, ..._args) {
88
88
  // no flags
89
89
  let myBoosts = await TLObject.read(_data);
90
90
  let chats = await TLObject.read(_data);
91
91
  let users = await TLObject.read(_data);
92
- return new MyBoosts({ myBoosts: myBoosts, chats: chats, users: users });
92
+ return new MyBoosts({ "myBoosts": myBoosts, "chats": chats, "users": users });
93
93
  }
94
94
  /**
95
- * Generate buffer from TLObject.
96
- */
95
+ * Generate buffer from TLObject.
96
+ */
97
97
  write() {
98
98
  const b = new BytesIO();
99
99
  b.write(Primitive.Int.write(this.constructorId, false));
100
100
  // no flags
101
101
  if (this.myBoosts) {
102
- b.write(Primitive.Vector.write(this.myBoosts));
102
+ b.write((Primitive.Vector.write(this.myBoosts)));
103
103
  }
104
104
  if (this.chats) {
105
- b.write(Primitive.Vector.write(this.chats));
105
+ b.write((Primitive.Vector.write(this.chats)));
106
106
  }
107
107
  if (this.users) {
108
- b.write(Primitive.Vector.write(this.users));
108
+ b.write((Primitive.Vector.write(this.users)));
109
109
  }
110
110
  return b.buffer;
111
111
  }
@@ -123,22 +123,11 @@ export class BoostsStatus extends TLObject {
123
123
  myBoostSlots;
124
124
  constructor(params) {
125
125
  super();
126
- this.classType = 'types';
127
- this.className = 'premium.BoostsStatus';
126
+ this.classType = "types";
127
+ this.className = "premium.BoostsStatus";
128
128
  this.constructorId = 0x4959427a;
129
129
  this.subclassOfId = 0xc31b1ab9;
130
- this._slots = [
131
- 'myBoost',
132
- 'level',
133
- 'currentLevelBoosts',
134
- 'boosts',
135
- 'giftBoosts',
136
- 'nextLevelBoosts',
137
- 'premiumAudience',
138
- 'boostUrl',
139
- 'prepaidGiveaways',
140
- 'myBoostSlots',
141
- ];
130
+ this._slots = ["myBoost", "level", "currentLevelBoosts", "boosts", "giftBoosts", "nextLevelBoosts", "premiumAudience", "boostUrl", "prepaidGiveaways", "myBoostSlots"];
142
131
  this.myBoost = params.myBoost;
143
132
  this.level = params.level;
144
133
  this.currentLevelBoosts = params.currentLevelBoosts;
@@ -151,76 +140,65 @@ export class BoostsStatus extends TLObject {
151
140
  this.myBoostSlots = params.myBoostSlots;
152
141
  }
153
142
  /**
154
- * Generate the TLObject from buffer.
155
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
156
- */
143
+ * Generate the TLObject from buffer.
144
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
145
+ */
157
146
  static async read(_data, ..._args) {
158
147
  // @ts-ignore
159
148
  let flags = await Primitive.Int.read(_data);
160
- let myBoost = flags & (1 << 2) ? true : false;
149
+ let myBoost = (flags & (1 << 2)) ? true : false;
161
150
  let level = await Primitive.Int.read(_data);
162
151
  let currentLevelBoosts = await Primitive.Int.read(_data);
163
152
  let boosts = await Primitive.Int.read(_data);
164
- let giftBoosts = flags & (1 << 4) ? await Primitive.Int.read(_data) : undefined;
165
- let nextLevelBoosts = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
166
- let premiumAudience = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
153
+ let giftBoosts = (flags & (1 << 4)) ? await Primitive.Int.read(_data) : undefined;
154
+ let nextLevelBoosts = (flags & (1 << 0)) ? await Primitive.Int.read(_data) : undefined;
155
+ let premiumAudience = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
167
156
  let boostUrl = await Primitive.String.read(_data);
168
- let prepaidGiveaways = flags & (1 << 3) ? await TLObject.read(_data) : [];
169
- let myBoostSlots = flags & (1 << 2) ? await TLObject.read(_data, Primitive.Int) : [];
170
- return new BoostsStatus({
171
- myBoost: myBoost,
172
- level: level,
173
- currentLevelBoosts: currentLevelBoosts,
174
- boosts: boosts,
175
- giftBoosts: giftBoosts,
176
- nextLevelBoosts: nextLevelBoosts,
177
- premiumAudience: premiumAudience,
178
- boostUrl: boostUrl,
179
- prepaidGiveaways: prepaidGiveaways,
180
- myBoostSlots: myBoostSlots,
181
- });
157
+ let prepaidGiveaways = (flags & (1 << 3)) ? await TLObject.read(_data) : [];
158
+ let myBoostSlots = (flags & (1 << 2)) ? await TLObject.read(_data, Primitive.Int) : [];
159
+ return new BoostsStatus({ "myBoost": myBoost, "level": level, "currentLevelBoosts": currentLevelBoosts, "boosts": boosts, "giftBoosts": giftBoosts, "nextLevelBoosts": nextLevelBoosts, "premiumAudience": premiumAudience, "boostUrl": boostUrl, "prepaidGiveaways": prepaidGiveaways, "myBoostSlots": myBoostSlots });
182
160
  }
183
161
  /**
184
- * Generate buffer from TLObject.
185
- */
162
+ * Generate buffer from TLObject.
163
+ */
186
164
  write() {
187
165
  const b = new BytesIO();
188
166
  b.write(Primitive.Int.write(this.constructorId, false));
189
167
  // @ts-ignore
190
168
  let flags = 0;
191
- flags |= this.myBoost ? 1 << 2 : 0;
192
- flags |= this.giftBoosts !== undefined ? 1 << 4 : 0;
193
- flags |= this.nextLevelBoosts !== undefined ? 1 << 0 : 0;
194
- flags |= this.premiumAudience !== undefined ? 1 << 1 : 0;
195
- flags |= this.prepaidGiveaways ? 1 << 3 : 0;
196
- flags |= this.myBoostSlots ? 1 << 2 : 0;
197
- b.write(Primitive.Int.write(flags));
169
+ flags |= this.myBoost ? (1 << 2) : 0;
170
+ flags |= this.giftBoosts !== undefined ? (1 << 4) : 0;
171
+ flags |= this.nextLevelBoosts !== undefined ? (1 << 0) : 0;
172
+ flags |= this.premiumAudience !== undefined ? (1 << 1) : 0;
173
+ flags |= this.prepaidGiveaways ? (1 << 3) : 0;
174
+ flags |= this.myBoostSlots ? (1 << 2) : 0;
175
+ b.write((Primitive.Int.write(flags)));
198
176
  if (this.level !== undefined) {
199
- b.write(Primitive.Int.write(this.level));
177
+ b.write((Primitive.Int.write(this.level)));
200
178
  }
201
179
  if (this.currentLevelBoosts !== undefined) {
202
- b.write(Primitive.Int.write(this.currentLevelBoosts));
180
+ b.write((Primitive.Int.write(this.currentLevelBoosts)));
203
181
  }
204
182
  if (this.boosts !== undefined) {
205
- b.write(Primitive.Int.write(this.boosts));
183
+ b.write((Primitive.Int.write(this.boosts)));
206
184
  }
207
185
  if (this.giftBoosts !== undefined) {
208
- b.write(Primitive.Int.write(this.giftBoosts));
186
+ b.write((Primitive.Int.write(this.giftBoosts)));
209
187
  }
210
188
  if (this.nextLevelBoosts !== undefined) {
211
- b.write(Primitive.Int.write(this.nextLevelBoosts));
189
+ b.write((Primitive.Int.write(this.nextLevelBoosts)));
212
190
  }
213
191
  if (this.premiumAudience !== undefined) {
214
192
  b.write(this.premiumAudience.write());
215
193
  }
216
194
  if (this.boostUrl !== undefined) {
217
- b.write(Primitive.String.write(this.boostUrl));
195
+ b.write((Primitive.String.write(this.boostUrl)));
218
196
  }
219
197
  if (this.prepaidGiveaways) {
220
- b.write(Primitive.Vector.write(this.prepaidGiveaways));
198
+ b.write((Primitive.Vector.write(this.prepaidGiveaways)));
221
199
  }
222
200
  if (this.myBoostSlots) {
223
- b.write(Primitive.Vector.write(this.myBoostSlots, Primitive.Int));
201
+ b.write((Primitive.Vector.write(this.myBoostSlots, Primitive.Int)));
224
202
  }
225
203
  return b.buffer;
226
204
  }
@@ -233,47 +211,47 @@ export class GetBoostsList extends TLObject {
233
211
  limit;
234
212
  constructor(params) {
235
213
  super();
236
- this.classType = 'functions';
237
- this.className = 'premium.GetBoostsList';
214
+ this.classType = "functions";
215
+ this.className = "premium.GetBoostsList";
238
216
  this.constructorId = 0x60f67660;
239
217
  this.subclassOfId = 0x2235a8bd;
240
- this._slots = ['gifts', 'peer', 'offset', 'limit'];
218
+ this._slots = ["gifts", "peer", "offset", "limit"];
241
219
  this.gifts = params.gifts;
242
220
  this.peer = params.peer;
243
221
  this.offset = params.offset;
244
222
  this.limit = params.limit;
245
223
  }
246
224
  /**
247
- * Generate the TLObject from buffer.
248
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
249
- */
225
+ * Generate the TLObject from buffer.
226
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
227
+ */
250
228
  static async read(_data, ..._args) {
251
229
  // @ts-ignore
252
230
  let flags = await Primitive.Int.read(_data);
253
- let gifts = flags & (1 << 0) ? true : false;
231
+ let gifts = (flags & (1 << 0)) ? true : false;
254
232
  let peer = await TLObject.read(_data);
255
233
  let offset = await Primitive.String.read(_data);
256
234
  let limit = await Primitive.Int.read(_data);
257
- return new GetBoostsList({ gifts: gifts, peer: peer, offset: offset, limit: limit });
235
+ return new GetBoostsList({ "gifts": gifts, "peer": peer, "offset": offset, "limit": limit });
258
236
  }
259
237
  /**
260
- * Generate buffer from TLObject.
261
- */
238
+ * Generate buffer from TLObject.
239
+ */
262
240
  write() {
263
241
  const b = new BytesIO();
264
242
  b.write(Primitive.Int.write(this.constructorId, false));
265
243
  // @ts-ignore
266
244
  let flags = 0;
267
- flags |= this.gifts ? 1 << 0 : 0;
268
- b.write(Primitive.Int.write(flags));
245
+ flags |= this.gifts ? (1 << 0) : 0;
246
+ b.write((Primitive.Int.write(flags)));
269
247
  if (this.peer !== undefined) {
270
248
  b.write(this.peer.write());
271
249
  }
272
250
  if (this.offset !== undefined) {
273
- b.write(Primitive.String.write(this.offset));
251
+ b.write((Primitive.String.write(this.offset)));
274
252
  }
275
253
  if (this.limit !== undefined) {
276
- b.write(Primitive.Int.write(this.limit));
254
+ b.write((Primitive.Int.write(this.limit)));
277
255
  }
278
256
  return b.buffer;
279
257
  }
@@ -282,23 +260,23 @@ export class GetMyBoosts extends TLObject {
282
260
  __response__;
283
261
  constructor() {
284
262
  super();
285
- this.classType = 'functions';
286
- this.className = 'premium.GetMyBoosts';
263
+ this.classType = "functions";
264
+ this.className = "premium.GetMyBoosts";
287
265
  this.constructorId = 0xbe77b4a;
288
266
  this.subclassOfId = 0xad3512db;
289
267
  this._slots = [];
290
268
  }
291
269
  /**
292
- * Generate the TLObject from buffer.
293
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
294
- */
270
+ * Generate the TLObject from buffer.
271
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
272
+ */
295
273
  static async read(_data, ..._args) {
296
274
  // no flags
297
275
  return new GetMyBoosts();
298
276
  }
299
277
  /**
300
- * Generate buffer from TLObject.
301
- */
278
+ * Generate buffer from TLObject.
279
+ */
302
280
  write() {
303
281
  const b = new BytesIO();
304
282
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -312,37 +290,37 @@ export class ApplyBoost extends TLObject {
312
290
  peer;
313
291
  constructor(params) {
314
292
  super();
315
- this.classType = 'functions';
316
- this.className = 'premium.ApplyBoost';
293
+ this.classType = "functions";
294
+ this.className = "premium.ApplyBoost";
317
295
  this.constructorId = 0x6b7da746;
318
296
  this.subclassOfId = 0xad3512db;
319
- this._slots = ['slots', 'peer'];
297
+ this._slots = ["slots", "peer"];
320
298
  this.slots = params.slots;
321
299
  this.peer = params.peer;
322
300
  }
323
301
  /**
324
- * Generate the TLObject from buffer.
325
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
326
- */
302
+ * Generate the TLObject from buffer.
303
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
304
+ */
327
305
  static async read(_data, ..._args) {
328
306
  // @ts-ignore
329
307
  let flags = await Primitive.Int.read(_data);
330
- let slots = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
308
+ let slots = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.Int) : [];
331
309
  let peer = await TLObject.read(_data);
332
- return new ApplyBoost({ slots: slots, peer: peer });
310
+ return new ApplyBoost({ "slots": slots, "peer": peer });
333
311
  }
334
312
  /**
335
- * Generate buffer from TLObject.
336
- */
313
+ * Generate buffer from TLObject.
314
+ */
337
315
  write() {
338
316
  const b = new BytesIO();
339
317
  b.write(Primitive.Int.write(this.constructorId, false));
340
318
  // @ts-ignore
341
319
  let flags = 0;
342
- flags |= this.slots ? 1 << 0 : 0;
343
- b.write(Primitive.Int.write(flags));
320
+ flags |= this.slots ? (1 << 0) : 0;
321
+ b.write((Primitive.Int.write(flags)));
344
322
  if (this.slots) {
345
- b.write(Primitive.Vector.write(this.slots, Primitive.Int));
323
+ b.write((Primitive.Vector.write(this.slots, Primitive.Int)));
346
324
  }
347
325
  if (this.peer !== undefined) {
348
326
  b.write(this.peer.write());
@@ -355,25 +333,25 @@ export class GetBoostsStatus extends TLObject {
355
333
  peer;
356
334
  constructor(params) {
357
335
  super();
358
- this.classType = 'functions';
359
- this.className = 'premium.GetBoostsStatus';
336
+ this.classType = "functions";
337
+ this.className = "premium.GetBoostsStatus";
360
338
  this.constructorId = 0x42f1f61;
361
339
  this.subclassOfId = 0xc31b1ab9;
362
- this._slots = ['peer'];
340
+ this._slots = ["peer"];
363
341
  this.peer = params.peer;
364
342
  }
365
343
  /**
366
- * Generate the TLObject from buffer.
367
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
368
- */
344
+ * Generate the TLObject from buffer.
345
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
346
+ */
369
347
  static async read(_data, ..._args) {
370
348
  // no flags
371
349
  let peer = await TLObject.read(_data);
372
- return new GetBoostsStatus({ peer: peer });
350
+ return new GetBoostsStatus({ "peer": peer });
373
351
  }
374
352
  /**
375
- * Generate buffer from TLObject.
376
- */
353
+ * Generate buffer from TLObject.
354
+ */
377
355
  write() {
378
356
  const b = new BytesIO();
379
357
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -390,27 +368,27 @@ export class GetUserBoosts extends TLObject {
390
368
  userId;
391
369
  constructor(params) {
392
370
  super();
393
- this.classType = 'functions';
394
- this.className = 'premium.GetUserBoosts';
371
+ this.classType = "functions";
372
+ this.className = "premium.GetUserBoosts";
395
373
  this.constructorId = 0x39854d1f;
396
374
  this.subclassOfId = 0x2235a8bd;
397
- this._slots = ['peer', 'userId'];
375
+ this._slots = ["peer", "userId"];
398
376
  this.peer = params.peer;
399
377
  this.userId = params.userId;
400
378
  }
401
379
  /**
402
- * Generate the TLObject from buffer.
403
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
404
- */
380
+ * Generate the TLObject from buffer.
381
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
382
+ */
405
383
  static async read(_data, ..._args) {
406
384
  // no flags
407
385
  let peer = await TLObject.read(_data);
408
386
  let userId = await TLObject.read(_data);
409
- return new GetUserBoosts({ peer: peer, userId: userId });
387
+ return new GetUserBoosts({ "peer": peer, "userId": userId });
410
388
  }
411
389
  /**
412
- * Generate buffer from TLObject.
413
- */
390
+ * Generate buffer from TLObject.
391
+ */
414
392
  write() {
415
393
  const b = new BytesIO();
416
394
  b.write(Primitive.Int.write(this.constructorId, false));