@tgsnake/skema 3.1.0-browser.0 → 3.1.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 +3 -4
- package/dist/src/deps.js +4 -4
- package/dist/src/raw/class/All.d.ts +1 -1
- package/dist/src/raw/class/All.js +2739 -2739
- package/dist/src/raw/class/Raw.d.ts +7516 -7516
- package/dist/src/raw/class/Raw.js +20426 -26448
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1813 -1983
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +117 -128
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +714 -849
- package/dist/src/raw/class/tl/bots.d.ts +231 -231
- package/dist/src/raw/class/tl/bots.js +504 -524
- package/dist/src/raw/class/tl/channels.d.ts +331 -331
- package/dist/src/raw/class/tl/channels.js +732 -823
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +183 -196
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +138 -159
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +492 -537
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +152 -204
- 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 +25 -32
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +618 -686
- 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 +1851 -1851
- package/dist/src/raw/class/tl/messages.js +4854 -5924
- package/dist/src/raw/class/tl/payments.d.ts +641 -641
- package/dist/src/raw/class/tl/payments.js +1734 -2198
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +644 -779
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +116 -139
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +111 -133
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +97 -115
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +169 -268
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +144 -173
- 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 +622 -781
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +47 -52
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +175 -246
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +155 -178
- 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 +206 -206
- package/dist/src/raw/class/tl/wallet.js +525 -591
- package/dist/src/raw/class/types.d.ts +1 -1
- package/dist/src/raw/class/types.js +1 -1
- 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
|
// 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';
|
|
@@ -15,36 +15,36 @@ export class AllStoriesNotModified extends TLObject {
|
|
|
15
15
|
stealthMode;
|
|
16
16
|
constructor(params) {
|
|
17
17
|
super();
|
|
18
|
-
this.classType =
|
|
19
|
-
this.className =
|
|
18
|
+
this.classType = "types";
|
|
19
|
+
this.className = "stories.AllStoriesNotModified";
|
|
20
20
|
this.constructorId = 0x1158fe3e;
|
|
21
21
|
this.subclassOfId = 0x7e60d0cd;
|
|
22
|
-
this._slots = [
|
|
22
|
+
this._slots = ["state", "stealthMode"];
|
|
23
23
|
this.state = params.state;
|
|
24
24
|
this.stealthMode = params.stealthMode;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Generate the TLObject from buffer.
|
|
28
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
29
|
+
*/
|
|
30
30
|
static async read(_data, ..._args) {
|
|
31
31
|
// @ts-ignore
|
|
32
32
|
let flags = await Primitive.Int.read(_data);
|
|
33
33
|
let state = await Primitive.String.read(_data);
|
|
34
34
|
let stealthMode = await TLObject.read(_data);
|
|
35
|
-
return new AllStoriesNotModified({ state: state, stealthMode: stealthMode });
|
|
35
|
+
return new AllStoriesNotModified({ "state": state, "stealthMode": stealthMode });
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
* Generate buffer from TLObject.
|
|
39
|
+
*/
|
|
40
40
|
write() {
|
|
41
41
|
const b = new BytesIO();
|
|
42
42
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
43
43
|
// @ts-ignore
|
|
44
44
|
let flags = 0;
|
|
45
|
-
b.write(Primitive.Int.write(flags));
|
|
45
|
+
b.write((Primitive.Int.write(flags)));
|
|
46
46
|
if (this.state !== undefined) {
|
|
47
|
-
b.write(Primitive.String.write(this.state));
|
|
47
|
+
b.write((Primitive.String.write(this.state)));
|
|
48
48
|
}
|
|
49
49
|
if (this.stealthMode !== undefined) {
|
|
50
50
|
b.write(this.stealthMode.write());
|
|
@@ -62,11 +62,11 @@ export class AllStories extends TLObject {
|
|
|
62
62
|
stealthMode;
|
|
63
63
|
constructor(params) {
|
|
64
64
|
super();
|
|
65
|
-
this.classType =
|
|
66
|
-
this.className =
|
|
65
|
+
this.classType = "types";
|
|
66
|
+
this.className = "stories.AllStories";
|
|
67
67
|
this.constructorId = 0x6efc5e81;
|
|
68
68
|
this.subclassOfId = 0x7e60d0cd;
|
|
69
|
-
this._slots = [
|
|
69
|
+
this._slots = ["hasMore", "count", "state", "peerStories", "chats", "users", "stealthMode"];
|
|
70
70
|
this.hasMore = params.hasMore;
|
|
71
71
|
this.count = params.count;
|
|
72
72
|
this.state = params.state;
|
|
@@ -76,53 +76,45 @@ export class AllStories extends TLObject {
|
|
|
76
76
|
this.stealthMode = params.stealthMode;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
* Generate the TLObject from buffer.
|
|
80
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
81
|
+
*/
|
|
82
82
|
static async read(_data, ..._args) {
|
|
83
83
|
// @ts-ignore
|
|
84
84
|
let flags = await Primitive.Int.read(_data);
|
|
85
|
-
let hasMore = flags & (1 << 0) ? true : false;
|
|
85
|
+
let hasMore = (flags & (1 << 0)) ? true : false;
|
|
86
86
|
let count = await Primitive.Int.read(_data);
|
|
87
87
|
let state = await Primitive.String.read(_data);
|
|
88
88
|
let peerStories = await TLObject.read(_data);
|
|
89
89
|
let chats = await TLObject.read(_data);
|
|
90
90
|
let users = await TLObject.read(_data);
|
|
91
91
|
let stealthMode = await TLObject.read(_data);
|
|
92
|
-
return new AllStories({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
chats: chats,
|
|
98
|
-
users: users,
|
|
99
|
-
stealthMode: stealthMode,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Generate buffer from TLObject.
|
|
104
|
-
*/
|
|
92
|
+
return new AllStories({ "hasMore": hasMore, "count": count, "state": state, "peerStories": peerStories, "chats": chats, "users": users, "stealthMode": stealthMode });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Generate buffer from TLObject.
|
|
96
|
+
*/
|
|
105
97
|
write() {
|
|
106
98
|
const b = new BytesIO();
|
|
107
99
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
108
100
|
// @ts-ignore
|
|
109
101
|
let flags = 0;
|
|
110
|
-
flags |= this.hasMore ? 1 << 0 : 0;
|
|
111
|
-
b.write(Primitive.Int.write(flags));
|
|
102
|
+
flags |= this.hasMore ? (1 << 0) : 0;
|
|
103
|
+
b.write((Primitive.Int.write(flags)));
|
|
112
104
|
if (this.count !== undefined) {
|
|
113
|
-
b.write(Primitive.Int.write(this.count));
|
|
105
|
+
b.write((Primitive.Int.write(this.count)));
|
|
114
106
|
}
|
|
115
107
|
if (this.state !== undefined) {
|
|
116
|
-
b.write(Primitive.String.write(this.state));
|
|
108
|
+
b.write((Primitive.String.write(this.state)));
|
|
117
109
|
}
|
|
118
110
|
if (this.peerStories) {
|
|
119
|
-
b.write(Primitive.Vector.write(this.peerStories));
|
|
111
|
+
b.write((Primitive.Vector.write(this.peerStories)));
|
|
120
112
|
}
|
|
121
113
|
if (this.chats) {
|
|
122
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
114
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
123
115
|
}
|
|
124
116
|
if (this.users) {
|
|
125
|
-
b.write(Primitive.Vector.write(this.users));
|
|
117
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
126
118
|
}
|
|
127
119
|
if (this.stealthMode !== undefined) {
|
|
128
120
|
b.write(this.stealthMode.write());
|
|
@@ -138,11 +130,11 @@ export class Stories extends TLObject {
|
|
|
138
130
|
users;
|
|
139
131
|
constructor(params) {
|
|
140
132
|
super();
|
|
141
|
-
this.classType =
|
|
142
|
-
this.className =
|
|
133
|
+
this.classType = "types";
|
|
134
|
+
this.className = "stories.Stories";
|
|
143
135
|
this.constructorId = 0x63c3dd0a;
|
|
144
136
|
this.subclassOfId = 0x251c0c2c;
|
|
145
|
-
this._slots = [
|
|
137
|
+
this._slots = ["count", "stories", "pinnedToTop", "chats", "users"];
|
|
146
138
|
this.count = params.count;
|
|
147
139
|
this.stories = params.stories;
|
|
148
140
|
this.pinnedToTop = params.pinnedToTop;
|
|
@@ -150,49 +142,43 @@ export class Stories extends TLObject {
|
|
|
150
142
|
this.users = params.users;
|
|
151
143
|
}
|
|
152
144
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
145
|
+
* Generate the TLObject from buffer.
|
|
146
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
147
|
+
*/
|
|
156
148
|
static async read(_data, ..._args) {
|
|
157
149
|
// @ts-ignore
|
|
158
150
|
let flags = await Primitive.Int.read(_data);
|
|
159
151
|
let count = await Primitive.Int.read(_data);
|
|
160
152
|
let stories = await TLObject.read(_data);
|
|
161
|
-
let pinnedToTop = flags & (1 << 0) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
153
|
+
let pinnedToTop = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
162
154
|
let chats = await TLObject.read(_data);
|
|
163
155
|
let users = await TLObject.read(_data);
|
|
164
|
-
return new Stories({
|
|
165
|
-
count: count,
|
|
166
|
-
stories: stories,
|
|
167
|
-
pinnedToTop: pinnedToTop,
|
|
168
|
-
chats: chats,
|
|
169
|
-
users: users,
|
|
170
|
-
});
|
|
156
|
+
return new Stories({ "count": count, "stories": stories, "pinnedToTop": pinnedToTop, "chats": chats, "users": users });
|
|
171
157
|
}
|
|
172
158
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
159
|
+
* Generate buffer from TLObject.
|
|
160
|
+
*/
|
|
175
161
|
write() {
|
|
176
162
|
const b = new BytesIO();
|
|
177
163
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
178
164
|
// @ts-ignore
|
|
179
165
|
let flags = 0;
|
|
180
|
-
flags |= this.pinnedToTop ? 1 << 0 : 0;
|
|
181
|
-
b.write(Primitive.Int.write(flags));
|
|
166
|
+
flags |= this.pinnedToTop ? (1 << 0) : 0;
|
|
167
|
+
b.write((Primitive.Int.write(flags)));
|
|
182
168
|
if (this.count !== undefined) {
|
|
183
|
-
b.write(Primitive.Int.write(this.count));
|
|
169
|
+
b.write((Primitive.Int.write(this.count)));
|
|
184
170
|
}
|
|
185
171
|
if (this.stories) {
|
|
186
|
-
b.write(Primitive.Vector.write(this.stories));
|
|
172
|
+
b.write((Primitive.Vector.write(this.stories)));
|
|
187
173
|
}
|
|
188
174
|
if (this.pinnedToTop) {
|
|
189
|
-
b.write(Primitive.Vector.write(this.pinnedToTop, Primitive.Int));
|
|
175
|
+
b.write((Primitive.Vector.write(this.pinnedToTop, Primitive.Int)));
|
|
190
176
|
}
|
|
191
177
|
if (this.chats) {
|
|
192
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
178
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
193
179
|
}
|
|
194
180
|
if (this.users) {
|
|
195
|
-
b.write(Primitive.Vector.write(this.users));
|
|
181
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
196
182
|
}
|
|
197
183
|
return b.buffer;
|
|
198
184
|
}
|
|
@@ -208,20 +194,11 @@ export class StoryViewsList extends TLObject {
|
|
|
208
194
|
nextOffset;
|
|
209
195
|
constructor(params) {
|
|
210
196
|
super();
|
|
211
|
-
this.classType =
|
|
212
|
-
this.className =
|
|
197
|
+
this.classType = "types";
|
|
198
|
+
this.className = "stories.StoryViewsList";
|
|
213
199
|
this.constructorId = 0x59d78fc5;
|
|
214
200
|
this.subclassOfId = 0xb9437560;
|
|
215
|
-
this._slots = [
|
|
216
|
-
'count',
|
|
217
|
-
'viewsCount',
|
|
218
|
-
'forwardsCount',
|
|
219
|
-
'reactionsCount',
|
|
220
|
-
'views',
|
|
221
|
-
'chats',
|
|
222
|
-
'users',
|
|
223
|
-
'nextOffset',
|
|
224
|
-
];
|
|
201
|
+
this._slots = ["count", "viewsCount", "forwardsCount", "reactionsCount", "views", "chats", "users", "nextOffset"];
|
|
225
202
|
this.count = params.count;
|
|
226
203
|
this.viewsCount = params.viewsCount;
|
|
227
204
|
this.forwardsCount = params.forwardsCount;
|
|
@@ -232,9 +209,9 @@ export class StoryViewsList extends TLObject {
|
|
|
232
209
|
this.nextOffset = params.nextOffset;
|
|
233
210
|
}
|
|
234
211
|
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
212
|
+
* Generate the TLObject from buffer.
|
|
213
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
214
|
+
*/
|
|
238
215
|
static async read(_data, ..._args) {
|
|
239
216
|
// @ts-ignore
|
|
240
217
|
let flags = await Primitive.Int.read(_data);
|
|
@@ -245,51 +222,42 @@ export class StoryViewsList extends TLObject {
|
|
|
245
222
|
let views = await TLObject.read(_data);
|
|
246
223
|
let chats = await TLObject.read(_data);
|
|
247
224
|
let users = await TLObject.read(_data);
|
|
248
|
-
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
249
|
-
return new StoryViewsList({
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
views: views,
|
|
255
|
-
chats: chats,
|
|
256
|
-
users: users,
|
|
257
|
-
nextOffset: nextOffset,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Generate buffer from TLObject.
|
|
262
|
-
*/
|
|
225
|
+
let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
226
|
+
return new StoryViewsList({ "count": count, "viewsCount": viewsCount, "forwardsCount": forwardsCount, "reactionsCount": reactionsCount, "views": views, "chats": chats, "users": users, "nextOffset": nextOffset });
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Generate buffer from TLObject.
|
|
230
|
+
*/
|
|
263
231
|
write() {
|
|
264
232
|
const b = new BytesIO();
|
|
265
233
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
266
234
|
// @ts-ignore
|
|
267
235
|
let flags = 0;
|
|
268
|
-
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
269
|
-
b.write(Primitive.Int.write(flags));
|
|
236
|
+
flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
|
|
237
|
+
b.write((Primitive.Int.write(flags)));
|
|
270
238
|
if (this.count !== undefined) {
|
|
271
|
-
b.write(Primitive.Int.write(this.count));
|
|
239
|
+
b.write((Primitive.Int.write(this.count)));
|
|
272
240
|
}
|
|
273
241
|
if (this.viewsCount !== undefined) {
|
|
274
|
-
b.write(Primitive.Int.write(this.viewsCount));
|
|
242
|
+
b.write((Primitive.Int.write(this.viewsCount)));
|
|
275
243
|
}
|
|
276
244
|
if (this.forwardsCount !== undefined) {
|
|
277
|
-
b.write(Primitive.Int.write(this.forwardsCount));
|
|
245
|
+
b.write((Primitive.Int.write(this.forwardsCount)));
|
|
278
246
|
}
|
|
279
247
|
if (this.reactionsCount !== undefined) {
|
|
280
|
-
b.write(Primitive.Int.write(this.reactionsCount));
|
|
248
|
+
b.write((Primitive.Int.write(this.reactionsCount)));
|
|
281
249
|
}
|
|
282
250
|
if (this.views) {
|
|
283
|
-
b.write(Primitive.Vector.write(this.views));
|
|
251
|
+
b.write((Primitive.Vector.write(this.views)));
|
|
284
252
|
}
|
|
285
253
|
if (this.chats) {
|
|
286
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
254
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
287
255
|
}
|
|
288
256
|
if (this.users) {
|
|
289
|
-
b.write(Primitive.Vector.write(this.users));
|
|
257
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
290
258
|
}
|
|
291
259
|
if (this.nextOffset !== undefined) {
|
|
292
|
-
b.write(Primitive.String.write(this.nextOffset));
|
|
260
|
+
b.write((Primitive.String.write(this.nextOffset)));
|
|
293
261
|
}
|
|
294
262
|
return b.buffer;
|
|
295
263
|
}
|
|
@@ -299,36 +267,36 @@ export class StoryViews extends TLObject {
|
|
|
299
267
|
users;
|
|
300
268
|
constructor(params) {
|
|
301
269
|
super();
|
|
302
|
-
this.classType =
|
|
303
|
-
this.className =
|
|
270
|
+
this.classType = "types";
|
|
271
|
+
this.className = "stories.StoryViews";
|
|
304
272
|
this.constructorId = 0xde9eed1d;
|
|
305
273
|
this.subclassOfId = 0x4b3fc4ba;
|
|
306
|
-
this._slots = [
|
|
274
|
+
this._slots = ["views", "users"];
|
|
307
275
|
this.views = params.views;
|
|
308
276
|
this.users = params.users;
|
|
309
277
|
}
|
|
310
278
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
279
|
+
* Generate the TLObject from buffer.
|
|
280
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
281
|
+
*/
|
|
314
282
|
static async read(_data, ..._args) {
|
|
315
283
|
// no flags
|
|
316
284
|
let views = await TLObject.read(_data);
|
|
317
285
|
let users = await TLObject.read(_data);
|
|
318
|
-
return new StoryViews({ views: views, users: users });
|
|
286
|
+
return new StoryViews({ "views": views, "users": users });
|
|
319
287
|
}
|
|
320
288
|
/**
|
|
321
|
-
|
|
322
|
-
|
|
289
|
+
* Generate buffer from TLObject.
|
|
290
|
+
*/
|
|
323
291
|
write() {
|
|
324
292
|
const b = new BytesIO();
|
|
325
293
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
326
294
|
// no flags
|
|
327
295
|
if (this.views) {
|
|
328
|
-
b.write(Primitive.Vector.write(this.views));
|
|
296
|
+
b.write((Primitive.Vector.write(this.views)));
|
|
329
297
|
}
|
|
330
298
|
if (this.users) {
|
|
331
|
-
b.write(Primitive.Vector.write(this.users));
|
|
299
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
332
300
|
}
|
|
333
301
|
return b.buffer;
|
|
334
302
|
}
|
|
@@ -339,29 +307,29 @@ export class PeerStories extends TLObject {
|
|
|
339
307
|
users;
|
|
340
308
|
constructor(params) {
|
|
341
309
|
super();
|
|
342
|
-
this.classType =
|
|
343
|
-
this.className =
|
|
310
|
+
this.classType = "types";
|
|
311
|
+
this.className = "stories.PeerStories";
|
|
344
312
|
this.constructorId = 0xcae68768;
|
|
345
313
|
this.subclassOfId = 0x9d56cfd0;
|
|
346
|
-
this._slots = [
|
|
314
|
+
this._slots = ["stories", "chats", "users"];
|
|
347
315
|
this.stories = params.stories;
|
|
348
316
|
this.chats = params.chats;
|
|
349
317
|
this.users = params.users;
|
|
350
318
|
}
|
|
351
319
|
/**
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
320
|
+
* Generate the TLObject from buffer.
|
|
321
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
322
|
+
*/
|
|
355
323
|
static async read(_data, ..._args) {
|
|
356
324
|
// no flags
|
|
357
325
|
let stories = await TLObject.read(_data);
|
|
358
326
|
let chats = await TLObject.read(_data);
|
|
359
327
|
let users = await TLObject.read(_data);
|
|
360
|
-
return new PeerStories({ stories: stories, chats: chats, users: users });
|
|
328
|
+
return new PeerStories({ "stories": stories, "chats": chats, "users": users });
|
|
361
329
|
}
|
|
362
330
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
331
|
+
* Generate buffer from TLObject.
|
|
332
|
+
*/
|
|
365
333
|
write() {
|
|
366
334
|
const b = new BytesIO();
|
|
367
335
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -370,10 +338,10 @@ export class PeerStories extends TLObject {
|
|
|
370
338
|
b.write(this.stories.write());
|
|
371
339
|
}
|
|
372
340
|
if (this.chats) {
|
|
373
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
341
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
374
342
|
}
|
|
375
343
|
if (this.users) {
|
|
376
|
-
b.write(Primitive.Vector.write(this.users));
|
|
344
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
377
345
|
}
|
|
378
346
|
return b.buffer;
|
|
379
347
|
}
|
|
@@ -386,11 +354,11 @@ export class StoryReactionsList extends TLObject {
|
|
|
386
354
|
nextOffset;
|
|
387
355
|
constructor(params) {
|
|
388
356
|
super();
|
|
389
|
-
this.classType =
|
|
390
|
-
this.className =
|
|
357
|
+
this.classType = "types";
|
|
358
|
+
this.className = "stories.StoryReactionsList";
|
|
391
359
|
this.constructorId = 0xaa5f789c;
|
|
392
360
|
this.subclassOfId = 0x46f91e3;
|
|
393
|
-
this._slots = [
|
|
361
|
+
this._slots = ["count", "reactions", "chats", "users", "nextOffset"];
|
|
394
362
|
this.count = params.count;
|
|
395
363
|
this.reactions = params.reactions;
|
|
396
364
|
this.chats = params.chats;
|
|
@@ -398,9 +366,9 @@ export class StoryReactionsList extends TLObject {
|
|
|
398
366
|
this.nextOffset = params.nextOffset;
|
|
399
367
|
}
|
|
400
368
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
369
|
+
* Generate the TLObject from buffer.
|
|
370
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
371
|
+
*/
|
|
404
372
|
static async read(_data, ..._args) {
|
|
405
373
|
// @ts-ignore
|
|
406
374
|
let flags = await Primitive.Int.read(_data);
|
|
@@ -408,39 +376,33 @@ export class StoryReactionsList extends TLObject {
|
|
|
408
376
|
let reactions = await TLObject.read(_data);
|
|
409
377
|
let chats = await TLObject.read(_data);
|
|
410
378
|
let users = await TLObject.read(_data);
|
|
411
|
-
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
412
|
-
return new StoryReactionsList({
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
nextOffset: nextOffset,
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Generate buffer from TLObject.
|
|
422
|
-
*/
|
|
379
|
+
let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
380
|
+
return new StoryReactionsList({ "count": count, "reactions": reactions, "chats": chats, "users": users, "nextOffset": nextOffset });
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Generate buffer from TLObject.
|
|
384
|
+
*/
|
|
423
385
|
write() {
|
|
424
386
|
const b = new BytesIO();
|
|
425
387
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
426
388
|
// @ts-ignore
|
|
427
389
|
let flags = 0;
|
|
428
|
-
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
429
|
-
b.write(Primitive.Int.write(flags));
|
|
390
|
+
flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
|
|
391
|
+
b.write((Primitive.Int.write(flags)));
|
|
430
392
|
if (this.count !== undefined) {
|
|
431
|
-
b.write(Primitive.Int.write(this.count));
|
|
393
|
+
b.write((Primitive.Int.write(this.count)));
|
|
432
394
|
}
|
|
433
395
|
if (this.reactions) {
|
|
434
|
-
b.write(Primitive.Vector.write(this.reactions));
|
|
396
|
+
b.write((Primitive.Vector.write(this.reactions)));
|
|
435
397
|
}
|
|
436
398
|
if (this.chats) {
|
|
437
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
399
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
438
400
|
}
|
|
439
401
|
if (this.users) {
|
|
440
|
-
b.write(Primitive.Vector.write(this.users));
|
|
402
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
441
403
|
}
|
|
442
404
|
if (this.nextOffset !== undefined) {
|
|
443
|
-
b.write(Primitive.String.write(this.nextOffset));
|
|
405
|
+
b.write((Primitive.String.write(this.nextOffset)));
|
|
444
406
|
}
|
|
445
407
|
return b.buffer;
|
|
446
408
|
}
|
|
@@ -453,11 +415,11 @@ export class FoundStories extends TLObject {
|
|
|
453
415
|
users;
|
|
454
416
|
constructor(params) {
|
|
455
417
|
super();
|
|
456
|
-
this.classType =
|
|
457
|
-
this.className =
|
|
418
|
+
this.classType = "types";
|
|
419
|
+
this.className = "stories.FoundStories";
|
|
458
420
|
this.constructorId = 0xe2de7737;
|
|
459
421
|
this.subclassOfId = 0x17790b35;
|
|
460
|
-
this._slots = [
|
|
422
|
+
this._slots = ["count", "stories", "nextOffset", "chats", "users"];
|
|
461
423
|
this.count = params.count;
|
|
462
424
|
this.stories = params.stories;
|
|
463
425
|
this.nextOffset = params.nextOffset;
|
|
@@ -465,49 +427,43 @@ export class FoundStories extends TLObject {
|
|
|
465
427
|
this.users = params.users;
|
|
466
428
|
}
|
|
467
429
|
/**
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
430
|
+
* Generate the TLObject from buffer.
|
|
431
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
432
|
+
*/
|
|
471
433
|
static async read(_data, ..._args) {
|
|
472
434
|
// @ts-ignore
|
|
473
435
|
let flags = await Primitive.Int.read(_data);
|
|
474
436
|
let count = await Primitive.Int.read(_data);
|
|
475
437
|
let stories = await TLObject.read(_data);
|
|
476
|
-
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
438
|
+
let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
477
439
|
let chats = await TLObject.read(_data);
|
|
478
440
|
let users = await TLObject.read(_data);
|
|
479
|
-
return new FoundStories({
|
|
480
|
-
count: count,
|
|
481
|
-
stories: stories,
|
|
482
|
-
nextOffset: nextOffset,
|
|
483
|
-
chats: chats,
|
|
484
|
-
users: users,
|
|
485
|
-
});
|
|
441
|
+
return new FoundStories({ "count": count, "stories": stories, "nextOffset": nextOffset, "chats": chats, "users": users });
|
|
486
442
|
}
|
|
487
443
|
/**
|
|
488
|
-
|
|
489
|
-
|
|
444
|
+
* Generate buffer from TLObject.
|
|
445
|
+
*/
|
|
490
446
|
write() {
|
|
491
447
|
const b = new BytesIO();
|
|
492
448
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
493
449
|
// @ts-ignore
|
|
494
450
|
let flags = 0;
|
|
495
|
-
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
496
|
-
b.write(Primitive.Int.write(flags));
|
|
451
|
+
flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
|
|
452
|
+
b.write((Primitive.Int.write(flags)));
|
|
497
453
|
if (this.count !== undefined) {
|
|
498
|
-
b.write(Primitive.Int.write(this.count));
|
|
454
|
+
b.write((Primitive.Int.write(this.count)));
|
|
499
455
|
}
|
|
500
456
|
if (this.stories) {
|
|
501
|
-
b.write(Primitive.Vector.write(this.stories));
|
|
457
|
+
b.write((Primitive.Vector.write(this.stories)));
|
|
502
458
|
}
|
|
503
459
|
if (this.nextOffset !== undefined) {
|
|
504
|
-
b.write(Primitive.String.write(this.nextOffset));
|
|
460
|
+
b.write((Primitive.String.write(this.nextOffset)));
|
|
505
461
|
}
|
|
506
462
|
if (this.chats) {
|
|
507
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
463
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
508
464
|
}
|
|
509
465
|
if (this.users) {
|
|
510
|
-
b.write(Primitive.Vector.write(this.users));
|
|
466
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
511
467
|
}
|
|
512
468
|
return b.buffer;
|
|
513
469
|
}
|
|
@@ -516,31 +472,31 @@ export class CanSendStoryCount extends TLObject {
|
|
|
516
472
|
countRemains;
|
|
517
473
|
constructor(params) {
|
|
518
474
|
super();
|
|
519
|
-
this.classType =
|
|
520
|
-
this.className =
|
|
475
|
+
this.classType = "types";
|
|
476
|
+
this.className = "stories.CanSendStoryCount";
|
|
521
477
|
this.constructorId = 0xc387c04e;
|
|
522
478
|
this.subclassOfId = 0xcb53a298;
|
|
523
|
-
this._slots = [
|
|
479
|
+
this._slots = ["countRemains"];
|
|
524
480
|
this.countRemains = params.countRemains;
|
|
525
481
|
}
|
|
526
482
|
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
483
|
+
* Generate the TLObject from buffer.
|
|
484
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
485
|
+
*/
|
|
530
486
|
static async read(_data, ..._args) {
|
|
531
487
|
// no flags
|
|
532
488
|
let countRemains = await Primitive.Int.read(_data);
|
|
533
|
-
return new CanSendStoryCount({ countRemains: countRemains });
|
|
489
|
+
return new CanSendStoryCount({ "countRemains": countRemains });
|
|
534
490
|
}
|
|
535
491
|
/**
|
|
536
|
-
|
|
537
|
-
|
|
492
|
+
* Generate buffer from TLObject.
|
|
493
|
+
*/
|
|
538
494
|
write() {
|
|
539
495
|
const b = new BytesIO();
|
|
540
496
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
541
497
|
// no flags
|
|
542
498
|
if (this.countRemains !== undefined) {
|
|
543
|
-
b.write(Primitive.Int.write(this.countRemains));
|
|
499
|
+
b.write((Primitive.Int.write(this.countRemains)));
|
|
544
500
|
}
|
|
545
501
|
return b.buffer;
|
|
546
502
|
}
|
|
@@ -548,23 +504,23 @@ export class CanSendStoryCount extends TLObject {
|
|
|
548
504
|
export class AlbumsNotModified extends TLObject {
|
|
549
505
|
constructor() {
|
|
550
506
|
super();
|
|
551
|
-
this.classType =
|
|
552
|
-
this.className =
|
|
507
|
+
this.classType = "types";
|
|
508
|
+
this.className = "stories.AlbumsNotModified";
|
|
553
509
|
this.constructorId = 0x564edaeb;
|
|
554
510
|
this.subclassOfId = 0x5a73d39;
|
|
555
511
|
this._slots = [];
|
|
556
512
|
}
|
|
557
513
|
/**
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
514
|
+
* Generate the TLObject from buffer.
|
|
515
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
516
|
+
*/
|
|
561
517
|
static async read(_data, ..._args) {
|
|
562
518
|
// no flags
|
|
563
519
|
return new AlbumsNotModified();
|
|
564
520
|
}
|
|
565
521
|
/**
|
|
566
|
-
|
|
567
|
-
|
|
522
|
+
* Generate buffer from TLObject.
|
|
523
|
+
*/
|
|
568
524
|
write() {
|
|
569
525
|
const b = new BytesIO();
|
|
570
526
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -577,36 +533,36 @@ export class Albums extends TLObject {
|
|
|
577
533
|
albums;
|
|
578
534
|
constructor(params) {
|
|
579
535
|
super();
|
|
580
|
-
this.classType =
|
|
581
|
-
this.className =
|
|
536
|
+
this.classType = "types";
|
|
537
|
+
this.className = "stories.Albums";
|
|
582
538
|
this.constructorId = 0xc3987a3a;
|
|
583
539
|
this.subclassOfId = 0x5a73d39;
|
|
584
|
-
this._slots = [
|
|
540
|
+
this._slots = ["hash", "albums"];
|
|
585
541
|
this.hash = params.hash;
|
|
586
542
|
this.albums = params.albums;
|
|
587
543
|
}
|
|
588
544
|
/**
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
545
|
+
* Generate the TLObject from buffer.
|
|
546
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
547
|
+
*/
|
|
592
548
|
static async read(_data, ..._args) {
|
|
593
549
|
// no flags
|
|
594
550
|
let hash = await Primitive.Long.read(_data);
|
|
595
551
|
let albums = await TLObject.read(_data);
|
|
596
|
-
return new Albums({ hash: hash, albums: albums });
|
|
552
|
+
return new Albums({ "hash": hash, "albums": albums });
|
|
597
553
|
}
|
|
598
554
|
/**
|
|
599
|
-
|
|
600
|
-
|
|
555
|
+
* Generate buffer from TLObject.
|
|
556
|
+
*/
|
|
601
557
|
write() {
|
|
602
558
|
const b = new BytesIO();
|
|
603
559
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
604
560
|
// no flags
|
|
605
561
|
if (this.hash !== undefined) {
|
|
606
|
-
b.write(Primitive.Long.write(this.hash));
|
|
562
|
+
b.write((Primitive.Long.write(this.hash)));
|
|
607
563
|
}
|
|
608
564
|
if (this.albums) {
|
|
609
|
-
b.write(Primitive.Vector.write(this.albums));
|
|
565
|
+
b.write((Primitive.Vector.write(this.albums)));
|
|
610
566
|
}
|
|
611
567
|
return b.buffer;
|
|
612
568
|
}
|
|
@@ -616,25 +572,25 @@ export class CanSendStory extends TLObject {
|
|
|
616
572
|
peer;
|
|
617
573
|
constructor(params) {
|
|
618
574
|
super();
|
|
619
|
-
this.classType =
|
|
620
|
-
this.className =
|
|
575
|
+
this.classType = "functions";
|
|
576
|
+
this.className = "stories.CanSendStory";
|
|
621
577
|
this.constructorId = 0x30eb63f0;
|
|
622
578
|
this.subclassOfId = 0xcb53a298;
|
|
623
|
-
this._slots = [
|
|
579
|
+
this._slots = ["peer"];
|
|
624
580
|
this.peer = params.peer;
|
|
625
581
|
}
|
|
626
582
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
583
|
+
* Generate the TLObject from buffer.
|
|
584
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
585
|
+
*/
|
|
630
586
|
static async read(_data, ..._args) {
|
|
631
587
|
// no flags
|
|
632
588
|
let peer = await TLObject.read(_data);
|
|
633
|
-
return new CanSendStory({ peer: peer });
|
|
589
|
+
return new CanSendStory({ "peer": peer });
|
|
634
590
|
}
|
|
635
591
|
/**
|
|
636
|
-
|
|
637
|
-
|
|
592
|
+
* Generate buffer from TLObject.
|
|
593
|
+
*/
|
|
638
594
|
write() {
|
|
639
595
|
const b = new BytesIO();
|
|
640
596
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -664,27 +620,11 @@ export class SendStory extends TLObject {
|
|
|
664
620
|
music;
|
|
665
621
|
constructor(params) {
|
|
666
622
|
super();
|
|
667
|
-
this.classType =
|
|
668
|
-
this.className =
|
|
623
|
+
this.classType = "functions";
|
|
624
|
+
this.className = "stories.SendStory";
|
|
669
625
|
this.constructorId = 0x8f9e6898;
|
|
670
626
|
this.subclassOfId = 0x8af52aac;
|
|
671
|
-
this._slots = [
|
|
672
|
-
'pinned',
|
|
673
|
-
'noforwards',
|
|
674
|
-
'fwdModified',
|
|
675
|
-
'peer',
|
|
676
|
-
'media',
|
|
677
|
-
'mediaAreas',
|
|
678
|
-
'caption',
|
|
679
|
-
'entities',
|
|
680
|
-
'privacyRules',
|
|
681
|
-
'randomId',
|
|
682
|
-
'period',
|
|
683
|
-
'fwdFromId',
|
|
684
|
-
'fwdFromStory',
|
|
685
|
-
'albums',
|
|
686
|
-
'music',
|
|
687
|
-
];
|
|
627
|
+
this._slots = ["pinned", "noforwards", "fwdModified", "peer", "media", "mediaAreas", "caption", "entities", "privacyRules", "randomId", "period", "fwdFromId", "fwdFromStory", "albums", "music"];
|
|
688
628
|
this.pinned = params.pinned;
|
|
689
629
|
this.noforwards = params.noforwards;
|
|
690
630
|
this.fwdModified = params.fwdModified;
|
|
@@ -702,65 +642,49 @@ export class SendStory extends TLObject {
|
|
|
702
642
|
this.music = params.music;
|
|
703
643
|
}
|
|
704
644
|
/**
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
645
|
+
* Generate the TLObject from buffer.
|
|
646
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
647
|
+
*/
|
|
708
648
|
static async read(_data, ..._args) {
|
|
709
649
|
// @ts-ignore
|
|
710
650
|
let flags = await Primitive.Int.read(_data);
|
|
711
|
-
let pinned = flags & (1 << 2) ? true : false;
|
|
712
|
-
let noforwards = flags & (1 << 4) ? true : false;
|
|
713
|
-
let fwdModified = flags & (1 << 7) ? true : false;
|
|
651
|
+
let pinned = (flags & (1 << 2)) ? true : false;
|
|
652
|
+
let noforwards = (flags & (1 << 4)) ? true : false;
|
|
653
|
+
let fwdModified = (flags & (1 << 7)) ? true : false;
|
|
714
654
|
let peer = await TLObject.read(_data);
|
|
715
655
|
let media = await TLObject.read(_data);
|
|
716
|
-
let mediaAreas = flags & (1 << 5) ? await TLObject.read(_data) : [];
|
|
717
|
-
let caption = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
718
|
-
let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
656
|
+
let mediaAreas = (flags & (1 << 5)) ? await TLObject.read(_data) : [];
|
|
657
|
+
let caption = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
658
|
+
let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
|
|
719
659
|
let privacyRules = await TLObject.read(_data);
|
|
720
660
|
let randomId = await Primitive.Long.read(_data);
|
|
721
|
-
let period = flags & (1 << 3) ? await Primitive.Int.read(_data) : undefined;
|
|
722
|
-
let fwdFromId = flags & (1 << 6) ? await TLObject.read(_data) : undefined;
|
|
723
|
-
let fwdFromStory = flags & (1 << 6) ? await Primitive.Int.read(_data) : undefined;
|
|
724
|
-
let albums = flags & (1 << 8) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
725
|
-
let music = flags & (1 << 9) ? await TLObject.read(_data) : undefined;
|
|
726
|
-
return new SendStory({
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
media: media,
|
|
732
|
-
mediaAreas: mediaAreas,
|
|
733
|
-
caption: caption,
|
|
734
|
-
entities: entities,
|
|
735
|
-
privacyRules: privacyRules,
|
|
736
|
-
randomId: randomId,
|
|
737
|
-
period: period,
|
|
738
|
-
fwdFromId: fwdFromId,
|
|
739
|
-
fwdFromStory: fwdFromStory,
|
|
740
|
-
albums: albums,
|
|
741
|
-
music: music,
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Generate buffer from TLObject.
|
|
746
|
-
*/
|
|
661
|
+
let period = (flags & (1 << 3)) ? await Primitive.Int.read(_data) : undefined;
|
|
662
|
+
let fwdFromId = (flags & (1 << 6)) ? await TLObject.read(_data) : undefined;
|
|
663
|
+
let fwdFromStory = (flags & (1 << 6)) ? await Primitive.Int.read(_data) : undefined;
|
|
664
|
+
let albums = (flags & (1 << 8)) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
665
|
+
let music = (flags & (1 << 9)) ? await TLObject.read(_data) : undefined;
|
|
666
|
+
return new SendStory({ "pinned": pinned, "noforwards": noforwards, "fwdModified": fwdModified, "peer": peer, "media": media, "mediaAreas": mediaAreas, "caption": caption, "entities": entities, "privacyRules": privacyRules, "randomId": randomId, "period": period, "fwdFromId": fwdFromId, "fwdFromStory": fwdFromStory, "albums": albums, "music": music });
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Generate buffer from TLObject.
|
|
670
|
+
*/
|
|
747
671
|
write() {
|
|
748
672
|
const b = new BytesIO();
|
|
749
673
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
750
674
|
// @ts-ignore
|
|
751
675
|
let flags = 0;
|
|
752
|
-
flags |= this.pinned ? 1 << 2 : 0;
|
|
753
|
-
flags |= this.noforwards ? 1 << 4 : 0;
|
|
754
|
-
flags |= this.fwdModified ? 1 << 7 : 0;
|
|
755
|
-
flags |= this.mediaAreas ? 1 << 5 : 0;
|
|
756
|
-
flags |= this.caption !== undefined ? 1 << 0 : 0;
|
|
757
|
-
flags |= this.entities ? 1 << 1 : 0;
|
|
758
|
-
flags |= this.period !== undefined ? 1 << 3 : 0;
|
|
759
|
-
flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
|
|
760
|
-
flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
|
|
761
|
-
flags |= this.albums ? 1 << 8 : 0;
|
|
762
|
-
flags |= this.music !== undefined ? 1 << 9 : 0;
|
|
763
|
-
b.write(Primitive.Int.write(flags));
|
|
676
|
+
flags |= this.pinned ? (1 << 2) : 0;
|
|
677
|
+
flags |= this.noforwards ? (1 << 4) : 0;
|
|
678
|
+
flags |= this.fwdModified ? (1 << 7) : 0;
|
|
679
|
+
flags |= this.mediaAreas ? (1 << 5) : 0;
|
|
680
|
+
flags |= this.caption !== undefined ? (1 << 0) : 0;
|
|
681
|
+
flags |= this.entities ? (1 << 1) : 0;
|
|
682
|
+
flags |= this.period !== undefined ? (1 << 3) : 0;
|
|
683
|
+
flags |= this.fwdFromId !== undefined ? (1 << 6) : 0;
|
|
684
|
+
flags |= this.fwdFromStory !== undefined ? (1 << 6) : 0;
|
|
685
|
+
flags |= this.albums ? (1 << 8) : 0;
|
|
686
|
+
flags |= this.music !== undefined ? (1 << 9) : 0;
|
|
687
|
+
b.write((Primitive.Int.write(flags)));
|
|
764
688
|
if (this.peer !== undefined) {
|
|
765
689
|
b.write(this.peer.write());
|
|
766
690
|
}
|
|
@@ -768,31 +692,31 @@ export class SendStory extends TLObject {
|
|
|
768
692
|
b.write(this.media.write());
|
|
769
693
|
}
|
|
770
694
|
if (this.mediaAreas) {
|
|
771
|
-
b.write(Primitive.Vector.write(this.mediaAreas));
|
|
695
|
+
b.write((Primitive.Vector.write(this.mediaAreas)));
|
|
772
696
|
}
|
|
773
697
|
if (this.caption !== undefined) {
|
|
774
|
-
b.write(Primitive.String.write(this.caption));
|
|
698
|
+
b.write((Primitive.String.write(this.caption)));
|
|
775
699
|
}
|
|
776
700
|
if (this.entities) {
|
|
777
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
701
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
778
702
|
}
|
|
779
703
|
if (this.privacyRules) {
|
|
780
|
-
b.write(Primitive.Vector.write(this.privacyRules));
|
|
704
|
+
b.write((Primitive.Vector.write(this.privacyRules)));
|
|
781
705
|
}
|
|
782
706
|
if (this.randomId !== undefined) {
|
|
783
|
-
b.write(Primitive.Long.write(this.randomId));
|
|
707
|
+
b.write((Primitive.Long.write(this.randomId)));
|
|
784
708
|
}
|
|
785
709
|
if (this.period !== undefined) {
|
|
786
|
-
b.write(Primitive.Int.write(this.period));
|
|
710
|
+
b.write((Primitive.Int.write(this.period)));
|
|
787
711
|
}
|
|
788
712
|
if (this.fwdFromId !== undefined) {
|
|
789
713
|
b.write(this.fwdFromId.write());
|
|
790
714
|
}
|
|
791
715
|
if (this.fwdFromStory !== undefined) {
|
|
792
|
-
b.write(Primitive.Int.write(this.fwdFromStory));
|
|
716
|
+
b.write((Primitive.Int.write(this.fwdFromStory)));
|
|
793
717
|
}
|
|
794
718
|
if (this.albums) {
|
|
795
|
-
b.write(Primitive.Vector.write(this.albums, Primitive.Int));
|
|
719
|
+
b.write((Primitive.Vector.write(this.albums, Primitive.Int)));
|
|
796
720
|
}
|
|
797
721
|
if (this.music !== undefined) {
|
|
798
722
|
b.write(this.music.write());
|
|
@@ -812,20 +736,11 @@ export class EditStory extends TLObject {
|
|
|
812
736
|
music;
|
|
813
737
|
constructor(params) {
|
|
814
738
|
super();
|
|
815
|
-
this.classType =
|
|
816
|
-
this.className =
|
|
739
|
+
this.classType = "functions";
|
|
740
|
+
this.className = "stories.EditStory";
|
|
817
741
|
this.constructorId = 0x2c63a72b;
|
|
818
742
|
this.subclassOfId = 0x8af52aac;
|
|
819
|
-
this._slots = [
|
|
820
|
-
'peer',
|
|
821
|
-
'id',
|
|
822
|
-
'media',
|
|
823
|
-
'mediaAreas',
|
|
824
|
-
'caption',
|
|
825
|
-
'entities',
|
|
826
|
-
'privacyRules',
|
|
827
|
-
'music',
|
|
828
|
-
];
|
|
743
|
+
this._slots = ["peer", "id", "media", "mediaAreas", "caption", "entities", "privacyRules", "music"];
|
|
829
744
|
this.peer = params.peer;
|
|
830
745
|
this.id = params.id;
|
|
831
746
|
this.media = params.media;
|
|
@@ -836,66 +751,57 @@ export class EditStory extends TLObject {
|
|
|
836
751
|
this.music = params.music;
|
|
837
752
|
}
|
|
838
753
|
/**
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
754
|
+
* Generate the TLObject from buffer.
|
|
755
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
756
|
+
*/
|
|
842
757
|
static async read(_data, ..._args) {
|
|
843
758
|
// @ts-ignore
|
|
844
759
|
let flags = await Primitive.Int.read(_data);
|
|
845
760
|
let peer = await TLObject.read(_data);
|
|
846
761
|
let id = await Primitive.Int.read(_data);
|
|
847
|
-
let media = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
848
|
-
let mediaAreas = flags & (1 << 3) ? await TLObject.read(_data) : [];
|
|
849
|
-
let caption = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
850
|
-
let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
851
|
-
let privacyRules = flags & (1 << 2) ? await TLObject.read(_data) : [];
|
|
852
|
-
let music = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
853
|
-
return new EditStory({
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
caption: caption,
|
|
859
|
-
entities: entities,
|
|
860
|
-
privacyRules: privacyRules,
|
|
861
|
-
music: music,
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Generate buffer from TLObject.
|
|
866
|
-
*/
|
|
762
|
+
let media = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
|
|
763
|
+
let mediaAreas = (flags & (1 << 3)) ? await TLObject.read(_data) : [];
|
|
764
|
+
let caption = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
765
|
+
let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
|
|
766
|
+
let privacyRules = (flags & (1 << 2)) ? await TLObject.read(_data) : [];
|
|
767
|
+
let music = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
|
|
768
|
+
return new EditStory({ "peer": peer, "id": id, "media": media, "mediaAreas": mediaAreas, "caption": caption, "entities": entities, "privacyRules": privacyRules, "music": music });
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Generate buffer from TLObject.
|
|
772
|
+
*/
|
|
867
773
|
write() {
|
|
868
774
|
const b = new BytesIO();
|
|
869
775
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
870
776
|
// @ts-ignore
|
|
871
777
|
let flags = 0;
|
|
872
|
-
flags |= this.media !== undefined ? 1 << 0 : 0;
|
|
873
|
-
flags |= this.mediaAreas ? 1 << 3 : 0;
|
|
874
|
-
flags |= this.caption !== undefined ? 1 << 1 : 0;
|
|
875
|
-
flags |= this.entities ? 1 << 1 : 0;
|
|
876
|
-
flags |= this.privacyRules ? 1 << 2 : 0;
|
|
877
|
-
flags |= this.music !== undefined ? 1 << 4 : 0;
|
|
878
|
-
b.write(Primitive.Int.write(flags));
|
|
778
|
+
flags |= this.media !== undefined ? (1 << 0) : 0;
|
|
779
|
+
flags |= this.mediaAreas ? (1 << 3) : 0;
|
|
780
|
+
flags |= this.caption !== undefined ? (1 << 1) : 0;
|
|
781
|
+
flags |= this.entities ? (1 << 1) : 0;
|
|
782
|
+
flags |= this.privacyRules ? (1 << 2) : 0;
|
|
783
|
+
flags |= this.music !== undefined ? (1 << 4) : 0;
|
|
784
|
+
b.write((Primitive.Int.write(flags)));
|
|
879
785
|
if (this.peer !== undefined) {
|
|
880
786
|
b.write(this.peer.write());
|
|
881
787
|
}
|
|
882
788
|
if (this.id !== undefined) {
|
|
883
|
-
b.write(Primitive.Int.write(this.id));
|
|
789
|
+
b.write((Primitive.Int.write(this.id)));
|
|
884
790
|
}
|
|
885
791
|
if (this.media !== undefined) {
|
|
886
792
|
b.write(this.media.write());
|
|
887
793
|
}
|
|
888
794
|
if (this.mediaAreas) {
|
|
889
|
-
b.write(Primitive.Vector.write(this.mediaAreas));
|
|
795
|
+
b.write((Primitive.Vector.write(this.mediaAreas)));
|
|
890
796
|
}
|
|
891
797
|
if (this.caption !== undefined) {
|
|
892
|
-
b.write(Primitive.String.write(this.caption));
|
|
798
|
+
b.write((Primitive.String.write(this.caption)));
|
|
893
799
|
}
|
|
894
800
|
if (this.entities) {
|
|
895
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
801
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
896
802
|
}
|
|
897
803
|
if (this.privacyRules) {
|
|
898
|
-
b.write(Primitive.Vector.write(this.privacyRules));
|
|
804
|
+
b.write((Primitive.Vector.write(this.privacyRules)));
|
|
899
805
|
}
|
|
900
806
|
if (this.music !== undefined) {
|
|
901
807
|
b.write(this.music.write());
|
|
@@ -909,27 +815,27 @@ export class DeleteStories extends TLObject {
|
|
|
909
815
|
id;
|
|
910
816
|
constructor(params) {
|
|
911
817
|
super();
|
|
912
|
-
this.classType =
|
|
913
|
-
this.className =
|
|
818
|
+
this.classType = "functions";
|
|
819
|
+
this.className = "stories.DeleteStories";
|
|
914
820
|
this.constructorId = 0xae59db5f;
|
|
915
821
|
this.subclassOfId = 0x5026710f;
|
|
916
|
-
this._slots = [
|
|
822
|
+
this._slots = ["peer", "id"];
|
|
917
823
|
this.peer = params.peer;
|
|
918
824
|
this.id = params.id;
|
|
919
825
|
}
|
|
920
826
|
/**
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
827
|
+
* Generate the TLObject from buffer.
|
|
828
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
829
|
+
*/
|
|
924
830
|
static async read(_data, ..._args) {
|
|
925
831
|
// no flags
|
|
926
832
|
let peer = await TLObject.read(_data);
|
|
927
833
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
928
|
-
return new DeleteStories({ peer: peer, id: id });
|
|
834
|
+
return new DeleteStories({ "peer": peer, "id": id });
|
|
929
835
|
}
|
|
930
836
|
/**
|
|
931
|
-
|
|
932
|
-
|
|
837
|
+
* Generate buffer from TLObject.
|
|
838
|
+
*/
|
|
933
839
|
write() {
|
|
934
840
|
const b = new BytesIO();
|
|
935
841
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -938,7 +844,7 @@ export class DeleteStories extends TLObject {
|
|
|
938
844
|
b.write(this.peer.write());
|
|
939
845
|
}
|
|
940
846
|
if (this.id) {
|
|
941
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
847
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
942
848
|
}
|
|
943
849
|
return b.buffer;
|
|
944
850
|
}
|
|
@@ -950,29 +856,29 @@ export class TogglePinned extends TLObject {
|
|
|
950
856
|
pinned;
|
|
951
857
|
constructor(params) {
|
|
952
858
|
super();
|
|
953
|
-
this.classType =
|
|
954
|
-
this.className =
|
|
859
|
+
this.classType = "functions";
|
|
860
|
+
this.className = "stories.TogglePinned";
|
|
955
861
|
this.constructorId = 0x9a75a1ef;
|
|
956
862
|
this.subclassOfId = 0x5026710f;
|
|
957
|
-
this._slots = [
|
|
863
|
+
this._slots = ["peer", "id", "pinned"];
|
|
958
864
|
this.peer = params.peer;
|
|
959
865
|
this.id = params.id;
|
|
960
866
|
this.pinned = params.pinned;
|
|
961
867
|
}
|
|
962
868
|
/**
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
869
|
+
* Generate the TLObject from buffer.
|
|
870
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
871
|
+
*/
|
|
966
872
|
static async read(_data, ..._args) {
|
|
967
873
|
// no flags
|
|
968
874
|
let peer = await TLObject.read(_data);
|
|
969
875
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
970
876
|
let pinned = await Primitive.Bool.read(_data);
|
|
971
|
-
return new TogglePinned({ peer: peer, id: id, pinned: pinned });
|
|
877
|
+
return new TogglePinned({ "peer": peer, "id": id, "pinned": pinned });
|
|
972
878
|
}
|
|
973
879
|
/**
|
|
974
|
-
|
|
975
|
-
|
|
880
|
+
* Generate buffer from TLObject.
|
|
881
|
+
*/
|
|
976
882
|
write() {
|
|
977
883
|
const b = new BytesIO();
|
|
978
884
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -981,10 +887,10 @@ export class TogglePinned extends TLObject {
|
|
|
981
887
|
b.write(this.peer.write());
|
|
982
888
|
}
|
|
983
889
|
if (this.id) {
|
|
984
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
890
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
985
891
|
}
|
|
986
892
|
if (this.pinned !== undefined) {
|
|
987
|
-
b.write(Primitive.Bool.write(this.pinned));
|
|
893
|
+
b.write((Primitive.Bool.write(this.pinned)));
|
|
988
894
|
}
|
|
989
895
|
return b.buffer;
|
|
990
896
|
}
|
|
@@ -996,41 +902,41 @@ export class GetAllStories extends TLObject {
|
|
|
996
902
|
state;
|
|
997
903
|
constructor(params) {
|
|
998
904
|
super();
|
|
999
|
-
this.classType =
|
|
1000
|
-
this.className =
|
|
905
|
+
this.classType = "functions";
|
|
906
|
+
this.className = "stories.GetAllStories";
|
|
1001
907
|
this.constructorId = 0xeeb0d625;
|
|
1002
908
|
this.subclassOfId = 0x7e60d0cd;
|
|
1003
|
-
this._slots = [
|
|
909
|
+
this._slots = ["next", "hidden", "state"];
|
|
1004
910
|
this.next = params.next;
|
|
1005
911
|
this.hidden = params.hidden;
|
|
1006
912
|
this.state = params.state;
|
|
1007
913
|
}
|
|
1008
914
|
/**
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
915
|
+
* Generate the TLObject from buffer.
|
|
916
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
917
|
+
*/
|
|
1012
918
|
static async read(_data, ..._args) {
|
|
1013
919
|
// @ts-ignore
|
|
1014
920
|
let flags = await Primitive.Int.read(_data);
|
|
1015
|
-
let next = flags & (1 << 1) ? true : false;
|
|
1016
|
-
let hidden = flags & (1 << 2) ? true : false;
|
|
1017
|
-
let state = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
1018
|
-
return new GetAllStories({ next: next, hidden: hidden, state: state });
|
|
921
|
+
let next = (flags & (1 << 1)) ? true : false;
|
|
922
|
+
let hidden = (flags & (1 << 2)) ? true : false;
|
|
923
|
+
let state = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
924
|
+
return new GetAllStories({ "next": next, "hidden": hidden, "state": state });
|
|
1019
925
|
}
|
|
1020
926
|
/**
|
|
1021
|
-
|
|
1022
|
-
|
|
927
|
+
* Generate buffer from TLObject.
|
|
928
|
+
*/
|
|
1023
929
|
write() {
|
|
1024
930
|
const b = new BytesIO();
|
|
1025
931
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1026
932
|
// @ts-ignore
|
|
1027
933
|
let flags = 0;
|
|
1028
|
-
flags |= this.next ? 1 << 1 : 0;
|
|
1029
|
-
flags |= this.hidden ? 1 << 2 : 0;
|
|
1030
|
-
flags |= this.state !== undefined ? 1 << 0 : 0;
|
|
1031
|
-
b.write(Primitive.Int.write(flags));
|
|
934
|
+
flags |= this.next ? (1 << 1) : 0;
|
|
935
|
+
flags |= this.hidden ? (1 << 2) : 0;
|
|
936
|
+
flags |= this.state !== undefined ? (1 << 0) : 0;
|
|
937
|
+
b.write((Primitive.Int.write(flags)));
|
|
1032
938
|
if (this.state !== undefined) {
|
|
1033
|
-
b.write(Primitive.String.write(this.state));
|
|
939
|
+
b.write((Primitive.String.write(this.state)));
|
|
1034
940
|
}
|
|
1035
941
|
return b.buffer;
|
|
1036
942
|
}
|
|
@@ -1042,29 +948,29 @@ export class GetPinnedStories extends TLObject {
|
|
|
1042
948
|
limit;
|
|
1043
949
|
constructor(params) {
|
|
1044
950
|
super();
|
|
1045
|
-
this.classType =
|
|
1046
|
-
this.className =
|
|
951
|
+
this.classType = "functions";
|
|
952
|
+
this.className = "stories.GetPinnedStories";
|
|
1047
953
|
this.constructorId = 0x5821a5dc;
|
|
1048
954
|
this.subclassOfId = 0x251c0c2c;
|
|
1049
|
-
this._slots = [
|
|
955
|
+
this._slots = ["peer", "offsetId", "limit"];
|
|
1050
956
|
this.peer = params.peer;
|
|
1051
957
|
this.offsetId = params.offsetId;
|
|
1052
958
|
this.limit = params.limit;
|
|
1053
959
|
}
|
|
1054
960
|
/**
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
961
|
+
* Generate the TLObject from buffer.
|
|
962
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
963
|
+
*/
|
|
1058
964
|
static async read(_data, ..._args) {
|
|
1059
965
|
// no flags
|
|
1060
966
|
let peer = await TLObject.read(_data);
|
|
1061
967
|
let offsetId = await Primitive.Int.read(_data);
|
|
1062
968
|
let limit = await Primitive.Int.read(_data);
|
|
1063
|
-
return new GetPinnedStories({ peer: peer, offsetId: offsetId, limit: limit });
|
|
969
|
+
return new GetPinnedStories({ "peer": peer, "offsetId": offsetId, "limit": limit });
|
|
1064
970
|
}
|
|
1065
971
|
/**
|
|
1066
|
-
|
|
1067
|
-
|
|
972
|
+
* Generate buffer from TLObject.
|
|
973
|
+
*/
|
|
1068
974
|
write() {
|
|
1069
975
|
const b = new BytesIO();
|
|
1070
976
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1073,10 +979,10 @@ export class GetPinnedStories extends TLObject {
|
|
|
1073
979
|
b.write(this.peer.write());
|
|
1074
980
|
}
|
|
1075
981
|
if (this.offsetId !== undefined) {
|
|
1076
|
-
b.write(Primitive.Int.write(this.offsetId));
|
|
982
|
+
b.write((Primitive.Int.write(this.offsetId)));
|
|
1077
983
|
}
|
|
1078
984
|
if (this.limit !== undefined) {
|
|
1079
|
-
b.write(Primitive.Int.write(this.limit));
|
|
985
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1080
986
|
}
|
|
1081
987
|
return b.buffer;
|
|
1082
988
|
}
|
|
@@ -1088,29 +994,29 @@ export class GetStoriesArchive extends TLObject {
|
|
|
1088
994
|
limit;
|
|
1089
995
|
constructor(params) {
|
|
1090
996
|
super();
|
|
1091
|
-
this.classType =
|
|
1092
|
-
this.className =
|
|
997
|
+
this.classType = "functions";
|
|
998
|
+
this.className = "stories.GetStoriesArchive";
|
|
1093
999
|
this.constructorId = 0xb4352016;
|
|
1094
1000
|
this.subclassOfId = 0x251c0c2c;
|
|
1095
|
-
this._slots = [
|
|
1001
|
+
this._slots = ["peer", "offsetId", "limit"];
|
|
1096
1002
|
this.peer = params.peer;
|
|
1097
1003
|
this.offsetId = params.offsetId;
|
|
1098
1004
|
this.limit = params.limit;
|
|
1099
1005
|
}
|
|
1100
1006
|
/**
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1007
|
+
* Generate the TLObject from buffer.
|
|
1008
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1009
|
+
*/
|
|
1104
1010
|
static async read(_data, ..._args) {
|
|
1105
1011
|
// no flags
|
|
1106
1012
|
let peer = await TLObject.read(_data);
|
|
1107
1013
|
let offsetId = await Primitive.Int.read(_data);
|
|
1108
1014
|
let limit = await Primitive.Int.read(_data);
|
|
1109
|
-
return new GetStoriesArchive({ peer: peer, offsetId: offsetId, limit: limit });
|
|
1015
|
+
return new GetStoriesArchive({ "peer": peer, "offsetId": offsetId, "limit": limit });
|
|
1110
1016
|
}
|
|
1111
1017
|
/**
|
|
1112
|
-
|
|
1113
|
-
|
|
1018
|
+
* Generate buffer from TLObject.
|
|
1019
|
+
*/
|
|
1114
1020
|
write() {
|
|
1115
1021
|
const b = new BytesIO();
|
|
1116
1022
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1119,10 +1025,10 @@ export class GetStoriesArchive extends TLObject {
|
|
|
1119
1025
|
b.write(this.peer.write());
|
|
1120
1026
|
}
|
|
1121
1027
|
if (this.offsetId !== undefined) {
|
|
1122
|
-
b.write(Primitive.Int.write(this.offsetId));
|
|
1028
|
+
b.write((Primitive.Int.write(this.offsetId)));
|
|
1123
1029
|
}
|
|
1124
1030
|
if (this.limit !== undefined) {
|
|
1125
|
-
b.write(Primitive.Int.write(this.limit));
|
|
1031
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1126
1032
|
}
|
|
1127
1033
|
return b.buffer;
|
|
1128
1034
|
}
|
|
@@ -1133,27 +1039,27 @@ export class GetStoriesByID extends TLObject {
|
|
|
1133
1039
|
id;
|
|
1134
1040
|
constructor(params) {
|
|
1135
1041
|
super();
|
|
1136
|
-
this.classType =
|
|
1137
|
-
this.className =
|
|
1042
|
+
this.classType = "functions";
|
|
1043
|
+
this.className = "stories.GetStoriesByID";
|
|
1138
1044
|
this.constructorId = 0x5774ca74;
|
|
1139
1045
|
this.subclassOfId = 0x251c0c2c;
|
|
1140
|
-
this._slots = [
|
|
1046
|
+
this._slots = ["peer", "id"];
|
|
1141
1047
|
this.peer = params.peer;
|
|
1142
1048
|
this.id = params.id;
|
|
1143
1049
|
}
|
|
1144
1050
|
/**
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1051
|
+
* Generate the TLObject from buffer.
|
|
1052
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1053
|
+
*/
|
|
1148
1054
|
static async read(_data, ..._args) {
|
|
1149
1055
|
// no flags
|
|
1150
1056
|
let peer = await TLObject.read(_data);
|
|
1151
1057
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
1152
|
-
return new GetStoriesByID({ peer: peer, id: id });
|
|
1058
|
+
return new GetStoriesByID({ "peer": peer, "id": id });
|
|
1153
1059
|
}
|
|
1154
1060
|
/**
|
|
1155
|
-
|
|
1156
|
-
|
|
1061
|
+
* Generate buffer from TLObject.
|
|
1062
|
+
*/
|
|
1157
1063
|
write() {
|
|
1158
1064
|
const b = new BytesIO();
|
|
1159
1065
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1162,7 +1068,7 @@ export class GetStoriesByID extends TLObject {
|
|
|
1162
1068
|
b.write(this.peer.write());
|
|
1163
1069
|
}
|
|
1164
1070
|
if (this.id) {
|
|
1165
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
1071
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
1166
1072
|
}
|
|
1167
1073
|
return b.buffer;
|
|
1168
1074
|
}
|
|
@@ -1172,31 +1078,31 @@ export class ToggleAllStoriesHidden extends TLObject {
|
|
|
1172
1078
|
hidden;
|
|
1173
1079
|
constructor(params) {
|
|
1174
1080
|
super();
|
|
1175
|
-
this.classType =
|
|
1176
|
-
this.className =
|
|
1081
|
+
this.classType = "functions";
|
|
1082
|
+
this.className = "stories.ToggleAllStoriesHidden";
|
|
1177
1083
|
this.constructorId = 0x7c2557c4;
|
|
1178
1084
|
this.subclassOfId = 0xf5b399ac;
|
|
1179
|
-
this._slots = [
|
|
1085
|
+
this._slots = ["hidden"];
|
|
1180
1086
|
this.hidden = params.hidden;
|
|
1181
1087
|
}
|
|
1182
1088
|
/**
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1089
|
+
* Generate the TLObject from buffer.
|
|
1090
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1091
|
+
*/
|
|
1186
1092
|
static async read(_data, ..._args) {
|
|
1187
1093
|
// no flags
|
|
1188
1094
|
let hidden = await Primitive.Bool.read(_data);
|
|
1189
|
-
return new ToggleAllStoriesHidden({ hidden: hidden });
|
|
1095
|
+
return new ToggleAllStoriesHidden({ "hidden": hidden });
|
|
1190
1096
|
}
|
|
1191
1097
|
/**
|
|
1192
|
-
|
|
1193
|
-
|
|
1098
|
+
* Generate buffer from TLObject.
|
|
1099
|
+
*/
|
|
1194
1100
|
write() {
|
|
1195
1101
|
const b = new BytesIO();
|
|
1196
1102
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1197
1103
|
// no flags
|
|
1198
1104
|
if (this.hidden !== undefined) {
|
|
1199
|
-
b.write(Primitive.Bool.write(this.hidden));
|
|
1105
|
+
b.write((Primitive.Bool.write(this.hidden)));
|
|
1200
1106
|
}
|
|
1201
1107
|
return b.buffer;
|
|
1202
1108
|
}
|
|
@@ -1207,27 +1113,27 @@ export class ReadStories extends TLObject {
|
|
|
1207
1113
|
maxId;
|
|
1208
1114
|
constructor(params) {
|
|
1209
1115
|
super();
|
|
1210
|
-
this.classType =
|
|
1211
|
-
this.className =
|
|
1116
|
+
this.classType = "functions";
|
|
1117
|
+
this.className = "stories.ReadStories";
|
|
1212
1118
|
this.constructorId = 0xa556dac8;
|
|
1213
1119
|
this.subclassOfId = 0x5026710f;
|
|
1214
|
-
this._slots = [
|
|
1120
|
+
this._slots = ["peer", "maxId"];
|
|
1215
1121
|
this.peer = params.peer;
|
|
1216
1122
|
this.maxId = params.maxId;
|
|
1217
1123
|
}
|
|
1218
1124
|
/**
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1125
|
+
* Generate the TLObject from buffer.
|
|
1126
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1127
|
+
*/
|
|
1222
1128
|
static async read(_data, ..._args) {
|
|
1223
1129
|
// no flags
|
|
1224
1130
|
let peer = await TLObject.read(_data);
|
|
1225
1131
|
let maxId = await Primitive.Int.read(_data);
|
|
1226
|
-
return new ReadStories({ peer: peer, maxId: maxId });
|
|
1132
|
+
return new ReadStories({ "peer": peer, "maxId": maxId });
|
|
1227
1133
|
}
|
|
1228
1134
|
/**
|
|
1229
|
-
|
|
1230
|
-
|
|
1135
|
+
* Generate buffer from TLObject.
|
|
1136
|
+
*/
|
|
1231
1137
|
write() {
|
|
1232
1138
|
const b = new BytesIO();
|
|
1233
1139
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1236,7 +1142,7 @@ export class ReadStories extends TLObject {
|
|
|
1236
1142
|
b.write(this.peer.write());
|
|
1237
1143
|
}
|
|
1238
1144
|
if (this.maxId !== undefined) {
|
|
1239
|
-
b.write(Primitive.Int.write(this.maxId));
|
|
1145
|
+
b.write((Primitive.Int.write(this.maxId)));
|
|
1240
1146
|
}
|
|
1241
1147
|
return b.buffer;
|
|
1242
1148
|
}
|
|
@@ -1247,27 +1153,27 @@ export class IncrementStoryViews extends TLObject {
|
|
|
1247
1153
|
id;
|
|
1248
1154
|
constructor(params) {
|
|
1249
1155
|
super();
|
|
1250
|
-
this.classType =
|
|
1251
|
-
this.className =
|
|
1156
|
+
this.classType = "functions";
|
|
1157
|
+
this.className = "stories.IncrementStoryViews";
|
|
1252
1158
|
this.constructorId = 0xb2028afb;
|
|
1253
1159
|
this.subclassOfId = 0xf5b399ac;
|
|
1254
|
-
this._slots = [
|
|
1160
|
+
this._slots = ["peer", "id"];
|
|
1255
1161
|
this.peer = params.peer;
|
|
1256
1162
|
this.id = params.id;
|
|
1257
1163
|
}
|
|
1258
1164
|
/**
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1165
|
+
* Generate the TLObject from buffer.
|
|
1166
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1167
|
+
*/
|
|
1262
1168
|
static async read(_data, ..._args) {
|
|
1263
1169
|
// no flags
|
|
1264
1170
|
let peer = await TLObject.read(_data);
|
|
1265
1171
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
1266
|
-
return new IncrementStoryViews({ peer: peer, id: id });
|
|
1172
|
+
return new IncrementStoryViews({ "peer": peer, "id": id });
|
|
1267
1173
|
}
|
|
1268
1174
|
/**
|
|
1269
|
-
|
|
1270
|
-
|
|
1175
|
+
* Generate buffer from TLObject.
|
|
1176
|
+
*/
|
|
1271
1177
|
write() {
|
|
1272
1178
|
const b = new BytesIO();
|
|
1273
1179
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1276,7 +1182,7 @@ export class IncrementStoryViews extends TLObject {
|
|
|
1276
1182
|
b.write(this.peer.write());
|
|
1277
1183
|
}
|
|
1278
1184
|
if (this.id) {
|
|
1279
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
1185
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
1280
1186
|
}
|
|
1281
1187
|
return b.buffer;
|
|
1282
1188
|
}
|
|
@@ -1293,20 +1199,11 @@ export class GetStoryViewsList extends TLObject {
|
|
|
1293
1199
|
limit;
|
|
1294
1200
|
constructor(params) {
|
|
1295
1201
|
super();
|
|
1296
|
-
this.classType =
|
|
1297
|
-
this.className =
|
|
1202
|
+
this.classType = "functions";
|
|
1203
|
+
this.className = "stories.GetStoryViewsList";
|
|
1298
1204
|
this.constructorId = 0x7ed23c57;
|
|
1299
1205
|
this.subclassOfId = 0xb9437560;
|
|
1300
|
-
this._slots = [
|
|
1301
|
-
'justContacts',
|
|
1302
|
-
'reactionsFirst',
|
|
1303
|
-
'forwardsFirst',
|
|
1304
|
-
'peer',
|
|
1305
|
-
'q',
|
|
1306
|
-
'id',
|
|
1307
|
-
'offset',
|
|
1308
|
-
'limit',
|
|
1309
|
-
];
|
|
1206
|
+
this._slots = ["justContacts", "reactionsFirst", "forwardsFirst", "peer", "q", "id", "offset", "limit"];
|
|
1310
1207
|
this.justContacts = params.justContacts;
|
|
1311
1208
|
this.reactionsFirst = params.reactionsFirst;
|
|
1312
1209
|
this.forwardsFirst = params.forwardsFirst;
|
|
@@ -1317,58 +1214,49 @@ export class GetStoryViewsList extends TLObject {
|
|
|
1317
1214
|
this.limit = params.limit;
|
|
1318
1215
|
}
|
|
1319
1216
|
/**
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1217
|
+
* Generate the TLObject from buffer.
|
|
1218
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1219
|
+
*/
|
|
1323
1220
|
static async read(_data, ..._args) {
|
|
1324
1221
|
// @ts-ignore
|
|
1325
1222
|
let flags = await Primitive.Int.read(_data);
|
|
1326
|
-
let justContacts = flags & (1 << 0) ? true : false;
|
|
1327
|
-
let reactionsFirst = flags & (1 << 2) ? true : false;
|
|
1328
|
-
let forwardsFirst = flags & (1 << 3) ? true : false;
|
|
1223
|
+
let justContacts = (flags & (1 << 0)) ? true : false;
|
|
1224
|
+
let reactionsFirst = (flags & (1 << 2)) ? true : false;
|
|
1225
|
+
let forwardsFirst = (flags & (1 << 3)) ? true : false;
|
|
1329
1226
|
let peer = await TLObject.read(_data);
|
|
1330
|
-
let q = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
1227
|
+
let q = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
1331
1228
|
let id = await Primitive.Int.read(_data);
|
|
1332
1229
|
let offset = await Primitive.String.read(_data);
|
|
1333
1230
|
let limit = await Primitive.Int.read(_data);
|
|
1334
|
-
return new GetStoryViewsList({
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
q: q,
|
|
1340
|
-
id: id,
|
|
1341
|
-
offset: offset,
|
|
1342
|
-
limit: limit,
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
/**
|
|
1346
|
-
* Generate buffer from TLObject.
|
|
1347
|
-
*/
|
|
1231
|
+
return new GetStoryViewsList({ "justContacts": justContacts, "reactionsFirst": reactionsFirst, "forwardsFirst": forwardsFirst, "peer": peer, "q": q, "id": id, "offset": offset, "limit": limit });
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Generate buffer from TLObject.
|
|
1235
|
+
*/
|
|
1348
1236
|
write() {
|
|
1349
1237
|
const b = new BytesIO();
|
|
1350
1238
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1351
1239
|
// @ts-ignore
|
|
1352
1240
|
let flags = 0;
|
|
1353
|
-
flags |= this.justContacts ? 1 << 0 : 0;
|
|
1354
|
-
flags |= this.reactionsFirst ? 1 << 2 : 0;
|
|
1355
|
-
flags |= this.forwardsFirst ? 1 << 3 : 0;
|
|
1356
|
-
flags |= this.q !== undefined ? 1 << 1 : 0;
|
|
1357
|
-
b.write(Primitive.Int.write(flags));
|
|
1241
|
+
flags |= this.justContacts ? (1 << 0) : 0;
|
|
1242
|
+
flags |= this.reactionsFirst ? (1 << 2) : 0;
|
|
1243
|
+
flags |= this.forwardsFirst ? (1 << 3) : 0;
|
|
1244
|
+
flags |= this.q !== undefined ? (1 << 1) : 0;
|
|
1245
|
+
b.write((Primitive.Int.write(flags)));
|
|
1358
1246
|
if (this.peer !== undefined) {
|
|
1359
1247
|
b.write(this.peer.write());
|
|
1360
1248
|
}
|
|
1361
1249
|
if (this.q !== undefined) {
|
|
1362
|
-
b.write(Primitive.String.write(this.q));
|
|
1250
|
+
b.write((Primitive.String.write(this.q)));
|
|
1363
1251
|
}
|
|
1364
1252
|
if (this.id !== undefined) {
|
|
1365
|
-
b.write(Primitive.Int.write(this.id));
|
|
1253
|
+
b.write((Primitive.Int.write(this.id)));
|
|
1366
1254
|
}
|
|
1367
1255
|
if (this.offset !== undefined) {
|
|
1368
|
-
b.write(Primitive.String.write(this.offset));
|
|
1256
|
+
b.write((Primitive.String.write(this.offset)));
|
|
1369
1257
|
}
|
|
1370
1258
|
if (this.limit !== undefined) {
|
|
1371
|
-
b.write(Primitive.Int.write(this.limit));
|
|
1259
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1372
1260
|
}
|
|
1373
1261
|
return b.buffer;
|
|
1374
1262
|
}
|
|
@@ -1379,27 +1267,27 @@ export class GetStoriesViews extends TLObject {
|
|
|
1379
1267
|
id;
|
|
1380
1268
|
constructor(params) {
|
|
1381
1269
|
super();
|
|
1382
|
-
this.classType =
|
|
1383
|
-
this.className =
|
|
1270
|
+
this.classType = "functions";
|
|
1271
|
+
this.className = "stories.GetStoriesViews";
|
|
1384
1272
|
this.constructorId = 0x28e16cc8;
|
|
1385
1273
|
this.subclassOfId = 0x4b3fc4ba;
|
|
1386
|
-
this._slots = [
|
|
1274
|
+
this._slots = ["peer", "id"];
|
|
1387
1275
|
this.peer = params.peer;
|
|
1388
1276
|
this.id = params.id;
|
|
1389
1277
|
}
|
|
1390
1278
|
/**
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1279
|
+
* Generate the TLObject from buffer.
|
|
1280
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1281
|
+
*/
|
|
1394
1282
|
static async read(_data, ..._args) {
|
|
1395
1283
|
// no flags
|
|
1396
1284
|
let peer = await TLObject.read(_data);
|
|
1397
1285
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
1398
|
-
return new GetStoriesViews({ peer: peer, id: id });
|
|
1286
|
+
return new GetStoriesViews({ "peer": peer, "id": id });
|
|
1399
1287
|
}
|
|
1400
1288
|
/**
|
|
1401
|
-
|
|
1402
|
-
|
|
1289
|
+
* Generate buffer from TLObject.
|
|
1290
|
+
*/
|
|
1403
1291
|
write() {
|
|
1404
1292
|
const b = new BytesIO();
|
|
1405
1293
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1408,7 +1296,7 @@ export class GetStoriesViews extends TLObject {
|
|
|
1408
1296
|
b.write(this.peer.write());
|
|
1409
1297
|
}
|
|
1410
1298
|
if (this.id) {
|
|
1411
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
1299
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
1412
1300
|
}
|
|
1413
1301
|
return b.buffer;
|
|
1414
1302
|
}
|
|
@@ -1419,27 +1307,27 @@ export class ExportStoryLink extends TLObject {
|
|
|
1419
1307
|
id;
|
|
1420
1308
|
constructor(params) {
|
|
1421
1309
|
super();
|
|
1422
|
-
this.classType =
|
|
1423
|
-
this.className =
|
|
1310
|
+
this.classType = "functions";
|
|
1311
|
+
this.className = "stories.ExportStoryLink";
|
|
1424
1312
|
this.constructorId = 0x7b8def20;
|
|
1425
1313
|
this.subclassOfId = 0xfc541a6;
|
|
1426
|
-
this._slots = [
|
|
1314
|
+
this._slots = ["peer", "id"];
|
|
1427
1315
|
this.peer = params.peer;
|
|
1428
1316
|
this.id = params.id;
|
|
1429
1317
|
}
|
|
1430
1318
|
/**
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1319
|
+
* Generate the TLObject from buffer.
|
|
1320
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1321
|
+
*/
|
|
1434
1322
|
static async read(_data, ..._args) {
|
|
1435
1323
|
// no flags
|
|
1436
1324
|
let peer = await TLObject.read(_data);
|
|
1437
1325
|
let id = await Primitive.Int.read(_data);
|
|
1438
|
-
return new ExportStoryLink({ peer: peer, id: id });
|
|
1326
|
+
return new ExportStoryLink({ "peer": peer, "id": id });
|
|
1439
1327
|
}
|
|
1440
1328
|
/**
|
|
1441
|
-
|
|
1442
|
-
|
|
1329
|
+
* Generate buffer from TLObject.
|
|
1330
|
+
*/
|
|
1443
1331
|
write() {
|
|
1444
1332
|
const b = new BytesIO();
|
|
1445
1333
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1448,7 +1336,7 @@ export class ExportStoryLink extends TLObject {
|
|
|
1448
1336
|
b.write(this.peer.write());
|
|
1449
1337
|
}
|
|
1450
1338
|
if (this.id !== undefined) {
|
|
1451
|
-
b.write(Primitive.Int.write(this.id));
|
|
1339
|
+
b.write((Primitive.Int.write(this.id)));
|
|
1452
1340
|
}
|
|
1453
1341
|
return b.buffer;
|
|
1454
1342
|
}
|
|
@@ -1461,31 +1349,31 @@ export class Report extends TLObject {
|
|
|
1461
1349
|
message;
|
|
1462
1350
|
constructor(params) {
|
|
1463
1351
|
super();
|
|
1464
|
-
this.classType =
|
|
1465
|
-
this.className =
|
|
1352
|
+
this.classType = "functions";
|
|
1353
|
+
this.className = "stories.Report";
|
|
1466
1354
|
this.constructorId = 0x19d8eb45;
|
|
1467
1355
|
this.subclassOfId = 0xacd3f438;
|
|
1468
|
-
this._slots = [
|
|
1356
|
+
this._slots = ["peer", "id", "option", "message"];
|
|
1469
1357
|
this.peer = params.peer;
|
|
1470
1358
|
this.id = params.id;
|
|
1471
1359
|
this.option = params.option;
|
|
1472
1360
|
this.message = params.message;
|
|
1473
1361
|
}
|
|
1474
1362
|
/**
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1363
|
+
* Generate the TLObject from buffer.
|
|
1364
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1365
|
+
*/
|
|
1478
1366
|
static async read(_data, ..._args) {
|
|
1479
1367
|
// no flags
|
|
1480
1368
|
let peer = await TLObject.read(_data);
|
|
1481
1369
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
1482
1370
|
let option = await Primitive.Bytes.read(_data);
|
|
1483
1371
|
let message = await Primitive.String.read(_data);
|
|
1484
|
-
return new Report({ peer: peer, id: id, option: option, message: message });
|
|
1372
|
+
return new Report({ "peer": peer, "id": id, "option": option, "message": message });
|
|
1485
1373
|
}
|
|
1486
1374
|
/**
|
|
1487
|
-
|
|
1488
|
-
|
|
1375
|
+
* Generate buffer from TLObject.
|
|
1376
|
+
*/
|
|
1489
1377
|
write() {
|
|
1490
1378
|
const b = new BytesIO();
|
|
1491
1379
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1494,13 +1382,13 @@ export class Report extends TLObject {
|
|
|
1494
1382
|
b.write(this.peer.write());
|
|
1495
1383
|
}
|
|
1496
1384
|
if (this.id) {
|
|
1497
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
1385
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
1498
1386
|
}
|
|
1499
1387
|
if (this.option !== undefined) {
|
|
1500
|
-
b.write(Primitive.Bytes.write(this.option));
|
|
1388
|
+
b.write((Primitive.Bytes.write(this.option)));
|
|
1501
1389
|
}
|
|
1502
1390
|
if (this.message !== undefined) {
|
|
1503
|
-
b.write(Primitive.String.write(this.message));
|
|
1391
|
+
b.write((Primitive.String.write(this.message)));
|
|
1504
1392
|
}
|
|
1505
1393
|
return b.buffer;
|
|
1506
1394
|
}
|
|
@@ -1511,36 +1399,36 @@ export class ActivateStealthMode extends TLObject {
|
|
|
1511
1399
|
future;
|
|
1512
1400
|
constructor(params) {
|
|
1513
1401
|
super();
|
|
1514
|
-
this.classType =
|
|
1515
|
-
this.className =
|
|
1402
|
+
this.classType = "functions";
|
|
1403
|
+
this.className = "stories.ActivateStealthMode";
|
|
1516
1404
|
this.constructorId = 0x57bbd166;
|
|
1517
1405
|
this.subclassOfId = 0x8af52aac;
|
|
1518
|
-
this._slots = [
|
|
1406
|
+
this._slots = ["past", "future"];
|
|
1519
1407
|
this.past = params.past;
|
|
1520
1408
|
this.future = params.future;
|
|
1521
1409
|
}
|
|
1522
1410
|
/**
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1411
|
+
* Generate the TLObject from buffer.
|
|
1412
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1413
|
+
*/
|
|
1526
1414
|
static async read(_data, ..._args) {
|
|
1527
1415
|
// @ts-ignore
|
|
1528
1416
|
let flags = await Primitive.Int.read(_data);
|
|
1529
|
-
let past = flags & (1 << 0) ? true : false;
|
|
1530
|
-
let future = flags & (1 << 1) ? true : false;
|
|
1531
|
-
return new ActivateStealthMode({ past: past, future: future });
|
|
1417
|
+
let past = (flags & (1 << 0)) ? true : false;
|
|
1418
|
+
let future = (flags & (1 << 1)) ? true : false;
|
|
1419
|
+
return new ActivateStealthMode({ "past": past, "future": future });
|
|
1532
1420
|
}
|
|
1533
1421
|
/**
|
|
1534
|
-
|
|
1535
|
-
|
|
1422
|
+
* Generate buffer from TLObject.
|
|
1423
|
+
*/
|
|
1536
1424
|
write() {
|
|
1537
1425
|
const b = new BytesIO();
|
|
1538
1426
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1539
1427
|
// @ts-ignore
|
|
1540
1428
|
let flags = 0;
|
|
1541
|
-
flags |= this.past ? 1 << 0 : 0;
|
|
1542
|
-
flags |= this.future ? 1 << 1 : 0;
|
|
1543
|
-
b.write(Primitive.Int.write(flags));
|
|
1429
|
+
flags |= this.past ? (1 << 0) : 0;
|
|
1430
|
+
flags |= this.future ? (1 << 1) : 0;
|
|
1431
|
+
b.write((Primitive.Int.write(flags)));
|
|
1544
1432
|
return b.buffer;
|
|
1545
1433
|
}
|
|
1546
1434
|
}
|
|
@@ -1552,49 +1440,44 @@ export class SendReaction extends TLObject {
|
|
|
1552
1440
|
reaction;
|
|
1553
1441
|
constructor(params) {
|
|
1554
1442
|
super();
|
|
1555
|
-
this.classType =
|
|
1556
|
-
this.className =
|
|
1443
|
+
this.classType = "functions";
|
|
1444
|
+
this.className = "stories.SendReaction";
|
|
1557
1445
|
this.constructorId = 0x7fd736b2;
|
|
1558
1446
|
this.subclassOfId = 0x8af52aac;
|
|
1559
|
-
this._slots = [
|
|
1447
|
+
this._slots = ["addToRecent", "peer", "storyId", "reaction"];
|
|
1560
1448
|
this.addToRecent = params.addToRecent;
|
|
1561
1449
|
this.peer = params.peer;
|
|
1562
1450
|
this.storyId = params.storyId;
|
|
1563
1451
|
this.reaction = params.reaction;
|
|
1564
1452
|
}
|
|
1565
1453
|
/**
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1454
|
+
* Generate the TLObject from buffer.
|
|
1455
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1456
|
+
*/
|
|
1569
1457
|
static async read(_data, ..._args) {
|
|
1570
1458
|
// @ts-ignore
|
|
1571
1459
|
let flags = await Primitive.Int.read(_data);
|
|
1572
|
-
let addToRecent = flags & (1 << 0) ? true : false;
|
|
1460
|
+
let addToRecent = (flags & (1 << 0)) ? true : false;
|
|
1573
1461
|
let peer = await TLObject.read(_data);
|
|
1574
1462
|
let storyId = await Primitive.Int.read(_data);
|
|
1575
1463
|
let reaction = await TLObject.read(_data);
|
|
1576
|
-
return new SendReaction({
|
|
1577
|
-
addToRecent: addToRecent,
|
|
1578
|
-
peer: peer,
|
|
1579
|
-
storyId: storyId,
|
|
1580
|
-
reaction: reaction,
|
|
1581
|
-
});
|
|
1464
|
+
return new SendReaction({ "addToRecent": addToRecent, "peer": peer, "storyId": storyId, "reaction": reaction });
|
|
1582
1465
|
}
|
|
1583
1466
|
/**
|
|
1584
|
-
|
|
1585
|
-
|
|
1467
|
+
* Generate buffer from TLObject.
|
|
1468
|
+
*/
|
|
1586
1469
|
write() {
|
|
1587
1470
|
const b = new BytesIO();
|
|
1588
1471
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1589
1472
|
// @ts-ignore
|
|
1590
1473
|
let flags = 0;
|
|
1591
|
-
flags |= this.addToRecent ? 1 << 0 : 0;
|
|
1592
|
-
b.write(Primitive.Int.write(flags));
|
|
1474
|
+
flags |= this.addToRecent ? (1 << 0) : 0;
|
|
1475
|
+
b.write((Primitive.Int.write(flags)));
|
|
1593
1476
|
if (this.peer !== undefined) {
|
|
1594
1477
|
b.write(this.peer.write());
|
|
1595
1478
|
}
|
|
1596
1479
|
if (this.storyId !== undefined) {
|
|
1597
|
-
b.write(Primitive.Int.write(this.storyId));
|
|
1480
|
+
b.write((Primitive.Int.write(this.storyId)));
|
|
1598
1481
|
}
|
|
1599
1482
|
if (this.reaction !== undefined) {
|
|
1600
1483
|
b.write(this.reaction.write());
|
|
@@ -1607,25 +1490,25 @@ export class GetPeerStories extends TLObject {
|
|
|
1607
1490
|
peer;
|
|
1608
1491
|
constructor(params) {
|
|
1609
1492
|
super();
|
|
1610
|
-
this.classType =
|
|
1611
|
-
this.className =
|
|
1493
|
+
this.classType = "functions";
|
|
1494
|
+
this.className = "stories.GetPeerStories";
|
|
1612
1495
|
this.constructorId = 0x2c4ada50;
|
|
1613
1496
|
this.subclassOfId = 0x9d56cfd0;
|
|
1614
|
-
this._slots = [
|
|
1497
|
+
this._slots = ["peer"];
|
|
1615
1498
|
this.peer = params.peer;
|
|
1616
1499
|
}
|
|
1617
1500
|
/**
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1501
|
+
* Generate the TLObject from buffer.
|
|
1502
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1503
|
+
*/
|
|
1621
1504
|
static async read(_data, ..._args) {
|
|
1622
1505
|
// no flags
|
|
1623
1506
|
let peer = await TLObject.read(_data);
|
|
1624
|
-
return new GetPeerStories({ peer: peer });
|
|
1507
|
+
return new GetPeerStories({ "peer": peer });
|
|
1625
1508
|
}
|
|
1626
1509
|
/**
|
|
1627
|
-
|
|
1628
|
-
|
|
1510
|
+
* Generate buffer from TLObject.
|
|
1511
|
+
*/
|
|
1629
1512
|
write() {
|
|
1630
1513
|
const b = new BytesIO();
|
|
1631
1514
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1640,23 +1523,23 @@ export class GetAllReadPeerStories extends TLObject {
|
|
|
1640
1523
|
__response__;
|
|
1641
1524
|
constructor() {
|
|
1642
1525
|
super();
|
|
1643
|
-
this.classType =
|
|
1644
|
-
this.className =
|
|
1526
|
+
this.classType = "functions";
|
|
1527
|
+
this.className = "stories.GetAllReadPeerStories";
|
|
1645
1528
|
this.constructorId = 0x9b5ae7f9;
|
|
1646
1529
|
this.subclassOfId = 0x8af52aac;
|
|
1647
1530
|
this._slots = [];
|
|
1648
1531
|
}
|
|
1649
1532
|
/**
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1533
|
+
* Generate the TLObject from buffer.
|
|
1534
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1535
|
+
*/
|
|
1653
1536
|
static async read(_data, ..._args) {
|
|
1654
1537
|
// no flags
|
|
1655
1538
|
return new GetAllReadPeerStories();
|
|
1656
1539
|
}
|
|
1657
1540
|
/**
|
|
1658
|
-
|
|
1659
|
-
|
|
1541
|
+
* Generate buffer from TLObject.
|
|
1542
|
+
*/
|
|
1660
1543
|
write() {
|
|
1661
1544
|
const b = new BytesIO();
|
|
1662
1545
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1669,31 +1552,31 @@ export class GetPeerMaxIDs extends TLObject {
|
|
|
1669
1552
|
id;
|
|
1670
1553
|
constructor(params) {
|
|
1671
1554
|
super();
|
|
1672
|
-
this.classType =
|
|
1673
|
-
this.className =
|
|
1555
|
+
this.classType = "functions";
|
|
1556
|
+
this.className = "stories.GetPeerMaxIDs";
|
|
1674
1557
|
this.constructorId = 0x78499170;
|
|
1675
1558
|
this.subclassOfId = 0x3cb69156;
|
|
1676
|
-
this._slots = [
|
|
1559
|
+
this._slots = ["id"];
|
|
1677
1560
|
this.id = params.id;
|
|
1678
1561
|
}
|
|
1679
1562
|
/**
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1563
|
+
* Generate the TLObject from buffer.
|
|
1564
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1565
|
+
*/
|
|
1683
1566
|
static async read(_data, ..._args) {
|
|
1684
1567
|
// no flags
|
|
1685
1568
|
let id = await TLObject.read(_data);
|
|
1686
|
-
return new GetPeerMaxIDs({ id: id });
|
|
1569
|
+
return new GetPeerMaxIDs({ "id": id });
|
|
1687
1570
|
}
|
|
1688
1571
|
/**
|
|
1689
|
-
|
|
1690
|
-
|
|
1572
|
+
* Generate buffer from TLObject.
|
|
1573
|
+
*/
|
|
1691
1574
|
write() {
|
|
1692
1575
|
const b = new BytesIO();
|
|
1693
1576
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1694
1577
|
// no flags
|
|
1695
1578
|
if (this.id) {
|
|
1696
|
-
b.write(Primitive.Vector.write(this.id));
|
|
1579
|
+
b.write((Primitive.Vector.write(this.id)));
|
|
1697
1580
|
}
|
|
1698
1581
|
return b.buffer;
|
|
1699
1582
|
}
|
|
@@ -1702,23 +1585,23 @@ export class GetChatsToSend extends TLObject {
|
|
|
1702
1585
|
__response__;
|
|
1703
1586
|
constructor() {
|
|
1704
1587
|
super();
|
|
1705
|
-
this.classType =
|
|
1706
|
-
this.className =
|
|
1588
|
+
this.classType = "functions";
|
|
1589
|
+
this.className = "stories.GetChatsToSend";
|
|
1707
1590
|
this.constructorId = 0xa56a8b60;
|
|
1708
1591
|
this.subclassOfId = 0x99d5cb14;
|
|
1709
1592
|
this._slots = [];
|
|
1710
1593
|
}
|
|
1711
1594
|
/**
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1595
|
+
* Generate the TLObject from buffer.
|
|
1596
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1597
|
+
*/
|
|
1715
1598
|
static async read(_data, ..._args) {
|
|
1716
1599
|
// no flags
|
|
1717
1600
|
return new GetChatsToSend();
|
|
1718
1601
|
}
|
|
1719
1602
|
/**
|
|
1720
|
-
|
|
1721
|
-
|
|
1603
|
+
* Generate buffer from TLObject.
|
|
1604
|
+
*/
|
|
1722
1605
|
write() {
|
|
1723
1606
|
const b = new BytesIO();
|
|
1724
1607
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1732,27 +1615,27 @@ export class TogglePeerStoriesHidden extends TLObject {
|
|
|
1732
1615
|
hidden;
|
|
1733
1616
|
constructor(params) {
|
|
1734
1617
|
super();
|
|
1735
|
-
this.classType =
|
|
1736
|
-
this.className =
|
|
1618
|
+
this.classType = "functions";
|
|
1619
|
+
this.className = "stories.TogglePeerStoriesHidden";
|
|
1737
1620
|
this.constructorId = 0xbd0415c4;
|
|
1738
1621
|
this.subclassOfId = 0xf5b399ac;
|
|
1739
|
-
this._slots = [
|
|
1622
|
+
this._slots = ["peer", "hidden"];
|
|
1740
1623
|
this.peer = params.peer;
|
|
1741
1624
|
this.hidden = params.hidden;
|
|
1742
1625
|
}
|
|
1743
1626
|
/**
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1627
|
+
* Generate the TLObject from buffer.
|
|
1628
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1629
|
+
*/
|
|
1747
1630
|
static async read(_data, ..._args) {
|
|
1748
1631
|
// no flags
|
|
1749
1632
|
let peer = await TLObject.read(_data);
|
|
1750
1633
|
let hidden = await Primitive.Bool.read(_data);
|
|
1751
|
-
return new TogglePeerStoriesHidden({ peer: peer, hidden: hidden });
|
|
1634
|
+
return new TogglePeerStoriesHidden({ "peer": peer, "hidden": hidden });
|
|
1752
1635
|
}
|
|
1753
1636
|
/**
|
|
1754
|
-
|
|
1755
|
-
|
|
1637
|
+
* Generate buffer from TLObject.
|
|
1638
|
+
*/
|
|
1756
1639
|
write() {
|
|
1757
1640
|
const b = new BytesIO();
|
|
1758
1641
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1761,7 +1644,7 @@ export class TogglePeerStoriesHidden extends TLObject {
|
|
|
1761
1644
|
b.write(this.peer.write());
|
|
1762
1645
|
}
|
|
1763
1646
|
if (this.hidden !== undefined) {
|
|
1764
|
-
b.write(Primitive.Bool.write(this.hidden));
|
|
1647
|
+
b.write((Primitive.Bool.write(this.hidden)));
|
|
1765
1648
|
}
|
|
1766
1649
|
return b.buffer;
|
|
1767
1650
|
}
|
|
@@ -1776,11 +1659,11 @@ export class GetStoryReactionsList extends TLObject {
|
|
|
1776
1659
|
limit;
|
|
1777
1660
|
constructor(params) {
|
|
1778
1661
|
super();
|
|
1779
|
-
this.classType =
|
|
1780
|
-
this.className =
|
|
1662
|
+
this.classType = "functions";
|
|
1663
|
+
this.className = "stories.GetStoryReactionsList";
|
|
1781
1664
|
this.constructorId = 0xb9b2881f;
|
|
1782
1665
|
this.subclassOfId = 0x46f91e3;
|
|
1783
|
-
this._slots = [
|
|
1666
|
+
this._slots = ["forwardsFirst", "peer", "id", "reaction", "offset", "limit"];
|
|
1784
1667
|
this.forwardsFirst = params.forwardsFirst;
|
|
1785
1668
|
this.peer = params.peer;
|
|
1786
1669
|
this.id = params.id;
|
|
@@ -1789,53 +1672,46 @@ export class GetStoryReactionsList extends TLObject {
|
|
|
1789
1672
|
this.limit = params.limit;
|
|
1790
1673
|
}
|
|
1791
1674
|
/**
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1675
|
+
* Generate the TLObject from buffer.
|
|
1676
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1677
|
+
*/
|
|
1795
1678
|
static async read(_data, ..._args) {
|
|
1796
1679
|
// @ts-ignore
|
|
1797
1680
|
let flags = await Primitive.Int.read(_data);
|
|
1798
|
-
let forwardsFirst = flags & (1 << 2) ? true : false;
|
|
1681
|
+
let forwardsFirst = (flags & (1 << 2)) ? true : false;
|
|
1799
1682
|
let peer = await TLObject.read(_data);
|
|
1800
1683
|
let id = await Primitive.Int.read(_data);
|
|
1801
|
-
let reaction = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
1802
|
-
let offset = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
1684
|
+
let reaction = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
|
|
1685
|
+
let offset = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
1803
1686
|
let limit = await Primitive.Int.read(_data);
|
|
1804
|
-
return new GetStoryReactionsList({
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
offset: offset,
|
|
1810
|
-
limit: limit,
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1813
|
-
/**
|
|
1814
|
-
* Generate buffer from TLObject.
|
|
1815
|
-
*/
|
|
1687
|
+
return new GetStoryReactionsList({ "forwardsFirst": forwardsFirst, "peer": peer, "id": id, "reaction": reaction, "offset": offset, "limit": limit });
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Generate buffer from TLObject.
|
|
1691
|
+
*/
|
|
1816
1692
|
write() {
|
|
1817
1693
|
const b = new BytesIO();
|
|
1818
1694
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1819
1695
|
// @ts-ignore
|
|
1820
1696
|
let flags = 0;
|
|
1821
|
-
flags |= this.forwardsFirst ? 1 << 2 : 0;
|
|
1822
|
-
flags |= this.reaction !== undefined ? 1 << 0 : 0;
|
|
1823
|
-
flags |= this.offset !== undefined ? 1 << 1 : 0;
|
|
1824
|
-
b.write(Primitive.Int.write(flags));
|
|
1697
|
+
flags |= this.forwardsFirst ? (1 << 2) : 0;
|
|
1698
|
+
flags |= this.reaction !== undefined ? (1 << 0) : 0;
|
|
1699
|
+
flags |= this.offset !== undefined ? (1 << 1) : 0;
|
|
1700
|
+
b.write((Primitive.Int.write(flags)));
|
|
1825
1701
|
if (this.peer !== undefined) {
|
|
1826
1702
|
b.write(this.peer.write());
|
|
1827
1703
|
}
|
|
1828
1704
|
if (this.id !== undefined) {
|
|
1829
|
-
b.write(Primitive.Int.write(this.id));
|
|
1705
|
+
b.write((Primitive.Int.write(this.id)));
|
|
1830
1706
|
}
|
|
1831
1707
|
if (this.reaction !== undefined) {
|
|
1832
1708
|
b.write(this.reaction.write());
|
|
1833
1709
|
}
|
|
1834
1710
|
if (this.offset !== undefined) {
|
|
1835
|
-
b.write(Primitive.String.write(this.offset));
|
|
1711
|
+
b.write((Primitive.String.write(this.offset)));
|
|
1836
1712
|
}
|
|
1837
1713
|
if (this.limit !== undefined) {
|
|
1838
|
-
b.write(Primitive.Int.write(this.limit));
|
|
1714
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1839
1715
|
}
|
|
1840
1716
|
return b.buffer;
|
|
1841
1717
|
}
|
|
@@ -1846,27 +1722,27 @@ export class TogglePinnedToTop extends TLObject {
|
|
|
1846
1722
|
id;
|
|
1847
1723
|
constructor(params) {
|
|
1848
1724
|
super();
|
|
1849
|
-
this.classType =
|
|
1850
|
-
this.className =
|
|
1725
|
+
this.classType = "functions";
|
|
1726
|
+
this.className = "stories.TogglePinnedToTop";
|
|
1851
1727
|
this.constructorId = 0xb297e9b;
|
|
1852
1728
|
this.subclassOfId = 0xf5b399ac;
|
|
1853
|
-
this._slots = [
|
|
1729
|
+
this._slots = ["peer", "id"];
|
|
1854
1730
|
this.peer = params.peer;
|
|
1855
1731
|
this.id = params.id;
|
|
1856
1732
|
}
|
|
1857
1733
|
/**
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1734
|
+
* Generate the TLObject from buffer.
|
|
1735
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1736
|
+
*/
|
|
1861
1737
|
static async read(_data, ..._args) {
|
|
1862
1738
|
// no flags
|
|
1863
1739
|
let peer = await TLObject.read(_data);
|
|
1864
1740
|
let id = await TLObject.read(_data, Primitive.Int);
|
|
1865
|
-
return new TogglePinnedToTop({ peer: peer, id: id });
|
|
1741
|
+
return new TogglePinnedToTop({ "peer": peer, "id": id });
|
|
1866
1742
|
}
|
|
1867
1743
|
/**
|
|
1868
|
-
|
|
1869
|
-
|
|
1744
|
+
* Generate buffer from TLObject.
|
|
1745
|
+
*/
|
|
1870
1746
|
write() {
|
|
1871
1747
|
const b = new BytesIO();
|
|
1872
1748
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1875,7 +1751,7 @@ export class TogglePinnedToTop extends TLObject {
|
|
|
1875
1751
|
b.write(this.peer.write());
|
|
1876
1752
|
}
|
|
1877
1753
|
if (this.id) {
|
|
1878
|
-
b.write(Primitive.Vector.write(this.id, Primitive.Int));
|
|
1754
|
+
b.write((Primitive.Vector.write(this.id, Primitive.Int)));
|
|
1879
1755
|
}
|
|
1880
1756
|
return b.buffer;
|
|
1881
1757
|
}
|
|
@@ -1889,11 +1765,11 @@ export class SearchPosts extends TLObject {
|
|
|
1889
1765
|
limit;
|
|
1890
1766
|
constructor(params) {
|
|
1891
1767
|
super();
|
|
1892
|
-
this.classType =
|
|
1893
|
-
this.className =
|
|
1768
|
+
this.classType = "functions";
|
|
1769
|
+
this.className = "stories.SearchPosts";
|
|
1894
1770
|
this.constructorId = 0xd1810907;
|
|
1895
1771
|
this.subclassOfId = 0x17790b35;
|
|
1896
|
-
this._slots = [
|
|
1772
|
+
this._slots = ["hashtag", "area", "peer", "offset", "limit"];
|
|
1897
1773
|
this.hashtag = params.hashtag;
|
|
1898
1774
|
this.area = params.area;
|
|
1899
1775
|
this.peer = params.peer;
|
|
@@ -1901,39 +1777,33 @@ export class SearchPosts extends TLObject {
|
|
|
1901
1777
|
this.limit = params.limit;
|
|
1902
1778
|
}
|
|
1903
1779
|
/**
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1780
|
+
* Generate the TLObject from buffer.
|
|
1781
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1782
|
+
*/
|
|
1907
1783
|
static async read(_data, ..._args) {
|
|
1908
1784
|
// @ts-ignore
|
|
1909
1785
|
let flags = await Primitive.Int.read(_data);
|
|
1910
|
-
let hashtag = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
1911
|
-
let area = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
1912
|
-
let peer = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
1786
|
+
let hashtag = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
1787
|
+
let area = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
|
|
1788
|
+
let peer = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
|
|
1913
1789
|
let offset = await Primitive.String.read(_data);
|
|
1914
1790
|
let limit = await Primitive.Int.read(_data);
|
|
1915
|
-
return new SearchPosts({
|
|
1916
|
-
hashtag: hashtag,
|
|
1917
|
-
area: area,
|
|
1918
|
-
peer: peer,
|
|
1919
|
-
offset: offset,
|
|
1920
|
-
limit: limit,
|
|
1921
|
-
});
|
|
1791
|
+
return new SearchPosts({ "hashtag": hashtag, "area": area, "peer": peer, "offset": offset, "limit": limit });
|
|
1922
1792
|
}
|
|
1923
1793
|
/**
|
|
1924
|
-
|
|
1925
|
-
|
|
1794
|
+
* Generate buffer from TLObject.
|
|
1795
|
+
*/
|
|
1926
1796
|
write() {
|
|
1927
1797
|
const b = new BytesIO();
|
|
1928
1798
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1929
1799
|
// @ts-ignore
|
|
1930
1800
|
let flags = 0;
|
|
1931
|
-
flags |= this.hashtag !== undefined ? 1 << 0 : 0;
|
|
1932
|
-
flags |= this.area !== undefined ? 1 << 1 : 0;
|
|
1933
|
-
flags |= this.peer !== undefined ? 1 << 2 : 0;
|
|
1934
|
-
b.write(Primitive.Int.write(flags));
|
|
1801
|
+
flags |= this.hashtag !== undefined ? (1 << 0) : 0;
|
|
1802
|
+
flags |= this.area !== undefined ? (1 << 1) : 0;
|
|
1803
|
+
flags |= this.peer !== undefined ? (1 << 2) : 0;
|
|
1804
|
+
b.write((Primitive.Int.write(flags)));
|
|
1935
1805
|
if (this.hashtag !== undefined) {
|
|
1936
|
-
b.write(Primitive.String.write(this.hashtag));
|
|
1806
|
+
b.write((Primitive.String.write(this.hashtag)));
|
|
1937
1807
|
}
|
|
1938
1808
|
if (this.area !== undefined) {
|
|
1939
1809
|
b.write(this.area.write());
|
|
@@ -1942,10 +1812,10 @@ export class SearchPosts extends TLObject {
|
|
|
1942
1812
|
b.write(this.peer.write());
|
|
1943
1813
|
}
|
|
1944
1814
|
if (this.offset !== undefined) {
|
|
1945
|
-
b.write(Primitive.String.write(this.offset));
|
|
1815
|
+
b.write((Primitive.String.write(this.offset)));
|
|
1946
1816
|
}
|
|
1947
1817
|
if (this.limit !== undefined) {
|
|
1948
|
-
b.write(Primitive.Int.write(this.limit));
|
|
1818
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1949
1819
|
}
|
|
1950
1820
|
return b.buffer;
|
|
1951
1821
|
}
|
|
@@ -1957,29 +1827,29 @@ export class CreateAlbum extends TLObject {
|
|
|
1957
1827
|
stories;
|
|
1958
1828
|
constructor(params) {
|
|
1959
1829
|
super();
|
|
1960
|
-
this.classType =
|
|
1961
|
-
this.className =
|
|
1830
|
+
this.classType = "functions";
|
|
1831
|
+
this.className = "stories.CreateAlbum";
|
|
1962
1832
|
this.constructorId = 0xa36396e5;
|
|
1963
1833
|
this.subclassOfId = 0x7c8c5ea2;
|
|
1964
|
-
this._slots = [
|
|
1834
|
+
this._slots = ["peer", "title", "stories"];
|
|
1965
1835
|
this.peer = params.peer;
|
|
1966
1836
|
this.title = params.title;
|
|
1967
1837
|
this.stories = params.stories;
|
|
1968
1838
|
}
|
|
1969
1839
|
/**
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1840
|
+
* Generate the TLObject from buffer.
|
|
1841
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1842
|
+
*/
|
|
1973
1843
|
static async read(_data, ..._args) {
|
|
1974
1844
|
// no flags
|
|
1975
1845
|
let peer = await TLObject.read(_data);
|
|
1976
1846
|
let title = await Primitive.String.read(_data);
|
|
1977
1847
|
let stories = await TLObject.read(_data, Primitive.Int);
|
|
1978
|
-
return new CreateAlbum({ peer: peer, title: title, stories: stories });
|
|
1848
|
+
return new CreateAlbum({ "peer": peer, "title": title, "stories": stories });
|
|
1979
1849
|
}
|
|
1980
1850
|
/**
|
|
1981
|
-
|
|
1982
|
-
|
|
1851
|
+
* Generate buffer from TLObject.
|
|
1852
|
+
*/
|
|
1983
1853
|
write() {
|
|
1984
1854
|
const b = new BytesIO();
|
|
1985
1855
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1988,10 +1858,10 @@ export class CreateAlbum extends TLObject {
|
|
|
1988
1858
|
b.write(this.peer.write());
|
|
1989
1859
|
}
|
|
1990
1860
|
if (this.title !== undefined) {
|
|
1991
|
-
b.write(Primitive.String.write(this.title));
|
|
1861
|
+
b.write((Primitive.String.write(this.title)));
|
|
1992
1862
|
}
|
|
1993
1863
|
if (this.stories) {
|
|
1994
|
-
b.write(Primitive.Vector.write(this.stories, Primitive.Int));
|
|
1864
|
+
b.write((Primitive.Vector.write(this.stories, Primitive.Int)));
|
|
1995
1865
|
}
|
|
1996
1866
|
return b.buffer;
|
|
1997
1867
|
}
|
|
@@ -2006,11 +1876,11 @@ export class UpdateAlbum extends TLObject {
|
|
|
2006
1876
|
order;
|
|
2007
1877
|
constructor(params) {
|
|
2008
1878
|
super();
|
|
2009
|
-
this.classType =
|
|
2010
|
-
this.className =
|
|
1879
|
+
this.classType = "functions";
|
|
1880
|
+
this.className = "stories.UpdateAlbum";
|
|
2011
1881
|
this.constructorId = 0x5e5259b6;
|
|
2012
1882
|
this.subclassOfId = 0x7c8c5ea2;
|
|
2013
|
-
this._slots = [
|
|
1883
|
+
this._slots = ["peer", "albumId", "title", "deleteStories", "addStories", "order"];
|
|
2014
1884
|
this.peer = params.peer;
|
|
2015
1885
|
this.albumId = params.albumId;
|
|
2016
1886
|
this.title = params.title;
|
|
@@ -2019,57 +1889,50 @@ export class UpdateAlbum extends TLObject {
|
|
|
2019
1889
|
this.order = params.order;
|
|
2020
1890
|
}
|
|
2021
1891
|
/**
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
1892
|
+
* Generate the TLObject from buffer.
|
|
1893
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1894
|
+
*/
|
|
2025
1895
|
static async read(_data, ..._args) {
|
|
2026
1896
|
// @ts-ignore
|
|
2027
1897
|
let flags = await Primitive.Int.read(_data);
|
|
2028
1898
|
let peer = await TLObject.read(_data);
|
|
2029
1899
|
let albumId = await Primitive.Int.read(_data);
|
|
2030
|
-
let title = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
2031
|
-
let deleteStories = flags & (1 << 1) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
2032
|
-
let addStories = flags & (1 << 2) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
2033
|
-
let order = flags & (1 << 3) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
2034
|
-
return new UpdateAlbum({
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
addStories: addStories,
|
|
2040
|
-
order: order,
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
/**
|
|
2044
|
-
* Generate buffer from TLObject.
|
|
2045
|
-
*/
|
|
1900
|
+
let title = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
1901
|
+
let deleteStories = (flags & (1 << 1)) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
1902
|
+
let addStories = (flags & (1 << 2)) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
1903
|
+
let order = (flags & (1 << 3)) ? await TLObject.read(_data, Primitive.Int) : [];
|
|
1904
|
+
return new UpdateAlbum({ "peer": peer, "albumId": albumId, "title": title, "deleteStories": deleteStories, "addStories": addStories, "order": order });
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Generate buffer from TLObject.
|
|
1908
|
+
*/
|
|
2046
1909
|
write() {
|
|
2047
1910
|
const b = new BytesIO();
|
|
2048
1911
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2049
1912
|
// @ts-ignore
|
|
2050
1913
|
let flags = 0;
|
|
2051
|
-
flags |= this.title !== undefined ? 1 << 0 : 0;
|
|
2052
|
-
flags |= this.deleteStories ? 1 << 1 : 0;
|
|
2053
|
-
flags |= this.addStories ? 1 << 2 : 0;
|
|
2054
|
-
flags |= this.order ? 1 << 3 : 0;
|
|
2055
|
-
b.write(Primitive.Int.write(flags));
|
|
1914
|
+
flags |= this.title !== undefined ? (1 << 0) : 0;
|
|
1915
|
+
flags |= this.deleteStories ? (1 << 1) : 0;
|
|
1916
|
+
flags |= this.addStories ? (1 << 2) : 0;
|
|
1917
|
+
flags |= this.order ? (1 << 3) : 0;
|
|
1918
|
+
b.write((Primitive.Int.write(flags)));
|
|
2056
1919
|
if (this.peer !== undefined) {
|
|
2057
1920
|
b.write(this.peer.write());
|
|
2058
1921
|
}
|
|
2059
1922
|
if (this.albumId !== undefined) {
|
|
2060
|
-
b.write(Primitive.Int.write(this.albumId));
|
|
1923
|
+
b.write((Primitive.Int.write(this.albumId)));
|
|
2061
1924
|
}
|
|
2062
1925
|
if (this.title !== undefined) {
|
|
2063
|
-
b.write(Primitive.String.write(this.title));
|
|
1926
|
+
b.write((Primitive.String.write(this.title)));
|
|
2064
1927
|
}
|
|
2065
1928
|
if (this.deleteStories) {
|
|
2066
|
-
b.write(Primitive.Vector.write(this.deleteStories, Primitive.Int));
|
|
1929
|
+
b.write((Primitive.Vector.write(this.deleteStories, Primitive.Int)));
|
|
2067
1930
|
}
|
|
2068
1931
|
if (this.addStories) {
|
|
2069
|
-
b.write(Primitive.Vector.write(this.addStories, Primitive.Int));
|
|
1932
|
+
b.write((Primitive.Vector.write(this.addStories, Primitive.Int)));
|
|
2070
1933
|
}
|
|
2071
1934
|
if (this.order) {
|
|
2072
|
-
b.write(Primitive.Vector.write(this.order, Primitive.Int));
|
|
1935
|
+
b.write((Primitive.Vector.write(this.order, Primitive.Int)));
|
|
2073
1936
|
}
|
|
2074
1937
|
return b.buffer;
|
|
2075
1938
|
}
|
|
@@ -2080,27 +1943,27 @@ export class ReorderAlbums extends TLObject {
|
|
|
2080
1943
|
order;
|
|
2081
1944
|
constructor(params) {
|
|
2082
1945
|
super();
|
|
2083
|
-
this.classType =
|
|
2084
|
-
this.className =
|
|
1946
|
+
this.classType = "functions";
|
|
1947
|
+
this.className = "stories.ReorderAlbums";
|
|
2085
1948
|
this.constructorId = 0x8535fbd9;
|
|
2086
1949
|
this.subclassOfId = 0xf5b399ac;
|
|
2087
|
-
this._slots = [
|
|
1950
|
+
this._slots = ["peer", "order"];
|
|
2088
1951
|
this.peer = params.peer;
|
|
2089
1952
|
this.order = params.order;
|
|
2090
1953
|
}
|
|
2091
1954
|
/**
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
1955
|
+
* Generate the TLObject from buffer.
|
|
1956
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1957
|
+
*/
|
|
2095
1958
|
static async read(_data, ..._args) {
|
|
2096
1959
|
// no flags
|
|
2097
1960
|
let peer = await TLObject.read(_data);
|
|
2098
1961
|
let order = await TLObject.read(_data, Primitive.Int);
|
|
2099
|
-
return new ReorderAlbums({ peer: peer, order: order });
|
|
1962
|
+
return new ReorderAlbums({ "peer": peer, "order": order });
|
|
2100
1963
|
}
|
|
2101
1964
|
/**
|
|
2102
|
-
|
|
2103
|
-
|
|
1965
|
+
* Generate buffer from TLObject.
|
|
1966
|
+
*/
|
|
2104
1967
|
write() {
|
|
2105
1968
|
const b = new BytesIO();
|
|
2106
1969
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2109,7 +1972,7 @@ export class ReorderAlbums extends TLObject {
|
|
|
2109
1972
|
b.write(this.peer.write());
|
|
2110
1973
|
}
|
|
2111
1974
|
if (this.order) {
|
|
2112
|
-
b.write(Primitive.Vector.write(this.order, Primitive.Int));
|
|
1975
|
+
b.write((Primitive.Vector.write(this.order, Primitive.Int)));
|
|
2113
1976
|
}
|
|
2114
1977
|
return b.buffer;
|
|
2115
1978
|
}
|
|
@@ -2120,27 +1983,27 @@ export class DeleteAlbum extends TLObject {
|
|
|
2120
1983
|
albumId;
|
|
2121
1984
|
constructor(params) {
|
|
2122
1985
|
super();
|
|
2123
|
-
this.classType =
|
|
2124
|
-
this.className =
|
|
1986
|
+
this.classType = "functions";
|
|
1987
|
+
this.className = "stories.DeleteAlbum";
|
|
2125
1988
|
this.constructorId = 0x8d3456d0;
|
|
2126
1989
|
this.subclassOfId = 0xf5b399ac;
|
|
2127
|
-
this._slots = [
|
|
1990
|
+
this._slots = ["peer", "albumId"];
|
|
2128
1991
|
this.peer = params.peer;
|
|
2129
1992
|
this.albumId = params.albumId;
|
|
2130
1993
|
}
|
|
2131
1994
|
/**
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
1995
|
+
* Generate the TLObject from buffer.
|
|
1996
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1997
|
+
*/
|
|
2135
1998
|
static async read(_data, ..._args) {
|
|
2136
1999
|
// no flags
|
|
2137
2000
|
let peer = await TLObject.read(_data);
|
|
2138
2001
|
let albumId = await Primitive.Int.read(_data);
|
|
2139
|
-
return new DeleteAlbum({ peer: peer, albumId: albumId });
|
|
2002
|
+
return new DeleteAlbum({ "peer": peer, "albumId": albumId });
|
|
2140
2003
|
}
|
|
2141
2004
|
/**
|
|
2142
|
-
|
|
2143
|
-
|
|
2005
|
+
* Generate buffer from TLObject.
|
|
2006
|
+
*/
|
|
2144
2007
|
write() {
|
|
2145
2008
|
const b = new BytesIO();
|
|
2146
2009
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2149,7 +2012,7 @@ export class DeleteAlbum extends TLObject {
|
|
|
2149
2012
|
b.write(this.peer.write());
|
|
2150
2013
|
}
|
|
2151
2014
|
if (this.albumId !== undefined) {
|
|
2152
|
-
b.write(Primitive.Int.write(this.albumId));
|
|
2015
|
+
b.write((Primitive.Int.write(this.albumId)));
|
|
2153
2016
|
}
|
|
2154
2017
|
return b.buffer;
|
|
2155
2018
|
}
|
|
@@ -2160,27 +2023,27 @@ export class GetAlbums extends TLObject {
|
|
|
2160
2023
|
hash;
|
|
2161
2024
|
constructor(params) {
|
|
2162
2025
|
super();
|
|
2163
|
-
this.classType =
|
|
2164
|
-
this.className =
|
|
2026
|
+
this.classType = "functions";
|
|
2027
|
+
this.className = "stories.GetAlbums";
|
|
2165
2028
|
this.constructorId = 0x25b3eac7;
|
|
2166
2029
|
this.subclassOfId = 0x5a73d39;
|
|
2167
|
-
this._slots = [
|
|
2030
|
+
this._slots = ["peer", "hash"];
|
|
2168
2031
|
this.peer = params.peer;
|
|
2169
2032
|
this.hash = params.hash;
|
|
2170
2033
|
}
|
|
2171
2034
|
/**
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2035
|
+
* Generate the TLObject from buffer.
|
|
2036
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2037
|
+
*/
|
|
2175
2038
|
static async read(_data, ..._args) {
|
|
2176
2039
|
// no flags
|
|
2177
2040
|
let peer = await TLObject.read(_data);
|
|
2178
2041
|
let hash = await Primitive.Long.read(_data);
|
|
2179
|
-
return new GetAlbums({ peer: peer, hash: hash });
|
|
2042
|
+
return new GetAlbums({ "peer": peer, "hash": hash });
|
|
2180
2043
|
}
|
|
2181
2044
|
/**
|
|
2182
|
-
|
|
2183
|
-
|
|
2045
|
+
* Generate buffer from TLObject.
|
|
2046
|
+
*/
|
|
2184
2047
|
write() {
|
|
2185
2048
|
const b = new BytesIO();
|
|
2186
2049
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2189,7 +2052,7 @@ export class GetAlbums extends TLObject {
|
|
|
2189
2052
|
b.write(this.peer.write());
|
|
2190
2053
|
}
|
|
2191
2054
|
if (this.hash !== undefined) {
|
|
2192
|
-
b.write(Primitive.Long.write(this.hash));
|
|
2055
|
+
b.write((Primitive.Long.write(this.hash)));
|
|
2193
2056
|
}
|
|
2194
2057
|
return b.buffer;
|
|
2195
2058
|
}
|
|
@@ -2202,31 +2065,31 @@ export class GetAlbumStories extends TLObject {
|
|
|
2202
2065
|
limit;
|
|
2203
2066
|
constructor(params) {
|
|
2204
2067
|
super();
|
|
2205
|
-
this.classType =
|
|
2206
|
-
this.className =
|
|
2068
|
+
this.classType = "functions";
|
|
2069
|
+
this.className = "stories.GetAlbumStories";
|
|
2207
2070
|
this.constructorId = 0xac806d61;
|
|
2208
2071
|
this.subclassOfId = 0x251c0c2c;
|
|
2209
|
-
this._slots = [
|
|
2072
|
+
this._slots = ["peer", "albumId", "offset", "limit"];
|
|
2210
2073
|
this.peer = params.peer;
|
|
2211
2074
|
this.albumId = params.albumId;
|
|
2212
2075
|
this.offset = params.offset;
|
|
2213
2076
|
this.limit = params.limit;
|
|
2214
2077
|
}
|
|
2215
2078
|
/**
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2079
|
+
* Generate the TLObject from buffer.
|
|
2080
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2081
|
+
*/
|
|
2219
2082
|
static async read(_data, ..._args) {
|
|
2220
2083
|
// no flags
|
|
2221
2084
|
let peer = await TLObject.read(_data);
|
|
2222
2085
|
let albumId = await Primitive.Int.read(_data);
|
|
2223
2086
|
let offset = await Primitive.Int.read(_data);
|
|
2224
2087
|
let limit = await Primitive.Int.read(_data);
|
|
2225
|
-
return new GetAlbumStories({ peer: peer, albumId: albumId, offset: offset, limit: limit });
|
|
2088
|
+
return new GetAlbumStories({ "peer": peer, "albumId": albumId, "offset": offset, "limit": limit });
|
|
2226
2089
|
}
|
|
2227
2090
|
/**
|
|
2228
|
-
|
|
2229
|
-
|
|
2091
|
+
* Generate buffer from TLObject.
|
|
2092
|
+
*/
|
|
2230
2093
|
write() {
|
|
2231
2094
|
const b = new BytesIO();
|
|
2232
2095
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2235,13 +2098,13 @@ export class GetAlbumStories extends TLObject {
|
|
|
2235
2098
|
b.write(this.peer.write());
|
|
2236
2099
|
}
|
|
2237
2100
|
if (this.albumId !== undefined) {
|
|
2238
|
-
b.write(Primitive.Int.write(this.albumId));
|
|
2101
|
+
b.write((Primitive.Int.write(this.albumId)));
|
|
2239
2102
|
}
|
|
2240
2103
|
if (this.offset !== undefined) {
|
|
2241
|
-
b.write(Primitive.Int.write(this.offset));
|
|
2104
|
+
b.write((Primitive.Int.write(this.offset)));
|
|
2242
2105
|
}
|
|
2243
2106
|
if (this.limit !== undefined) {
|
|
2244
|
-
b.write(Primitive.Int.write(this.limit));
|
|
2107
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
2245
2108
|
}
|
|
2246
2109
|
return b.buffer;
|
|
2247
2110
|
}
|
|
@@ -2260,22 +2123,11 @@ export class StartLive extends TLObject {
|
|
|
2260
2123
|
sendPaidMessagesStars;
|
|
2261
2124
|
constructor(params) {
|
|
2262
2125
|
super();
|
|
2263
|
-
this.classType =
|
|
2264
|
-
this.className =
|
|
2126
|
+
this.classType = "functions";
|
|
2127
|
+
this.className = "stories.StartLive";
|
|
2265
2128
|
this.constructorId = 0xd069ccde;
|
|
2266
2129
|
this.subclassOfId = 0x8af52aac;
|
|
2267
|
-
this._slots = [
|
|
2268
|
-
'pinned',
|
|
2269
|
-
'noforwards',
|
|
2270
|
-
'rtmpStream',
|
|
2271
|
-
'peer',
|
|
2272
|
-
'caption',
|
|
2273
|
-
'entities',
|
|
2274
|
-
'privacyRules',
|
|
2275
|
-
'randomId',
|
|
2276
|
-
'messagesEnabled',
|
|
2277
|
-
'sendPaidMessagesStars',
|
|
2278
|
-
];
|
|
2130
|
+
this._slots = ["pinned", "noforwards", "rtmpStream", "peer", "caption", "entities", "privacyRules", "randomId", "messagesEnabled", "sendPaidMessagesStars"];
|
|
2279
2131
|
this.pinned = params.pinned;
|
|
2280
2132
|
this.noforwards = params.noforwards;
|
|
2281
2133
|
this.rtmpStream = params.rtmpStream;
|
|
@@ -2288,71 +2140,60 @@ export class StartLive extends TLObject {
|
|
|
2288
2140
|
this.sendPaidMessagesStars = params.sendPaidMessagesStars;
|
|
2289
2141
|
}
|
|
2290
2142
|
/**
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2143
|
+
* Generate the TLObject from buffer.
|
|
2144
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2145
|
+
*/
|
|
2294
2146
|
static async read(_data, ..._args) {
|
|
2295
2147
|
// @ts-ignore
|
|
2296
2148
|
let flags = await Primitive.Int.read(_data);
|
|
2297
|
-
let pinned = flags & (1 << 2) ? true : false;
|
|
2298
|
-
let noforwards = flags & (1 << 4) ? true : false;
|
|
2299
|
-
let rtmpStream = flags & (1 << 5) ? true : false;
|
|
2149
|
+
let pinned = (flags & (1 << 2)) ? true : false;
|
|
2150
|
+
let noforwards = (flags & (1 << 4)) ? true : false;
|
|
2151
|
+
let rtmpStream = (flags & (1 << 5)) ? true : false;
|
|
2300
2152
|
let peer = await TLObject.read(_data);
|
|
2301
|
-
let caption = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
2302
|
-
let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
2153
|
+
let caption = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
2154
|
+
let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
|
|
2303
2155
|
let privacyRules = await TLObject.read(_data);
|
|
2304
2156
|
let randomId = await Primitive.Long.read(_data);
|
|
2305
|
-
let messagesEnabled = flags & (1 << 6) ? await Primitive.Bool.read(_data) : undefined;
|
|
2306
|
-
let sendPaidMessagesStars = flags & (1 << 7) ? await Primitive.Long.read(_data) : undefined;
|
|
2307
|
-
return new StartLive({
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
caption: caption,
|
|
2313
|
-
entities: entities,
|
|
2314
|
-
privacyRules: privacyRules,
|
|
2315
|
-
randomId: randomId,
|
|
2316
|
-
messagesEnabled: messagesEnabled,
|
|
2317
|
-
sendPaidMessagesStars: sendPaidMessagesStars,
|
|
2318
|
-
});
|
|
2319
|
-
}
|
|
2320
|
-
/**
|
|
2321
|
-
* Generate buffer from TLObject.
|
|
2322
|
-
*/
|
|
2157
|
+
let messagesEnabled = (flags & (1 << 6)) ? await Primitive.Bool.read(_data) : undefined;
|
|
2158
|
+
let sendPaidMessagesStars = (flags & (1 << 7)) ? await Primitive.Long.read(_data) : undefined;
|
|
2159
|
+
return new StartLive({ "pinned": pinned, "noforwards": noforwards, "rtmpStream": rtmpStream, "peer": peer, "caption": caption, "entities": entities, "privacyRules": privacyRules, "randomId": randomId, "messagesEnabled": messagesEnabled, "sendPaidMessagesStars": sendPaidMessagesStars });
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* Generate buffer from TLObject.
|
|
2163
|
+
*/
|
|
2323
2164
|
write() {
|
|
2324
2165
|
const b = new BytesIO();
|
|
2325
2166
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2326
2167
|
// @ts-ignore
|
|
2327
2168
|
let flags = 0;
|
|
2328
|
-
flags |= this.pinned ? 1 << 2 : 0;
|
|
2329
|
-
flags |= this.noforwards ? 1 << 4 : 0;
|
|
2330
|
-
flags |= this.rtmpStream ? 1 << 5 : 0;
|
|
2331
|
-
flags |= this.caption !== undefined ? 1 << 0 : 0;
|
|
2332
|
-
flags |= this.entities ? 1 << 1 : 0;
|
|
2333
|
-
flags |= this.messagesEnabled !== undefined ? 1 << 6 : 0;
|
|
2334
|
-
flags |= this.sendPaidMessagesStars !== undefined ? 1 << 7 : 0;
|
|
2335
|
-
b.write(Primitive.Int.write(flags));
|
|
2169
|
+
flags |= this.pinned ? (1 << 2) : 0;
|
|
2170
|
+
flags |= this.noforwards ? (1 << 4) : 0;
|
|
2171
|
+
flags |= this.rtmpStream ? (1 << 5) : 0;
|
|
2172
|
+
flags |= this.caption !== undefined ? (1 << 0) : 0;
|
|
2173
|
+
flags |= this.entities ? (1 << 1) : 0;
|
|
2174
|
+
flags |= this.messagesEnabled !== undefined ? (1 << 6) : 0;
|
|
2175
|
+
flags |= this.sendPaidMessagesStars !== undefined ? (1 << 7) : 0;
|
|
2176
|
+
b.write((Primitive.Int.write(flags)));
|
|
2336
2177
|
if (this.peer !== undefined) {
|
|
2337
2178
|
b.write(this.peer.write());
|
|
2338
2179
|
}
|
|
2339
2180
|
if (this.caption !== undefined) {
|
|
2340
|
-
b.write(Primitive.String.write(this.caption));
|
|
2181
|
+
b.write((Primitive.String.write(this.caption)));
|
|
2341
2182
|
}
|
|
2342
2183
|
if (this.entities) {
|
|
2343
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
2184
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
2344
2185
|
}
|
|
2345
2186
|
if (this.privacyRules) {
|
|
2346
|
-
b.write(Primitive.Vector.write(this.privacyRules));
|
|
2187
|
+
b.write((Primitive.Vector.write(this.privacyRules)));
|
|
2347
2188
|
}
|
|
2348
2189
|
if (this.randomId !== undefined) {
|
|
2349
|
-
b.write(Primitive.Long.write(this.randomId));
|
|
2190
|
+
b.write((Primitive.Long.write(this.randomId)));
|
|
2350
2191
|
}
|
|
2351
2192
|
if (this.messagesEnabled !== undefined) {
|
|
2352
|
-
b.write(Primitive.Bool.write(this.messagesEnabled));
|
|
2193
|
+
b.write((Primitive.Bool.write(this.messagesEnabled)));
|
|
2353
2194
|
}
|
|
2354
2195
|
if (this.sendPaidMessagesStars !== undefined) {
|
|
2355
|
-
b.write(Primitive.Long.write(this.sendPaidMessagesStars));
|
|
2196
|
+
b.write((Primitive.Long.write(this.sendPaidMessagesStars)));
|
|
2356
2197
|
}
|
|
2357
2198
|
return b.buffer;
|
|
2358
2199
|
}
|