@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.
- package/dist/src/deps.d.ts +4 -3
- package/dist/src/deps.js +4 -4
- package/dist/src/raw/class/All.d.ts +1 -1
- package/dist/src/raw/class/All.js +2783 -2783
- package/dist/src/raw/class/Raw.d.ts +7601 -7601
- package/dist/src/raw/class/Raw.js +26781 -20676
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1983 -1813
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +128 -117
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +849 -714
- package/dist/src/raw/class/tl/bots.d.ts +256 -256
- package/dist/src/raw/class/tl/bots.js +661 -607
- package/dist/src/raw/class/tl/channels.d.ts +336 -336
- package/dist/src/raw/class/tl/channels.js +836 -745
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +196 -183
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +159 -138
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +537 -492
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +204 -152
- package/dist/src/raw/class/tl/feed.d.ts +71 -71
- package/dist/src/raw/class/tl/feed.js +214 -179
- package/dist/src/raw/class/tl/folders.d.ts +6 -6
- package/dist/src/raw/class/tl/folders.js +11 -11
- package/dist/src/raw/class/tl/fragment.d.ts +11 -11
- package/dist/src/raw/class/tl/fragment.js +32 -25
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +686 -618
- package/dist/src/raw/class/tl/langpack.d.ts +26 -26
- package/dist/src/raw/class/tl/langpack.js +57 -57
- package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
- package/dist/src/raw/class/tl/messages.js +5965 -4886
- package/dist/src/raw/class/tl/payments.d.ts +646 -646
- package/dist/src/raw/class/tl/payments.js +2254 -1766
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +779 -644
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +139 -116
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +133 -111
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +115 -97
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +268 -169
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +173 -144
- package/dist/src/raw/class/tl/storage.d.ts +51 -51
- package/dist/src/raw/class/tl/storage.js +71 -71
- package/dist/src/raw/class/tl/stories.d.ts +221 -221
- package/dist/src/raw/class/tl/stories.js +781 -622
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +52 -47
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +246 -175
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +178 -155
- package/dist/src/raw/class/tl/users.d.ts +61 -61
- package/dist/src/raw/class/tl/users.js +124 -124
- package/dist/src/raw/class/tl/wallet.d.ts +221 -221
- package/dist/src/raw/class/tl/wallet.js +624 -558
- package/dist/src/raw/class/types.d.ts +1 -1
- package/dist/src/raw/class/types.js +1 -1
- package/package.json +6 -4
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
8
|
* it under the terms of the MIT License as published.
|
|
9
|
-
*/
|
|
9
|
+
*/
|
|
10
10
|
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
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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
|
-
|
|
82
|
-
|
|
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
|
-
|
|
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
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
-
|
|
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
|
-
|
|
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
|
-
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
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
|
-
|
|
169
|
-
|
|
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
|
-
|
|
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 =
|
|
21
|
-
this.className =
|
|
20
|
+
this.classType = 'types';
|
|
21
|
+
this.className = 'premium.BoostsList';
|
|
22
22
|
this.constructorId = 0x86f8613c;
|
|
23
23
|
this.subclassOfId = 0x2235a8bd;
|
|
24
|
-
this._slots = [
|
|
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
|
-
|
|
32
|
-
|
|
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 =
|
|
39
|
+
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
40
40
|
let users = await TLObject.read(_data);
|
|
41
|
-
return new BoostsList({
|
|
41
|
+
return new BoostsList({ count: count, boosts: boosts, nextOffset: nextOffset, users: users });
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
|
|
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 ?
|
|
52
|
-
b.write(
|
|
51
|
+
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
52
|
+
b.write(Primitive.Int.write(flags));
|
|
53
53
|
if (this.count !== undefined) {
|
|
54
|
-
b.write(
|
|
54
|
+
b.write(Primitive.Int.write(this.count));
|
|
55
55
|
}
|
|
56
56
|
if (this.boosts) {
|
|
57
|
-
b.write(
|
|
57
|
+
b.write(Primitive.Vector.write(this.boosts));
|
|
58
58
|
}
|
|
59
59
|
if (this.nextOffset !== undefined) {
|
|
60
|
-
b.write(
|
|
60
|
+
b.write(Primitive.String.write(this.nextOffset));
|
|
61
61
|
}
|
|
62
62
|
if (this.users) {
|
|
63
|
-
b.write(
|
|
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 =
|
|
75
|
-
this.className =
|
|
74
|
+
this.classType = 'types';
|
|
75
|
+
this.className = 'premium.MyBoosts';
|
|
76
76
|
this.constructorId = 0x9ae228e2;
|
|
77
77
|
this.subclassOfId = 0xad3512db;
|
|
78
|
-
this._slots = [
|
|
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
|
-
|
|
85
|
-
|
|
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({
|
|
92
|
+
return new MyBoosts({ myBoosts: myBoosts, chats: chats, users: users });
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
|
|
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(
|
|
102
|
+
b.write(Primitive.Vector.write(this.myBoosts));
|
|
103
103
|
}
|
|
104
104
|
if (this.chats) {
|
|
105
|
-
b.write(
|
|
105
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
106
106
|
}
|
|
107
107
|
if (this.users) {
|
|
108
|
-
b.write(
|
|
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 =
|
|
127
|
-
this.className =
|
|
126
|
+
this.classType = 'types';
|
|
127
|
+
this.className = 'premium.BoostsStatus';
|
|
128
128
|
this.constructorId = 0x4959427a;
|
|
129
129
|
this.subclassOfId = 0xc31b1ab9;
|
|
130
|
-
this._slots = [
|
|
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
|
-
|
|
144
|
-
|
|
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 =
|
|
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 =
|
|
154
|
-
let nextLevelBoosts =
|
|
155
|
-
let premiumAudience =
|
|
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 =
|
|
158
|
-
let myBoostSlots =
|
|
159
|
-
return new BoostsStatus({
|
|
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
|
-
|
|
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 ?
|
|
170
|
-
flags |= this.giftBoosts !== undefined ?
|
|
171
|
-
flags |= this.nextLevelBoosts !== undefined ?
|
|
172
|
-
flags |= this.premiumAudience !== undefined ?
|
|
173
|
-
flags |= this.prepaidGiveaways ?
|
|
174
|
-
flags |= this.myBoostSlots ?
|
|
175
|
-
b.write(
|
|
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(
|
|
199
|
+
b.write(Primitive.Int.write(this.level));
|
|
178
200
|
}
|
|
179
201
|
if (this.currentLevelBoosts !== undefined) {
|
|
180
|
-
b.write(
|
|
202
|
+
b.write(Primitive.Int.write(this.currentLevelBoosts));
|
|
181
203
|
}
|
|
182
204
|
if (this.boosts !== undefined) {
|
|
183
|
-
b.write(
|
|
205
|
+
b.write(Primitive.Int.write(this.boosts));
|
|
184
206
|
}
|
|
185
207
|
if (this.giftBoosts !== undefined) {
|
|
186
|
-
b.write(
|
|
208
|
+
b.write(Primitive.Int.write(this.giftBoosts));
|
|
187
209
|
}
|
|
188
210
|
if (this.nextLevelBoosts !== undefined) {
|
|
189
|
-
b.write(
|
|
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(
|
|
217
|
+
b.write(Primitive.String.write(this.boostUrl));
|
|
196
218
|
}
|
|
197
219
|
if (this.prepaidGiveaways) {
|
|
198
|
-
b.write(
|
|
220
|
+
b.write(Primitive.Vector.write(this.prepaidGiveaways));
|
|
199
221
|
}
|
|
200
222
|
if (this.myBoostSlots) {
|
|
201
|
-
b.write(
|
|
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 =
|
|
215
|
-
this.className =
|
|
236
|
+
this.classType = 'functions';
|
|
237
|
+
this.className = 'premium.GetBoostsList';
|
|
216
238
|
this.constructorId = 0x60f67660;
|
|
217
239
|
this.subclassOfId = 0x2235a8bd;
|
|
218
|
-
this._slots = [
|
|
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
|
-
|
|
226
|
-
|
|
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 =
|
|
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({
|
|
257
|
+
return new GetBoostsList({ gifts: gifts, peer: peer, offset: offset, limit: limit });
|
|
236
258
|
}
|
|
237
259
|
/**
|
|
238
|
-
|
|
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 ?
|
|
246
|
-
b.write(
|
|
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(
|
|
273
|
+
b.write(Primitive.String.write(this.offset));
|
|
252
274
|
}
|
|
253
275
|
if (this.limit !== undefined) {
|
|
254
|
-
b.write(
|
|
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 =
|
|
264
|
-
this.className =
|
|
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
|
-
|
|
271
|
-
|
|
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
|
-
|
|
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 =
|
|
294
|
-
this.className =
|
|
315
|
+
this.classType = 'functions';
|
|
316
|
+
this.className = 'premium.ApplyBoost';
|
|
295
317
|
this.constructorId = 0x6b7da746;
|
|
296
318
|
this.subclassOfId = 0xad3512db;
|
|
297
|
-
this._slots = [
|
|
319
|
+
this._slots = ['slots', 'peer'];
|
|
298
320
|
this.slots = params.slots;
|
|
299
321
|
this.peer = params.peer;
|
|
300
322
|
}
|
|
301
323
|
/**
|
|
302
|
-
|
|
303
|
-
|
|
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 =
|
|
330
|
+
let slots = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
309
331
|
let peer = await TLObject.read(_data);
|
|
310
|
-
return new ApplyBoost({
|
|
332
|
+
return new ApplyBoost({ slots: slots, peer: peer });
|
|
311
333
|
}
|
|
312
334
|
/**
|
|
313
|
-
|
|
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 ?
|
|
321
|
-
b.write(
|
|
342
|
+
flags |= this.slots ? 1 << 0 : 0;
|
|
343
|
+
b.write(Primitive.Int.write(flags));
|
|
322
344
|
if (this.slots) {
|
|
323
|
-
b.write(
|
|
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 =
|
|
337
|
-
this.className =
|
|
358
|
+
this.classType = 'functions';
|
|
359
|
+
this.className = 'premium.GetBoostsStatus';
|
|
338
360
|
this.constructorId = 0x42f1f61;
|
|
339
361
|
this.subclassOfId = 0xc31b1ab9;
|
|
340
|
-
this._slots = [
|
|
362
|
+
this._slots = ['peer'];
|
|
341
363
|
this.peer = params.peer;
|
|
342
364
|
}
|
|
343
365
|
/**
|
|
344
|
-
|
|
345
|
-
|
|
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({
|
|
372
|
+
return new GetBoostsStatus({ peer: peer });
|
|
351
373
|
}
|
|
352
374
|
/**
|
|
353
|
-
|
|
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 =
|
|
372
|
-
this.className =
|
|
393
|
+
this.classType = 'functions';
|
|
394
|
+
this.className = 'premium.GetUserBoosts';
|
|
373
395
|
this.constructorId = 0x39854d1f;
|
|
374
396
|
this.subclassOfId = 0x2235a8bd;
|
|
375
|
-
this._slots = [
|
|
397
|
+
this._slots = ['peer', 'userId'];
|
|
376
398
|
this.peer = params.peer;
|
|
377
399
|
this.userId = params.userId;
|
|
378
400
|
}
|
|
379
401
|
/**
|
|
380
|
-
|
|
381
|
-
|
|
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({
|
|
409
|
+
return new GetUserBoosts({ peer: peer, userId: userId });
|
|
388
410
|
}
|
|
389
411
|
/**
|
|
390
|
-
|
|
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));
|