@tgsnake/skema 3.1.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 (74) hide show
  1. package/README.md +1 -1
  2. package/dist/src/deps.d.ts +4 -3
  3. package/dist/src/deps.js +4 -4
  4. package/dist/src/errors/RpcError.js +3 -1
  5. package/dist/src/helpers.js +19 -34
  6. package/dist/src/raw/class/All.d.ts +49 -5
  7. package/dist/src/raw/class/All.js +2783 -2739
  8. package/dist/src/raw/class/Raw.d.ts +7856 -7518
  9. package/dist/src/raw/class/Raw.js +27367 -20433
  10. package/dist/src/raw/class/tl/account.d.ts +841 -841
  11. package/dist/src/raw/class/tl/account.js +1983 -1813
  12. package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
  13. package/dist/src/raw/class/tl/aicompose.js +128 -117
  14. package/dist/src/raw/class/tl/auth.d.ts +296 -296
  15. package/dist/src/raw/class/tl/auth.js +849 -714
  16. package/dist/src/raw/class/tl/bots.d.ts +353 -232
  17. package/dist/src/raw/class/tl/bots.js +871 -504
  18. package/dist/src/raw/class/tl/channels.d.ts +351 -331
  19. package/dist/src/raw/class/tl/channels.js +873 -735
  20. package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
  21. package/dist/src/raw/class/tl/chatlists.js +196 -183
  22. package/dist/src/raw/class/tl/communities.d.ts +56 -56
  23. package/dist/src/raw/class/tl/communities.js +159 -138
  24. package/dist/src/raw/class/tl/contacts.d.ts +216 -216
  25. package/dist/src/raw/class/tl/contacts.js +537 -492
  26. package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
  27. package/dist/src/raw/class/tl/ephemeral.js +204 -152
  28. package/dist/src/raw/class/tl/feed.d.ts +278 -0
  29. package/dist/src/raw/class/tl/feed.js +671 -0
  30. package/dist/src/raw/class/tl/folders.d.ts +6 -6
  31. package/dist/src/raw/class/tl/folders.js +11 -11
  32. package/dist/src/raw/class/tl/fragment.d.ts +11 -11
  33. package/dist/src/raw/class/tl/fragment.js +32 -25
  34. package/dist/src/raw/class/tl/help.d.ts +286 -286
  35. package/dist/src/raw/class/tl/help.js +686 -618
  36. package/dist/src/raw/class/tl/langpack.d.ts +26 -26
  37. package/dist/src/raw/class/tl/langpack.js +57 -57
  38. package/dist/src/raw/class/tl/messages.d.ts +1901 -1851
  39. package/dist/src/raw/class/tl/messages.js +6043 -4855
  40. package/dist/src/raw/class/tl/payments.d.ts +677 -641
  41. package/dist/src/raw/class/tl/payments.js +2312 -1734
  42. package/dist/src/raw/class/tl/phone.d.ts +256 -256
  43. package/dist/src/raw/class/tl/phone.js +779 -644
  44. package/dist/src/raw/class/tl/photos.d.ts +41 -41
  45. package/dist/src/raw/class/tl/photos.js +139 -116
  46. package/dist/src/raw/class/tl/premium.d.ts +41 -41
  47. package/dist/src/raw/class/tl/premium.js +133 -111
  48. package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
  49. package/dist/src/raw/class/tl/smsjobs.js +115 -97
  50. package/dist/src/raw/class/tl/stats.d.ts +71 -71
  51. package/dist/src/raw/class/tl/stats.js +268 -169
  52. package/dist/src/raw/class/tl/stickers.d.ts +61 -61
  53. package/dist/src/raw/class/tl/stickers.js +173 -144
  54. package/dist/src/raw/class/tl/storage.d.ts +51 -51
  55. package/dist/src/raw/class/tl/storage.js +71 -71
  56. package/dist/src/raw/class/tl/stories.d.ts +221 -221
  57. package/dist/src/raw/class/tl/stories.js +781 -622
  58. package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
  59. package/dist/src/raw/class/tl/toncenter.js +52 -47
  60. package/dist/src/raw/class/tl/updates.d.ts +56 -56
  61. package/dist/src/raw/class/tl/updates.js +246 -175
  62. package/dist/src/raw/class/tl/upload.d.ts +66 -66
  63. package/dist/src/raw/class/tl/upload.js +178 -155
  64. package/dist/src/raw/class/tl/users.d.ts +61 -61
  65. package/dist/src/raw/class/tl/users.js +124 -124
  66. package/dist/src/raw/class/tl/wallet.d.ts +257 -206
  67. package/dist/src/raw/class/tl/wallet.js +701 -525
  68. package/dist/src/raw/class/types.d.ts +3 -2
  69. package/dist/src/raw/class/types.js +1 -1
  70. package/dist/src/raw/core/GzipPacked.d.ts +4 -0
  71. package/dist/src/raw/core/GzipPacked.js +9 -1
  72. package/dist/src/raw/core/primitive/Bytes.js +26 -4
  73. package/dist/src/raw/core/primitive/Vector.js +11 -3
  74. package/package.json +7 -5
@@ -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,11 +123,22 @@ 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 = ["myBoost", "level", "currentLevelBoosts", "boosts", "giftBoosts", "nextLevelBoosts", "premiumAudience", "boostUrl", "prepaidGiveaways", "myBoostSlots"];
130
+ this._slots = [
131
+ 'myBoost',
132
+ 'level',
133
+ 'currentLevelBoosts',
134
+ 'boosts',
135
+ 'giftBoosts',
136
+ 'nextLevelBoosts',
137
+ 'premiumAudience',
138
+ 'boostUrl',
139
+ 'prepaidGiveaways',
140
+ 'myBoostSlots',
141
+ ];
131
142
  this.myBoost = params.myBoost;
132
143
  this.level = params.level;
133
144
  this.currentLevelBoosts = params.currentLevelBoosts;
@@ -140,65 +151,76 @@ export class BoostsStatus extends TLObject {
140
151
  this.myBoostSlots = params.myBoostSlots;
141
152
  }
142
153
  /**
143
- * Generate the TLObject from buffer.
144
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
145
- */
154
+ * Generate the TLObject from buffer.
155
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
156
+ */
146
157
  static async read(_data, ..._args) {
147
158
  // @ts-ignore
148
159
  let flags = await Primitive.Int.read(_data);
149
- let myBoost = (flags & (1 << 2)) ? true : false;
160
+ let myBoost = flags & (1 << 2) ? true : false;
150
161
  let level = await Primitive.Int.read(_data);
151
162
  let currentLevelBoosts = await Primitive.Int.read(_data);
152
163
  let boosts = await Primitive.Int.read(_data);
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;
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;
156
167
  let boostUrl = await Primitive.String.read(_data);
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 });
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
+ });
160
182
  }
161
183
  /**
162
- * Generate buffer from TLObject.
163
- */
184
+ * Generate buffer from TLObject.
185
+ */
164
186
  write() {
165
187
  const b = new BytesIO();
166
188
  b.write(Primitive.Int.write(this.constructorId, false));
167
189
  // @ts-ignore
168
190
  let flags = 0;
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)));
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));
176
198
  if (this.level !== undefined) {
177
- b.write((Primitive.Int.write(this.level)));
199
+ b.write(Primitive.Int.write(this.level));
178
200
  }
179
201
  if (this.currentLevelBoosts !== undefined) {
180
- b.write((Primitive.Int.write(this.currentLevelBoosts)));
202
+ b.write(Primitive.Int.write(this.currentLevelBoosts));
181
203
  }
182
204
  if (this.boosts !== undefined) {
183
- b.write((Primitive.Int.write(this.boosts)));
205
+ b.write(Primitive.Int.write(this.boosts));
184
206
  }
185
207
  if (this.giftBoosts !== undefined) {
186
- b.write((Primitive.Int.write(this.giftBoosts)));
208
+ b.write(Primitive.Int.write(this.giftBoosts));
187
209
  }
188
210
  if (this.nextLevelBoosts !== undefined) {
189
- b.write((Primitive.Int.write(this.nextLevelBoosts)));
211
+ b.write(Primitive.Int.write(this.nextLevelBoosts));
190
212
  }
191
213
  if (this.premiumAudience !== undefined) {
192
214
  b.write(this.premiumAudience.write());
193
215
  }
194
216
  if (this.boostUrl !== undefined) {
195
- b.write((Primitive.String.write(this.boostUrl)));
217
+ b.write(Primitive.String.write(this.boostUrl));
196
218
  }
197
219
  if (this.prepaidGiveaways) {
198
- b.write((Primitive.Vector.write(this.prepaidGiveaways)));
220
+ b.write(Primitive.Vector.write(this.prepaidGiveaways));
199
221
  }
200
222
  if (this.myBoostSlots) {
201
- b.write((Primitive.Vector.write(this.myBoostSlots, Primitive.Int)));
223
+ b.write(Primitive.Vector.write(this.myBoostSlots, Primitive.Int));
202
224
  }
203
225
  return b.buffer;
204
226
  }
@@ -211,47 +233,47 @@ export class GetBoostsList extends TLObject {
211
233
  limit;
212
234
  constructor(params) {
213
235
  super();
214
- this.classType = "functions";
215
- this.className = "premium.GetBoostsList";
236
+ this.classType = 'functions';
237
+ this.className = 'premium.GetBoostsList';
216
238
  this.constructorId = 0x60f67660;
217
239
  this.subclassOfId = 0x2235a8bd;
218
- this._slots = ["gifts", "peer", "offset", "limit"];
240
+ this._slots = ['gifts', 'peer', 'offset', 'limit'];
219
241
  this.gifts = params.gifts;
220
242
  this.peer = params.peer;
221
243
  this.offset = params.offset;
222
244
  this.limit = params.limit;
223
245
  }
224
246
  /**
225
- * Generate the TLObject from buffer.
226
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
227
- */
247
+ * Generate the TLObject from buffer.
248
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
249
+ */
228
250
  static async read(_data, ..._args) {
229
251
  // @ts-ignore
230
252
  let flags = await Primitive.Int.read(_data);
231
- let gifts = (flags & (1 << 0)) ? true : false;
253
+ let gifts = flags & (1 << 0) ? true : false;
232
254
  let peer = await TLObject.read(_data);
233
255
  let offset = await Primitive.String.read(_data);
234
256
  let limit = await Primitive.Int.read(_data);
235
- return new GetBoostsList({ "gifts": gifts, "peer": peer, "offset": offset, "limit": limit });
257
+ return new GetBoostsList({ gifts: gifts, peer: peer, offset: offset, limit: limit });
236
258
  }
237
259
  /**
238
- * Generate buffer from TLObject.
239
- */
260
+ * Generate buffer from TLObject.
261
+ */
240
262
  write() {
241
263
  const b = new BytesIO();
242
264
  b.write(Primitive.Int.write(this.constructorId, false));
243
265
  // @ts-ignore
244
266
  let flags = 0;
245
- flags |= this.gifts ? (1 << 0) : 0;
246
- b.write((Primitive.Int.write(flags)));
267
+ flags |= this.gifts ? 1 << 0 : 0;
268
+ b.write(Primitive.Int.write(flags));
247
269
  if (this.peer !== undefined) {
248
270
  b.write(this.peer.write());
249
271
  }
250
272
  if (this.offset !== undefined) {
251
- b.write((Primitive.String.write(this.offset)));
273
+ b.write(Primitive.String.write(this.offset));
252
274
  }
253
275
  if (this.limit !== undefined) {
254
- b.write((Primitive.Int.write(this.limit)));
276
+ b.write(Primitive.Int.write(this.limit));
255
277
  }
256
278
  return b.buffer;
257
279
  }
@@ -260,23 +282,23 @@ export class GetMyBoosts extends TLObject {
260
282
  __response__;
261
283
  constructor() {
262
284
  super();
263
- this.classType = "functions";
264
- this.className = "premium.GetMyBoosts";
285
+ this.classType = 'functions';
286
+ this.className = 'premium.GetMyBoosts';
265
287
  this.constructorId = 0xbe77b4a;
266
288
  this.subclassOfId = 0xad3512db;
267
289
  this._slots = [];
268
290
  }
269
291
  /**
270
- * Generate the TLObject from buffer.
271
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
272
- */
292
+ * Generate the TLObject from buffer.
293
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
294
+ */
273
295
  static async read(_data, ..._args) {
274
296
  // no flags
275
297
  return new GetMyBoosts();
276
298
  }
277
299
  /**
278
- * Generate buffer from TLObject.
279
- */
300
+ * Generate buffer from TLObject.
301
+ */
280
302
  write() {
281
303
  const b = new BytesIO();
282
304
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -290,37 +312,37 @@ export class ApplyBoost extends TLObject {
290
312
  peer;
291
313
  constructor(params) {
292
314
  super();
293
- this.classType = "functions";
294
- this.className = "premium.ApplyBoost";
315
+ this.classType = 'functions';
316
+ this.className = 'premium.ApplyBoost';
295
317
  this.constructorId = 0x6b7da746;
296
318
  this.subclassOfId = 0xad3512db;
297
- this._slots = ["slots", "peer"];
319
+ this._slots = ['slots', 'peer'];
298
320
  this.slots = params.slots;
299
321
  this.peer = params.peer;
300
322
  }
301
323
  /**
302
- * Generate the TLObject from buffer.
303
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
304
- */
324
+ * Generate the TLObject from buffer.
325
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
326
+ */
305
327
  static async read(_data, ..._args) {
306
328
  // @ts-ignore
307
329
  let flags = await Primitive.Int.read(_data);
308
- let slots = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.Int) : [];
330
+ let slots = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
309
331
  let peer = await TLObject.read(_data);
310
- return new ApplyBoost({ "slots": slots, "peer": peer });
332
+ return new ApplyBoost({ slots: slots, peer: peer });
311
333
  }
312
334
  /**
313
- * Generate buffer from TLObject.
314
- */
335
+ * Generate buffer from TLObject.
336
+ */
315
337
  write() {
316
338
  const b = new BytesIO();
317
339
  b.write(Primitive.Int.write(this.constructorId, false));
318
340
  // @ts-ignore
319
341
  let flags = 0;
320
- flags |= this.slots ? (1 << 0) : 0;
321
- b.write((Primitive.Int.write(flags)));
342
+ flags |= this.slots ? 1 << 0 : 0;
343
+ b.write(Primitive.Int.write(flags));
322
344
  if (this.slots) {
323
- b.write((Primitive.Vector.write(this.slots, Primitive.Int)));
345
+ b.write(Primitive.Vector.write(this.slots, Primitive.Int));
324
346
  }
325
347
  if (this.peer !== undefined) {
326
348
  b.write(this.peer.write());
@@ -333,25 +355,25 @@ export class GetBoostsStatus extends TLObject {
333
355
  peer;
334
356
  constructor(params) {
335
357
  super();
336
- this.classType = "functions";
337
- this.className = "premium.GetBoostsStatus";
358
+ this.classType = 'functions';
359
+ this.className = 'premium.GetBoostsStatus';
338
360
  this.constructorId = 0x42f1f61;
339
361
  this.subclassOfId = 0xc31b1ab9;
340
- this._slots = ["peer"];
362
+ this._slots = ['peer'];
341
363
  this.peer = params.peer;
342
364
  }
343
365
  /**
344
- * Generate the TLObject from buffer.
345
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
346
- */
366
+ * Generate the TLObject from buffer.
367
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
368
+ */
347
369
  static async read(_data, ..._args) {
348
370
  // no flags
349
371
  let peer = await TLObject.read(_data);
350
- return new GetBoostsStatus({ "peer": peer });
372
+ return new GetBoostsStatus({ peer: peer });
351
373
  }
352
374
  /**
353
- * Generate buffer from TLObject.
354
- */
375
+ * Generate buffer from TLObject.
376
+ */
355
377
  write() {
356
378
  const b = new BytesIO();
357
379
  b.write(Primitive.Int.write(this.constructorId, false));
@@ -368,27 +390,27 @@ export class GetUserBoosts extends TLObject {
368
390
  userId;
369
391
  constructor(params) {
370
392
  super();
371
- this.classType = "functions";
372
- this.className = "premium.GetUserBoosts";
393
+ this.classType = 'functions';
394
+ this.className = 'premium.GetUserBoosts';
373
395
  this.constructorId = 0x39854d1f;
374
396
  this.subclassOfId = 0x2235a8bd;
375
- this._slots = ["peer", "userId"];
397
+ this._slots = ['peer', 'userId'];
376
398
  this.peer = params.peer;
377
399
  this.userId = params.userId;
378
400
  }
379
401
  /**
380
- * Generate the TLObject from buffer.
381
- * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
382
- */
402
+ * Generate the TLObject from buffer.
403
+ * @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
404
+ */
383
405
  static async read(_data, ..._args) {
384
406
  // no flags
385
407
  let peer = await TLObject.read(_data);
386
408
  let userId = await TLObject.read(_data);
387
- return new GetUserBoosts({ "peer": peer, "userId": userId });
409
+ return new GetUserBoosts({ peer: peer, userId: userId });
388
410
  }
389
411
  /**
390
- * Generate buffer from TLObject.
391
- */
412
+ * Generate buffer from TLObject.
413
+ */
392
414
  write() {
393
415
  const b = new BytesIO();
394
416
  b.write(Primitive.Int.write(this.constructorId, false));