@tgsnake/skema 3.2.0 → 3.2.1-browser.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/deps.d.ts +4 -3
- package/dist/src/deps.js +4 -4
- package/dist/src/raw/class/All.d.ts +1 -1
- package/dist/src/raw/class/All.js +2783 -2783
- package/dist/src/raw/class/Raw.d.ts +7601 -7601
- package/dist/src/raw/class/Raw.js +26781 -20676
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1983 -1813
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +128 -117
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +849 -714
- package/dist/src/raw/class/tl/bots.d.ts +256 -256
- package/dist/src/raw/class/tl/bots.js +661 -607
- package/dist/src/raw/class/tl/channels.d.ts +336 -336
- package/dist/src/raw/class/tl/channels.js +836 -745
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +196 -183
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +159 -138
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +537 -492
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +204 -152
- package/dist/src/raw/class/tl/feed.d.ts +71 -71
- package/dist/src/raw/class/tl/feed.js +214 -179
- package/dist/src/raw/class/tl/folders.d.ts +6 -6
- package/dist/src/raw/class/tl/folders.js +11 -11
- package/dist/src/raw/class/tl/fragment.d.ts +11 -11
- package/dist/src/raw/class/tl/fragment.js +32 -25
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +686 -618
- package/dist/src/raw/class/tl/langpack.d.ts +26 -26
- package/dist/src/raw/class/tl/langpack.js +57 -57
- package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
- package/dist/src/raw/class/tl/messages.js +5965 -4886
- package/dist/src/raw/class/tl/payments.d.ts +646 -646
- package/dist/src/raw/class/tl/payments.js +2254 -1766
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +779 -644
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +139 -116
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +133 -111
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +115 -97
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +268 -169
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +173 -144
- package/dist/src/raw/class/tl/storage.d.ts +51 -51
- package/dist/src/raw/class/tl/storage.js +71 -71
- package/dist/src/raw/class/tl/stories.d.ts +221 -221
- package/dist/src/raw/class/tl/stories.js +781 -622
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +52 -47
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +246 -175
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +178 -155
- package/dist/src/raw/class/tl/users.d.ts +61 -61
- package/dist/src/raw/class/tl/users.js +124 -124
- package/dist/src/raw/class/tl/wallet.d.ts +221 -221
- package/dist/src/raw/class/tl/wallet.js +624 -558
- package/dist/src/raw/class/types.d.ts +1 -1
- package/dist/src/raw/class/types.js +1 -1
- package/package.json +6 -4
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
*
|
|
7
7
|
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
8
|
* it under the terms of the MIT License as published.
|
|
9
|
-
*/
|
|
9
|
+
*/
|
|
10
10
|
// This file is auto generate. All change made in this file will be lost!
|
|
11
11
|
import { TLObject, Primitive } from '../../core/index.js';
|
|
12
12
|
import { BytesIO } from '../../../deps.js';
|
|
13
13
|
export class ContactsNotModified extends TLObject {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
|
-
this.classType =
|
|
17
|
-
this.className =
|
|
16
|
+
this.classType = 'types';
|
|
17
|
+
this.className = 'contacts.ContactsNotModified';
|
|
18
18
|
this.constructorId = 0xb74ba9d2;
|
|
19
19
|
this.subclassOfId = 0x38be25f6;
|
|
20
20
|
this._slots = [];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
* Generate the TLObject from buffer.
|
|
24
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
25
|
+
*/
|
|
26
26
|
static async read(_data, ..._args) {
|
|
27
27
|
// no flags
|
|
28
28
|
return new ContactsNotModified();
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* Generate buffer from TLObject.
|
|
32
|
+
*/
|
|
33
33
|
write() {
|
|
34
34
|
const b = new BytesIO();
|
|
35
35
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -43,41 +43,41 @@ export class Contacts extends TLObject {
|
|
|
43
43
|
users;
|
|
44
44
|
constructor(params) {
|
|
45
45
|
super();
|
|
46
|
-
this.classType =
|
|
47
|
-
this.className =
|
|
46
|
+
this.classType = 'types';
|
|
47
|
+
this.className = 'contacts.Contacts';
|
|
48
48
|
this.constructorId = 0xeae87e42;
|
|
49
49
|
this.subclassOfId = 0x38be25f6;
|
|
50
|
-
this._slots = [
|
|
50
|
+
this._slots = ['contacts', 'savedCount', 'users'];
|
|
51
51
|
this.contacts = params.contacts;
|
|
52
52
|
this.savedCount = params.savedCount;
|
|
53
53
|
this.users = params.users;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
* Generate the TLObject from buffer.
|
|
57
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
58
|
+
*/
|
|
59
59
|
static async read(_data, ..._args) {
|
|
60
60
|
// no flags
|
|
61
61
|
let contacts = await TLObject.read(_data);
|
|
62
62
|
let savedCount = await Primitive.Int.read(_data);
|
|
63
63
|
let users = await TLObject.read(_data);
|
|
64
|
-
return new Contacts({
|
|
64
|
+
return new Contacts({ contacts: contacts, savedCount: savedCount, users: users });
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
* Generate buffer from TLObject.
|
|
68
|
+
*/
|
|
69
69
|
write() {
|
|
70
70
|
const b = new BytesIO();
|
|
71
71
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
72
72
|
// no flags
|
|
73
73
|
if (this.contacts) {
|
|
74
|
-
b.write(
|
|
74
|
+
b.write(Primitive.Vector.write(this.contacts));
|
|
75
75
|
}
|
|
76
76
|
if (this.savedCount !== undefined) {
|
|
77
|
-
b.write(
|
|
77
|
+
b.write(Primitive.Int.write(this.savedCount));
|
|
78
78
|
}
|
|
79
79
|
if (this.users) {
|
|
80
|
-
b.write(
|
|
80
|
+
b.write(Primitive.Vector.write(this.users));
|
|
81
81
|
}
|
|
82
82
|
return b.buffer;
|
|
83
83
|
}
|
|
@@ -89,46 +89,51 @@ export class ImportedContacts extends TLObject {
|
|
|
89
89
|
users;
|
|
90
90
|
constructor(params) {
|
|
91
91
|
super();
|
|
92
|
-
this.classType =
|
|
93
|
-
this.className =
|
|
92
|
+
this.classType = 'types';
|
|
93
|
+
this.className = 'contacts.ImportedContacts';
|
|
94
94
|
this.constructorId = 0x77d01c3b;
|
|
95
95
|
this.subclassOfId = 0x8172ad93;
|
|
96
|
-
this._slots = [
|
|
96
|
+
this._slots = ['imported', 'popularInvites', 'retryContacts', 'users'];
|
|
97
97
|
this.imported = params.imported;
|
|
98
98
|
this.popularInvites = params.popularInvites;
|
|
99
99
|
this.retryContacts = params.retryContacts;
|
|
100
100
|
this.users = params.users;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
* Generate the TLObject from buffer.
|
|
104
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
105
|
+
*/
|
|
106
106
|
static async read(_data, ..._args) {
|
|
107
107
|
// no flags
|
|
108
108
|
let imported = await TLObject.read(_data);
|
|
109
109
|
let popularInvites = await TLObject.read(_data);
|
|
110
110
|
let retryContacts = await TLObject.read(_data, Primitive.Long);
|
|
111
111
|
let users = await TLObject.read(_data);
|
|
112
|
-
return new ImportedContacts({
|
|
112
|
+
return new ImportedContacts({
|
|
113
|
+
imported: imported,
|
|
114
|
+
popularInvites: popularInvites,
|
|
115
|
+
retryContacts: retryContacts,
|
|
116
|
+
users: users,
|
|
117
|
+
});
|
|
113
118
|
}
|
|
114
119
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
120
|
+
* Generate buffer from TLObject.
|
|
121
|
+
*/
|
|
117
122
|
write() {
|
|
118
123
|
const b = new BytesIO();
|
|
119
124
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
120
125
|
// no flags
|
|
121
126
|
if (this.imported) {
|
|
122
|
-
b.write(
|
|
127
|
+
b.write(Primitive.Vector.write(this.imported));
|
|
123
128
|
}
|
|
124
129
|
if (this.popularInvites) {
|
|
125
|
-
b.write(
|
|
130
|
+
b.write(Primitive.Vector.write(this.popularInvites));
|
|
126
131
|
}
|
|
127
132
|
if (this.retryContacts) {
|
|
128
|
-
b.write(
|
|
133
|
+
b.write(Primitive.Vector.write(this.retryContacts, Primitive.Long));
|
|
129
134
|
}
|
|
130
135
|
if (this.users) {
|
|
131
|
-
b.write(
|
|
136
|
+
b.write(Primitive.Vector.write(this.users));
|
|
132
137
|
}
|
|
133
138
|
return b.buffer;
|
|
134
139
|
}
|
|
@@ -139,41 +144,41 @@ export class Blocked extends TLObject {
|
|
|
139
144
|
users;
|
|
140
145
|
constructor(params) {
|
|
141
146
|
super();
|
|
142
|
-
this.classType =
|
|
143
|
-
this.className =
|
|
147
|
+
this.classType = 'types';
|
|
148
|
+
this.className = 'contacts.Blocked';
|
|
144
149
|
this.constructorId = 0xade1591;
|
|
145
150
|
this.subclassOfId = 0xffba4f4f;
|
|
146
|
-
this._slots = [
|
|
151
|
+
this._slots = ['blocked', 'chats', 'users'];
|
|
147
152
|
this.blocked = params.blocked;
|
|
148
153
|
this.chats = params.chats;
|
|
149
154
|
this.users = params.users;
|
|
150
155
|
}
|
|
151
156
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
157
|
+
* Generate the TLObject from buffer.
|
|
158
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
159
|
+
*/
|
|
155
160
|
static async read(_data, ..._args) {
|
|
156
161
|
// no flags
|
|
157
162
|
let blocked = await TLObject.read(_data);
|
|
158
163
|
let chats = await TLObject.read(_data);
|
|
159
164
|
let users = await TLObject.read(_data);
|
|
160
|
-
return new Blocked({
|
|
165
|
+
return new Blocked({ blocked: blocked, chats: chats, users: users });
|
|
161
166
|
}
|
|
162
167
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
* Generate buffer from TLObject.
|
|
169
|
+
*/
|
|
165
170
|
write() {
|
|
166
171
|
const b = new BytesIO();
|
|
167
172
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
168
173
|
// no flags
|
|
169
174
|
if (this.blocked) {
|
|
170
|
-
b.write(
|
|
175
|
+
b.write(Primitive.Vector.write(this.blocked));
|
|
171
176
|
}
|
|
172
177
|
if (this.chats) {
|
|
173
|
-
b.write(
|
|
178
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
174
179
|
}
|
|
175
180
|
if (this.users) {
|
|
176
|
-
b.write(
|
|
181
|
+
b.write(Primitive.Vector.write(this.users));
|
|
177
182
|
}
|
|
178
183
|
return b.buffer;
|
|
179
184
|
}
|
|
@@ -185,46 +190,46 @@ export class BlockedSlice extends TLObject {
|
|
|
185
190
|
users;
|
|
186
191
|
constructor(params) {
|
|
187
192
|
super();
|
|
188
|
-
this.classType =
|
|
189
|
-
this.className =
|
|
193
|
+
this.classType = 'types';
|
|
194
|
+
this.className = 'contacts.BlockedSlice';
|
|
190
195
|
this.constructorId = 0xe1664194;
|
|
191
196
|
this.subclassOfId = 0xffba4f4f;
|
|
192
|
-
this._slots = [
|
|
197
|
+
this._slots = ['count', 'blocked', 'chats', 'users'];
|
|
193
198
|
this.count = params.count;
|
|
194
199
|
this.blocked = params.blocked;
|
|
195
200
|
this.chats = params.chats;
|
|
196
201
|
this.users = params.users;
|
|
197
202
|
}
|
|
198
203
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
204
|
+
* Generate the TLObject from buffer.
|
|
205
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
206
|
+
*/
|
|
202
207
|
static async read(_data, ..._args) {
|
|
203
208
|
// no flags
|
|
204
209
|
let count = await Primitive.Int.read(_data);
|
|
205
210
|
let blocked = await TLObject.read(_data);
|
|
206
211
|
let chats = await TLObject.read(_data);
|
|
207
212
|
let users = await TLObject.read(_data);
|
|
208
|
-
return new BlockedSlice({
|
|
213
|
+
return new BlockedSlice({ count: count, blocked: blocked, chats: chats, users: users });
|
|
209
214
|
}
|
|
210
215
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
* Generate buffer from TLObject.
|
|
217
|
+
*/
|
|
213
218
|
write() {
|
|
214
219
|
const b = new BytesIO();
|
|
215
220
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
216
221
|
// no flags
|
|
217
222
|
if (this.count !== undefined) {
|
|
218
|
-
b.write(
|
|
223
|
+
b.write(Primitive.Int.write(this.count));
|
|
219
224
|
}
|
|
220
225
|
if (this.blocked) {
|
|
221
|
-
b.write(
|
|
226
|
+
b.write(Primitive.Vector.write(this.blocked));
|
|
222
227
|
}
|
|
223
228
|
if (this.chats) {
|
|
224
|
-
b.write(
|
|
229
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
225
230
|
}
|
|
226
231
|
if (this.users) {
|
|
227
|
-
b.write(
|
|
232
|
+
b.write(Primitive.Vector.write(this.users));
|
|
228
233
|
}
|
|
229
234
|
return b.buffer;
|
|
230
235
|
}
|
|
@@ -236,46 +241,46 @@ export class Found extends TLObject {
|
|
|
236
241
|
users;
|
|
237
242
|
constructor(params) {
|
|
238
243
|
super();
|
|
239
|
-
this.classType =
|
|
240
|
-
this.className =
|
|
244
|
+
this.classType = 'types';
|
|
245
|
+
this.className = 'contacts.Found';
|
|
241
246
|
this.constructorId = 0xb3134d9d;
|
|
242
247
|
this.subclassOfId = 0x4386a2e3;
|
|
243
|
-
this._slots = [
|
|
248
|
+
this._slots = ['myResults', 'results', 'chats', 'users'];
|
|
244
249
|
this.myResults = params.myResults;
|
|
245
250
|
this.results = params.results;
|
|
246
251
|
this.chats = params.chats;
|
|
247
252
|
this.users = params.users;
|
|
248
253
|
}
|
|
249
254
|
/**
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
255
|
+
* Generate the TLObject from buffer.
|
|
256
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
257
|
+
*/
|
|
253
258
|
static async read(_data, ..._args) {
|
|
254
259
|
// no flags
|
|
255
260
|
let myResults = await TLObject.read(_data);
|
|
256
261
|
let results = await TLObject.read(_data);
|
|
257
262
|
let chats = await TLObject.read(_data);
|
|
258
263
|
let users = await TLObject.read(_data);
|
|
259
|
-
return new Found({
|
|
264
|
+
return new Found({ myResults: myResults, results: results, chats: chats, users: users });
|
|
260
265
|
}
|
|
261
266
|
/**
|
|
262
|
-
|
|
263
|
-
|
|
267
|
+
* Generate buffer from TLObject.
|
|
268
|
+
*/
|
|
264
269
|
write() {
|
|
265
270
|
const b = new BytesIO();
|
|
266
271
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
267
272
|
// no flags
|
|
268
273
|
if (this.myResults) {
|
|
269
|
-
b.write(
|
|
274
|
+
b.write(Primitive.Vector.write(this.myResults));
|
|
270
275
|
}
|
|
271
276
|
if (this.results) {
|
|
272
|
-
b.write(
|
|
277
|
+
b.write(Primitive.Vector.write(this.results));
|
|
273
278
|
}
|
|
274
279
|
if (this.chats) {
|
|
275
|
-
b.write(
|
|
280
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
276
281
|
}
|
|
277
282
|
if (this.users) {
|
|
278
|
-
b.write(
|
|
283
|
+
b.write(Primitive.Vector.write(this.users));
|
|
279
284
|
}
|
|
280
285
|
return b.buffer;
|
|
281
286
|
}
|
|
@@ -286,29 +291,29 @@ export class ResolvedPeer extends TLObject {
|
|
|
286
291
|
users;
|
|
287
292
|
constructor(params) {
|
|
288
293
|
super();
|
|
289
|
-
this.classType =
|
|
290
|
-
this.className =
|
|
294
|
+
this.classType = 'types';
|
|
295
|
+
this.className = 'contacts.ResolvedPeer';
|
|
291
296
|
this.constructorId = 0x7f077ad9;
|
|
292
297
|
this.subclassOfId = 0xf065b3a8;
|
|
293
|
-
this._slots = [
|
|
298
|
+
this._slots = ['peer', 'chats', 'users'];
|
|
294
299
|
this.peer = params.peer;
|
|
295
300
|
this.chats = params.chats;
|
|
296
301
|
this.users = params.users;
|
|
297
302
|
}
|
|
298
303
|
/**
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
304
|
+
* Generate the TLObject from buffer.
|
|
305
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
306
|
+
*/
|
|
302
307
|
static async read(_data, ..._args) {
|
|
303
308
|
// no flags
|
|
304
309
|
let peer = await TLObject.read(_data);
|
|
305
310
|
let chats = await TLObject.read(_data);
|
|
306
311
|
let users = await TLObject.read(_data);
|
|
307
|
-
return new ResolvedPeer({
|
|
312
|
+
return new ResolvedPeer({ peer: peer, chats: chats, users: users });
|
|
308
313
|
}
|
|
309
314
|
/**
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
* Generate buffer from TLObject.
|
|
316
|
+
*/
|
|
312
317
|
write() {
|
|
313
318
|
const b = new BytesIO();
|
|
314
319
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -317,10 +322,10 @@ export class ResolvedPeer extends TLObject {
|
|
|
317
322
|
b.write(this.peer.write());
|
|
318
323
|
}
|
|
319
324
|
if (this.chats) {
|
|
320
|
-
b.write(
|
|
325
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
321
326
|
}
|
|
322
327
|
if (this.users) {
|
|
323
|
-
b.write(
|
|
328
|
+
b.write(Primitive.Vector.write(this.users));
|
|
324
329
|
}
|
|
325
330
|
return b.buffer;
|
|
326
331
|
}
|
|
@@ -328,23 +333,23 @@ export class ResolvedPeer extends TLObject {
|
|
|
328
333
|
export class TopPeersNotModified extends TLObject {
|
|
329
334
|
constructor() {
|
|
330
335
|
super();
|
|
331
|
-
this.classType =
|
|
332
|
-
this.className =
|
|
336
|
+
this.classType = 'types';
|
|
337
|
+
this.className = 'contacts.TopPeersNotModified';
|
|
333
338
|
this.constructorId = 0xde266ef5;
|
|
334
339
|
this.subclassOfId = 0x9ee8bb88;
|
|
335
340
|
this._slots = [];
|
|
336
341
|
}
|
|
337
342
|
/**
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
343
|
+
* Generate the TLObject from buffer.
|
|
344
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
345
|
+
*/
|
|
341
346
|
static async read(_data, ..._args) {
|
|
342
347
|
// no flags
|
|
343
348
|
return new TopPeersNotModified();
|
|
344
349
|
}
|
|
345
350
|
/**
|
|
346
|
-
|
|
347
|
-
|
|
351
|
+
* Generate buffer from TLObject.
|
|
352
|
+
*/
|
|
348
353
|
write() {
|
|
349
354
|
const b = new BytesIO();
|
|
350
355
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -358,41 +363,41 @@ export class TopPeers extends TLObject {
|
|
|
358
363
|
users;
|
|
359
364
|
constructor(params) {
|
|
360
365
|
super();
|
|
361
|
-
this.classType =
|
|
362
|
-
this.className =
|
|
366
|
+
this.classType = 'types';
|
|
367
|
+
this.className = 'contacts.TopPeers';
|
|
363
368
|
this.constructorId = 0x70b772a8;
|
|
364
369
|
this.subclassOfId = 0x9ee8bb88;
|
|
365
|
-
this._slots = [
|
|
370
|
+
this._slots = ['categories', 'chats', 'users'];
|
|
366
371
|
this.categories = params.categories;
|
|
367
372
|
this.chats = params.chats;
|
|
368
373
|
this.users = params.users;
|
|
369
374
|
}
|
|
370
375
|
/**
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
376
|
+
* Generate the TLObject from buffer.
|
|
377
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
378
|
+
*/
|
|
374
379
|
static async read(_data, ..._args) {
|
|
375
380
|
// no flags
|
|
376
381
|
let categories = await TLObject.read(_data);
|
|
377
382
|
let chats = await TLObject.read(_data);
|
|
378
383
|
let users = await TLObject.read(_data);
|
|
379
|
-
return new TopPeers({
|
|
384
|
+
return new TopPeers({ categories: categories, chats: chats, users: users });
|
|
380
385
|
}
|
|
381
386
|
/**
|
|
382
|
-
|
|
383
|
-
|
|
387
|
+
* Generate buffer from TLObject.
|
|
388
|
+
*/
|
|
384
389
|
write() {
|
|
385
390
|
const b = new BytesIO();
|
|
386
391
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
387
392
|
// no flags
|
|
388
393
|
if (this.categories) {
|
|
389
|
-
b.write(
|
|
394
|
+
b.write(Primitive.Vector.write(this.categories));
|
|
390
395
|
}
|
|
391
396
|
if (this.chats) {
|
|
392
|
-
b.write(
|
|
397
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
393
398
|
}
|
|
394
399
|
if (this.users) {
|
|
395
|
-
b.write(
|
|
400
|
+
b.write(Primitive.Vector.write(this.users));
|
|
396
401
|
}
|
|
397
402
|
return b.buffer;
|
|
398
403
|
}
|
|
@@ -400,23 +405,23 @@ export class TopPeers extends TLObject {
|
|
|
400
405
|
export class TopPeersDisabled extends TLObject {
|
|
401
406
|
constructor() {
|
|
402
407
|
super();
|
|
403
|
-
this.classType =
|
|
404
|
-
this.className =
|
|
408
|
+
this.classType = 'types';
|
|
409
|
+
this.className = 'contacts.TopPeersDisabled';
|
|
405
410
|
this.constructorId = 0xb52c939d;
|
|
406
411
|
this.subclassOfId = 0x9ee8bb88;
|
|
407
412
|
this._slots = [];
|
|
408
413
|
}
|
|
409
414
|
/**
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
415
|
+
* Generate the TLObject from buffer.
|
|
416
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
417
|
+
*/
|
|
413
418
|
static async read(_data, ..._args) {
|
|
414
419
|
// no flags
|
|
415
420
|
return new TopPeersDisabled();
|
|
416
421
|
}
|
|
417
422
|
/**
|
|
418
|
-
|
|
419
|
-
|
|
423
|
+
* Generate buffer from TLObject.
|
|
424
|
+
*/
|
|
420
425
|
write() {
|
|
421
426
|
const b = new BytesIO();
|
|
422
427
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -429,36 +434,36 @@ export class ContactBirthdays extends TLObject {
|
|
|
429
434
|
users;
|
|
430
435
|
constructor(params) {
|
|
431
436
|
super();
|
|
432
|
-
this.classType =
|
|
433
|
-
this.className =
|
|
437
|
+
this.classType = 'types';
|
|
438
|
+
this.className = 'contacts.ContactBirthdays';
|
|
434
439
|
this.constructorId = 0x114ff30d;
|
|
435
440
|
this.subclassOfId = 0xe7aabff;
|
|
436
|
-
this._slots = [
|
|
441
|
+
this._slots = ['contacts', 'users'];
|
|
437
442
|
this.contacts = params.contacts;
|
|
438
443
|
this.users = params.users;
|
|
439
444
|
}
|
|
440
445
|
/**
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
446
|
+
* Generate the TLObject from buffer.
|
|
447
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
448
|
+
*/
|
|
444
449
|
static async read(_data, ..._args) {
|
|
445
450
|
// no flags
|
|
446
451
|
let contacts = await TLObject.read(_data);
|
|
447
452
|
let users = await TLObject.read(_data);
|
|
448
|
-
return new ContactBirthdays({
|
|
453
|
+
return new ContactBirthdays({ contacts: contacts, users: users });
|
|
449
454
|
}
|
|
450
455
|
/**
|
|
451
|
-
|
|
452
|
-
|
|
456
|
+
* Generate buffer from TLObject.
|
|
457
|
+
*/
|
|
453
458
|
write() {
|
|
454
459
|
const b = new BytesIO();
|
|
455
460
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
456
461
|
// no flags
|
|
457
462
|
if (this.contacts) {
|
|
458
|
-
b.write(
|
|
463
|
+
b.write(Primitive.Vector.write(this.contacts));
|
|
459
464
|
}
|
|
460
465
|
if (this.users) {
|
|
461
|
-
b.write(
|
|
466
|
+
b.write(Primitive.Vector.write(this.users));
|
|
462
467
|
}
|
|
463
468
|
return b.buffer;
|
|
464
469
|
}
|
|
@@ -466,23 +471,23 @@ export class ContactBirthdays extends TLObject {
|
|
|
466
471
|
export class SponsoredPeersEmpty extends TLObject {
|
|
467
472
|
constructor() {
|
|
468
473
|
super();
|
|
469
|
-
this.classType =
|
|
470
|
-
this.className =
|
|
474
|
+
this.classType = 'types';
|
|
475
|
+
this.className = 'contacts.SponsoredPeersEmpty';
|
|
471
476
|
this.constructorId = 0xea32b4b1;
|
|
472
477
|
this.subclassOfId = 0xb45d5ccc;
|
|
473
478
|
this._slots = [];
|
|
474
479
|
}
|
|
475
480
|
/**
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
481
|
+
* Generate the TLObject from buffer.
|
|
482
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
483
|
+
*/
|
|
479
484
|
static async read(_data, ..._args) {
|
|
480
485
|
// no flags
|
|
481
486
|
return new SponsoredPeersEmpty();
|
|
482
487
|
}
|
|
483
488
|
/**
|
|
484
|
-
|
|
485
|
-
|
|
489
|
+
* Generate buffer from TLObject.
|
|
490
|
+
*/
|
|
486
491
|
write() {
|
|
487
492
|
const b = new BytesIO();
|
|
488
493
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -496,41 +501,41 @@ export class SponsoredPeers extends TLObject {
|
|
|
496
501
|
users;
|
|
497
502
|
constructor(params) {
|
|
498
503
|
super();
|
|
499
|
-
this.classType =
|
|
500
|
-
this.className =
|
|
504
|
+
this.classType = 'types';
|
|
505
|
+
this.className = 'contacts.SponsoredPeers';
|
|
501
506
|
this.constructorId = 0xeb032884;
|
|
502
507
|
this.subclassOfId = 0xb45d5ccc;
|
|
503
|
-
this._slots = [
|
|
508
|
+
this._slots = ['peers', 'chats', 'users'];
|
|
504
509
|
this.peers = params.peers;
|
|
505
510
|
this.chats = params.chats;
|
|
506
511
|
this.users = params.users;
|
|
507
512
|
}
|
|
508
513
|
/**
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
514
|
+
* Generate the TLObject from buffer.
|
|
515
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
516
|
+
*/
|
|
512
517
|
static async read(_data, ..._args) {
|
|
513
518
|
// no flags
|
|
514
519
|
let peers = await TLObject.read(_data);
|
|
515
520
|
let chats = await TLObject.read(_data);
|
|
516
521
|
let users = await TLObject.read(_data);
|
|
517
|
-
return new SponsoredPeers({
|
|
522
|
+
return new SponsoredPeers({ peers: peers, chats: chats, users: users });
|
|
518
523
|
}
|
|
519
524
|
/**
|
|
520
|
-
|
|
521
|
-
|
|
525
|
+
* Generate buffer from TLObject.
|
|
526
|
+
*/
|
|
522
527
|
write() {
|
|
523
528
|
const b = new BytesIO();
|
|
524
529
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
525
530
|
// no flags
|
|
526
531
|
if (this.peers) {
|
|
527
|
-
b.write(
|
|
532
|
+
b.write(Primitive.Vector.write(this.peers));
|
|
528
533
|
}
|
|
529
534
|
if (this.chats) {
|
|
530
|
-
b.write(
|
|
535
|
+
b.write(Primitive.Vector.write(this.chats));
|
|
531
536
|
}
|
|
532
537
|
if (this.users) {
|
|
533
|
-
b.write(
|
|
538
|
+
b.write(Primitive.Vector.write(this.users));
|
|
534
539
|
}
|
|
535
540
|
return b.buffer;
|
|
536
541
|
}
|
|
@@ -540,31 +545,31 @@ export class GetContactIDs extends TLObject {
|
|
|
540
545
|
hash;
|
|
541
546
|
constructor(params) {
|
|
542
547
|
super();
|
|
543
|
-
this.classType =
|
|
544
|
-
this.className =
|
|
548
|
+
this.classType = 'functions';
|
|
549
|
+
this.className = 'contacts.GetContactIDs';
|
|
545
550
|
this.constructorId = 0x7adc669d;
|
|
546
551
|
this.subclassOfId = 0x5026710f;
|
|
547
|
-
this._slots = [
|
|
552
|
+
this._slots = ['hash'];
|
|
548
553
|
this.hash = params.hash;
|
|
549
554
|
}
|
|
550
555
|
/**
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
556
|
+
* Generate the TLObject from buffer.
|
|
557
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
558
|
+
*/
|
|
554
559
|
static async read(_data, ..._args) {
|
|
555
560
|
// no flags
|
|
556
561
|
let hash = await Primitive.Long.read(_data);
|
|
557
|
-
return new GetContactIDs({
|
|
562
|
+
return new GetContactIDs({ hash: hash });
|
|
558
563
|
}
|
|
559
564
|
/**
|
|
560
|
-
|
|
561
|
-
|
|
565
|
+
* Generate buffer from TLObject.
|
|
566
|
+
*/
|
|
562
567
|
write() {
|
|
563
568
|
const b = new BytesIO();
|
|
564
569
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
565
570
|
// no flags
|
|
566
571
|
if (this.hash !== undefined) {
|
|
567
|
-
b.write(
|
|
572
|
+
b.write(Primitive.Long.write(this.hash));
|
|
568
573
|
}
|
|
569
574
|
return b.buffer;
|
|
570
575
|
}
|
|
@@ -573,23 +578,23 @@ export class GetStatuses extends TLObject {
|
|
|
573
578
|
__response__;
|
|
574
579
|
constructor() {
|
|
575
580
|
super();
|
|
576
|
-
this.classType =
|
|
577
|
-
this.className =
|
|
581
|
+
this.classType = 'functions';
|
|
582
|
+
this.className = 'contacts.GetStatuses';
|
|
578
583
|
this.constructorId = 0xc4a353ee;
|
|
579
584
|
this.subclassOfId = 0xdf815c90;
|
|
580
585
|
this._slots = [];
|
|
581
586
|
}
|
|
582
587
|
/**
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
588
|
+
* Generate the TLObject from buffer.
|
|
589
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
590
|
+
*/
|
|
586
591
|
static async read(_data, ..._args) {
|
|
587
592
|
// no flags
|
|
588
593
|
return new GetStatuses();
|
|
589
594
|
}
|
|
590
595
|
/**
|
|
591
|
-
|
|
592
|
-
|
|
596
|
+
* Generate buffer from TLObject.
|
|
597
|
+
*/
|
|
593
598
|
write() {
|
|
594
599
|
const b = new BytesIO();
|
|
595
600
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -602,31 +607,31 @@ export class GetContacts extends TLObject {
|
|
|
602
607
|
hash;
|
|
603
608
|
constructor(params) {
|
|
604
609
|
super();
|
|
605
|
-
this.classType =
|
|
606
|
-
this.className =
|
|
610
|
+
this.classType = 'functions';
|
|
611
|
+
this.className = 'contacts.GetContacts';
|
|
607
612
|
this.constructorId = 0x5dd69e12;
|
|
608
613
|
this.subclassOfId = 0x38be25f6;
|
|
609
|
-
this._slots = [
|
|
614
|
+
this._slots = ['hash'];
|
|
610
615
|
this.hash = params.hash;
|
|
611
616
|
}
|
|
612
617
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
618
|
+
* Generate the TLObject from buffer.
|
|
619
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
620
|
+
*/
|
|
616
621
|
static async read(_data, ..._args) {
|
|
617
622
|
// no flags
|
|
618
623
|
let hash = await Primitive.Long.read(_data);
|
|
619
|
-
return new GetContacts({
|
|
624
|
+
return new GetContacts({ hash: hash });
|
|
620
625
|
}
|
|
621
626
|
/**
|
|
622
|
-
|
|
623
|
-
|
|
627
|
+
* Generate buffer from TLObject.
|
|
628
|
+
*/
|
|
624
629
|
write() {
|
|
625
630
|
const b = new BytesIO();
|
|
626
631
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
627
632
|
// no flags
|
|
628
633
|
if (this.hash !== undefined) {
|
|
629
|
-
b.write(
|
|
634
|
+
b.write(Primitive.Long.write(this.hash));
|
|
630
635
|
}
|
|
631
636
|
return b.buffer;
|
|
632
637
|
}
|
|
@@ -636,31 +641,31 @@ export class ImportContacts extends TLObject {
|
|
|
636
641
|
contacts;
|
|
637
642
|
constructor(params) {
|
|
638
643
|
super();
|
|
639
|
-
this.classType =
|
|
640
|
-
this.className =
|
|
644
|
+
this.classType = 'functions';
|
|
645
|
+
this.className = 'contacts.ImportContacts';
|
|
641
646
|
this.constructorId = 0x2c800be5;
|
|
642
647
|
this.subclassOfId = 0x8172ad93;
|
|
643
|
-
this._slots = [
|
|
648
|
+
this._slots = ['contacts'];
|
|
644
649
|
this.contacts = params.contacts;
|
|
645
650
|
}
|
|
646
651
|
/**
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
652
|
+
* Generate the TLObject from buffer.
|
|
653
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
654
|
+
*/
|
|
650
655
|
static async read(_data, ..._args) {
|
|
651
656
|
// no flags
|
|
652
657
|
let contacts = await TLObject.read(_data);
|
|
653
|
-
return new ImportContacts({
|
|
658
|
+
return new ImportContacts({ contacts: contacts });
|
|
654
659
|
}
|
|
655
660
|
/**
|
|
656
|
-
|
|
657
|
-
|
|
661
|
+
* Generate buffer from TLObject.
|
|
662
|
+
*/
|
|
658
663
|
write() {
|
|
659
664
|
const b = new BytesIO();
|
|
660
665
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
661
666
|
// no flags
|
|
662
667
|
if (this.contacts) {
|
|
663
|
-
b.write(
|
|
668
|
+
b.write(Primitive.Vector.write(this.contacts));
|
|
664
669
|
}
|
|
665
670
|
return b.buffer;
|
|
666
671
|
}
|
|
@@ -670,31 +675,31 @@ export class DeleteContacts extends TLObject {
|
|
|
670
675
|
id;
|
|
671
676
|
constructor(params) {
|
|
672
677
|
super();
|
|
673
|
-
this.classType =
|
|
674
|
-
this.className =
|
|
678
|
+
this.classType = 'functions';
|
|
679
|
+
this.className = 'contacts.DeleteContacts';
|
|
675
680
|
this.constructorId = 0x96a0e00;
|
|
676
681
|
this.subclassOfId = 0x8af52aac;
|
|
677
|
-
this._slots = [
|
|
682
|
+
this._slots = ['id'];
|
|
678
683
|
this.id = params.id;
|
|
679
684
|
}
|
|
680
685
|
/**
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
686
|
+
* Generate the TLObject from buffer.
|
|
687
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
688
|
+
*/
|
|
684
689
|
static async read(_data, ..._args) {
|
|
685
690
|
// no flags
|
|
686
691
|
let id = await TLObject.read(_data);
|
|
687
|
-
return new DeleteContacts({
|
|
692
|
+
return new DeleteContacts({ id: id });
|
|
688
693
|
}
|
|
689
694
|
/**
|
|
690
|
-
|
|
691
|
-
|
|
695
|
+
* Generate buffer from TLObject.
|
|
696
|
+
*/
|
|
692
697
|
write() {
|
|
693
698
|
const b = new BytesIO();
|
|
694
699
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
695
700
|
// no flags
|
|
696
701
|
if (this.id) {
|
|
697
|
-
b.write(
|
|
702
|
+
b.write(Primitive.Vector.write(this.id));
|
|
698
703
|
}
|
|
699
704
|
return b.buffer;
|
|
700
705
|
}
|
|
@@ -704,31 +709,31 @@ export class DeleteByPhones extends TLObject {
|
|
|
704
709
|
phones;
|
|
705
710
|
constructor(params) {
|
|
706
711
|
super();
|
|
707
|
-
this.classType =
|
|
708
|
-
this.className =
|
|
712
|
+
this.classType = 'functions';
|
|
713
|
+
this.className = 'contacts.DeleteByPhones';
|
|
709
714
|
this.constructorId = 0x1013fd9e;
|
|
710
715
|
this.subclassOfId = 0xf5b399ac;
|
|
711
|
-
this._slots = [
|
|
716
|
+
this._slots = ['phones'];
|
|
712
717
|
this.phones = params.phones;
|
|
713
718
|
}
|
|
714
719
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
720
|
+
* Generate the TLObject from buffer.
|
|
721
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
722
|
+
*/
|
|
718
723
|
static async read(_data, ..._args) {
|
|
719
724
|
// no flags
|
|
720
725
|
let phones = await TLObject.read(_data, Primitive.String);
|
|
721
|
-
return new DeleteByPhones({
|
|
726
|
+
return new DeleteByPhones({ phones: phones });
|
|
722
727
|
}
|
|
723
728
|
/**
|
|
724
|
-
|
|
725
|
-
|
|
729
|
+
* Generate buffer from TLObject.
|
|
730
|
+
*/
|
|
726
731
|
write() {
|
|
727
732
|
const b = new BytesIO();
|
|
728
733
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
729
734
|
// no flags
|
|
730
735
|
if (this.phones) {
|
|
731
|
-
b.write(
|
|
736
|
+
b.write(Primitive.Vector.write(this.phones, Primitive.String));
|
|
732
737
|
}
|
|
733
738
|
return b.buffer;
|
|
734
739
|
}
|
|
@@ -739,35 +744,35 @@ export class Block extends TLObject {
|
|
|
739
744
|
id;
|
|
740
745
|
constructor(params) {
|
|
741
746
|
super();
|
|
742
|
-
this.classType =
|
|
743
|
-
this.className =
|
|
747
|
+
this.classType = 'functions';
|
|
748
|
+
this.className = 'contacts.Block';
|
|
744
749
|
this.constructorId = 0x2e2e8734;
|
|
745
750
|
this.subclassOfId = 0xf5b399ac;
|
|
746
|
-
this._slots = [
|
|
751
|
+
this._slots = ['myStoriesFrom', 'id'];
|
|
747
752
|
this.myStoriesFrom = params.myStoriesFrom;
|
|
748
753
|
this.id = params.id;
|
|
749
754
|
}
|
|
750
755
|
/**
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
756
|
+
* Generate the TLObject from buffer.
|
|
757
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
758
|
+
*/
|
|
754
759
|
static async read(_data, ..._args) {
|
|
755
760
|
// @ts-ignore
|
|
756
761
|
let flags = await Primitive.Int.read(_data);
|
|
757
|
-
let myStoriesFrom =
|
|
762
|
+
let myStoriesFrom = flags & (1 << 0) ? true : false;
|
|
758
763
|
let id = await TLObject.read(_data);
|
|
759
|
-
return new Block({
|
|
764
|
+
return new Block({ myStoriesFrom: myStoriesFrom, id: id });
|
|
760
765
|
}
|
|
761
766
|
/**
|
|
762
|
-
|
|
763
|
-
|
|
767
|
+
* Generate buffer from TLObject.
|
|
768
|
+
*/
|
|
764
769
|
write() {
|
|
765
770
|
const b = new BytesIO();
|
|
766
771
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
767
772
|
// @ts-ignore
|
|
768
773
|
let flags = 0;
|
|
769
|
-
flags |= this.myStoriesFrom ?
|
|
770
|
-
b.write(
|
|
774
|
+
flags |= this.myStoriesFrom ? 1 << 0 : 0;
|
|
775
|
+
b.write(Primitive.Int.write(flags));
|
|
771
776
|
if (this.id !== undefined) {
|
|
772
777
|
b.write(this.id.write());
|
|
773
778
|
}
|
|
@@ -780,35 +785,35 @@ export class Unblock extends TLObject {
|
|
|
780
785
|
id;
|
|
781
786
|
constructor(params) {
|
|
782
787
|
super();
|
|
783
|
-
this.classType =
|
|
784
|
-
this.className =
|
|
788
|
+
this.classType = 'functions';
|
|
789
|
+
this.className = 'contacts.Unblock';
|
|
785
790
|
this.constructorId = 0xb550d328;
|
|
786
791
|
this.subclassOfId = 0xf5b399ac;
|
|
787
|
-
this._slots = [
|
|
792
|
+
this._slots = ['myStoriesFrom', 'id'];
|
|
788
793
|
this.myStoriesFrom = params.myStoriesFrom;
|
|
789
794
|
this.id = params.id;
|
|
790
795
|
}
|
|
791
796
|
/**
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
797
|
+
* Generate the TLObject from buffer.
|
|
798
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
799
|
+
*/
|
|
795
800
|
static async read(_data, ..._args) {
|
|
796
801
|
// @ts-ignore
|
|
797
802
|
let flags = await Primitive.Int.read(_data);
|
|
798
|
-
let myStoriesFrom =
|
|
803
|
+
let myStoriesFrom = flags & (1 << 0) ? true : false;
|
|
799
804
|
let id = await TLObject.read(_data);
|
|
800
|
-
return new Unblock({
|
|
805
|
+
return new Unblock({ myStoriesFrom: myStoriesFrom, id: id });
|
|
801
806
|
}
|
|
802
807
|
/**
|
|
803
|
-
|
|
804
|
-
|
|
808
|
+
* Generate buffer from TLObject.
|
|
809
|
+
*/
|
|
805
810
|
write() {
|
|
806
811
|
const b = new BytesIO();
|
|
807
812
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
808
813
|
// @ts-ignore
|
|
809
814
|
let flags = 0;
|
|
810
|
-
flags |= this.myStoriesFrom ?
|
|
811
|
-
b.write(
|
|
815
|
+
flags |= this.myStoriesFrom ? 1 << 0 : 0;
|
|
816
|
+
b.write(Primitive.Int.write(flags));
|
|
812
817
|
if (this.id !== undefined) {
|
|
813
818
|
b.write(this.id.write());
|
|
814
819
|
}
|
|
@@ -822,42 +827,42 @@ export class GetBlocked extends TLObject {
|
|
|
822
827
|
limit;
|
|
823
828
|
constructor(params) {
|
|
824
829
|
super();
|
|
825
|
-
this.classType =
|
|
826
|
-
this.className =
|
|
830
|
+
this.classType = 'functions';
|
|
831
|
+
this.className = 'contacts.GetBlocked';
|
|
827
832
|
this.constructorId = 0x9a868f80;
|
|
828
833
|
this.subclassOfId = 0xffba4f4f;
|
|
829
|
-
this._slots = [
|
|
834
|
+
this._slots = ['myStoriesFrom', 'offset', 'limit'];
|
|
830
835
|
this.myStoriesFrom = params.myStoriesFrom;
|
|
831
836
|
this.offset = params.offset;
|
|
832
837
|
this.limit = params.limit;
|
|
833
838
|
}
|
|
834
839
|
/**
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
840
|
+
* Generate the TLObject from buffer.
|
|
841
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
842
|
+
*/
|
|
838
843
|
static async read(_data, ..._args) {
|
|
839
844
|
// @ts-ignore
|
|
840
845
|
let flags = await Primitive.Int.read(_data);
|
|
841
|
-
let myStoriesFrom =
|
|
846
|
+
let myStoriesFrom = flags & (1 << 0) ? true : false;
|
|
842
847
|
let offset = await Primitive.Int.read(_data);
|
|
843
848
|
let limit = await Primitive.Int.read(_data);
|
|
844
|
-
return new GetBlocked({
|
|
849
|
+
return new GetBlocked({ myStoriesFrom: myStoriesFrom, offset: offset, limit: limit });
|
|
845
850
|
}
|
|
846
851
|
/**
|
|
847
|
-
|
|
848
|
-
|
|
852
|
+
* Generate buffer from TLObject.
|
|
853
|
+
*/
|
|
849
854
|
write() {
|
|
850
855
|
const b = new BytesIO();
|
|
851
856
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
852
857
|
// @ts-ignore
|
|
853
858
|
let flags = 0;
|
|
854
|
-
flags |= this.myStoriesFrom ?
|
|
855
|
-
b.write(
|
|
859
|
+
flags |= this.myStoriesFrom ? 1 << 0 : 0;
|
|
860
|
+
b.write(Primitive.Int.write(flags));
|
|
856
861
|
if (this.offset !== undefined) {
|
|
857
|
-
b.write(
|
|
862
|
+
b.write(Primitive.Int.write(this.offset));
|
|
858
863
|
}
|
|
859
864
|
if (this.limit !== undefined) {
|
|
860
|
-
b.write(
|
|
865
|
+
b.write(Primitive.Int.write(this.limit));
|
|
861
866
|
}
|
|
862
867
|
return b.buffer;
|
|
863
868
|
}
|
|
@@ -870,45 +875,45 @@ export class Search extends TLObject {
|
|
|
870
875
|
limit;
|
|
871
876
|
constructor(params) {
|
|
872
877
|
super();
|
|
873
|
-
this.classType =
|
|
874
|
-
this.className =
|
|
878
|
+
this.classType = 'functions';
|
|
879
|
+
this.className = 'contacts.Search';
|
|
875
880
|
this.constructorId = 0x5f58d0f;
|
|
876
881
|
this.subclassOfId = 0x4386a2e3;
|
|
877
|
-
this._slots = [
|
|
882
|
+
this._slots = ['broadcasts', 'bots', 'q', 'limit'];
|
|
878
883
|
this.broadcasts = params.broadcasts;
|
|
879
884
|
this.bots = params.bots;
|
|
880
885
|
this.q = params.q;
|
|
881
886
|
this.limit = params.limit;
|
|
882
887
|
}
|
|
883
888
|
/**
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
889
|
+
* Generate the TLObject from buffer.
|
|
890
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
891
|
+
*/
|
|
887
892
|
static async read(_data, ..._args) {
|
|
888
893
|
// @ts-ignore
|
|
889
894
|
let flags = await Primitive.Int.read(_data);
|
|
890
|
-
let broadcasts =
|
|
891
|
-
let bots =
|
|
895
|
+
let broadcasts = flags & (1 << 0) ? true : false;
|
|
896
|
+
let bots = flags & (1 << 1) ? true : false;
|
|
892
897
|
let q = await Primitive.String.read(_data);
|
|
893
898
|
let limit = await Primitive.Int.read(_data);
|
|
894
|
-
return new Search({
|
|
899
|
+
return new Search({ broadcasts: broadcasts, bots: bots, q: q, limit: limit });
|
|
895
900
|
}
|
|
896
901
|
/**
|
|
897
|
-
|
|
898
|
-
|
|
902
|
+
* Generate buffer from TLObject.
|
|
903
|
+
*/
|
|
899
904
|
write() {
|
|
900
905
|
const b = new BytesIO();
|
|
901
906
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
902
907
|
// @ts-ignore
|
|
903
908
|
let flags = 0;
|
|
904
|
-
flags |= this.broadcasts ?
|
|
905
|
-
flags |= this.bots ?
|
|
906
|
-
b.write(
|
|
909
|
+
flags |= this.broadcasts ? 1 << 0 : 0;
|
|
910
|
+
flags |= this.bots ? 1 << 1 : 0;
|
|
911
|
+
b.write(Primitive.Int.write(flags));
|
|
907
912
|
if (this.q !== undefined) {
|
|
908
|
-
b.write(
|
|
913
|
+
b.write(Primitive.String.write(this.q));
|
|
909
914
|
}
|
|
910
915
|
if (this.limit !== undefined) {
|
|
911
|
-
b.write(
|
|
916
|
+
b.write(Primitive.Int.write(this.limit));
|
|
912
917
|
}
|
|
913
918
|
return b.buffer;
|
|
914
919
|
}
|
|
@@ -919,40 +924,40 @@ export class ResolveUsername extends TLObject {
|
|
|
919
924
|
referer;
|
|
920
925
|
constructor(params) {
|
|
921
926
|
super();
|
|
922
|
-
this.classType =
|
|
923
|
-
this.className =
|
|
927
|
+
this.classType = 'functions';
|
|
928
|
+
this.className = 'contacts.ResolveUsername';
|
|
924
929
|
this.constructorId = 0x725afbbc;
|
|
925
930
|
this.subclassOfId = 0xf065b3a8;
|
|
926
|
-
this._slots = [
|
|
931
|
+
this._slots = ['username', 'referer'];
|
|
927
932
|
this.username = params.username;
|
|
928
933
|
this.referer = params.referer;
|
|
929
934
|
}
|
|
930
935
|
/**
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
936
|
+
* Generate the TLObject from buffer.
|
|
937
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
938
|
+
*/
|
|
934
939
|
static async read(_data, ..._args) {
|
|
935
940
|
// @ts-ignore
|
|
936
941
|
let flags = await Primitive.Int.read(_data);
|
|
937
942
|
let username = await Primitive.String.read(_data);
|
|
938
|
-
let referer =
|
|
939
|
-
return new ResolveUsername({
|
|
943
|
+
let referer = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
944
|
+
return new ResolveUsername({ username: username, referer: referer });
|
|
940
945
|
}
|
|
941
946
|
/**
|
|
942
|
-
|
|
943
|
-
|
|
947
|
+
* Generate buffer from TLObject.
|
|
948
|
+
*/
|
|
944
949
|
write() {
|
|
945
950
|
const b = new BytesIO();
|
|
946
951
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
947
952
|
// @ts-ignore
|
|
948
953
|
let flags = 0;
|
|
949
|
-
flags |= this.referer !== undefined ?
|
|
950
|
-
b.write(
|
|
954
|
+
flags |= this.referer !== undefined ? 1 << 0 : 0;
|
|
955
|
+
b.write(Primitive.Int.write(flags));
|
|
951
956
|
if (this.username !== undefined) {
|
|
952
|
-
b.write(
|
|
957
|
+
b.write(Primitive.String.write(this.username));
|
|
953
958
|
}
|
|
954
959
|
if (this.referer !== undefined) {
|
|
955
|
-
b.write(
|
|
960
|
+
b.write(Primitive.String.write(this.referer));
|
|
956
961
|
}
|
|
957
962
|
return b.buffer;
|
|
958
963
|
}
|
|
@@ -974,11 +979,25 @@ export class GetTopPeers extends TLObject {
|
|
|
974
979
|
hash;
|
|
975
980
|
constructor(params) {
|
|
976
981
|
super();
|
|
977
|
-
this.classType =
|
|
978
|
-
this.className =
|
|
982
|
+
this.classType = 'functions';
|
|
983
|
+
this.className = 'contacts.GetTopPeers';
|
|
979
984
|
this.constructorId = 0x973478b6;
|
|
980
985
|
this.subclassOfId = 0x9ee8bb88;
|
|
981
|
-
this._slots = [
|
|
986
|
+
this._slots = [
|
|
987
|
+
'correspondents',
|
|
988
|
+
'botsPm',
|
|
989
|
+
'botsInline',
|
|
990
|
+
'phoneCalls',
|
|
991
|
+
'forwardUsers',
|
|
992
|
+
'forwardChats',
|
|
993
|
+
'groups',
|
|
994
|
+
'channels',
|
|
995
|
+
'botsApp',
|
|
996
|
+
'botsGuestchat',
|
|
997
|
+
'offset',
|
|
998
|
+
'limit',
|
|
999
|
+
'hash',
|
|
1000
|
+
];
|
|
982
1001
|
this.correspondents = params.correspondents;
|
|
983
1002
|
this.botsPm = params.botsPm;
|
|
984
1003
|
this.botsInline = params.botsInline;
|
|
@@ -994,54 +1013,68 @@ export class GetTopPeers extends TLObject {
|
|
|
994
1013
|
this.hash = params.hash;
|
|
995
1014
|
}
|
|
996
1015
|
/**
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1016
|
+
* Generate the TLObject from buffer.
|
|
1017
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1018
|
+
*/
|
|
1000
1019
|
static async read(_data, ..._args) {
|
|
1001
1020
|
// @ts-ignore
|
|
1002
1021
|
let flags = await Primitive.Int.read(_data);
|
|
1003
|
-
let correspondents =
|
|
1004
|
-
let botsPm =
|
|
1005
|
-
let botsInline =
|
|
1006
|
-
let phoneCalls =
|
|
1007
|
-
let forwardUsers =
|
|
1008
|
-
let forwardChats =
|
|
1009
|
-
let groups =
|
|
1010
|
-
let channels =
|
|
1011
|
-
let botsApp =
|
|
1012
|
-
let botsGuestchat =
|
|
1022
|
+
let correspondents = flags & (1 << 0) ? true : false;
|
|
1023
|
+
let botsPm = flags & (1 << 1) ? true : false;
|
|
1024
|
+
let botsInline = flags & (1 << 2) ? true : false;
|
|
1025
|
+
let phoneCalls = flags & (1 << 3) ? true : false;
|
|
1026
|
+
let forwardUsers = flags & (1 << 4) ? true : false;
|
|
1027
|
+
let forwardChats = flags & (1 << 5) ? true : false;
|
|
1028
|
+
let groups = flags & (1 << 10) ? true : false;
|
|
1029
|
+
let channels = flags & (1 << 15) ? true : false;
|
|
1030
|
+
let botsApp = flags & (1 << 16) ? true : false;
|
|
1031
|
+
let botsGuestchat = flags & (1 << 17) ? true : false;
|
|
1013
1032
|
let offset = await Primitive.Int.read(_data);
|
|
1014
1033
|
let limit = await Primitive.Int.read(_data);
|
|
1015
1034
|
let hash = await Primitive.Long.read(_data);
|
|
1016
|
-
return new GetTopPeers({
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1035
|
+
return new GetTopPeers({
|
|
1036
|
+
correspondents: correspondents,
|
|
1037
|
+
botsPm: botsPm,
|
|
1038
|
+
botsInline: botsInline,
|
|
1039
|
+
phoneCalls: phoneCalls,
|
|
1040
|
+
forwardUsers: forwardUsers,
|
|
1041
|
+
forwardChats: forwardChats,
|
|
1042
|
+
groups: groups,
|
|
1043
|
+
channels: channels,
|
|
1044
|
+
botsApp: botsApp,
|
|
1045
|
+
botsGuestchat: botsGuestchat,
|
|
1046
|
+
offset: offset,
|
|
1047
|
+
limit: limit,
|
|
1048
|
+
hash: hash,
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Generate buffer from TLObject.
|
|
1053
|
+
*/
|
|
1021
1054
|
write() {
|
|
1022
1055
|
const b = new BytesIO();
|
|
1023
1056
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1024
1057
|
// @ts-ignore
|
|
1025
1058
|
let flags = 0;
|
|
1026
|
-
flags |= this.correspondents ?
|
|
1027
|
-
flags |= this.botsPm ?
|
|
1028
|
-
flags |= this.botsInline ?
|
|
1029
|
-
flags |= this.phoneCalls ?
|
|
1030
|
-
flags |= this.forwardUsers ?
|
|
1031
|
-
flags |= this.forwardChats ?
|
|
1032
|
-
flags |= this.groups ?
|
|
1033
|
-
flags |= this.channels ?
|
|
1034
|
-
flags |= this.botsApp ?
|
|
1035
|
-
flags |= this.botsGuestchat ?
|
|
1036
|
-
b.write(
|
|
1059
|
+
flags |= this.correspondents ? 1 << 0 : 0;
|
|
1060
|
+
flags |= this.botsPm ? 1 << 1 : 0;
|
|
1061
|
+
flags |= this.botsInline ? 1 << 2 : 0;
|
|
1062
|
+
flags |= this.phoneCalls ? 1 << 3 : 0;
|
|
1063
|
+
flags |= this.forwardUsers ? 1 << 4 : 0;
|
|
1064
|
+
flags |= this.forwardChats ? 1 << 5 : 0;
|
|
1065
|
+
flags |= this.groups ? 1 << 10 : 0;
|
|
1066
|
+
flags |= this.channels ? 1 << 15 : 0;
|
|
1067
|
+
flags |= this.botsApp ? 1 << 16 : 0;
|
|
1068
|
+
flags |= this.botsGuestchat ? 1 << 17 : 0;
|
|
1069
|
+
b.write(Primitive.Int.write(flags));
|
|
1037
1070
|
if (this.offset !== undefined) {
|
|
1038
|
-
b.write(
|
|
1071
|
+
b.write(Primitive.Int.write(this.offset));
|
|
1039
1072
|
}
|
|
1040
1073
|
if (this.limit !== undefined) {
|
|
1041
|
-
b.write(
|
|
1074
|
+
b.write(Primitive.Int.write(this.limit));
|
|
1042
1075
|
}
|
|
1043
1076
|
if (this.hash !== undefined) {
|
|
1044
|
-
b.write(
|
|
1077
|
+
b.write(Primitive.Long.write(this.hash));
|
|
1045
1078
|
}
|
|
1046
1079
|
return b.buffer;
|
|
1047
1080
|
}
|
|
@@ -1052,27 +1085,27 @@ export class ResetTopPeerRating extends TLObject {
|
|
|
1052
1085
|
peer;
|
|
1053
1086
|
constructor(params) {
|
|
1054
1087
|
super();
|
|
1055
|
-
this.classType =
|
|
1056
|
-
this.className =
|
|
1088
|
+
this.classType = 'functions';
|
|
1089
|
+
this.className = 'contacts.ResetTopPeerRating';
|
|
1057
1090
|
this.constructorId = 0x1ae373ac;
|
|
1058
1091
|
this.subclassOfId = 0xf5b399ac;
|
|
1059
|
-
this._slots = [
|
|
1092
|
+
this._slots = ['category', 'peer'];
|
|
1060
1093
|
this.category = params.category;
|
|
1061
1094
|
this.peer = params.peer;
|
|
1062
1095
|
}
|
|
1063
1096
|
/**
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1097
|
+
* Generate the TLObject from buffer.
|
|
1098
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1099
|
+
*/
|
|
1067
1100
|
static async read(_data, ..._args) {
|
|
1068
1101
|
// no flags
|
|
1069
1102
|
let category = await TLObject.read(_data);
|
|
1070
1103
|
let peer = await TLObject.read(_data);
|
|
1071
|
-
return new ResetTopPeerRating({
|
|
1104
|
+
return new ResetTopPeerRating({ category: category, peer: peer });
|
|
1072
1105
|
}
|
|
1073
1106
|
/**
|
|
1074
|
-
|
|
1075
|
-
|
|
1107
|
+
* Generate buffer from TLObject.
|
|
1108
|
+
*/
|
|
1076
1109
|
write() {
|
|
1077
1110
|
const b = new BytesIO();
|
|
1078
1111
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1090,23 +1123,23 @@ export class ResetSaved extends TLObject {
|
|
|
1090
1123
|
__response__;
|
|
1091
1124
|
constructor() {
|
|
1092
1125
|
super();
|
|
1093
|
-
this.classType =
|
|
1094
|
-
this.className =
|
|
1126
|
+
this.classType = 'functions';
|
|
1127
|
+
this.className = 'contacts.ResetSaved';
|
|
1095
1128
|
this.constructorId = 0x879537f1;
|
|
1096
1129
|
this.subclassOfId = 0xf5b399ac;
|
|
1097
1130
|
this._slots = [];
|
|
1098
1131
|
}
|
|
1099
1132
|
/**
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1133
|
+
* Generate the TLObject from buffer.
|
|
1134
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1135
|
+
*/
|
|
1103
1136
|
static async read(_data, ..._args) {
|
|
1104
1137
|
// no flags
|
|
1105
1138
|
return new ResetSaved();
|
|
1106
1139
|
}
|
|
1107
1140
|
/**
|
|
1108
|
-
|
|
1109
|
-
|
|
1141
|
+
* Generate buffer from TLObject.
|
|
1142
|
+
*/
|
|
1110
1143
|
write() {
|
|
1111
1144
|
const b = new BytesIO();
|
|
1112
1145
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1118,23 +1151,23 @@ export class GetSaved extends TLObject {
|
|
|
1118
1151
|
__response__;
|
|
1119
1152
|
constructor() {
|
|
1120
1153
|
super();
|
|
1121
|
-
this.classType =
|
|
1122
|
-
this.className =
|
|
1154
|
+
this.classType = 'functions';
|
|
1155
|
+
this.className = 'contacts.GetSaved';
|
|
1123
1156
|
this.constructorId = 0x82f1e39f;
|
|
1124
1157
|
this.subclassOfId = 0x975dbef;
|
|
1125
1158
|
this._slots = [];
|
|
1126
1159
|
}
|
|
1127
1160
|
/**
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1161
|
+
* Generate the TLObject from buffer.
|
|
1162
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1163
|
+
*/
|
|
1131
1164
|
static async read(_data, ..._args) {
|
|
1132
1165
|
// no flags
|
|
1133
1166
|
return new GetSaved();
|
|
1134
1167
|
}
|
|
1135
1168
|
/**
|
|
1136
|
-
|
|
1137
|
-
|
|
1169
|
+
* Generate buffer from TLObject.
|
|
1170
|
+
*/
|
|
1138
1171
|
write() {
|
|
1139
1172
|
const b = new BytesIO();
|
|
1140
1173
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1147,31 +1180,31 @@ export class ToggleTopPeers extends TLObject {
|
|
|
1147
1180
|
enabled;
|
|
1148
1181
|
constructor(params) {
|
|
1149
1182
|
super();
|
|
1150
|
-
this.classType =
|
|
1151
|
-
this.className =
|
|
1183
|
+
this.classType = 'functions';
|
|
1184
|
+
this.className = 'contacts.ToggleTopPeers';
|
|
1152
1185
|
this.constructorId = 0x8514bdda;
|
|
1153
1186
|
this.subclassOfId = 0xf5b399ac;
|
|
1154
|
-
this._slots = [
|
|
1187
|
+
this._slots = ['enabled'];
|
|
1155
1188
|
this.enabled = params.enabled;
|
|
1156
1189
|
}
|
|
1157
1190
|
/**
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1191
|
+
* Generate the TLObject from buffer.
|
|
1192
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1193
|
+
*/
|
|
1161
1194
|
static async read(_data, ..._args) {
|
|
1162
1195
|
// no flags
|
|
1163
1196
|
let enabled = await Primitive.Bool.read(_data);
|
|
1164
|
-
return new ToggleTopPeers({
|
|
1197
|
+
return new ToggleTopPeers({ enabled: enabled });
|
|
1165
1198
|
}
|
|
1166
1199
|
/**
|
|
1167
|
-
|
|
1168
|
-
|
|
1200
|
+
* Generate buffer from TLObject.
|
|
1201
|
+
*/
|
|
1169
1202
|
write() {
|
|
1170
1203
|
const b = new BytesIO();
|
|
1171
1204
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1172
1205
|
// no flags
|
|
1173
1206
|
if (this.enabled !== undefined) {
|
|
1174
|
-
b.write(
|
|
1207
|
+
b.write(Primitive.Bool.write(this.enabled));
|
|
1175
1208
|
}
|
|
1176
1209
|
return b.buffer;
|
|
1177
1210
|
}
|
|
@@ -1186,11 +1219,11 @@ export class AddContact extends TLObject {
|
|
|
1186
1219
|
note;
|
|
1187
1220
|
constructor(params) {
|
|
1188
1221
|
super();
|
|
1189
|
-
this.classType =
|
|
1190
|
-
this.className =
|
|
1222
|
+
this.classType = 'functions';
|
|
1223
|
+
this.className = 'contacts.AddContact';
|
|
1191
1224
|
this.constructorId = 0xd9ba2e54;
|
|
1192
1225
|
this.subclassOfId = 0x8af52aac;
|
|
1193
|
-
this._slots = [
|
|
1226
|
+
this._slots = ['addPhonePrivacyException', 'id', 'firstName', 'lastName', 'phone', 'note'];
|
|
1194
1227
|
this.addPhonePrivacyException = params.addPhonePrivacyException;
|
|
1195
1228
|
this.id = params.id;
|
|
1196
1229
|
this.firstName = params.firstName;
|
|
@@ -1199,42 +1232,49 @@ export class AddContact extends TLObject {
|
|
|
1199
1232
|
this.note = params.note;
|
|
1200
1233
|
}
|
|
1201
1234
|
/**
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1235
|
+
* Generate the TLObject from buffer.
|
|
1236
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1237
|
+
*/
|
|
1205
1238
|
static async read(_data, ..._args) {
|
|
1206
1239
|
// @ts-ignore
|
|
1207
1240
|
let flags = await Primitive.Int.read(_data);
|
|
1208
|
-
let addPhonePrivacyException =
|
|
1241
|
+
let addPhonePrivacyException = flags & (1 << 0) ? true : false;
|
|
1209
1242
|
let id = await TLObject.read(_data);
|
|
1210
1243
|
let firstName = await Primitive.String.read(_data);
|
|
1211
1244
|
let lastName = await Primitive.String.read(_data);
|
|
1212
1245
|
let phone = await Primitive.String.read(_data);
|
|
1213
|
-
let note =
|
|
1214
|
-
return new AddContact({
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1246
|
+
let note = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
1247
|
+
return new AddContact({
|
|
1248
|
+
addPhonePrivacyException: addPhonePrivacyException,
|
|
1249
|
+
id: id,
|
|
1250
|
+
firstName: firstName,
|
|
1251
|
+
lastName: lastName,
|
|
1252
|
+
phone: phone,
|
|
1253
|
+
note: note,
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Generate buffer from TLObject.
|
|
1258
|
+
*/
|
|
1219
1259
|
write() {
|
|
1220
1260
|
const b = new BytesIO();
|
|
1221
1261
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1222
1262
|
// @ts-ignore
|
|
1223
1263
|
let flags = 0;
|
|
1224
|
-
flags |= this.addPhonePrivacyException ?
|
|
1225
|
-
flags |= this.note !== undefined ?
|
|
1226
|
-
b.write(
|
|
1264
|
+
flags |= this.addPhonePrivacyException ? 1 << 0 : 0;
|
|
1265
|
+
flags |= this.note !== undefined ? 1 << 1 : 0;
|
|
1266
|
+
b.write(Primitive.Int.write(flags));
|
|
1227
1267
|
if (this.id !== undefined) {
|
|
1228
1268
|
b.write(this.id.write());
|
|
1229
1269
|
}
|
|
1230
1270
|
if (this.firstName !== undefined) {
|
|
1231
|
-
b.write(
|
|
1271
|
+
b.write(Primitive.String.write(this.firstName));
|
|
1232
1272
|
}
|
|
1233
1273
|
if (this.lastName !== undefined) {
|
|
1234
|
-
b.write(
|
|
1274
|
+
b.write(Primitive.String.write(this.lastName));
|
|
1235
1275
|
}
|
|
1236
1276
|
if (this.phone !== undefined) {
|
|
1237
|
-
b.write(
|
|
1277
|
+
b.write(Primitive.String.write(this.phone));
|
|
1238
1278
|
}
|
|
1239
1279
|
if (this.note !== undefined) {
|
|
1240
1280
|
b.write(this.note.write());
|
|
@@ -1247,25 +1287,25 @@ export class AcceptContact extends TLObject {
|
|
|
1247
1287
|
id;
|
|
1248
1288
|
constructor(params) {
|
|
1249
1289
|
super();
|
|
1250
|
-
this.classType =
|
|
1251
|
-
this.className =
|
|
1290
|
+
this.classType = 'functions';
|
|
1291
|
+
this.className = 'contacts.AcceptContact';
|
|
1252
1292
|
this.constructorId = 0xf831a20f;
|
|
1253
1293
|
this.subclassOfId = 0x8af52aac;
|
|
1254
|
-
this._slots = [
|
|
1294
|
+
this._slots = ['id'];
|
|
1255
1295
|
this.id = params.id;
|
|
1256
1296
|
}
|
|
1257
1297
|
/**
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1298
|
+
* Generate the TLObject from buffer.
|
|
1299
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1300
|
+
*/
|
|
1261
1301
|
static async read(_data, ..._args) {
|
|
1262
1302
|
// no flags
|
|
1263
1303
|
let id = await TLObject.read(_data);
|
|
1264
|
-
return new AcceptContact({
|
|
1304
|
+
return new AcceptContact({ id: id });
|
|
1265
1305
|
}
|
|
1266
1306
|
/**
|
|
1267
|
-
|
|
1268
|
-
|
|
1307
|
+
* Generate buffer from TLObject.
|
|
1308
|
+
*/
|
|
1269
1309
|
write() {
|
|
1270
1310
|
const b = new BytesIO();
|
|
1271
1311
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1283,43 +1323,43 @@ export class GetLocated extends TLObject {
|
|
|
1283
1323
|
selfExpires;
|
|
1284
1324
|
constructor(params) {
|
|
1285
1325
|
super();
|
|
1286
|
-
this.classType =
|
|
1287
|
-
this.className =
|
|
1326
|
+
this.classType = 'functions';
|
|
1327
|
+
this.className = 'contacts.GetLocated';
|
|
1288
1328
|
this.constructorId = 0xd348bc44;
|
|
1289
1329
|
this.subclassOfId = 0x8af52aac;
|
|
1290
|
-
this._slots = [
|
|
1330
|
+
this._slots = ['background', 'geoPoint', 'selfExpires'];
|
|
1291
1331
|
this.background = params.background;
|
|
1292
1332
|
this.geoPoint = params.geoPoint;
|
|
1293
1333
|
this.selfExpires = params.selfExpires;
|
|
1294
1334
|
}
|
|
1295
1335
|
/**
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1336
|
+
* Generate the TLObject from buffer.
|
|
1337
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1338
|
+
*/
|
|
1299
1339
|
static async read(_data, ..._args) {
|
|
1300
1340
|
// @ts-ignore
|
|
1301
1341
|
let flags = await Primitive.Int.read(_data);
|
|
1302
|
-
let background =
|
|
1342
|
+
let background = flags & (1 << 1) ? true : false;
|
|
1303
1343
|
let geoPoint = await TLObject.read(_data);
|
|
1304
|
-
let selfExpires =
|
|
1305
|
-
return new GetLocated({
|
|
1344
|
+
let selfExpires = flags & (1 << 0) ? await Primitive.Int.read(_data) : undefined;
|
|
1345
|
+
return new GetLocated({ background: background, geoPoint: geoPoint, selfExpires: selfExpires });
|
|
1306
1346
|
}
|
|
1307
1347
|
/**
|
|
1308
|
-
|
|
1309
|
-
|
|
1348
|
+
* Generate buffer from TLObject.
|
|
1349
|
+
*/
|
|
1310
1350
|
write() {
|
|
1311
1351
|
const b = new BytesIO();
|
|
1312
1352
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1313
1353
|
// @ts-ignore
|
|
1314
1354
|
let flags = 0;
|
|
1315
|
-
flags |= this.background ?
|
|
1316
|
-
flags |= this.selfExpires !== undefined ?
|
|
1317
|
-
b.write(
|
|
1355
|
+
flags |= this.background ? 1 << 1 : 0;
|
|
1356
|
+
flags |= this.selfExpires !== undefined ? 1 << 0 : 0;
|
|
1357
|
+
b.write(Primitive.Int.write(flags));
|
|
1318
1358
|
if (this.geoPoint !== undefined) {
|
|
1319
1359
|
b.write(this.geoPoint.write());
|
|
1320
1360
|
}
|
|
1321
1361
|
if (this.selfExpires !== undefined) {
|
|
1322
|
-
b.write(
|
|
1362
|
+
b.write(Primitive.Int.write(this.selfExpires));
|
|
1323
1363
|
}
|
|
1324
1364
|
return b.buffer;
|
|
1325
1365
|
}
|
|
@@ -1332,43 +1372,48 @@ export class BlockFromReplies extends TLObject {
|
|
|
1332
1372
|
msgId;
|
|
1333
1373
|
constructor(params) {
|
|
1334
1374
|
super();
|
|
1335
|
-
this.classType =
|
|
1336
|
-
this.className =
|
|
1375
|
+
this.classType = 'functions';
|
|
1376
|
+
this.className = 'contacts.BlockFromReplies';
|
|
1337
1377
|
this.constructorId = 0x29a8962c;
|
|
1338
1378
|
this.subclassOfId = 0x8af52aac;
|
|
1339
|
-
this._slots = [
|
|
1379
|
+
this._slots = ['deleteMessage', 'deleteHistory', 'reportSpam', 'msgId'];
|
|
1340
1380
|
this.deleteMessage = params.deleteMessage;
|
|
1341
1381
|
this.deleteHistory = params.deleteHistory;
|
|
1342
1382
|
this.reportSpam = params.reportSpam;
|
|
1343
1383
|
this.msgId = params.msgId;
|
|
1344
1384
|
}
|
|
1345
1385
|
/**
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1386
|
+
* Generate the TLObject from buffer.
|
|
1387
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1388
|
+
*/
|
|
1349
1389
|
static async read(_data, ..._args) {
|
|
1350
1390
|
// @ts-ignore
|
|
1351
1391
|
let flags = await Primitive.Int.read(_data);
|
|
1352
|
-
let deleteMessage =
|
|
1353
|
-
let deleteHistory =
|
|
1354
|
-
let reportSpam =
|
|
1392
|
+
let deleteMessage = flags & (1 << 0) ? true : false;
|
|
1393
|
+
let deleteHistory = flags & (1 << 1) ? true : false;
|
|
1394
|
+
let reportSpam = flags & (1 << 2) ? true : false;
|
|
1355
1395
|
let msgId = await Primitive.Int.read(_data);
|
|
1356
|
-
return new BlockFromReplies({
|
|
1396
|
+
return new BlockFromReplies({
|
|
1397
|
+
deleteMessage: deleteMessage,
|
|
1398
|
+
deleteHistory: deleteHistory,
|
|
1399
|
+
reportSpam: reportSpam,
|
|
1400
|
+
msgId: msgId,
|
|
1401
|
+
});
|
|
1357
1402
|
}
|
|
1358
1403
|
/**
|
|
1359
|
-
|
|
1360
|
-
|
|
1404
|
+
* Generate buffer from TLObject.
|
|
1405
|
+
*/
|
|
1361
1406
|
write() {
|
|
1362
1407
|
const b = new BytesIO();
|
|
1363
1408
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1364
1409
|
// @ts-ignore
|
|
1365
1410
|
let flags = 0;
|
|
1366
|
-
flags |= this.deleteMessage ?
|
|
1367
|
-
flags |= this.deleteHistory ?
|
|
1368
|
-
flags |= this.reportSpam ?
|
|
1369
|
-
b.write(
|
|
1411
|
+
flags |= this.deleteMessage ? 1 << 0 : 0;
|
|
1412
|
+
flags |= this.deleteHistory ? 1 << 1 : 0;
|
|
1413
|
+
flags |= this.reportSpam ? 1 << 2 : 0;
|
|
1414
|
+
b.write(Primitive.Int.write(flags));
|
|
1370
1415
|
if (this.msgId !== undefined) {
|
|
1371
|
-
b.write(
|
|
1416
|
+
b.write(Primitive.Int.write(this.msgId));
|
|
1372
1417
|
}
|
|
1373
1418
|
return b.buffer;
|
|
1374
1419
|
}
|
|
@@ -1378,31 +1423,31 @@ export class ResolvePhone extends TLObject {
|
|
|
1378
1423
|
phone;
|
|
1379
1424
|
constructor(params) {
|
|
1380
1425
|
super();
|
|
1381
|
-
this.classType =
|
|
1382
|
-
this.className =
|
|
1426
|
+
this.classType = 'functions';
|
|
1427
|
+
this.className = 'contacts.ResolvePhone';
|
|
1383
1428
|
this.constructorId = 0x8af94344;
|
|
1384
1429
|
this.subclassOfId = 0xf065b3a8;
|
|
1385
|
-
this._slots = [
|
|
1430
|
+
this._slots = ['phone'];
|
|
1386
1431
|
this.phone = params.phone;
|
|
1387
1432
|
}
|
|
1388
1433
|
/**
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1434
|
+
* Generate the TLObject from buffer.
|
|
1435
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1436
|
+
*/
|
|
1392
1437
|
static async read(_data, ..._args) {
|
|
1393
1438
|
// no flags
|
|
1394
1439
|
let phone = await Primitive.String.read(_data);
|
|
1395
|
-
return new ResolvePhone({
|
|
1440
|
+
return new ResolvePhone({ phone: phone });
|
|
1396
1441
|
}
|
|
1397
1442
|
/**
|
|
1398
|
-
|
|
1399
|
-
|
|
1443
|
+
* Generate buffer from TLObject.
|
|
1444
|
+
*/
|
|
1400
1445
|
write() {
|
|
1401
1446
|
const b = new BytesIO();
|
|
1402
1447
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1403
1448
|
// no flags
|
|
1404
1449
|
if (this.phone !== undefined) {
|
|
1405
|
-
b.write(
|
|
1450
|
+
b.write(Primitive.String.write(this.phone));
|
|
1406
1451
|
}
|
|
1407
1452
|
return b.buffer;
|
|
1408
1453
|
}
|
|
@@ -1411,23 +1456,23 @@ export class ExportContactToken extends TLObject {
|
|
|
1411
1456
|
__response__;
|
|
1412
1457
|
constructor() {
|
|
1413
1458
|
super();
|
|
1414
|
-
this.classType =
|
|
1415
|
-
this.className =
|
|
1459
|
+
this.classType = 'functions';
|
|
1460
|
+
this.className = 'contacts.ExportContactToken';
|
|
1416
1461
|
this.constructorId = 0xf8654027;
|
|
1417
1462
|
this.subclassOfId = 0x86ddbed1;
|
|
1418
1463
|
this._slots = [];
|
|
1419
1464
|
}
|
|
1420
1465
|
/**
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1466
|
+
* Generate the TLObject from buffer.
|
|
1467
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1468
|
+
*/
|
|
1424
1469
|
static async read(_data, ..._args) {
|
|
1425
1470
|
// no flags
|
|
1426
1471
|
return new ExportContactToken();
|
|
1427
1472
|
}
|
|
1428
1473
|
/**
|
|
1429
|
-
|
|
1430
|
-
|
|
1474
|
+
* Generate buffer from TLObject.
|
|
1475
|
+
*/
|
|
1431
1476
|
write() {
|
|
1432
1477
|
const b = new BytesIO();
|
|
1433
1478
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1440,31 +1485,31 @@ export class ImportContactToken extends TLObject {
|
|
|
1440
1485
|
token;
|
|
1441
1486
|
constructor(params) {
|
|
1442
1487
|
super();
|
|
1443
|
-
this.classType =
|
|
1444
|
-
this.className =
|
|
1488
|
+
this.classType = 'functions';
|
|
1489
|
+
this.className = 'contacts.ImportContactToken';
|
|
1445
1490
|
this.constructorId = 0x13005788;
|
|
1446
1491
|
this.subclassOfId = 0x2da17977;
|
|
1447
|
-
this._slots = [
|
|
1492
|
+
this._slots = ['token'];
|
|
1448
1493
|
this.token = params.token;
|
|
1449
1494
|
}
|
|
1450
1495
|
/**
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1496
|
+
* Generate the TLObject from buffer.
|
|
1497
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1498
|
+
*/
|
|
1454
1499
|
static async read(_data, ..._args) {
|
|
1455
1500
|
// no flags
|
|
1456
1501
|
let token = await Primitive.String.read(_data);
|
|
1457
|
-
return new ImportContactToken({
|
|
1502
|
+
return new ImportContactToken({ token: token });
|
|
1458
1503
|
}
|
|
1459
1504
|
/**
|
|
1460
|
-
|
|
1461
|
-
|
|
1505
|
+
* Generate buffer from TLObject.
|
|
1506
|
+
*/
|
|
1462
1507
|
write() {
|
|
1463
1508
|
const b = new BytesIO();
|
|
1464
1509
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1465
1510
|
// no flags
|
|
1466
1511
|
if (this.token !== undefined) {
|
|
1467
|
-
b.write(
|
|
1512
|
+
b.write(Primitive.String.write(this.token));
|
|
1468
1513
|
}
|
|
1469
1514
|
return b.buffer;
|
|
1470
1515
|
}
|
|
@@ -1474,31 +1519,31 @@ export class EditCloseFriends extends TLObject {
|
|
|
1474
1519
|
id;
|
|
1475
1520
|
constructor(params) {
|
|
1476
1521
|
super();
|
|
1477
|
-
this.classType =
|
|
1478
|
-
this.className =
|
|
1522
|
+
this.classType = 'functions';
|
|
1523
|
+
this.className = 'contacts.EditCloseFriends';
|
|
1479
1524
|
this.constructorId = 0xba6705f0;
|
|
1480
1525
|
this.subclassOfId = 0xf5b399ac;
|
|
1481
|
-
this._slots = [
|
|
1526
|
+
this._slots = ['id'];
|
|
1482
1527
|
this.id = params.id;
|
|
1483
1528
|
}
|
|
1484
1529
|
/**
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1530
|
+
* Generate the TLObject from buffer.
|
|
1531
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1532
|
+
*/
|
|
1488
1533
|
static async read(_data, ..._args) {
|
|
1489
1534
|
// no flags
|
|
1490
1535
|
let id = await TLObject.read(_data, Primitive.Long);
|
|
1491
|
-
return new EditCloseFriends({
|
|
1536
|
+
return new EditCloseFriends({ id: id });
|
|
1492
1537
|
}
|
|
1493
1538
|
/**
|
|
1494
|
-
|
|
1495
|
-
|
|
1539
|
+
* Generate buffer from TLObject.
|
|
1540
|
+
*/
|
|
1496
1541
|
write() {
|
|
1497
1542
|
const b = new BytesIO();
|
|
1498
1543
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1499
1544
|
// no flags
|
|
1500
1545
|
if (this.id) {
|
|
1501
|
-
b.write(
|
|
1546
|
+
b.write(Primitive.Vector.write(this.id, Primitive.Long));
|
|
1502
1547
|
}
|
|
1503
1548
|
return b.buffer;
|
|
1504
1549
|
}
|
|
@@ -1510,42 +1555,42 @@ export class SetBlocked extends TLObject {
|
|
|
1510
1555
|
limit;
|
|
1511
1556
|
constructor(params) {
|
|
1512
1557
|
super();
|
|
1513
|
-
this.classType =
|
|
1514
|
-
this.className =
|
|
1558
|
+
this.classType = 'functions';
|
|
1559
|
+
this.className = 'contacts.SetBlocked';
|
|
1515
1560
|
this.constructorId = 0x94c65c76;
|
|
1516
1561
|
this.subclassOfId = 0xf5b399ac;
|
|
1517
|
-
this._slots = [
|
|
1562
|
+
this._slots = ['myStoriesFrom', 'id', 'limit'];
|
|
1518
1563
|
this.myStoriesFrom = params.myStoriesFrom;
|
|
1519
1564
|
this.id = params.id;
|
|
1520
1565
|
this.limit = params.limit;
|
|
1521
1566
|
}
|
|
1522
1567
|
/**
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1568
|
+
* Generate the TLObject from buffer.
|
|
1569
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1570
|
+
*/
|
|
1526
1571
|
static async read(_data, ..._args) {
|
|
1527
1572
|
// @ts-ignore
|
|
1528
1573
|
let flags = await Primitive.Int.read(_data);
|
|
1529
|
-
let myStoriesFrom =
|
|
1574
|
+
let myStoriesFrom = flags & (1 << 0) ? true : false;
|
|
1530
1575
|
let id = await TLObject.read(_data);
|
|
1531
1576
|
let limit = await Primitive.Int.read(_data);
|
|
1532
|
-
return new SetBlocked({
|
|
1577
|
+
return new SetBlocked({ myStoriesFrom: myStoriesFrom, id: id, limit: limit });
|
|
1533
1578
|
}
|
|
1534
1579
|
/**
|
|
1535
|
-
|
|
1536
|
-
|
|
1580
|
+
* Generate buffer from TLObject.
|
|
1581
|
+
*/
|
|
1537
1582
|
write() {
|
|
1538
1583
|
const b = new BytesIO();
|
|
1539
1584
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1540
1585
|
// @ts-ignore
|
|
1541
1586
|
let flags = 0;
|
|
1542
|
-
flags |= this.myStoriesFrom ?
|
|
1543
|
-
b.write(
|
|
1587
|
+
flags |= this.myStoriesFrom ? 1 << 0 : 0;
|
|
1588
|
+
b.write(Primitive.Int.write(flags));
|
|
1544
1589
|
if (this.id) {
|
|
1545
|
-
b.write(
|
|
1590
|
+
b.write(Primitive.Vector.write(this.id));
|
|
1546
1591
|
}
|
|
1547
1592
|
if (this.limit !== undefined) {
|
|
1548
|
-
b.write(
|
|
1593
|
+
b.write(Primitive.Int.write(this.limit));
|
|
1549
1594
|
}
|
|
1550
1595
|
return b.buffer;
|
|
1551
1596
|
}
|
|
@@ -1554,23 +1599,23 @@ export class GetBirthdays extends TLObject {
|
|
|
1554
1599
|
__response__;
|
|
1555
1600
|
constructor() {
|
|
1556
1601
|
super();
|
|
1557
|
-
this.classType =
|
|
1558
|
-
this.className =
|
|
1602
|
+
this.classType = 'functions';
|
|
1603
|
+
this.className = 'contacts.GetBirthdays';
|
|
1559
1604
|
this.constructorId = 0xdaeda864;
|
|
1560
1605
|
this.subclassOfId = 0xe7aabff;
|
|
1561
1606
|
this._slots = [];
|
|
1562
1607
|
}
|
|
1563
1608
|
/**
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1609
|
+
* Generate the TLObject from buffer.
|
|
1610
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1611
|
+
*/
|
|
1567
1612
|
static async read(_data, ..._args) {
|
|
1568
1613
|
// no flags
|
|
1569
1614
|
return new GetBirthdays();
|
|
1570
1615
|
}
|
|
1571
1616
|
/**
|
|
1572
|
-
|
|
1573
|
-
|
|
1617
|
+
* Generate buffer from TLObject.
|
|
1618
|
+
*/
|
|
1574
1619
|
write() {
|
|
1575
1620
|
const b = new BytesIO();
|
|
1576
1621
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1583,31 +1628,31 @@ export class GetSponsoredPeers extends TLObject {
|
|
|
1583
1628
|
q;
|
|
1584
1629
|
constructor(params) {
|
|
1585
1630
|
super();
|
|
1586
|
-
this.classType =
|
|
1587
|
-
this.className =
|
|
1631
|
+
this.classType = 'functions';
|
|
1632
|
+
this.className = 'contacts.GetSponsoredPeers';
|
|
1588
1633
|
this.constructorId = 0xb6c8c393;
|
|
1589
1634
|
this.subclassOfId = 0xb45d5ccc;
|
|
1590
|
-
this._slots = [
|
|
1635
|
+
this._slots = ['q'];
|
|
1591
1636
|
this.q = params.q;
|
|
1592
1637
|
}
|
|
1593
1638
|
/**
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1639
|
+
* Generate the TLObject from buffer.
|
|
1640
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1641
|
+
*/
|
|
1597
1642
|
static async read(_data, ..._args) {
|
|
1598
1643
|
// no flags
|
|
1599
1644
|
let q = await Primitive.String.read(_data);
|
|
1600
|
-
return new GetSponsoredPeers({
|
|
1645
|
+
return new GetSponsoredPeers({ q: q });
|
|
1601
1646
|
}
|
|
1602
1647
|
/**
|
|
1603
|
-
|
|
1604
|
-
|
|
1648
|
+
* Generate buffer from TLObject.
|
|
1649
|
+
*/
|
|
1605
1650
|
write() {
|
|
1606
1651
|
const b = new BytesIO();
|
|
1607
1652
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1608
1653
|
// no flags
|
|
1609
1654
|
if (this.q !== undefined) {
|
|
1610
|
-
b.write(
|
|
1655
|
+
b.write(Primitive.String.write(this.q));
|
|
1611
1656
|
}
|
|
1612
1657
|
return b.buffer;
|
|
1613
1658
|
}
|
|
@@ -1618,27 +1663,27 @@ export class UpdateContactNote extends TLObject {
|
|
|
1618
1663
|
note;
|
|
1619
1664
|
constructor(params) {
|
|
1620
1665
|
super();
|
|
1621
|
-
this.classType =
|
|
1622
|
-
this.className =
|
|
1666
|
+
this.classType = 'functions';
|
|
1667
|
+
this.className = 'contacts.UpdateContactNote';
|
|
1623
1668
|
this.constructorId = 0x139f63fb;
|
|
1624
1669
|
this.subclassOfId = 0xf5b399ac;
|
|
1625
|
-
this._slots = [
|
|
1670
|
+
this._slots = ['id', 'note'];
|
|
1626
1671
|
this.id = params.id;
|
|
1627
1672
|
this.note = params.note;
|
|
1628
1673
|
}
|
|
1629
1674
|
/**
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1675
|
+
* Generate the TLObject from buffer.
|
|
1676
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1677
|
+
*/
|
|
1633
1678
|
static async read(_data, ..._args) {
|
|
1634
1679
|
// no flags
|
|
1635
1680
|
let id = await TLObject.read(_data);
|
|
1636
1681
|
let note = await TLObject.read(_data);
|
|
1637
|
-
return new UpdateContactNote({
|
|
1682
|
+
return new UpdateContactNote({ id: id, note: note });
|
|
1638
1683
|
}
|
|
1639
1684
|
/**
|
|
1640
|
-
|
|
1641
|
-
|
|
1685
|
+
* Generate buffer from TLObject.
|
|
1686
|
+
*/
|
|
1642
1687
|
write() {
|
|
1643
1688
|
const b = new BytesIO();
|
|
1644
1689
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1658,36 +1703,36 @@ export class ExportNoPaidMessagesToken extends TLObject {
|
|
|
1658
1703
|
temporary;
|
|
1659
1704
|
constructor(params) {
|
|
1660
1705
|
super();
|
|
1661
|
-
this.classType =
|
|
1662
|
-
this.className =
|
|
1706
|
+
this.classType = 'functions';
|
|
1707
|
+
this.className = 'contacts.ExportNoPaidMessagesToken';
|
|
1663
1708
|
this.constructorId = 0x83c586ae;
|
|
1664
1709
|
this.subclassOfId = 0xa13294f0;
|
|
1665
|
-
this._slots = [
|
|
1710
|
+
this._slots = ['revoke', 'temporary'];
|
|
1666
1711
|
this.revoke = params.revoke;
|
|
1667
1712
|
this.temporary = params.temporary;
|
|
1668
1713
|
}
|
|
1669
1714
|
/**
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1715
|
+
* Generate the TLObject from buffer.
|
|
1716
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1717
|
+
*/
|
|
1673
1718
|
static async read(_data, ..._args) {
|
|
1674
1719
|
// @ts-ignore
|
|
1675
1720
|
let flags = await Primitive.Int.read(_data);
|
|
1676
|
-
let revoke =
|
|
1677
|
-
let temporary =
|
|
1678
|
-
return new ExportNoPaidMessagesToken({
|
|
1721
|
+
let revoke = flags & (1 << 0) ? true : false;
|
|
1722
|
+
let temporary = flags & (1 << 1) ? true : false;
|
|
1723
|
+
return new ExportNoPaidMessagesToken({ revoke: revoke, temporary: temporary });
|
|
1679
1724
|
}
|
|
1680
1725
|
/**
|
|
1681
|
-
|
|
1682
|
-
|
|
1726
|
+
* Generate buffer from TLObject.
|
|
1727
|
+
*/
|
|
1683
1728
|
write() {
|
|
1684
1729
|
const b = new BytesIO();
|
|
1685
1730
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1686
1731
|
// @ts-ignore
|
|
1687
1732
|
let flags = 0;
|
|
1688
|
-
flags |= this.revoke ?
|
|
1689
|
-
flags |= this.temporary ?
|
|
1690
|
-
b.write(
|
|
1733
|
+
flags |= this.revoke ? 1 << 0 : 0;
|
|
1734
|
+
flags |= this.temporary ? 1 << 1 : 0;
|
|
1735
|
+
b.write(Primitive.Int.write(flags));
|
|
1691
1736
|
return b.buffer;
|
|
1692
1737
|
}
|
|
1693
1738
|
}
|
|
@@ -1697,27 +1742,27 @@ export class ImportNoPaidMessagesToken extends TLObject {
|
|
|
1697
1742
|
token;
|
|
1698
1743
|
constructor(params) {
|
|
1699
1744
|
super();
|
|
1700
|
-
this.classType =
|
|
1701
|
-
this.className =
|
|
1745
|
+
this.classType = 'functions';
|
|
1746
|
+
this.className = 'contacts.ImportNoPaidMessagesToken';
|
|
1702
1747
|
this.constructorId = 0x35a7c6ca;
|
|
1703
1748
|
this.subclassOfId = 0x2da17977;
|
|
1704
|
-
this._slots = [
|
|
1749
|
+
this._slots = ['userId', 'token'];
|
|
1705
1750
|
this.userId = params.userId;
|
|
1706
1751
|
this.token = params.token;
|
|
1707
1752
|
}
|
|
1708
1753
|
/**
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1754
|
+
* Generate the TLObject from buffer.
|
|
1755
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1756
|
+
*/
|
|
1712
1757
|
static async read(_data, ..._args) {
|
|
1713
1758
|
// no flags
|
|
1714
1759
|
let userId = await TLObject.read(_data);
|
|
1715
1760
|
let token = await Primitive.String.read(_data);
|
|
1716
|
-
return new ImportNoPaidMessagesToken({
|
|
1761
|
+
return new ImportNoPaidMessagesToken({ userId: userId, token: token });
|
|
1717
1762
|
}
|
|
1718
1763
|
/**
|
|
1719
|
-
|
|
1720
|
-
|
|
1764
|
+
* Generate buffer from TLObject.
|
|
1765
|
+
*/
|
|
1721
1766
|
write() {
|
|
1722
1767
|
const b = new BytesIO();
|
|
1723
1768
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1726,7 +1771,7 @@ export class ImportNoPaidMessagesToken extends TLObject {
|
|
|
1726
1771
|
b.write(this.userId.write());
|
|
1727
1772
|
}
|
|
1728
1773
|
if (this.token !== undefined) {
|
|
1729
|
-
b.write(
|
|
1774
|
+
b.write(Primitive.String.write(this.token));
|
|
1730
1775
|
}
|
|
1731
1776
|
return b.buffer;
|
|
1732
1777
|
}
|