@tgsnake/skema 3.2.1-browser.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2783 -2783
- package/dist/src/raw/class/Raw.d.ts +7601 -7601
- package/dist/src/raw/class/Raw.js +20676 -26781
- 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 +256 -256
- package/dist/src/raw/class/tl/bots.js +607 -661
- package/dist/src/raw/class/tl/channels.d.ts +336 -336
- package/dist/src/raw/class/tl/channels.js +745 -836
- 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/feed.d.ts +71 -71
- package/dist/src/raw/class/tl/feed.js +179 -214
- 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 +1866 -1866
- package/dist/src/raw/class/tl/messages.js +4886 -5965
- package/dist/src/raw/class/tl/payments.d.ts +646 -646
- package/dist/src/raw/class/tl/payments.js +1766 -2254
- 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 +221 -221
- package/dist/src/raw/class/tl/wallet.js +558 -624
- 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';
|
|
@@ -16,41 +16,41 @@ export class ConfigSimple extends TLObject {
|
|
|
16
16
|
rules;
|
|
17
17
|
constructor(params) {
|
|
18
18
|
super();
|
|
19
|
-
this.classType =
|
|
20
|
-
this.className =
|
|
19
|
+
this.classType = "types";
|
|
20
|
+
this.className = "help.ConfigSimple";
|
|
21
21
|
this.constructorId = 0x5a592a6c;
|
|
22
22
|
this.subclassOfId = 0x29183ac4;
|
|
23
|
-
this._slots = [
|
|
23
|
+
this._slots = ["date", "expires", "rules"];
|
|
24
24
|
this.date = params.date;
|
|
25
25
|
this.expires = params.expires;
|
|
26
26
|
this.rules = params.rules;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
* Generate the TLObject from buffer.
|
|
30
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
31
|
+
*/
|
|
32
32
|
static async read(_data, ..._args) {
|
|
33
33
|
// no flags
|
|
34
34
|
let date = await Primitive.Int.read(_data);
|
|
35
35
|
let expires = await Primitive.Int.read(_data);
|
|
36
36
|
let rules = await TLObject.read(_data);
|
|
37
|
-
return new ConfigSimple({ date: date, expires: expires, rules: rules });
|
|
37
|
+
return new ConfigSimple({ "date": date, "expires": expires, "rules": rules });
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
* Generate buffer from TLObject.
|
|
41
|
+
*/
|
|
42
42
|
write() {
|
|
43
43
|
const b = new BytesIO();
|
|
44
44
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
45
45
|
// no flags
|
|
46
46
|
if (this.date !== undefined) {
|
|
47
|
-
b.write(Primitive.Int.write(this.date));
|
|
47
|
+
b.write((Primitive.Int.write(this.date)));
|
|
48
48
|
}
|
|
49
49
|
if (this.expires !== undefined) {
|
|
50
|
-
b.write(Primitive.Int.write(this.expires));
|
|
50
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
51
51
|
}
|
|
52
52
|
if (this.rules) {
|
|
53
|
-
b.write(Primitive.Vector.write(this.rules));
|
|
53
|
+
b.write((Primitive.Vector.write(this.rules)));
|
|
54
54
|
}
|
|
55
55
|
return b.buffer;
|
|
56
56
|
}
|
|
@@ -66,11 +66,11 @@ export class AppUpdate extends TLObject {
|
|
|
66
66
|
sticker;
|
|
67
67
|
constructor(params) {
|
|
68
68
|
super();
|
|
69
|
-
this.classType =
|
|
70
|
-
this.className =
|
|
69
|
+
this.classType = "types";
|
|
70
|
+
this.className = "help.AppUpdate";
|
|
71
71
|
this.constructorId = 0xccbbce30;
|
|
72
72
|
this.subclassOfId = 0x5897069e;
|
|
73
|
-
this._slots = [
|
|
73
|
+
this._slots = ["canNotSkip", "id", "version", "text", "entities", "document", "url", "sticker"];
|
|
74
74
|
this.canNotSkip = params.canNotSkip;
|
|
75
75
|
this.id = params.id;
|
|
76
76
|
this.version = params.version;
|
|
@@ -81,61 +81,52 @@ export class AppUpdate extends TLObject {
|
|
|
81
81
|
this.sticker = params.sticker;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
* Generate the TLObject from buffer.
|
|
85
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
86
|
+
*/
|
|
87
87
|
static async read(_data, ..._args) {
|
|
88
88
|
// @ts-ignore
|
|
89
89
|
let flags = await Primitive.Int.read(_data);
|
|
90
|
-
let canNotSkip = flags & (1 << 0) ? true : false;
|
|
90
|
+
let canNotSkip = (flags & (1 << 0)) ? true : false;
|
|
91
91
|
let id = await Primitive.Int.read(_data);
|
|
92
92
|
let version = await Primitive.String.read(_data);
|
|
93
93
|
let text = await Primitive.String.read(_data);
|
|
94
94
|
let entities = await TLObject.read(_data);
|
|
95
|
-
let document = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
96
|
-
let url = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
|
|
97
|
-
let sticker = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
98
|
-
return new AppUpdate({
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
entities: entities,
|
|
104
|
-
document: document,
|
|
105
|
-
url: url,
|
|
106
|
-
sticker: sticker,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Generate buffer from TLObject.
|
|
111
|
-
*/
|
|
95
|
+
let document = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
|
|
96
|
+
let url = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
|
|
97
|
+
let sticker = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
|
|
98
|
+
return new AppUpdate({ "canNotSkip": canNotSkip, "id": id, "version": version, "text": text, "entities": entities, "document": document, "url": url, "sticker": sticker });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Generate buffer from TLObject.
|
|
102
|
+
*/
|
|
112
103
|
write() {
|
|
113
104
|
const b = new BytesIO();
|
|
114
105
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
115
106
|
// @ts-ignore
|
|
116
107
|
let flags = 0;
|
|
117
|
-
flags |= this.canNotSkip ? 1 << 0 : 0;
|
|
118
|
-
flags |= this.document !== undefined ? 1 << 1 : 0;
|
|
119
|
-
flags |= this.url !== undefined ? 1 << 2 : 0;
|
|
120
|
-
flags |= this.sticker !== undefined ? 1 << 3 : 0;
|
|
121
|
-
b.write(Primitive.Int.write(flags));
|
|
108
|
+
flags |= this.canNotSkip ? (1 << 0) : 0;
|
|
109
|
+
flags |= this.document !== undefined ? (1 << 1) : 0;
|
|
110
|
+
flags |= this.url !== undefined ? (1 << 2) : 0;
|
|
111
|
+
flags |= this.sticker !== undefined ? (1 << 3) : 0;
|
|
112
|
+
b.write((Primitive.Int.write(flags)));
|
|
122
113
|
if (this.id !== undefined) {
|
|
123
|
-
b.write(Primitive.Int.write(this.id));
|
|
114
|
+
b.write((Primitive.Int.write(this.id)));
|
|
124
115
|
}
|
|
125
116
|
if (this.version !== undefined) {
|
|
126
|
-
b.write(Primitive.String.write(this.version));
|
|
117
|
+
b.write((Primitive.String.write(this.version)));
|
|
127
118
|
}
|
|
128
119
|
if (this.text !== undefined) {
|
|
129
|
-
b.write(Primitive.String.write(this.text));
|
|
120
|
+
b.write((Primitive.String.write(this.text)));
|
|
130
121
|
}
|
|
131
122
|
if (this.entities) {
|
|
132
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
123
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
133
124
|
}
|
|
134
125
|
if (this.document !== undefined) {
|
|
135
126
|
b.write(this.document.write());
|
|
136
127
|
}
|
|
137
128
|
if (this.url !== undefined) {
|
|
138
|
-
b.write(Primitive.String.write(this.url));
|
|
129
|
+
b.write((Primitive.String.write(this.url)));
|
|
139
130
|
}
|
|
140
131
|
if (this.sticker !== undefined) {
|
|
141
132
|
b.write(this.sticker.write());
|
|
@@ -146,23 +137,23 @@ export class AppUpdate extends TLObject {
|
|
|
146
137
|
export class NoAppUpdate extends TLObject {
|
|
147
138
|
constructor() {
|
|
148
139
|
super();
|
|
149
|
-
this.classType =
|
|
150
|
-
this.className =
|
|
140
|
+
this.classType = "types";
|
|
141
|
+
this.className = "help.NoAppUpdate";
|
|
151
142
|
this.constructorId = 0xc45a6536;
|
|
152
143
|
this.subclassOfId = 0x5897069e;
|
|
153
144
|
this._slots = [];
|
|
154
145
|
}
|
|
155
146
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
147
|
+
* Generate the TLObject from buffer.
|
|
148
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
149
|
+
*/
|
|
159
150
|
static async read(_data, ..._args) {
|
|
160
151
|
// no flags
|
|
161
152
|
return new NoAppUpdate();
|
|
162
153
|
}
|
|
163
154
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
* Generate buffer from TLObject.
|
|
156
|
+
*/
|
|
166
157
|
write() {
|
|
167
158
|
const b = new BytesIO();
|
|
168
159
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -174,31 +165,31 @@ export class InviteText extends TLObject {
|
|
|
174
165
|
message;
|
|
175
166
|
constructor(params) {
|
|
176
167
|
super();
|
|
177
|
-
this.classType =
|
|
178
|
-
this.className =
|
|
168
|
+
this.classType = "types";
|
|
169
|
+
this.className = "help.InviteText";
|
|
179
170
|
this.constructorId = 0x18cb9f78;
|
|
180
171
|
this.subclassOfId = 0xcf70aa35;
|
|
181
|
-
this._slots = [
|
|
172
|
+
this._slots = ["message"];
|
|
182
173
|
this.message = params.message;
|
|
183
174
|
}
|
|
184
175
|
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
176
|
+
* Generate the TLObject from buffer.
|
|
177
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
178
|
+
*/
|
|
188
179
|
static async read(_data, ..._args) {
|
|
189
180
|
// no flags
|
|
190
181
|
let message = await Primitive.String.read(_data);
|
|
191
|
-
return new InviteText({ message: message });
|
|
182
|
+
return new InviteText({ "message": message });
|
|
192
183
|
}
|
|
193
184
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
185
|
+
* Generate buffer from TLObject.
|
|
186
|
+
*/
|
|
196
187
|
write() {
|
|
197
188
|
const b = new BytesIO();
|
|
198
189
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
199
190
|
// no flags
|
|
200
191
|
if (this.message !== undefined) {
|
|
201
|
-
b.write(Primitive.String.write(this.message));
|
|
192
|
+
b.write((Primitive.String.write(this.message)));
|
|
202
193
|
}
|
|
203
194
|
return b.buffer;
|
|
204
195
|
}
|
|
@@ -208,33 +199,33 @@ export class Support extends TLObject {
|
|
|
208
199
|
user;
|
|
209
200
|
constructor(params) {
|
|
210
201
|
super();
|
|
211
|
-
this.classType =
|
|
212
|
-
this.className =
|
|
202
|
+
this.classType = "types";
|
|
203
|
+
this.className = "help.Support";
|
|
213
204
|
this.constructorId = 0x17c6b5f6;
|
|
214
205
|
this.subclassOfId = 0x7159bceb;
|
|
215
|
-
this._slots = [
|
|
206
|
+
this._slots = ["phoneNumber", "user"];
|
|
216
207
|
this.phoneNumber = params.phoneNumber;
|
|
217
208
|
this.user = params.user;
|
|
218
209
|
}
|
|
219
210
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
211
|
+
* Generate the TLObject from buffer.
|
|
212
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
213
|
+
*/
|
|
223
214
|
static async read(_data, ..._args) {
|
|
224
215
|
// no flags
|
|
225
216
|
let phoneNumber = await Primitive.String.read(_data);
|
|
226
217
|
let user = await TLObject.read(_data);
|
|
227
|
-
return new Support({ phoneNumber: phoneNumber, user: user });
|
|
218
|
+
return new Support({ "phoneNumber": phoneNumber, "user": user });
|
|
228
219
|
}
|
|
229
220
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
221
|
+
* Generate buffer from TLObject.
|
|
222
|
+
*/
|
|
232
223
|
write() {
|
|
233
224
|
const b = new BytesIO();
|
|
234
225
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
235
226
|
// no flags
|
|
236
227
|
if (this.phoneNumber !== undefined) {
|
|
237
|
-
b.write(Primitive.String.write(this.phoneNumber));
|
|
228
|
+
b.write((Primitive.String.write(this.phoneNumber)));
|
|
238
229
|
}
|
|
239
230
|
if (this.user !== undefined) {
|
|
240
231
|
b.write(this.user.write());
|
|
@@ -250,11 +241,11 @@ export class TermsOfService extends TLObject {
|
|
|
250
241
|
minAgeConfirm;
|
|
251
242
|
constructor(params) {
|
|
252
243
|
super();
|
|
253
|
-
this.classType =
|
|
254
|
-
this.className =
|
|
244
|
+
this.classType = "types";
|
|
245
|
+
this.className = "help.TermsOfService";
|
|
255
246
|
this.constructorId = 0x780a0310;
|
|
256
247
|
this.subclassOfId = 0x20ee8312;
|
|
257
|
-
this._slots = [
|
|
248
|
+
this._slots = ["popup", "id", "text", "entities", "minAgeConfirm"];
|
|
258
249
|
this.popup = params.popup;
|
|
259
250
|
this.id = params.id;
|
|
260
251
|
this.text = params.text;
|
|
@@ -262,47 +253,41 @@ export class TermsOfService extends TLObject {
|
|
|
262
253
|
this.minAgeConfirm = params.minAgeConfirm;
|
|
263
254
|
}
|
|
264
255
|
/**
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
256
|
+
* Generate the TLObject from buffer.
|
|
257
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
258
|
+
*/
|
|
268
259
|
static async read(_data, ..._args) {
|
|
269
260
|
// @ts-ignore
|
|
270
261
|
let flags = await Primitive.Int.read(_data);
|
|
271
|
-
let popup = flags & (1 << 0) ? true : false;
|
|
262
|
+
let popup = (flags & (1 << 0)) ? true : false;
|
|
272
263
|
let id = await TLObject.read(_data);
|
|
273
264
|
let text = await Primitive.String.read(_data);
|
|
274
265
|
let entities = await TLObject.read(_data);
|
|
275
|
-
let minAgeConfirm = flags & (1 << 1) ? await Primitive.Int.read(_data) : undefined;
|
|
276
|
-
return new TermsOfService({
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
minAgeConfirm: minAgeConfirm,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Generate buffer from TLObject.
|
|
286
|
-
*/
|
|
266
|
+
let minAgeConfirm = (flags & (1 << 1)) ? await Primitive.Int.read(_data) : undefined;
|
|
267
|
+
return new TermsOfService({ "popup": popup, "id": id, "text": text, "entities": entities, "minAgeConfirm": minAgeConfirm });
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Generate buffer from TLObject.
|
|
271
|
+
*/
|
|
287
272
|
write() {
|
|
288
273
|
const b = new BytesIO();
|
|
289
274
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
290
275
|
// @ts-ignore
|
|
291
276
|
let flags = 0;
|
|
292
|
-
flags |= this.popup ? 1 << 0 : 0;
|
|
293
|
-
flags |= this.minAgeConfirm !== undefined ? 1 << 1 : 0;
|
|
294
|
-
b.write(Primitive.Int.write(flags));
|
|
277
|
+
flags |= this.popup ? (1 << 0) : 0;
|
|
278
|
+
flags |= this.minAgeConfirm !== undefined ? (1 << 1) : 0;
|
|
279
|
+
b.write((Primitive.Int.write(flags)));
|
|
295
280
|
if (this.id !== undefined) {
|
|
296
281
|
b.write(this.id.write());
|
|
297
282
|
}
|
|
298
283
|
if (this.text !== undefined) {
|
|
299
|
-
b.write(Primitive.String.write(this.text));
|
|
284
|
+
b.write((Primitive.String.write(this.text)));
|
|
300
285
|
}
|
|
301
286
|
if (this.entities) {
|
|
302
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
287
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
303
288
|
}
|
|
304
289
|
if (this.minAgeConfirm !== undefined) {
|
|
305
|
-
b.write(Primitive.Int.write(this.minAgeConfirm));
|
|
290
|
+
b.write((Primitive.Int.write(this.minAgeConfirm)));
|
|
306
291
|
}
|
|
307
292
|
return b.buffer;
|
|
308
293
|
}
|
|
@@ -313,41 +298,41 @@ export class RecentMeUrls extends TLObject {
|
|
|
313
298
|
users;
|
|
314
299
|
constructor(params) {
|
|
315
300
|
super();
|
|
316
|
-
this.classType =
|
|
317
|
-
this.className =
|
|
301
|
+
this.classType = "types";
|
|
302
|
+
this.className = "help.RecentMeUrls";
|
|
318
303
|
this.constructorId = 0xe0310d7;
|
|
319
304
|
this.subclassOfId = 0xf269c477;
|
|
320
|
-
this._slots = [
|
|
305
|
+
this._slots = ["urls", "chats", "users"];
|
|
321
306
|
this.urls = params.urls;
|
|
322
307
|
this.chats = params.chats;
|
|
323
308
|
this.users = params.users;
|
|
324
309
|
}
|
|
325
310
|
/**
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
311
|
+
* Generate the TLObject from buffer.
|
|
312
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
313
|
+
*/
|
|
329
314
|
static async read(_data, ..._args) {
|
|
330
315
|
// no flags
|
|
331
316
|
let urls = await TLObject.read(_data);
|
|
332
317
|
let chats = await TLObject.read(_data);
|
|
333
318
|
let users = await TLObject.read(_data);
|
|
334
|
-
return new RecentMeUrls({ urls: urls, chats: chats, users: users });
|
|
319
|
+
return new RecentMeUrls({ "urls": urls, "chats": chats, "users": users });
|
|
335
320
|
}
|
|
336
321
|
/**
|
|
337
|
-
|
|
338
|
-
|
|
322
|
+
* Generate buffer from TLObject.
|
|
323
|
+
*/
|
|
339
324
|
write() {
|
|
340
325
|
const b = new BytesIO();
|
|
341
326
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
342
327
|
// no flags
|
|
343
328
|
if (this.urls) {
|
|
344
|
-
b.write(Primitive.Vector.write(this.urls));
|
|
329
|
+
b.write((Primitive.Vector.write(this.urls)));
|
|
345
330
|
}
|
|
346
331
|
if (this.chats) {
|
|
347
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
332
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
348
333
|
}
|
|
349
334
|
if (this.users) {
|
|
350
|
-
b.write(Primitive.Vector.write(this.users));
|
|
335
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
351
336
|
}
|
|
352
337
|
return b.buffer;
|
|
353
338
|
}
|
|
@@ -356,31 +341,31 @@ export class TermsOfServiceUpdateEmpty extends TLObject {
|
|
|
356
341
|
expires;
|
|
357
342
|
constructor(params) {
|
|
358
343
|
super();
|
|
359
|
-
this.classType =
|
|
360
|
-
this.className =
|
|
344
|
+
this.classType = "types";
|
|
345
|
+
this.className = "help.TermsOfServiceUpdateEmpty";
|
|
361
346
|
this.constructorId = 0xe3309f7f;
|
|
362
347
|
this.subclassOfId = 0x293c2977;
|
|
363
|
-
this._slots = [
|
|
348
|
+
this._slots = ["expires"];
|
|
364
349
|
this.expires = params.expires;
|
|
365
350
|
}
|
|
366
351
|
/**
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
352
|
+
* Generate the TLObject from buffer.
|
|
353
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
354
|
+
*/
|
|
370
355
|
static async read(_data, ..._args) {
|
|
371
356
|
// no flags
|
|
372
357
|
let expires = await Primitive.Int.read(_data);
|
|
373
|
-
return new TermsOfServiceUpdateEmpty({ expires: expires });
|
|
358
|
+
return new TermsOfServiceUpdateEmpty({ "expires": expires });
|
|
374
359
|
}
|
|
375
360
|
/**
|
|
376
|
-
|
|
377
|
-
|
|
361
|
+
* Generate buffer from TLObject.
|
|
362
|
+
*/
|
|
378
363
|
write() {
|
|
379
364
|
const b = new BytesIO();
|
|
380
365
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
381
366
|
// no flags
|
|
382
367
|
if (this.expires !== undefined) {
|
|
383
|
-
b.write(Primitive.Int.write(this.expires));
|
|
368
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
384
369
|
}
|
|
385
370
|
return b.buffer;
|
|
386
371
|
}
|
|
@@ -390,33 +375,33 @@ export class TermsOfServiceUpdate extends TLObject {
|
|
|
390
375
|
termsOfService;
|
|
391
376
|
constructor(params) {
|
|
392
377
|
super();
|
|
393
|
-
this.classType =
|
|
394
|
-
this.className =
|
|
378
|
+
this.classType = "types";
|
|
379
|
+
this.className = "help.TermsOfServiceUpdate";
|
|
395
380
|
this.constructorId = 0x28ecf961;
|
|
396
381
|
this.subclassOfId = 0x293c2977;
|
|
397
|
-
this._slots = [
|
|
382
|
+
this._slots = ["expires", "termsOfService"];
|
|
398
383
|
this.expires = params.expires;
|
|
399
384
|
this.termsOfService = params.termsOfService;
|
|
400
385
|
}
|
|
401
386
|
/**
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
387
|
+
* Generate the TLObject from buffer.
|
|
388
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
389
|
+
*/
|
|
405
390
|
static async read(_data, ..._args) {
|
|
406
391
|
// no flags
|
|
407
392
|
let expires = await Primitive.Int.read(_data);
|
|
408
393
|
let termsOfService = await TLObject.read(_data);
|
|
409
|
-
return new TermsOfServiceUpdate({ expires: expires, termsOfService: termsOfService });
|
|
394
|
+
return new TermsOfServiceUpdate({ "expires": expires, "termsOfService": termsOfService });
|
|
410
395
|
}
|
|
411
396
|
/**
|
|
412
|
-
|
|
413
|
-
|
|
397
|
+
* Generate buffer from TLObject.
|
|
398
|
+
*/
|
|
414
399
|
write() {
|
|
415
400
|
const b = new BytesIO();
|
|
416
401
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
417
402
|
// no flags
|
|
418
403
|
if (this.expires !== undefined) {
|
|
419
|
-
b.write(Primitive.Int.write(this.expires));
|
|
404
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
420
405
|
}
|
|
421
406
|
if (this.termsOfService !== undefined) {
|
|
422
407
|
b.write(this.termsOfService.write());
|
|
@@ -427,23 +412,23 @@ export class TermsOfServiceUpdate extends TLObject {
|
|
|
427
412
|
export class DeepLinkInfoEmpty extends TLObject {
|
|
428
413
|
constructor() {
|
|
429
414
|
super();
|
|
430
|
-
this.classType =
|
|
431
|
-
this.className =
|
|
415
|
+
this.classType = "types";
|
|
416
|
+
this.className = "help.DeepLinkInfoEmpty";
|
|
432
417
|
this.constructorId = 0x66afa166;
|
|
433
418
|
this.subclassOfId = 0x984aac38;
|
|
434
419
|
this._slots = [];
|
|
435
420
|
}
|
|
436
421
|
/**
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
422
|
+
* Generate the TLObject from buffer.
|
|
423
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
424
|
+
*/
|
|
440
425
|
static async read(_data, ..._args) {
|
|
441
426
|
// no flags
|
|
442
427
|
return new DeepLinkInfoEmpty();
|
|
443
428
|
}
|
|
444
429
|
/**
|
|
445
|
-
|
|
446
|
-
|
|
430
|
+
* Generate buffer from TLObject.
|
|
431
|
+
*/
|
|
447
432
|
write() {
|
|
448
433
|
const b = new BytesIO();
|
|
449
434
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -457,43 +442,43 @@ export class DeepLinkInfo extends TLObject {
|
|
|
457
442
|
entities;
|
|
458
443
|
constructor(params) {
|
|
459
444
|
super();
|
|
460
|
-
this.classType =
|
|
461
|
-
this.className =
|
|
445
|
+
this.classType = "types";
|
|
446
|
+
this.className = "help.DeepLinkInfo";
|
|
462
447
|
this.constructorId = 0x6a4ee832;
|
|
463
448
|
this.subclassOfId = 0x984aac38;
|
|
464
|
-
this._slots = [
|
|
449
|
+
this._slots = ["updateApp", "message", "entities"];
|
|
465
450
|
this.updateApp = params.updateApp;
|
|
466
451
|
this.message = params.message;
|
|
467
452
|
this.entities = params.entities;
|
|
468
453
|
}
|
|
469
454
|
/**
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
455
|
+
* Generate the TLObject from buffer.
|
|
456
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
457
|
+
*/
|
|
473
458
|
static async read(_data, ..._args) {
|
|
474
459
|
// @ts-ignore
|
|
475
460
|
let flags = await Primitive.Int.read(_data);
|
|
476
|
-
let updateApp = flags & (1 << 0) ? true : false;
|
|
461
|
+
let updateApp = (flags & (1 << 0)) ? true : false;
|
|
477
462
|
let message = await Primitive.String.read(_data);
|
|
478
|
-
let entities = flags & (1 << 1) ? await TLObject.read(_data) : [];
|
|
479
|
-
return new DeepLinkInfo({ updateApp: updateApp, message: message, entities: entities });
|
|
463
|
+
let entities = (flags & (1 << 1)) ? await TLObject.read(_data) : [];
|
|
464
|
+
return new DeepLinkInfo({ "updateApp": updateApp, "message": message, "entities": entities });
|
|
480
465
|
}
|
|
481
466
|
/**
|
|
482
|
-
|
|
483
|
-
|
|
467
|
+
* Generate buffer from TLObject.
|
|
468
|
+
*/
|
|
484
469
|
write() {
|
|
485
470
|
const b = new BytesIO();
|
|
486
471
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
487
472
|
// @ts-ignore
|
|
488
473
|
let flags = 0;
|
|
489
|
-
flags |= this.updateApp ? 1 << 0 : 0;
|
|
490
|
-
flags |= this.entities ? 1 << 1 : 0;
|
|
491
|
-
b.write(Primitive.Int.write(flags));
|
|
474
|
+
flags |= this.updateApp ? (1 << 0) : 0;
|
|
475
|
+
flags |= this.entities ? (1 << 1) : 0;
|
|
476
|
+
b.write((Primitive.Int.write(flags)));
|
|
492
477
|
if (this.message !== undefined) {
|
|
493
|
-
b.write(Primitive.String.write(this.message));
|
|
478
|
+
b.write((Primitive.String.write(this.message)));
|
|
494
479
|
}
|
|
495
480
|
if (this.entities) {
|
|
496
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
481
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
497
482
|
}
|
|
498
483
|
return b.buffer;
|
|
499
484
|
}
|
|
@@ -501,23 +486,23 @@ export class DeepLinkInfo extends TLObject {
|
|
|
501
486
|
export class PassportConfigNotModified extends TLObject {
|
|
502
487
|
constructor() {
|
|
503
488
|
super();
|
|
504
|
-
this.classType =
|
|
505
|
-
this.className =
|
|
489
|
+
this.classType = "types";
|
|
490
|
+
this.className = "help.PassportConfigNotModified";
|
|
506
491
|
this.constructorId = 0xbfb9f457;
|
|
507
492
|
this.subclassOfId = 0xc666c0ad;
|
|
508
493
|
this._slots = [];
|
|
509
494
|
}
|
|
510
495
|
/**
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
496
|
+
* Generate the TLObject from buffer.
|
|
497
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
498
|
+
*/
|
|
514
499
|
static async read(_data, ..._args) {
|
|
515
500
|
// no flags
|
|
516
501
|
return new PassportConfigNotModified();
|
|
517
502
|
}
|
|
518
503
|
/**
|
|
519
|
-
|
|
520
|
-
|
|
504
|
+
* Generate buffer from TLObject.
|
|
505
|
+
*/
|
|
521
506
|
write() {
|
|
522
507
|
const b = new BytesIO();
|
|
523
508
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -530,33 +515,33 @@ export class PassportConfig extends TLObject {
|
|
|
530
515
|
countriesLangs;
|
|
531
516
|
constructor(params) {
|
|
532
517
|
super();
|
|
533
|
-
this.classType =
|
|
534
|
-
this.className =
|
|
518
|
+
this.classType = "types";
|
|
519
|
+
this.className = "help.PassportConfig";
|
|
535
520
|
this.constructorId = 0xa098d6af;
|
|
536
521
|
this.subclassOfId = 0xc666c0ad;
|
|
537
|
-
this._slots = [
|
|
522
|
+
this._slots = ["hash", "countriesLangs"];
|
|
538
523
|
this.hash = params.hash;
|
|
539
524
|
this.countriesLangs = params.countriesLangs;
|
|
540
525
|
}
|
|
541
526
|
/**
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
527
|
+
* Generate the TLObject from buffer.
|
|
528
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
529
|
+
*/
|
|
545
530
|
static async read(_data, ..._args) {
|
|
546
531
|
// no flags
|
|
547
532
|
let hash = await Primitive.Int.read(_data);
|
|
548
533
|
let countriesLangs = await TLObject.read(_data);
|
|
549
|
-
return new PassportConfig({ hash: hash, countriesLangs: countriesLangs });
|
|
534
|
+
return new PassportConfig({ "hash": hash, "countriesLangs": countriesLangs });
|
|
550
535
|
}
|
|
551
536
|
/**
|
|
552
|
-
|
|
553
|
-
|
|
537
|
+
* Generate buffer from TLObject.
|
|
538
|
+
*/
|
|
554
539
|
write() {
|
|
555
540
|
const b = new BytesIO();
|
|
556
541
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
557
542
|
// no flags
|
|
558
543
|
if (this.hash !== undefined) {
|
|
559
|
-
b.write(Primitive.Int.write(this.hash));
|
|
544
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
560
545
|
}
|
|
561
546
|
if (this.countriesLangs !== undefined) {
|
|
562
547
|
b.write(this.countriesLangs.write());
|
|
@@ -568,31 +553,31 @@ export class SupportName extends TLObject {
|
|
|
568
553
|
name;
|
|
569
554
|
constructor(params) {
|
|
570
555
|
super();
|
|
571
|
-
this.classType =
|
|
572
|
-
this.className =
|
|
556
|
+
this.classType = "types";
|
|
557
|
+
this.className = "help.SupportName";
|
|
573
558
|
this.constructorId = 0x8c05f1c9;
|
|
574
559
|
this.subclassOfId = 0x7f50b7c2;
|
|
575
|
-
this._slots = [
|
|
560
|
+
this._slots = ["name"];
|
|
576
561
|
this.name = params.name;
|
|
577
562
|
}
|
|
578
563
|
/**
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
564
|
+
* Generate the TLObject from buffer.
|
|
565
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
566
|
+
*/
|
|
582
567
|
static async read(_data, ..._args) {
|
|
583
568
|
// no flags
|
|
584
569
|
let name = await Primitive.String.read(_data);
|
|
585
|
-
return new SupportName({ name: name });
|
|
570
|
+
return new SupportName({ "name": name });
|
|
586
571
|
}
|
|
587
572
|
/**
|
|
588
|
-
|
|
589
|
-
|
|
573
|
+
* Generate buffer from TLObject.
|
|
574
|
+
*/
|
|
590
575
|
write() {
|
|
591
576
|
const b = new BytesIO();
|
|
592
577
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
593
578
|
// no flags
|
|
594
579
|
if (this.name !== undefined) {
|
|
595
|
-
b.write(Primitive.String.write(this.name));
|
|
580
|
+
b.write((Primitive.String.write(this.name)));
|
|
596
581
|
}
|
|
597
582
|
return b.buffer;
|
|
598
583
|
}
|
|
@@ -600,23 +585,23 @@ export class SupportName extends TLObject {
|
|
|
600
585
|
export class UserInfoEmpty extends TLObject {
|
|
601
586
|
constructor() {
|
|
602
587
|
super();
|
|
603
|
-
this.classType =
|
|
604
|
-
this.className =
|
|
588
|
+
this.classType = "types";
|
|
589
|
+
this.className = "help.UserInfoEmpty";
|
|
605
590
|
this.constructorId = 0xf3ae2eed;
|
|
606
591
|
this.subclassOfId = 0x5c53d7d8;
|
|
607
592
|
this._slots = [];
|
|
608
593
|
}
|
|
609
594
|
/**
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
595
|
+
* Generate the TLObject from buffer.
|
|
596
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
597
|
+
*/
|
|
613
598
|
static async read(_data, ..._args) {
|
|
614
599
|
// no flags
|
|
615
600
|
return new UserInfoEmpty();
|
|
616
601
|
}
|
|
617
602
|
/**
|
|
618
|
-
|
|
619
|
-
|
|
603
|
+
* Generate buffer from TLObject.
|
|
604
|
+
*/
|
|
620
605
|
write() {
|
|
621
606
|
const b = new BytesIO();
|
|
622
607
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -631,46 +616,46 @@ export class UserInfo extends TLObject {
|
|
|
631
616
|
date;
|
|
632
617
|
constructor(params) {
|
|
633
618
|
super();
|
|
634
|
-
this.classType =
|
|
635
|
-
this.className =
|
|
619
|
+
this.classType = "types";
|
|
620
|
+
this.className = "help.UserInfo";
|
|
636
621
|
this.constructorId = 0x1eb3758;
|
|
637
622
|
this.subclassOfId = 0x5c53d7d8;
|
|
638
|
-
this._slots = [
|
|
623
|
+
this._slots = ["message", "entities", "author", "date"];
|
|
639
624
|
this.message = params.message;
|
|
640
625
|
this.entities = params.entities;
|
|
641
626
|
this.author = params.author;
|
|
642
627
|
this.date = params.date;
|
|
643
628
|
}
|
|
644
629
|
/**
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
630
|
+
* Generate the TLObject from buffer.
|
|
631
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
632
|
+
*/
|
|
648
633
|
static async read(_data, ..._args) {
|
|
649
634
|
// no flags
|
|
650
635
|
let message = await Primitive.String.read(_data);
|
|
651
636
|
let entities = await TLObject.read(_data);
|
|
652
637
|
let author = await Primitive.String.read(_data);
|
|
653
638
|
let date = await Primitive.Int.read(_data);
|
|
654
|
-
return new UserInfo({ message: message, entities: entities, author: author, date: date });
|
|
639
|
+
return new UserInfo({ "message": message, "entities": entities, "author": author, "date": date });
|
|
655
640
|
}
|
|
656
641
|
/**
|
|
657
|
-
|
|
658
|
-
|
|
642
|
+
* Generate buffer from TLObject.
|
|
643
|
+
*/
|
|
659
644
|
write() {
|
|
660
645
|
const b = new BytesIO();
|
|
661
646
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
662
647
|
// no flags
|
|
663
648
|
if (this.message !== undefined) {
|
|
664
|
-
b.write(Primitive.String.write(this.message));
|
|
649
|
+
b.write((Primitive.String.write(this.message)));
|
|
665
650
|
}
|
|
666
651
|
if (this.entities) {
|
|
667
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
652
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
668
653
|
}
|
|
669
654
|
if (this.author !== undefined) {
|
|
670
|
-
b.write(Primitive.String.write(this.author));
|
|
655
|
+
b.write((Primitive.String.write(this.author)));
|
|
671
656
|
}
|
|
672
657
|
if (this.date !== undefined) {
|
|
673
|
-
b.write(Primitive.Int.write(this.date));
|
|
658
|
+
b.write((Primitive.Int.write(this.date)));
|
|
674
659
|
}
|
|
675
660
|
return b.buffer;
|
|
676
661
|
}
|
|
@@ -679,31 +664,31 @@ export class PromoDataEmpty extends TLObject {
|
|
|
679
664
|
expires;
|
|
680
665
|
constructor(params) {
|
|
681
666
|
super();
|
|
682
|
-
this.classType =
|
|
683
|
-
this.className =
|
|
667
|
+
this.classType = "types";
|
|
668
|
+
this.className = "help.PromoDataEmpty";
|
|
684
669
|
this.constructorId = 0x98f6ac75;
|
|
685
670
|
this.subclassOfId = 0x9d595542;
|
|
686
|
-
this._slots = [
|
|
671
|
+
this._slots = ["expires"];
|
|
687
672
|
this.expires = params.expires;
|
|
688
673
|
}
|
|
689
674
|
/**
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
675
|
+
* Generate the TLObject from buffer.
|
|
676
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
677
|
+
*/
|
|
693
678
|
static async read(_data, ..._args) {
|
|
694
679
|
// no flags
|
|
695
680
|
let expires = await Primitive.Int.read(_data);
|
|
696
|
-
return new PromoDataEmpty({ expires: expires });
|
|
681
|
+
return new PromoDataEmpty({ "expires": expires });
|
|
697
682
|
}
|
|
698
683
|
/**
|
|
699
|
-
|
|
700
|
-
|
|
684
|
+
* Generate buffer from TLObject.
|
|
685
|
+
*/
|
|
701
686
|
write() {
|
|
702
687
|
const b = new BytesIO();
|
|
703
688
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
704
689
|
// no flags
|
|
705
690
|
if (this.expires !== undefined) {
|
|
706
|
-
b.write(Primitive.Int.write(this.expires));
|
|
691
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
707
692
|
}
|
|
708
693
|
return b.buffer;
|
|
709
694
|
}
|
|
@@ -721,22 +706,11 @@ export class PromoData extends TLObject {
|
|
|
721
706
|
users;
|
|
722
707
|
constructor(params) {
|
|
723
708
|
super();
|
|
724
|
-
this.classType =
|
|
725
|
-
this.className =
|
|
709
|
+
this.classType = "types";
|
|
710
|
+
this.className = "help.PromoData";
|
|
726
711
|
this.constructorId = 0x8a4d87a;
|
|
727
712
|
this.subclassOfId = 0x9d595542;
|
|
728
|
-
this._slots = [
|
|
729
|
-
'proxy',
|
|
730
|
-
'expires',
|
|
731
|
-
'peer',
|
|
732
|
-
'psaType',
|
|
733
|
-
'psaMessage',
|
|
734
|
-
'pendingSuggestions',
|
|
735
|
-
'dismissedSuggestions',
|
|
736
|
-
'customPendingSuggestion',
|
|
737
|
-
'chats',
|
|
738
|
-
'users',
|
|
739
|
-
];
|
|
713
|
+
this._slots = ["proxy", "expires", "peer", "psaType", "psaMessage", "pendingSuggestions", "dismissedSuggestions", "customPendingSuggestion", "chats", "users"];
|
|
740
714
|
this.proxy = params.proxy;
|
|
741
715
|
this.expires = params.expires;
|
|
742
716
|
this.peer = params.peer;
|
|
@@ -749,75 +723,64 @@ export class PromoData extends TLObject {
|
|
|
749
723
|
this.users = params.users;
|
|
750
724
|
}
|
|
751
725
|
/**
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
726
|
+
* Generate the TLObject from buffer.
|
|
727
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
728
|
+
*/
|
|
755
729
|
static async read(_data, ..._args) {
|
|
756
730
|
// @ts-ignore
|
|
757
731
|
let flags = await Primitive.Int.read(_data);
|
|
758
|
-
let proxy = flags & (1 << 0) ? true : false;
|
|
732
|
+
let proxy = (flags & (1 << 0)) ? true : false;
|
|
759
733
|
let expires = await Primitive.Int.read(_data);
|
|
760
|
-
let peer = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
761
|
-
let psaType = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
762
|
-
let psaMessage = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
|
|
734
|
+
let peer = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
|
|
735
|
+
let psaType = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
736
|
+
let psaMessage = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
|
|
763
737
|
let pendingSuggestions = await TLObject.read(_data, Primitive.String);
|
|
764
738
|
let dismissedSuggestions = await TLObject.read(_data, Primitive.String);
|
|
765
|
-
let customPendingSuggestion = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
739
|
+
let customPendingSuggestion = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
|
|
766
740
|
let chats = await TLObject.read(_data);
|
|
767
741
|
let users = await TLObject.read(_data);
|
|
768
|
-
return new PromoData({
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
psaMessage: psaMessage,
|
|
774
|
-
pendingSuggestions: pendingSuggestions,
|
|
775
|
-
dismissedSuggestions: dismissedSuggestions,
|
|
776
|
-
customPendingSuggestion: customPendingSuggestion,
|
|
777
|
-
chats: chats,
|
|
778
|
-
users: users,
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Generate buffer from TLObject.
|
|
783
|
-
*/
|
|
742
|
+
return new PromoData({ "proxy": proxy, "expires": expires, "peer": peer, "psaType": psaType, "psaMessage": psaMessage, "pendingSuggestions": pendingSuggestions, "dismissedSuggestions": dismissedSuggestions, "customPendingSuggestion": customPendingSuggestion, "chats": chats, "users": users });
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Generate buffer from TLObject.
|
|
746
|
+
*/
|
|
784
747
|
write() {
|
|
785
748
|
const b = new BytesIO();
|
|
786
749
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
787
750
|
// @ts-ignore
|
|
788
751
|
let flags = 0;
|
|
789
|
-
flags |= this.proxy ? 1 << 0 : 0;
|
|
790
|
-
flags |= this.peer !== undefined ? 1 << 3 : 0;
|
|
791
|
-
flags |= this.psaType !== undefined ? 1 << 1 : 0;
|
|
792
|
-
flags |= this.psaMessage !== undefined ? 1 << 2 : 0;
|
|
793
|
-
flags |= this.customPendingSuggestion !== undefined ? 1 << 4 : 0;
|
|
794
|
-
b.write(Primitive.Int.write(flags));
|
|
752
|
+
flags |= this.proxy ? (1 << 0) : 0;
|
|
753
|
+
flags |= this.peer !== undefined ? (1 << 3) : 0;
|
|
754
|
+
flags |= this.psaType !== undefined ? (1 << 1) : 0;
|
|
755
|
+
flags |= this.psaMessage !== undefined ? (1 << 2) : 0;
|
|
756
|
+
flags |= this.customPendingSuggestion !== undefined ? (1 << 4) : 0;
|
|
757
|
+
b.write((Primitive.Int.write(flags)));
|
|
795
758
|
if (this.expires !== undefined) {
|
|
796
|
-
b.write(Primitive.Int.write(this.expires));
|
|
759
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
797
760
|
}
|
|
798
761
|
if (this.peer !== undefined) {
|
|
799
762
|
b.write(this.peer.write());
|
|
800
763
|
}
|
|
801
764
|
if (this.psaType !== undefined) {
|
|
802
|
-
b.write(Primitive.String.write(this.psaType));
|
|
765
|
+
b.write((Primitive.String.write(this.psaType)));
|
|
803
766
|
}
|
|
804
767
|
if (this.psaMessage !== undefined) {
|
|
805
|
-
b.write(Primitive.String.write(this.psaMessage));
|
|
768
|
+
b.write((Primitive.String.write(this.psaMessage)));
|
|
806
769
|
}
|
|
807
770
|
if (this.pendingSuggestions) {
|
|
808
|
-
b.write(Primitive.Vector.write(this.pendingSuggestions, Primitive.String));
|
|
771
|
+
b.write((Primitive.Vector.write(this.pendingSuggestions, Primitive.String)));
|
|
809
772
|
}
|
|
810
773
|
if (this.dismissedSuggestions) {
|
|
811
|
-
b.write(Primitive.Vector.write(this.dismissedSuggestions, Primitive.String));
|
|
774
|
+
b.write((Primitive.Vector.write(this.dismissedSuggestions, Primitive.String)));
|
|
812
775
|
}
|
|
813
776
|
if (this.customPendingSuggestion !== undefined) {
|
|
814
777
|
b.write(this.customPendingSuggestion.write());
|
|
815
778
|
}
|
|
816
779
|
if (this.chats) {
|
|
817
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
780
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
818
781
|
}
|
|
819
782
|
if (this.users) {
|
|
820
|
-
b.write(Primitive.Vector.write(this.users));
|
|
783
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
821
784
|
}
|
|
822
785
|
return b.buffer;
|
|
823
786
|
}
|
|
@@ -828,46 +791,46 @@ export class CountryCode extends TLObject {
|
|
|
828
791
|
patterns;
|
|
829
792
|
constructor(params) {
|
|
830
793
|
super();
|
|
831
|
-
this.classType =
|
|
832
|
-
this.className =
|
|
794
|
+
this.classType = "types";
|
|
795
|
+
this.className = "help.CountryCode";
|
|
833
796
|
this.constructorId = 0x4203c5ef;
|
|
834
797
|
this.subclassOfId = 0x76f34665;
|
|
835
|
-
this._slots = [
|
|
798
|
+
this._slots = ["countryCode", "prefixes", "patterns"];
|
|
836
799
|
this.countryCode = params.countryCode;
|
|
837
800
|
this.prefixes = params.prefixes;
|
|
838
801
|
this.patterns = params.patterns;
|
|
839
802
|
}
|
|
840
803
|
/**
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
804
|
+
* Generate the TLObject from buffer.
|
|
805
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
806
|
+
*/
|
|
844
807
|
static async read(_data, ..._args) {
|
|
845
808
|
// @ts-ignore
|
|
846
809
|
let flags = await Primitive.Int.read(_data);
|
|
847
810
|
let countryCode = await Primitive.String.read(_data);
|
|
848
|
-
let prefixes = flags & (1 << 0) ? await TLObject.read(_data, Primitive.String) : [];
|
|
849
|
-
let patterns = flags & (1 << 1) ? await TLObject.read(_data, Primitive.String) : [];
|
|
850
|
-
return new CountryCode({ countryCode: countryCode, prefixes: prefixes, patterns: patterns });
|
|
811
|
+
let prefixes = (flags & (1 << 0)) ? await TLObject.read(_data, Primitive.String) : [];
|
|
812
|
+
let patterns = (flags & (1 << 1)) ? await TLObject.read(_data, Primitive.String) : [];
|
|
813
|
+
return new CountryCode({ "countryCode": countryCode, "prefixes": prefixes, "patterns": patterns });
|
|
851
814
|
}
|
|
852
815
|
/**
|
|
853
|
-
|
|
854
|
-
|
|
816
|
+
* Generate buffer from TLObject.
|
|
817
|
+
*/
|
|
855
818
|
write() {
|
|
856
819
|
const b = new BytesIO();
|
|
857
820
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
858
821
|
// @ts-ignore
|
|
859
822
|
let flags = 0;
|
|
860
|
-
flags |= this.prefixes ? 1 << 0 : 0;
|
|
861
|
-
flags |= this.patterns ? 1 << 1 : 0;
|
|
862
|
-
b.write(Primitive.Int.write(flags));
|
|
823
|
+
flags |= this.prefixes ? (1 << 0) : 0;
|
|
824
|
+
flags |= this.patterns ? (1 << 1) : 0;
|
|
825
|
+
b.write((Primitive.Int.write(flags)));
|
|
863
826
|
if (this.countryCode !== undefined) {
|
|
864
|
-
b.write(Primitive.String.write(this.countryCode));
|
|
827
|
+
b.write((Primitive.String.write(this.countryCode)));
|
|
865
828
|
}
|
|
866
829
|
if (this.prefixes) {
|
|
867
|
-
b.write(Primitive.Vector.write(this.prefixes, Primitive.String));
|
|
830
|
+
b.write((Primitive.Vector.write(this.prefixes, Primitive.String)));
|
|
868
831
|
}
|
|
869
832
|
if (this.patterns) {
|
|
870
|
-
b.write(Primitive.Vector.write(this.patterns, Primitive.String));
|
|
833
|
+
b.write((Primitive.Vector.write(this.patterns, Primitive.String)));
|
|
871
834
|
}
|
|
872
835
|
return b.buffer;
|
|
873
836
|
}
|
|
@@ -880,11 +843,11 @@ export class Country extends TLObject {
|
|
|
880
843
|
countryCodes;
|
|
881
844
|
constructor(params) {
|
|
882
845
|
super();
|
|
883
|
-
this.classType =
|
|
884
|
-
this.className =
|
|
846
|
+
this.classType = "types";
|
|
847
|
+
this.className = "help.Country";
|
|
885
848
|
this.constructorId = 0xc3878e23;
|
|
886
849
|
this.subclassOfId = 0xa22e9e28;
|
|
887
|
-
this._slots = [
|
|
850
|
+
this._slots = ["hidden", "iso2", "defaultName", "name", "countryCodes"];
|
|
888
851
|
this.hidden = params.hidden;
|
|
889
852
|
this.iso2 = params.iso2;
|
|
890
853
|
this.defaultName = params.defaultName;
|
|
@@ -892,47 +855,41 @@ export class Country extends TLObject {
|
|
|
892
855
|
this.countryCodes = params.countryCodes;
|
|
893
856
|
}
|
|
894
857
|
/**
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
858
|
+
* Generate the TLObject from buffer.
|
|
859
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
860
|
+
*/
|
|
898
861
|
static async read(_data, ..._args) {
|
|
899
862
|
// @ts-ignore
|
|
900
863
|
let flags = await Primitive.Int.read(_data);
|
|
901
|
-
let hidden = flags & (1 << 0) ? true : false;
|
|
864
|
+
let hidden = (flags & (1 << 0)) ? true : false;
|
|
902
865
|
let iso2 = await Primitive.String.read(_data);
|
|
903
866
|
let defaultName = await Primitive.String.read(_data);
|
|
904
|
-
let name = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
867
|
+
let name = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
905
868
|
let countryCodes = await TLObject.read(_data);
|
|
906
|
-
return new Country({
|
|
907
|
-
hidden: hidden,
|
|
908
|
-
iso2: iso2,
|
|
909
|
-
defaultName: defaultName,
|
|
910
|
-
name: name,
|
|
911
|
-
countryCodes: countryCodes,
|
|
912
|
-
});
|
|
869
|
+
return new Country({ "hidden": hidden, "iso2": iso2, "defaultName": defaultName, "name": name, "countryCodes": countryCodes });
|
|
913
870
|
}
|
|
914
871
|
/**
|
|
915
|
-
|
|
916
|
-
|
|
872
|
+
* Generate buffer from TLObject.
|
|
873
|
+
*/
|
|
917
874
|
write() {
|
|
918
875
|
const b = new BytesIO();
|
|
919
876
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
920
877
|
// @ts-ignore
|
|
921
878
|
let flags = 0;
|
|
922
|
-
flags |= this.hidden ? 1 << 0 : 0;
|
|
923
|
-
flags |= this.name !== undefined ? 1 << 1 : 0;
|
|
924
|
-
b.write(Primitive.Int.write(flags));
|
|
879
|
+
flags |= this.hidden ? (1 << 0) : 0;
|
|
880
|
+
flags |= this.name !== undefined ? (1 << 1) : 0;
|
|
881
|
+
b.write((Primitive.Int.write(flags)));
|
|
925
882
|
if (this.iso2 !== undefined) {
|
|
926
|
-
b.write(Primitive.String.write(this.iso2));
|
|
883
|
+
b.write((Primitive.String.write(this.iso2)));
|
|
927
884
|
}
|
|
928
885
|
if (this.defaultName !== undefined) {
|
|
929
|
-
b.write(Primitive.String.write(this.defaultName));
|
|
886
|
+
b.write((Primitive.String.write(this.defaultName)));
|
|
930
887
|
}
|
|
931
888
|
if (this.name !== undefined) {
|
|
932
|
-
b.write(Primitive.String.write(this.name));
|
|
889
|
+
b.write((Primitive.String.write(this.name)));
|
|
933
890
|
}
|
|
934
891
|
if (this.countryCodes) {
|
|
935
|
-
b.write(Primitive.Vector.write(this.countryCodes));
|
|
892
|
+
b.write((Primitive.Vector.write(this.countryCodes)));
|
|
936
893
|
}
|
|
937
894
|
return b.buffer;
|
|
938
895
|
}
|
|
@@ -940,23 +897,23 @@ export class Country extends TLObject {
|
|
|
940
897
|
export class CountriesListNotModified extends TLObject {
|
|
941
898
|
constructor() {
|
|
942
899
|
super();
|
|
943
|
-
this.classType =
|
|
944
|
-
this.className =
|
|
900
|
+
this.classType = "types";
|
|
901
|
+
this.className = "help.CountriesListNotModified";
|
|
945
902
|
this.constructorId = 0x93cc1f32;
|
|
946
903
|
this.subclassOfId = 0xea31fe88;
|
|
947
904
|
this._slots = [];
|
|
948
905
|
}
|
|
949
906
|
/**
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
907
|
+
* Generate the TLObject from buffer.
|
|
908
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
909
|
+
*/
|
|
953
910
|
static async read(_data, ..._args) {
|
|
954
911
|
// no flags
|
|
955
912
|
return new CountriesListNotModified();
|
|
956
913
|
}
|
|
957
914
|
/**
|
|
958
|
-
|
|
959
|
-
|
|
915
|
+
* Generate buffer from TLObject.
|
|
916
|
+
*/
|
|
960
917
|
write() {
|
|
961
918
|
const b = new BytesIO();
|
|
962
919
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -969,36 +926,36 @@ export class CountriesList extends TLObject {
|
|
|
969
926
|
hash;
|
|
970
927
|
constructor(params) {
|
|
971
928
|
super();
|
|
972
|
-
this.classType =
|
|
973
|
-
this.className =
|
|
929
|
+
this.classType = "types";
|
|
930
|
+
this.className = "help.CountriesList";
|
|
974
931
|
this.constructorId = 0x87d0759e;
|
|
975
932
|
this.subclassOfId = 0xea31fe88;
|
|
976
|
-
this._slots = [
|
|
933
|
+
this._slots = ["countries", "hash"];
|
|
977
934
|
this.countries = params.countries;
|
|
978
935
|
this.hash = params.hash;
|
|
979
936
|
}
|
|
980
937
|
/**
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
938
|
+
* Generate the TLObject from buffer.
|
|
939
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
940
|
+
*/
|
|
984
941
|
static async read(_data, ..._args) {
|
|
985
942
|
// no flags
|
|
986
943
|
let countries = await TLObject.read(_data);
|
|
987
944
|
let hash = await Primitive.Int.read(_data);
|
|
988
|
-
return new CountriesList({ countries: countries, hash: hash });
|
|
945
|
+
return new CountriesList({ "countries": countries, "hash": hash });
|
|
989
946
|
}
|
|
990
947
|
/**
|
|
991
|
-
|
|
992
|
-
|
|
948
|
+
* Generate buffer from TLObject.
|
|
949
|
+
*/
|
|
993
950
|
write() {
|
|
994
951
|
const b = new BytesIO();
|
|
995
952
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
996
953
|
// no flags
|
|
997
954
|
if (this.countries) {
|
|
998
|
-
b.write(Primitive.Vector.write(this.countries));
|
|
955
|
+
b.write((Primitive.Vector.write(this.countries)));
|
|
999
956
|
}
|
|
1000
957
|
if (this.hash !== undefined) {
|
|
1001
|
-
b.write(Primitive.Int.write(this.hash));
|
|
958
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1002
959
|
}
|
|
1003
960
|
return b.buffer;
|
|
1004
961
|
}
|
|
@@ -1012,18 +969,11 @@ export class PremiumPromo extends TLObject {
|
|
|
1012
969
|
users;
|
|
1013
970
|
constructor(params) {
|
|
1014
971
|
super();
|
|
1015
|
-
this.classType =
|
|
1016
|
-
this.className =
|
|
972
|
+
this.classType = "types";
|
|
973
|
+
this.className = "help.PremiumPromo";
|
|
1017
974
|
this.constructorId = 0x5334759c;
|
|
1018
975
|
this.subclassOfId = 0xc987a338;
|
|
1019
|
-
this._slots = [
|
|
1020
|
-
'statusText',
|
|
1021
|
-
'statusEntities',
|
|
1022
|
-
'videoSections',
|
|
1023
|
-
'videos',
|
|
1024
|
-
'periodOptions',
|
|
1025
|
-
'users',
|
|
1026
|
-
];
|
|
976
|
+
this._slots = ["statusText", "statusEntities", "videoSections", "videos", "periodOptions", "users"];
|
|
1027
977
|
this.statusText = params.statusText;
|
|
1028
978
|
this.statusEntities = params.statusEntities;
|
|
1029
979
|
this.videoSections = params.videoSections;
|
|
@@ -1032,9 +982,9 @@ export class PremiumPromo extends TLObject {
|
|
|
1032
982
|
this.users = params.users;
|
|
1033
983
|
}
|
|
1034
984
|
/**
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
985
|
+
* Generate the TLObject from buffer.
|
|
986
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
987
|
+
*/
|
|
1038
988
|
static async read(_data, ..._args) {
|
|
1039
989
|
// no flags
|
|
1040
990
|
let statusText = await Primitive.String.read(_data);
|
|
@@ -1043,39 +993,32 @@ export class PremiumPromo extends TLObject {
|
|
|
1043
993
|
let videos = await TLObject.read(_data);
|
|
1044
994
|
let periodOptions = await TLObject.read(_data);
|
|
1045
995
|
let users = await TLObject.read(_data);
|
|
1046
|
-
return new PremiumPromo({
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
periodOptions: periodOptions,
|
|
1052
|
-
users: users,
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Generate buffer from TLObject.
|
|
1057
|
-
*/
|
|
996
|
+
return new PremiumPromo({ "statusText": statusText, "statusEntities": statusEntities, "videoSections": videoSections, "videos": videos, "periodOptions": periodOptions, "users": users });
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Generate buffer from TLObject.
|
|
1000
|
+
*/
|
|
1058
1001
|
write() {
|
|
1059
1002
|
const b = new BytesIO();
|
|
1060
1003
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1061
1004
|
// no flags
|
|
1062
1005
|
if (this.statusText !== undefined) {
|
|
1063
|
-
b.write(Primitive.String.write(this.statusText));
|
|
1006
|
+
b.write((Primitive.String.write(this.statusText)));
|
|
1064
1007
|
}
|
|
1065
1008
|
if (this.statusEntities) {
|
|
1066
|
-
b.write(Primitive.Vector.write(this.statusEntities));
|
|
1009
|
+
b.write((Primitive.Vector.write(this.statusEntities)));
|
|
1067
1010
|
}
|
|
1068
1011
|
if (this.videoSections) {
|
|
1069
|
-
b.write(Primitive.Vector.write(this.videoSections, Primitive.String));
|
|
1012
|
+
b.write((Primitive.Vector.write(this.videoSections, Primitive.String)));
|
|
1070
1013
|
}
|
|
1071
1014
|
if (this.videos) {
|
|
1072
|
-
b.write(Primitive.Vector.write(this.videos));
|
|
1015
|
+
b.write((Primitive.Vector.write(this.videos)));
|
|
1073
1016
|
}
|
|
1074
1017
|
if (this.periodOptions) {
|
|
1075
|
-
b.write(Primitive.Vector.write(this.periodOptions));
|
|
1018
|
+
b.write((Primitive.Vector.write(this.periodOptions)));
|
|
1076
1019
|
}
|
|
1077
1020
|
if (this.users) {
|
|
1078
|
-
b.write(Primitive.Vector.write(this.users));
|
|
1021
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
1079
1022
|
}
|
|
1080
1023
|
return b.buffer;
|
|
1081
1024
|
}
|
|
@@ -1083,23 +1026,23 @@ export class PremiumPromo extends TLObject {
|
|
|
1083
1026
|
export class AppConfigNotModified extends TLObject {
|
|
1084
1027
|
constructor() {
|
|
1085
1028
|
super();
|
|
1086
|
-
this.classType =
|
|
1087
|
-
this.className =
|
|
1029
|
+
this.classType = "types";
|
|
1030
|
+
this.className = "help.AppConfigNotModified";
|
|
1088
1031
|
this.constructorId = 0x7cde641d;
|
|
1089
1032
|
this.subclassOfId = 0x14381c9a;
|
|
1090
1033
|
this._slots = [];
|
|
1091
1034
|
}
|
|
1092
1035
|
/**
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1036
|
+
* Generate the TLObject from buffer.
|
|
1037
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1038
|
+
*/
|
|
1096
1039
|
static async read(_data, ..._args) {
|
|
1097
1040
|
// no flags
|
|
1098
1041
|
return new AppConfigNotModified();
|
|
1099
1042
|
}
|
|
1100
1043
|
/**
|
|
1101
|
-
|
|
1102
|
-
|
|
1044
|
+
* Generate buffer from TLObject.
|
|
1045
|
+
*/
|
|
1103
1046
|
write() {
|
|
1104
1047
|
const b = new BytesIO();
|
|
1105
1048
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1112,33 +1055,33 @@ export class AppConfig extends TLObject {
|
|
|
1112
1055
|
config;
|
|
1113
1056
|
constructor(params) {
|
|
1114
1057
|
super();
|
|
1115
|
-
this.classType =
|
|
1116
|
-
this.className =
|
|
1058
|
+
this.classType = "types";
|
|
1059
|
+
this.className = "help.AppConfig";
|
|
1117
1060
|
this.constructorId = 0xdd18782e;
|
|
1118
1061
|
this.subclassOfId = 0x14381c9a;
|
|
1119
|
-
this._slots = [
|
|
1062
|
+
this._slots = ["hash", "config"];
|
|
1120
1063
|
this.hash = params.hash;
|
|
1121
1064
|
this.config = params.config;
|
|
1122
1065
|
}
|
|
1123
1066
|
/**
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1067
|
+
* Generate the TLObject from buffer.
|
|
1068
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1069
|
+
*/
|
|
1127
1070
|
static async read(_data, ..._args) {
|
|
1128
1071
|
// no flags
|
|
1129
1072
|
let hash = await Primitive.Int.read(_data);
|
|
1130
1073
|
let config = await TLObject.read(_data);
|
|
1131
|
-
return new AppConfig({ hash: hash, config: config });
|
|
1074
|
+
return new AppConfig({ "hash": hash, "config": config });
|
|
1132
1075
|
}
|
|
1133
1076
|
/**
|
|
1134
|
-
|
|
1135
|
-
|
|
1077
|
+
* Generate buffer from TLObject.
|
|
1078
|
+
*/
|
|
1136
1079
|
write() {
|
|
1137
1080
|
const b = new BytesIO();
|
|
1138
1081
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1139
1082
|
// no flags
|
|
1140
1083
|
if (this.hash !== undefined) {
|
|
1141
|
-
b.write(Primitive.Int.write(this.hash));
|
|
1084
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1142
1085
|
}
|
|
1143
1086
|
if (this.config !== undefined) {
|
|
1144
1087
|
b.write(this.config.write());
|
|
@@ -1150,31 +1093,31 @@ export class PeerColorSet extends TLObject {
|
|
|
1150
1093
|
colors;
|
|
1151
1094
|
constructor(params) {
|
|
1152
1095
|
super();
|
|
1153
|
-
this.classType =
|
|
1154
|
-
this.className =
|
|
1096
|
+
this.classType = "types";
|
|
1097
|
+
this.className = "help.PeerColorSet";
|
|
1155
1098
|
this.constructorId = 0x26219a58;
|
|
1156
1099
|
this.subclassOfId = 0x11cbe12c;
|
|
1157
|
-
this._slots = [
|
|
1100
|
+
this._slots = ["colors"];
|
|
1158
1101
|
this.colors = params.colors;
|
|
1159
1102
|
}
|
|
1160
1103
|
/**
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1104
|
+
* Generate the TLObject from buffer.
|
|
1105
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1106
|
+
*/
|
|
1164
1107
|
static async read(_data, ..._args) {
|
|
1165
1108
|
// no flags
|
|
1166
1109
|
let colors = await TLObject.read(_data, Primitive.Int);
|
|
1167
|
-
return new PeerColorSet({ colors: colors });
|
|
1110
|
+
return new PeerColorSet({ "colors": colors });
|
|
1168
1111
|
}
|
|
1169
1112
|
/**
|
|
1170
|
-
|
|
1171
|
-
|
|
1113
|
+
* Generate buffer from TLObject.
|
|
1114
|
+
*/
|
|
1172
1115
|
write() {
|
|
1173
1116
|
const b = new BytesIO();
|
|
1174
1117
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1175
1118
|
// no flags
|
|
1176
1119
|
if (this.colors) {
|
|
1177
|
-
b.write(Primitive.Vector.write(this.colors, Primitive.Int));
|
|
1120
|
+
b.write((Primitive.Vector.write(this.colors, Primitive.Int)));
|
|
1178
1121
|
}
|
|
1179
1122
|
return b.buffer;
|
|
1180
1123
|
}
|
|
@@ -1185,45 +1128,41 @@ export class PeerColorProfileSet extends TLObject {
|
|
|
1185
1128
|
storyColors;
|
|
1186
1129
|
constructor(params) {
|
|
1187
1130
|
super();
|
|
1188
|
-
this.classType =
|
|
1189
|
-
this.className =
|
|
1131
|
+
this.classType = "types";
|
|
1132
|
+
this.className = "help.PeerColorProfileSet";
|
|
1190
1133
|
this.constructorId = 0x767d61eb;
|
|
1191
1134
|
this.subclassOfId = 0x11cbe12c;
|
|
1192
|
-
this._slots = [
|
|
1135
|
+
this._slots = ["paletteColors", "bgColors", "storyColors"];
|
|
1193
1136
|
this.paletteColors = params.paletteColors;
|
|
1194
1137
|
this.bgColors = params.bgColors;
|
|
1195
1138
|
this.storyColors = params.storyColors;
|
|
1196
1139
|
}
|
|
1197
1140
|
/**
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1141
|
+
* Generate the TLObject from buffer.
|
|
1142
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1143
|
+
*/
|
|
1201
1144
|
static async read(_data, ..._args) {
|
|
1202
1145
|
// no flags
|
|
1203
1146
|
let paletteColors = await TLObject.read(_data, Primitive.Int);
|
|
1204
1147
|
let bgColors = await TLObject.read(_data, Primitive.Int);
|
|
1205
1148
|
let storyColors = await TLObject.read(_data, Primitive.Int);
|
|
1206
|
-
return new PeerColorProfileSet({
|
|
1207
|
-
paletteColors: paletteColors,
|
|
1208
|
-
bgColors: bgColors,
|
|
1209
|
-
storyColors: storyColors,
|
|
1210
|
-
});
|
|
1149
|
+
return new PeerColorProfileSet({ "paletteColors": paletteColors, "bgColors": bgColors, "storyColors": storyColors });
|
|
1211
1150
|
}
|
|
1212
1151
|
/**
|
|
1213
|
-
|
|
1214
|
-
|
|
1152
|
+
* Generate buffer from TLObject.
|
|
1153
|
+
*/
|
|
1215
1154
|
write() {
|
|
1216
1155
|
const b = new BytesIO();
|
|
1217
1156
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1218
1157
|
// no flags
|
|
1219
1158
|
if (this.paletteColors) {
|
|
1220
|
-
b.write(Primitive.Vector.write(this.paletteColors, Primitive.Int));
|
|
1159
|
+
b.write((Primitive.Vector.write(this.paletteColors, Primitive.Int)));
|
|
1221
1160
|
}
|
|
1222
1161
|
if (this.bgColors) {
|
|
1223
|
-
b.write(Primitive.Vector.write(this.bgColors, Primitive.Int));
|
|
1162
|
+
b.write((Primitive.Vector.write(this.bgColors, Primitive.Int)));
|
|
1224
1163
|
}
|
|
1225
1164
|
if (this.storyColors) {
|
|
1226
|
-
b.write(Primitive.Vector.write(this.storyColors, Primitive.Int));
|
|
1165
|
+
b.write((Primitive.Vector.write(this.storyColors, Primitive.Int)));
|
|
1227
1166
|
}
|
|
1228
1167
|
return b.buffer;
|
|
1229
1168
|
}
|
|
@@ -1237,11 +1176,11 @@ export class PeerColorOption extends TLObject {
|
|
|
1237
1176
|
groupMinLevel;
|
|
1238
1177
|
constructor(params) {
|
|
1239
1178
|
super();
|
|
1240
|
-
this.classType =
|
|
1241
|
-
this.className =
|
|
1179
|
+
this.classType = "types";
|
|
1180
|
+
this.className = "help.PeerColorOption";
|
|
1242
1181
|
this.constructorId = 0xadec6ebe;
|
|
1243
1182
|
this.subclassOfId = 0x56b8ae98;
|
|
1244
|
-
this._slots = [
|
|
1183
|
+
this._slots = ["hidden", "colorId", "colors", "darkColors", "channelMinLevel", "groupMinLevel"];
|
|
1245
1184
|
this.hidden = params.hidden;
|
|
1246
1185
|
this.colorId = params.colorId;
|
|
1247
1186
|
this.colors = params.colors;
|
|
@@ -1250,43 +1189,36 @@ export class PeerColorOption extends TLObject {
|
|
|
1250
1189
|
this.groupMinLevel = params.groupMinLevel;
|
|
1251
1190
|
}
|
|
1252
1191
|
/**
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1192
|
+
* Generate the TLObject from buffer.
|
|
1193
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1194
|
+
*/
|
|
1256
1195
|
static async read(_data, ..._args) {
|
|
1257
1196
|
// @ts-ignore
|
|
1258
1197
|
let flags = await Primitive.Int.read(_data);
|
|
1259
|
-
let hidden = flags & (1 << 0) ? true : false;
|
|
1198
|
+
let hidden = (flags & (1 << 0)) ? true : false;
|
|
1260
1199
|
let colorId = await Primitive.Int.read(_data);
|
|
1261
|
-
let colors = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
1262
|
-
let darkColors = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
1263
|
-
let channelMinLevel = flags & (1 << 3) ? await Primitive.Int.read(_data) : undefined;
|
|
1264
|
-
let groupMinLevel = flags & (1 << 4) ? await Primitive.Int.read(_data) : undefined;
|
|
1265
|
-
return new PeerColorOption({
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
channelMinLevel: channelMinLevel,
|
|
1271
|
-
groupMinLevel: groupMinLevel,
|
|
1272
|
-
});
|
|
1273
|
-
}
|
|
1274
|
-
/**
|
|
1275
|
-
* Generate buffer from TLObject.
|
|
1276
|
-
*/
|
|
1200
|
+
let colors = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
|
|
1201
|
+
let darkColors = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
|
|
1202
|
+
let channelMinLevel = (flags & (1 << 3)) ? await Primitive.Int.read(_data) : undefined;
|
|
1203
|
+
let groupMinLevel = (flags & (1 << 4)) ? await Primitive.Int.read(_data) : undefined;
|
|
1204
|
+
return new PeerColorOption({ "hidden": hidden, "colorId": colorId, "colors": colors, "darkColors": darkColors, "channelMinLevel": channelMinLevel, "groupMinLevel": groupMinLevel });
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Generate buffer from TLObject.
|
|
1208
|
+
*/
|
|
1277
1209
|
write() {
|
|
1278
1210
|
const b = new BytesIO();
|
|
1279
1211
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1280
1212
|
// @ts-ignore
|
|
1281
1213
|
let flags = 0;
|
|
1282
|
-
flags |= this.hidden ? 1 << 0 : 0;
|
|
1283
|
-
flags |= this.colors !== undefined ? 1 << 1 : 0;
|
|
1284
|
-
flags |= this.darkColors !== undefined ? 1 << 2 : 0;
|
|
1285
|
-
flags |= this.channelMinLevel !== undefined ? 1 << 3 : 0;
|
|
1286
|
-
flags |= this.groupMinLevel !== undefined ? 1 << 4 : 0;
|
|
1287
|
-
b.write(Primitive.Int.write(flags));
|
|
1214
|
+
flags |= this.hidden ? (1 << 0) : 0;
|
|
1215
|
+
flags |= this.colors !== undefined ? (1 << 1) : 0;
|
|
1216
|
+
flags |= this.darkColors !== undefined ? (1 << 2) : 0;
|
|
1217
|
+
flags |= this.channelMinLevel !== undefined ? (1 << 3) : 0;
|
|
1218
|
+
flags |= this.groupMinLevel !== undefined ? (1 << 4) : 0;
|
|
1219
|
+
b.write((Primitive.Int.write(flags)));
|
|
1288
1220
|
if (this.colorId !== undefined) {
|
|
1289
|
-
b.write(Primitive.Int.write(this.colorId));
|
|
1221
|
+
b.write((Primitive.Int.write(this.colorId)));
|
|
1290
1222
|
}
|
|
1291
1223
|
if (this.colors !== undefined) {
|
|
1292
1224
|
b.write(this.colors.write());
|
|
@@ -1295,10 +1227,10 @@ export class PeerColorOption extends TLObject {
|
|
|
1295
1227
|
b.write(this.darkColors.write());
|
|
1296
1228
|
}
|
|
1297
1229
|
if (this.channelMinLevel !== undefined) {
|
|
1298
|
-
b.write(Primitive.Int.write(this.channelMinLevel));
|
|
1230
|
+
b.write((Primitive.Int.write(this.channelMinLevel)));
|
|
1299
1231
|
}
|
|
1300
1232
|
if (this.groupMinLevel !== undefined) {
|
|
1301
|
-
b.write(Primitive.Int.write(this.groupMinLevel));
|
|
1233
|
+
b.write((Primitive.Int.write(this.groupMinLevel)));
|
|
1302
1234
|
}
|
|
1303
1235
|
return b.buffer;
|
|
1304
1236
|
}
|
|
@@ -1306,23 +1238,23 @@ export class PeerColorOption extends TLObject {
|
|
|
1306
1238
|
export class PeerColorsNotModified extends TLObject {
|
|
1307
1239
|
constructor() {
|
|
1308
1240
|
super();
|
|
1309
|
-
this.classType =
|
|
1310
|
-
this.className =
|
|
1241
|
+
this.classType = "types";
|
|
1242
|
+
this.className = "help.PeerColorsNotModified";
|
|
1311
1243
|
this.constructorId = 0x2ba1f5ce;
|
|
1312
1244
|
this.subclassOfId = 0xe3f6733;
|
|
1313
1245
|
this._slots = [];
|
|
1314
1246
|
}
|
|
1315
1247
|
/**
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1248
|
+
* Generate the TLObject from buffer.
|
|
1249
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1250
|
+
*/
|
|
1319
1251
|
static async read(_data, ..._args) {
|
|
1320
1252
|
// no flags
|
|
1321
1253
|
return new PeerColorsNotModified();
|
|
1322
1254
|
}
|
|
1323
1255
|
/**
|
|
1324
|
-
|
|
1325
|
-
|
|
1256
|
+
* Generate buffer from TLObject.
|
|
1257
|
+
*/
|
|
1326
1258
|
write() {
|
|
1327
1259
|
const b = new BytesIO();
|
|
1328
1260
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1335,36 +1267,36 @@ export class PeerColors extends TLObject {
|
|
|
1335
1267
|
colors;
|
|
1336
1268
|
constructor(params) {
|
|
1337
1269
|
super();
|
|
1338
|
-
this.classType =
|
|
1339
|
-
this.className =
|
|
1270
|
+
this.classType = "types";
|
|
1271
|
+
this.className = "help.PeerColors";
|
|
1340
1272
|
this.constructorId = 0xf8ed08;
|
|
1341
1273
|
this.subclassOfId = 0xe3f6733;
|
|
1342
|
-
this._slots = [
|
|
1274
|
+
this._slots = ["hash", "colors"];
|
|
1343
1275
|
this.hash = params.hash;
|
|
1344
1276
|
this.colors = params.colors;
|
|
1345
1277
|
}
|
|
1346
1278
|
/**
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1279
|
+
* Generate the TLObject from buffer.
|
|
1280
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1281
|
+
*/
|
|
1350
1282
|
static async read(_data, ..._args) {
|
|
1351
1283
|
// no flags
|
|
1352
1284
|
let hash = await Primitive.Int.read(_data);
|
|
1353
1285
|
let colors = await TLObject.read(_data);
|
|
1354
|
-
return new PeerColors({ hash: hash, colors: colors });
|
|
1286
|
+
return new PeerColors({ "hash": hash, "colors": colors });
|
|
1355
1287
|
}
|
|
1356
1288
|
/**
|
|
1357
|
-
|
|
1358
|
-
|
|
1289
|
+
* Generate buffer from TLObject.
|
|
1290
|
+
*/
|
|
1359
1291
|
write() {
|
|
1360
1292
|
const b = new BytesIO();
|
|
1361
1293
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1362
1294
|
// no flags
|
|
1363
1295
|
if (this.hash !== undefined) {
|
|
1364
|
-
b.write(Primitive.Int.write(this.hash));
|
|
1296
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1365
1297
|
}
|
|
1366
1298
|
if (this.colors) {
|
|
1367
|
-
b.write(Primitive.Vector.write(this.colors));
|
|
1299
|
+
b.write((Primitive.Vector.write(this.colors)));
|
|
1368
1300
|
}
|
|
1369
1301
|
return b.buffer;
|
|
1370
1302
|
}
|
|
@@ -1372,23 +1304,23 @@ export class PeerColors extends TLObject {
|
|
|
1372
1304
|
export class TimezonesListNotModified extends TLObject {
|
|
1373
1305
|
constructor() {
|
|
1374
1306
|
super();
|
|
1375
|
-
this.classType =
|
|
1376
|
-
this.className =
|
|
1307
|
+
this.classType = "types";
|
|
1308
|
+
this.className = "help.TimezonesListNotModified";
|
|
1377
1309
|
this.constructorId = 0x970708cc;
|
|
1378
1310
|
this.subclassOfId = 0xca76e475;
|
|
1379
1311
|
this._slots = [];
|
|
1380
1312
|
}
|
|
1381
1313
|
/**
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1314
|
+
* Generate the TLObject from buffer.
|
|
1315
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1316
|
+
*/
|
|
1385
1317
|
static async read(_data, ..._args) {
|
|
1386
1318
|
// no flags
|
|
1387
1319
|
return new TimezonesListNotModified();
|
|
1388
1320
|
}
|
|
1389
1321
|
/**
|
|
1390
|
-
|
|
1391
|
-
|
|
1322
|
+
* Generate buffer from TLObject.
|
|
1323
|
+
*/
|
|
1392
1324
|
write() {
|
|
1393
1325
|
const b = new BytesIO();
|
|
1394
1326
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1401,36 +1333,36 @@ export class TimezonesList extends TLObject {
|
|
|
1401
1333
|
hash;
|
|
1402
1334
|
constructor(params) {
|
|
1403
1335
|
super();
|
|
1404
|
-
this.classType =
|
|
1405
|
-
this.className =
|
|
1336
|
+
this.classType = "types";
|
|
1337
|
+
this.className = "help.TimezonesList";
|
|
1406
1338
|
this.constructorId = 0x7b74ed71;
|
|
1407
1339
|
this.subclassOfId = 0xca76e475;
|
|
1408
|
-
this._slots = [
|
|
1340
|
+
this._slots = ["timezones", "hash"];
|
|
1409
1341
|
this.timezones = params.timezones;
|
|
1410
1342
|
this.hash = params.hash;
|
|
1411
1343
|
}
|
|
1412
1344
|
/**
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1345
|
+
* Generate the TLObject from buffer.
|
|
1346
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1347
|
+
*/
|
|
1416
1348
|
static async read(_data, ..._args) {
|
|
1417
1349
|
// no flags
|
|
1418
1350
|
let timezones = await TLObject.read(_data);
|
|
1419
1351
|
let hash = await Primitive.Int.read(_data);
|
|
1420
|
-
return new TimezonesList({ timezones: timezones, hash: hash });
|
|
1352
|
+
return new TimezonesList({ "timezones": timezones, "hash": hash });
|
|
1421
1353
|
}
|
|
1422
1354
|
/**
|
|
1423
|
-
|
|
1424
|
-
|
|
1355
|
+
* Generate buffer from TLObject.
|
|
1356
|
+
*/
|
|
1425
1357
|
write() {
|
|
1426
1358
|
const b = new BytesIO();
|
|
1427
1359
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1428
1360
|
// no flags
|
|
1429
1361
|
if (this.timezones) {
|
|
1430
|
-
b.write(Primitive.Vector.write(this.timezones));
|
|
1362
|
+
b.write((Primitive.Vector.write(this.timezones)));
|
|
1431
1363
|
}
|
|
1432
1364
|
if (this.hash !== undefined) {
|
|
1433
|
-
b.write(Primitive.Int.write(this.hash));
|
|
1365
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1434
1366
|
}
|
|
1435
1367
|
return b.buffer;
|
|
1436
1368
|
}
|
|
@@ -1439,23 +1371,23 @@ export class GetConfig extends TLObject {
|
|
|
1439
1371
|
__response__;
|
|
1440
1372
|
constructor() {
|
|
1441
1373
|
super();
|
|
1442
|
-
this.classType =
|
|
1443
|
-
this.className =
|
|
1374
|
+
this.classType = "functions";
|
|
1375
|
+
this.className = "help.GetConfig";
|
|
1444
1376
|
this.constructorId = 0xc4f9186b;
|
|
1445
1377
|
this.subclassOfId = 0xd3262a4a;
|
|
1446
1378
|
this._slots = [];
|
|
1447
1379
|
}
|
|
1448
1380
|
/**
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1381
|
+
* Generate the TLObject from buffer.
|
|
1382
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1383
|
+
*/
|
|
1452
1384
|
static async read(_data, ..._args) {
|
|
1453
1385
|
// no flags
|
|
1454
1386
|
return new GetConfig();
|
|
1455
1387
|
}
|
|
1456
1388
|
/**
|
|
1457
|
-
|
|
1458
|
-
|
|
1389
|
+
* Generate buffer from TLObject.
|
|
1390
|
+
*/
|
|
1459
1391
|
write() {
|
|
1460
1392
|
const b = new BytesIO();
|
|
1461
1393
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1467,23 +1399,23 @@ export class GetNearestDc extends TLObject {
|
|
|
1467
1399
|
__response__;
|
|
1468
1400
|
constructor() {
|
|
1469
1401
|
super();
|
|
1470
|
-
this.classType =
|
|
1471
|
-
this.className =
|
|
1402
|
+
this.classType = "functions";
|
|
1403
|
+
this.className = "help.GetNearestDc";
|
|
1472
1404
|
this.constructorId = 0x1fb33026;
|
|
1473
1405
|
this.subclassOfId = 0x3877045f;
|
|
1474
1406
|
this._slots = [];
|
|
1475
1407
|
}
|
|
1476
1408
|
/**
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1409
|
+
* Generate the TLObject from buffer.
|
|
1410
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1411
|
+
*/
|
|
1480
1412
|
static async read(_data, ..._args) {
|
|
1481
1413
|
// no flags
|
|
1482
1414
|
return new GetNearestDc();
|
|
1483
1415
|
}
|
|
1484
1416
|
/**
|
|
1485
|
-
|
|
1486
|
-
|
|
1417
|
+
* Generate buffer from TLObject.
|
|
1418
|
+
*/
|
|
1487
1419
|
write() {
|
|
1488
1420
|
const b = new BytesIO();
|
|
1489
1421
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1496,31 +1428,31 @@ export class GetAppUpdate extends TLObject {
|
|
|
1496
1428
|
source;
|
|
1497
1429
|
constructor(params) {
|
|
1498
1430
|
super();
|
|
1499
|
-
this.classType =
|
|
1500
|
-
this.className =
|
|
1431
|
+
this.classType = "functions";
|
|
1432
|
+
this.className = "help.GetAppUpdate";
|
|
1501
1433
|
this.constructorId = 0x522d5a7d;
|
|
1502
1434
|
this.subclassOfId = 0x5897069e;
|
|
1503
|
-
this._slots = [
|
|
1435
|
+
this._slots = ["source"];
|
|
1504
1436
|
this.source = params.source;
|
|
1505
1437
|
}
|
|
1506
1438
|
/**
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1439
|
+
* Generate the TLObject from buffer.
|
|
1440
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1441
|
+
*/
|
|
1510
1442
|
static async read(_data, ..._args) {
|
|
1511
1443
|
// no flags
|
|
1512
1444
|
let source = await Primitive.String.read(_data);
|
|
1513
|
-
return new GetAppUpdate({ source: source });
|
|
1445
|
+
return new GetAppUpdate({ "source": source });
|
|
1514
1446
|
}
|
|
1515
1447
|
/**
|
|
1516
|
-
|
|
1517
|
-
|
|
1448
|
+
* Generate buffer from TLObject.
|
|
1449
|
+
*/
|
|
1518
1450
|
write() {
|
|
1519
1451
|
const b = new BytesIO();
|
|
1520
1452
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1521
1453
|
// no flags
|
|
1522
1454
|
if (this.source !== undefined) {
|
|
1523
|
-
b.write(Primitive.String.write(this.source));
|
|
1455
|
+
b.write((Primitive.String.write(this.source)));
|
|
1524
1456
|
}
|
|
1525
1457
|
return b.buffer;
|
|
1526
1458
|
}
|
|
@@ -1529,23 +1461,23 @@ export class GetInviteText extends TLObject {
|
|
|
1529
1461
|
__response__;
|
|
1530
1462
|
constructor() {
|
|
1531
1463
|
super();
|
|
1532
|
-
this.classType =
|
|
1533
|
-
this.className =
|
|
1464
|
+
this.classType = "functions";
|
|
1465
|
+
this.className = "help.GetInviteText";
|
|
1534
1466
|
this.constructorId = 0x4d392343;
|
|
1535
1467
|
this.subclassOfId = 0xcf70aa35;
|
|
1536
1468
|
this._slots = [];
|
|
1537
1469
|
}
|
|
1538
1470
|
/**
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1471
|
+
* Generate the TLObject from buffer.
|
|
1472
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1473
|
+
*/
|
|
1542
1474
|
static async read(_data, ..._args) {
|
|
1543
1475
|
// no flags
|
|
1544
1476
|
return new GetInviteText();
|
|
1545
1477
|
}
|
|
1546
1478
|
/**
|
|
1547
|
-
|
|
1548
|
-
|
|
1479
|
+
* Generate buffer from TLObject.
|
|
1480
|
+
*/
|
|
1549
1481
|
write() {
|
|
1550
1482
|
const b = new BytesIO();
|
|
1551
1483
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1557,23 +1489,23 @@ export class GetSupport extends TLObject {
|
|
|
1557
1489
|
__response__;
|
|
1558
1490
|
constructor() {
|
|
1559
1491
|
super();
|
|
1560
|
-
this.classType =
|
|
1561
|
-
this.className =
|
|
1492
|
+
this.classType = "functions";
|
|
1493
|
+
this.className = "help.GetSupport";
|
|
1562
1494
|
this.constructorId = 0x9cdf08cd;
|
|
1563
1495
|
this.subclassOfId = 0x7159bceb;
|
|
1564
1496
|
this._slots = [];
|
|
1565
1497
|
}
|
|
1566
1498
|
/**
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1499
|
+
* Generate the TLObject from buffer.
|
|
1500
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1501
|
+
*/
|
|
1570
1502
|
static async read(_data, ..._args) {
|
|
1571
1503
|
// no flags
|
|
1572
1504
|
return new GetSupport();
|
|
1573
1505
|
}
|
|
1574
1506
|
/**
|
|
1575
|
-
|
|
1576
|
-
|
|
1507
|
+
* Generate buffer from TLObject.
|
|
1508
|
+
*/
|
|
1577
1509
|
write() {
|
|
1578
1510
|
const b = new BytesIO();
|
|
1579
1511
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1587,36 +1519,36 @@ export class SetBotUpdatesStatus extends TLObject {
|
|
|
1587
1519
|
message;
|
|
1588
1520
|
constructor(params) {
|
|
1589
1521
|
super();
|
|
1590
|
-
this.classType =
|
|
1591
|
-
this.className =
|
|
1522
|
+
this.classType = "functions";
|
|
1523
|
+
this.className = "help.SetBotUpdatesStatus";
|
|
1592
1524
|
this.constructorId = 0xec22cfcd;
|
|
1593
1525
|
this.subclassOfId = 0xf5b399ac;
|
|
1594
|
-
this._slots = [
|
|
1526
|
+
this._slots = ["pendingUpdatesCount", "message"];
|
|
1595
1527
|
this.pendingUpdatesCount = params.pendingUpdatesCount;
|
|
1596
1528
|
this.message = params.message;
|
|
1597
1529
|
}
|
|
1598
1530
|
/**
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1531
|
+
* Generate the TLObject from buffer.
|
|
1532
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1533
|
+
*/
|
|
1602
1534
|
static async read(_data, ..._args) {
|
|
1603
1535
|
// no flags
|
|
1604
1536
|
let pendingUpdatesCount = await Primitive.Int.read(_data);
|
|
1605
1537
|
let message = await Primitive.String.read(_data);
|
|
1606
|
-
return new SetBotUpdatesStatus({ pendingUpdatesCount: pendingUpdatesCount, message: message });
|
|
1538
|
+
return new SetBotUpdatesStatus({ "pendingUpdatesCount": pendingUpdatesCount, "message": message });
|
|
1607
1539
|
}
|
|
1608
1540
|
/**
|
|
1609
|
-
|
|
1610
|
-
|
|
1541
|
+
* Generate buffer from TLObject.
|
|
1542
|
+
*/
|
|
1611
1543
|
write() {
|
|
1612
1544
|
const b = new BytesIO();
|
|
1613
1545
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1614
1546
|
// no flags
|
|
1615
1547
|
if (this.pendingUpdatesCount !== undefined) {
|
|
1616
|
-
b.write(Primitive.Int.write(this.pendingUpdatesCount));
|
|
1548
|
+
b.write((Primitive.Int.write(this.pendingUpdatesCount)));
|
|
1617
1549
|
}
|
|
1618
1550
|
if (this.message !== undefined) {
|
|
1619
|
-
b.write(Primitive.String.write(this.message));
|
|
1551
|
+
b.write((Primitive.String.write(this.message)));
|
|
1620
1552
|
}
|
|
1621
1553
|
return b.buffer;
|
|
1622
1554
|
}
|
|
@@ -1625,23 +1557,23 @@ export class GetCdnConfig extends TLObject {
|
|
|
1625
1557
|
__response__;
|
|
1626
1558
|
constructor() {
|
|
1627
1559
|
super();
|
|
1628
|
-
this.classType =
|
|
1629
|
-
this.className =
|
|
1560
|
+
this.classType = "functions";
|
|
1561
|
+
this.className = "help.GetCdnConfig";
|
|
1630
1562
|
this.constructorId = 0x52029342;
|
|
1631
1563
|
this.subclassOfId = 0xecda397c;
|
|
1632
1564
|
this._slots = [];
|
|
1633
1565
|
}
|
|
1634
1566
|
/**
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1567
|
+
* Generate the TLObject from buffer.
|
|
1568
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1569
|
+
*/
|
|
1638
1570
|
static async read(_data, ..._args) {
|
|
1639
1571
|
// no flags
|
|
1640
1572
|
return new GetCdnConfig();
|
|
1641
1573
|
}
|
|
1642
1574
|
/**
|
|
1643
|
-
|
|
1644
|
-
|
|
1575
|
+
* Generate buffer from TLObject.
|
|
1576
|
+
*/
|
|
1645
1577
|
write() {
|
|
1646
1578
|
const b = new BytesIO();
|
|
1647
1579
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1654,31 +1586,31 @@ export class GetRecentMeUrls extends TLObject {
|
|
|
1654
1586
|
referer;
|
|
1655
1587
|
constructor(params) {
|
|
1656
1588
|
super();
|
|
1657
|
-
this.classType =
|
|
1658
|
-
this.className =
|
|
1589
|
+
this.classType = "functions";
|
|
1590
|
+
this.className = "help.GetRecentMeUrls";
|
|
1659
1591
|
this.constructorId = 0x3dc0f114;
|
|
1660
1592
|
this.subclassOfId = 0xf269c477;
|
|
1661
|
-
this._slots = [
|
|
1593
|
+
this._slots = ["referer"];
|
|
1662
1594
|
this.referer = params.referer;
|
|
1663
1595
|
}
|
|
1664
1596
|
/**
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1597
|
+
* Generate the TLObject from buffer.
|
|
1598
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1599
|
+
*/
|
|
1668
1600
|
static async read(_data, ..._args) {
|
|
1669
1601
|
// no flags
|
|
1670
1602
|
let referer = await Primitive.String.read(_data);
|
|
1671
|
-
return new GetRecentMeUrls({ referer: referer });
|
|
1603
|
+
return new GetRecentMeUrls({ "referer": referer });
|
|
1672
1604
|
}
|
|
1673
1605
|
/**
|
|
1674
|
-
|
|
1675
|
-
|
|
1606
|
+
* Generate buffer from TLObject.
|
|
1607
|
+
*/
|
|
1676
1608
|
write() {
|
|
1677
1609
|
const b = new BytesIO();
|
|
1678
1610
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1679
1611
|
// no flags
|
|
1680
1612
|
if (this.referer !== undefined) {
|
|
1681
|
-
b.write(Primitive.String.write(this.referer));
|
|
1613
|
+
b.write((Primitive.String.write(this.referer)));
|
|
1682
1614
|
}
|
|
1683
1615
|
return b.buffer;
|
|
1684
1616
|
}
|
|
@@ -1687,23 +1619,23 @@ export class GetTermsOfServiceUpdate extends TLObject {
|
|
|
1687
1619
|
__response__;
|
|
1688
1620
|
constructor() {
|
|
1689
1621
|
super();
|
|
1690
|
-
this.classType =
|
|
1691
|
-
this.className =
|
|
1622
|
+
this.classType = "functions";
|
|
1623
|
+
this.className = "help.GetTermsOfServiceUpdate";
|
|
1692
1624
|
this.constructorId = 0x2ca51fd1;
|
|
1693
1625
|
this.subclassOfId = 0x293c2977;
|
|
1694
1626
|
this._slots = [];
|
|
1695
1627
|
}
|
|
1696
1628
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1629
|
+
* Generate the TLObject from buffer.
|
|
1630
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1631
|
+
*/
|
|
1700
1632
|
static async read(_data, ..._args) {
|
|
1701
1633
|
// no flags
|
|
1702
1634
|
return new GetTermsOfServiceUpdate();
|
|
1703
1635
|
}
|
|
1704
1636
|
/**
|
|
1705
|
-
|
|
1706
|
-
|
|
1637
|
+
* Generate buffer from TLObject.
|
|
1638
|
+
*/
|
|
1707
1639
|
write() {
|
|
1708
1640
|
const b = new BytesIO();
|
|
1709
1641
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1716,25 +1648,25 @@ export class AcceptTermsOfService extends TLObject {
|
|
|
1716
1648
|
id;
|
|
1717
1649
|
constructor(params) {
|
|
1718
1650
|
super();
|
|
1719
|
-
this.classType =
|
|
1720
|
-
this.className =
|
|
1651
|
+
this.classType = "functions";
|
|
1652
|
+
this.className = "help.AcceptTermsOfService";
|
|
1721
1653
|
this.constructorId = 0xee72f79a;
|
|
1722
1654
|
this.subclassOfId = 0xf5b399ac;
|
|
1723
|
-
this._slots = [
|
|
1655
|
+
this._slots = ["id"];
|
|
1724
1656
|
this.id = params.id;
|
|
1725
1657
|
}
|
|
1726
1658
|
/**
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1659
|
+
* Generate the TLObject from buffer.
|
|
1660
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1661
|
+
*/
|
|
1730
1662
|
static async read(_data, ..._args) {
|
|
1731
1663
|
// no flags
|
|
1732
1664
|
let id = await TLObject.read(_data);
|
|
1733
|
-
return new AcceptTermsOfService({ id: id });
|
|
1665
|
+
return new AcceptTermsOfService({ "id": id });
|
|
1734
1666
|
}
|
|
1735
1667
|
/**
|
|
1736
|
-
|
|
1737
|
-
|
|
1668
|
+
* Generate buffer from TLObject.
|
|
1669
|
+
*/
|
|
1738
1670
|
write() {
|
|
1739
1671
|
const b = new BytesIO();
|
|
1740
1672
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1750,31 +1682,31 @@ export class GetDeepLinkInfo extends TLObject {
|
|
|
1750
1682
|
path;
|
|
1751
1683
|
constructor(params) {
|
|
1752
1684
|
super();
|
|
1753
|
-
this.classType =
|
|
1754
|
-
this.className =
|
|
1685
|
+
this.classType = "functions";
|
|
1686
|
+
this.className = "help.GetDeepLinkInfo";
|
|
1755
1687
|
this.constructorId = 0x3fedc75f;
|
|
1756
1688
|
this.subclassOfId = 0x984aac38;
|
|
1757
|
-
this._slots = [
|
|
1689
|
+
this._slots = ["path"];
|
|
1758
1690
|
this.path = params.path;
|
|
1759
1691
|
}
|
|
1760
1692
|
/**
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1693
|
+
* Generate the TLObject from buffer.
|
|
1694
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1695
|
+
*/
|
|
1764
1696
|
static async read(_data, ..._args) {
|
|
1765
1697
|
// no flags
|
|
1766
1698
|
let path = await Primitive.String.read(_data);
|
|
1767
|
-
return new GetDeepLinkInfo({ path: path });
|
|
1699
|
+
return new GetDeepLinkInfo({ "path": path });
|
|
1768
1700
|
}
|
|
1769
1701
|
/**
|
|
1770
|
-
|
|
1771
|
-
|
|
1702
|
+
* Generate buffer from TLObject.
|
|
1703
|
+
*/
|
|
1772
1704
|
write() {
|
|
1773
1705
|
const b = new BytesIO();
|
|
1774
1706
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1775
1707
|
// no flags
|
|
1776
1708
|
if (this.path !== undefined) {
|
|
1777
|
-
b.write(Primitive.String.write(this.path));
|
|
1709
|
+
b.write((Primitive.String.write(this.path)));
|
|
1778
1710
|
}
|
|
1779
1711
|
return b.buffer;
|
|
1780
1712
|
}
|
|
@@ -1784,31 +1716,31 @@ export class GetAppConfig extends TLObject {
|
|
|
1784
1716
|
hash;
|
|
1785
1717
|
constructor(params) {
|
|
1786
1718
|
super();
|
|
1787
|
-
this.classType =
|
|
1788
|
-
this.className =
|
|
1719
|
+
this.classType = "functions";
|
|
1720
|
+
this.className = "help.GetAppConfig";
|
|
1789
1721
|
this.constructorId = 0x61e3f854;
|
|
1790
1722
|
this.subclassOfId = 0x14381c9a;
|
|
1791
|
-
this._slots = [
|
|
1723
|
+
this._slots = ["hash"];
|
|
1792
1724
|
this.hash = params.hash;
|
|
1793
1725
|
}
|
|
1794
1726
|
/**
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1727
|
+
* Generate the TLObject from buffer.
|
|
1728
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1729
|
+
*/
|
|
1798
1730
|
static async read(_data, ..._args) {
|
|
1799
1731
|
// no flags
|
|
1800
1732
|
let hash = await Primitive.Int.read(_data);
|
|
1801
|
-
return new GetAppConfig({ hash: hash });
|
|
1733
|
+
return new GetAppConfig({ "hash": hash });
|
|
1802
1734
|
}
|
|
1803
1735
|
/**
|
|
1804
|
-
|
|
1805
|
-
|
|
1736
|
+
* Generate buffer from TLObject.
|
|
1737
|
+
*/
|
|
1806
1738
|
write() {
|
|
1807
1739
|
const b = new BytesIO();
|
|
1808
1740
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1809
1741
|
// no flags
|
|
1810
1742
|
if (this.hash !== undefined) {
|
|
1811
|
-
b.write(Primitive.Int.write(this.hash));
|
|
1743
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1812
1744
|
}
|
|
1813
1745
|
return b.buffer;
|
|
1814
1746
|
}
|
|
@@ -1818,31 +1750,31 @@ export class SaveAppLog extends TLObject {
|
|
|
1818
1750
|
events;
|
|
1819
1751
|
constructor(params) {
|
|
1820
1752
|
super();
|
|
1821
|
-
this.classType =
|
|
1822
|
-
this.className =
|
|
1753
|
+
this.classType = "functions";
|
|
1754
|
+
this.className = "help.SaveAppLog";
|
|
1823
1755
|
this.constructorId = 0x6f02f748;
|
|
1824
1756
|
this.subclassOfId = 0xf5b399ac;
|
|
1825
|
-
this._slots = [
|
|
1757
|
+
this._slots = ["events"];
|
|
1826
1758
|
this.events = params.events;
|
|
1827
1759
|
}
|
|
1828
1760
|
/**
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1761
|
+
* Generate the TLObject from buffer.
|
|
1762
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1763
|
+
*/
|
|
1832
1764
|
static async read(_data, ..._args) {
|
|
1833
1765
|
// no flags
|
|
1834
1766
|
let events = await TLObject.read(_data);
|
|
1835
|
-
return new SaveAppLog({ events: events });
|
|
1767
|
+
return new SaveAppLog({ "events": events });
|
|
1836
1768
|
}
|
|
1837
1769
|
/**
|
|
1838
|
-
|
|
1839
|
-
|
|
1770
|
+
* Generate buffer from TLObject.
|
|
1771
|
+
*/
|
|
1840
1772
|
write() {
|
|
1841
1773
|
const b = new BytesIO();
|
|
1842
1774
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1843
1775
|
// no flags
|
|
1844
1776
|
if (this.events) {
|
|
1845
|
-
b.write(Primitive.Vector.write(this.events));
|
|
1777
|
+
b.write((Primitive.Vector.write(this.events)));
|
|
1846
1778
|
}
|
|
1847
1779
|
return b.buffer;
|
|
1848
1780
|
}
|
|
@@ -1852,31 +1784,31 @@ export class GetPassportConfig extends TLObject {
|
|
|
1852
1784
|
hash;
|
|
1853
1785
|
constructor(params) {
|
|
1854
1786
|
super();
|
|
1855
|
-
this.classType =
|
|
1856
|
-
this.className =
|
|
1787
|
+
this.classType = "functions";
|
|
1788
|
+
this.className = "help.GetPassportConfig";
|
|
1857
1789
|
this.constructorId = 0xc661ad08;
|
|
1858
1790
|
this.subclassOfId = 0xc666c0ad;
|
|
1859
|
-
this._slots = [
|
|
1791
|
+
this._slots = ["hash"];
|
|
1860
1792
|
this.hash = params.hash;
|
|
1861
1793
|
}
|
|
1862
1794
|
/**
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1795
|
+
* Generate the TLObject from buffer.
|
|
1796
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1797
|
+
*/
|
|
1866
1798
|
static async read(_data, ..._args) {
|
|
1867
1799
|
// no flags
|
|
1868
1800
|
let hash = await Primitive.Int.read(_data);
|
|
1869
|
-
return new GetPassportConfig({ hash: hash });
|
|
1801
|
+
return new GetPassportConfig({ "hash": hash });
|
|
1870
1802
|
}
|
|
1871
1803
|
/**
|
|
1872
|
-
|
|
1873
|
-
|
|
1804
|
+
* Generate buffer from TLObject.
|
|
1805
|
+
*/
|
|
1874
1806
|
write() {
|
|
1875
1807
|
const b = new BytesIO();
|
|
1876
1808
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1877
1809
|
// no flags
|
|
1878
1810
|
if (this.hash !== undefined) {
|
|
1879
|
-
b.write(Primitive.Int.write(this.hash));
|
|
1811
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
1880
1812
|
}
|
|
1881
1813
|
return b.buffer;
|
|
1882
1814
|
}
|
|
@@ -1885,23 +1817,23 @@ export class GetSupportName extends TLObject {
|
|
|
1885
1817
|
__response__;
|
|
1886
1818
|
constructor() {
|
|
1887
1819
|
super();
|
|
1888
|
-
this.classType =
|
|
1889
|
-
this.className =
|
|
1820
|
+
this.classType = "functions";
|
|
1821
|
+
this.className = "help.GetSupportName";
|
|
1890
1822
|
this.constructorId = 0xd360e72c;
|
|
1891
1823
|
this.subclassOfId = 0x7f50b7c2;
|
|
1892
1824
|
this._slots = [];
|
|
1893
1825
|
}
|
|
1894
1826
|
/**
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1827
|
+
* Generate the TLObject from buffer.
|
|
1828
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1829
|
+
*/
|
|
1898
1830
|
static async read(_data, ..._args) {
|
|
1899
1831
|
// no flags
|
|
1900
1832
|
return new GetSupportName();
|
|
1901
1833
|
}
|
|
1902
1834
|
/**
|
|
1903
|
-
|
|
1904
|
-
|
|
1835
|
+
* Generate buffer from TLObject.
|
|
1836
|
+
*/
|
|
1905
1837
|
write() {
|
|
1906
1838
|
const b = new BytesIO();
|
|
1907
1839
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1914,25 +1846,25 @@ export class GetUserInfo extends TLObject {
|
|
|
1914
1846
|
userId;
|
|
1915
1847
|
constructor(params) {
|
|
1916
1848
|
super();
|
|
1917
|
-
this.classType =
|
|
1918
|
-
this.className =
|
|
1849
|
+
this.classType = "functions";
|
|
1850
|
+
this.className = "help.GetUserInfo";
|
|
1919
1851
|
this.constructorId = 0x38a08d3;
|
|
1920
1852
|
this.subclassOfId = 0x5c53d7d8;
|
|
1921
|
-
this._slots = [
|
|
1853
|
+
this._slots = ["userId"];
|
|
1922
1854
|
this.userId = params.userId;
|
|
1923
1855
|
}
|
|
1924
1856
|
/**
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1857
|
+
* Generate the TLObject from buffer.
|
|
1858
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1859
|
+
*/
|
|
1928
1860
|
static async read(_data, ..._args) {
|
|
1929
1861
|
// no flags
|
|
1930
1862
|
let userId = await TLObject.read(_data);
|
|
1931
|
-
return new GetUserInfo({ userId: userId });
|
|
1863
|
+
return new GetUserInfo({ "userId": userId });
|
|
1932
1864
|
}
|
|
1933
1865
|
/**
|
|
1934
|
-
|
|
1935
|
-
|
|
1866
|
+
* Generate buffer from TLObject.
|
|
1867
|
+
*/
|
|
1936
1868
|
write() {
|
|
1937
1869
|
const b = new BytesIO();
|
|
1938
1870
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1950,29 +1882,29 @@ export class EditUserInfo extends TLObject {
|
|
|
1950
1882
|
entities;
|
|
1951
1883
|
constructor(params) {
|
|
1952
1884
|
super();
|
|
1953
|
-
this.classType =
|
|
1954
|
-
this.className =
|
|
1885
|
+
this.classType = "functions";
|
|
1886
|
+
this.className = "help.EditUserInfo";
|
|
1955
1887
|
this.constructorId = 0x66b91b70;
|
|
1956
1888
|
this.subclassOfId = 0x5c53d7d8;
|
|
1957
|
-
this._slots = [
|
|
1889
|
+
this._slots = ["userId", "message", "entities"];
|
|
1958
1890
|
this.userId = params.userId;
|
|
1959
1891
|
this.message = params.message;
|
|
1960
1892
|
this.entities = params.entities;
|
|
1961
1893
|
}
|
|
1962
1894
|
/**
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1895
|
+
* Generate the TLObject from buffer.
|
|
1896
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1897
|
+
*/
|
|
1966
1898
|
static async read(_data, ..._args) {
|
|
1967
1899
|
// no flags
|
|
1968
1900
|
let userId = await TLObject.read(_data);
|
|
1969
1901
|
let message = await Primitive.String.read(_data);
|
|
1970
1902
|
let entities = await TLObject.read(_data);
|
|
1971
|
-
return new EditUserInfo({ userId: userId, message: message, entities: entities });
|
|
1903
|
+
return new EditUserInfo({ "userId": userId, "message": message, "entities": entities });
|
|
1972
1904
|
}
|
|
1973
1905
|
/**
|
|
1974
|
-
|
|
1975
|
-
|
|
1906
|
+
* Generate buffer from TLObject.
|
|
1907
|
+
*/
|
|
1976
1908
|
write() {
|
|
1977
1909
|
const b = new BytesIO();
|
|
1978
1910
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1981,10 +1913,10 @@ export class EditUserInfo extends TLObject {
|
|
|
1981
1913
|
b.write(this.userId.write());
|
|
1982
1914
|
}
|
|
1983
1915
|
if (this.message !== undefined) {
|
|
1984
|
-
b.write(Primitive.String.write(this.message));
|
|
1916
|
+
b.write((Primitive.String.write(this.message)));
|
|
1985
1917
|
}
|
|
1986
1918
|
if (this.entities) {
|
|
1987
|
-
b.write(Primitive.Vector.write(this.entities));
|
|
1919
|
+
b.write((Primitive.Vector.write(this.entities)));
|
|
1988
1920
|
}
|
|
1989
1921
|
return b.buffer;
|
|
1990
1922
|
}
|
|
@@ -1993,23 +1925,23 @@ export class GetPromoData extends TLObject {
|
|
|
1993
1925
|
__response__;
|
|
1994
1926
|
constructor() {
|
|
1995
1927
|
super();
|
|
1996
|
-
this.classType =
|
|
1997
|
-
this.className =
|
|
1928
|
+
this.classType = "functions";
|
|
1929
|
+
this.className = "help.GetPromoData";
|
|
1998
1930
|
this.constructorId = 0xc0977421;
|
|
1999
1931
|
this.subclassOfId = 0x9d595542;
|
|
2000
1932
|
this._slots = [];
|
|
2001
1933
|
}
|
|
2002
1934
|
/**
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
1935
|
+
* Generate the TLObject from buffer.
|
|
1936
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1937
|
+
*/
|
|
2006
1938
|
static async read(_data, ..._args) {
|
|
2007
1939
|
// no flags
|
|
2008
1940
|
return new GetPromoData();
|
|
2009
1941
|
}
|
|
2010
1942
|
/**
|
|
2011
|
-
|
|
2012
|
-
|
|
1943
|
+
* Generate buffer from TLObject.
|
|
1944
|
+
*/
|
|
2013
1945
|
write() {
|
|
2014
1946
|
const b = new BytesIO();
|
|
2015
1947
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2022,25 +1954,25 @@ export class HidePromoData extends TLObject {
|
|
|
2022
1954
|
peer;
|
|
2023
1955
|
constructor(params) {
|
|
2024
1956
|
super();
|
|
2025
|
-
this.classType =
|
|
2026
|
-
this.className =
|
|
1957
|
+
this.classType = "functions";
|
|
1958
|
+
this.className = "help.HidePromoData";
|
|
2027
1959
|
this.constructorId = 0x1e251c95;
|
|
2028
1960
|
this.subclassOfId = 0xf5b399ac;
|
|
2029
|
-
this._slots = [
|
|
1961
|
+
this._slots = ["peer"];
|
|
2030
1962
|
this.peer = params.peer;
|
|
2031
1963
|
}
|
|
2032
1964
|
/**
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
1965
|
+
* Generate the TLObject from buffer.
|
|
1966
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1967
|
+
*/
|
|
2036
1968
|
static async read(_data, ..._args) {
|
|
2037
1969
|
// no flags
|
|
2038
1970
|
let peer = await TLObject.read(_data);
|
|
2039
|
-
return new HidePromoData({ peer: peer });
|
|
1971
|
+
return new HidePromoData({ "peer": peer });
|
|
2040
1972
|
}
|
|
2041
1973
|
/**
|
|
2042
|
-
|
|
2043
|
-
|
|
1974
|
+
* Generate buffer from TLObject.
|
|
1975
|
+
*/
|
|
2044
1976
|
write() {
|
|
2045
1977
|
const b = new BytesIO();
|
|
2046
1978
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2057,27 +1989,27 @@ export class DismissSuggestion extends TLObject {
|
|
|
2057
1989
|
suggestion;
|
|
2058
1990
|
constructor(params) {
|
|
2059
1991
|
super();
|
|
2060
|
-
this.classType =
|
|
2061
|
-
this.className =
|
|
1992
|
+
this.classType = "functions";
|
|
1993
|
+
this.className = "help.DismissSuggestion";
|
|
2062
1994
|
this.constructorId = 0xf50dbaa1;
|
|
2063
1995
|
this.subclassOfId = 0xf5b399ac;
|
|
2064
|
-
this._slots = [
|
|
1996
|
+
this._slots = ["peer", "suggestion"];
|
|
2065
1997
|
this.peer = params.peer;
|
|
2066
1998
|
this.suggestion = params.suggestion;
|
|
2067
1999
|
}
|
|
2068
2000
|
/**
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2001
|
+
* Generate the TLObject from buffer.
|
|
2002
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2003
|
+
*/
|
|
2072
2004
|
static async read(_data, ..._args) {
|
|
2073
2005
|
// no flags
|
|
2074
2006
|
let peer = await TLObject.read(_data);
|
|
2075
2007
|
let suggestion = await Primitive.String.read(_data);
|
|
2076
|
-
return new DismissSuggestion({ peer: peer, suggestion: suggestion });
|
|
2008
|
+
return new DismissSuggestion({ "peer": peer, "suggestion": suggestion });
|
|
2077
2009
|
}
|
|
2078
2010
|
/**
|
|
2079
|
-
|
|
2080
|
-
|
|
2011
|
+
* Generate buffer from TLObject.
|
|
2012
|
+
*/
|
|
2081
2013
|
write() {
|
|
2082
2014
|
const b = new BytesIO();
|
|
2083
2015
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2086,7 +2018,7 @@ export class DismissSuggestion extends TLObject {
|
|
|
2086
2018
|
b.write(this.peer.write());
|
|
2087
2019
|
}
|
|
2088
2020
|
if (this.suggestion !== undefined) {
|
|
2089
|
-
b.write(Primitive.String.write(this.suggestion));
|
|
2021
|
+
b.write((Primitive.String.write(this.suggestion)));
|
|
2090
2022
|
}
|
|
2091
2023
|
return b.buffer;
|
|
2092
2024
|
}
|
|
@@ -2097,36 +2029,36 @@ export class GetCountriesList extends TLObject {
|
|
|
2097
2029
|
hash;
|
|
2098
2030
|
constructor(params) {
|
|
2099
2031
|
super();
|
|
2100
|
-
this.classType =
|
|
2101
|
-
this.className =
|
|
2032
|
+
this.classType = "functions";
|
|
2033
|
+
this.className = "help.GetCountriesList";
|
|
2102
2034
|
this.constructorId = 0x735787a8;
|
|
2103
2035
|
this.subclassOfId = 0xea31fe88;
|
|
2104
|
-
this._slots = [
|
|
2036
|
+
this._slots = ["langCode", "hash"];
|
|
2105
2037
|
this.langCode = params.langCode;
|
|
2106
2038
|
this.hash = params.hash;
|
|
2107
2039
|
}
|
|
2108
2040
|
/**
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2041
|
+
* Generate the TLObject from buffer.
|
|
2042
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2043
|
+
*/
|
|
2112
2044
|
static async read(_data, ..._args) {
|
|
2113
2045
|
// no flags
|
|
2114
2046
|
let langCode = await Primitive.String.read(_data);
|
|
2115
2047
|
let hash = await Primitive.Int.read(_data);
|
|
2116
|
-
return new GetCountriesList({ langCode: langCode, hash: hash });
|
|
2048
|
+
return new GetCountriesList({ "langCode": langCode, "hash": hash });
|
|
2117
2049
|
}
|
|
2118
2050
|
/**
|
|
2119
|
-
|
|
2120
|
-
|
|
2051
|
+
* Generate buffer from TLObject.
|
|
2052
|
+
*/
|
|
2121
2053
|
write() {
|
|
2122
2054
|
const b = new BytesIO();
|
|
2123
2055
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2124
2056
|
// no flags
|
|
2125
2057
|
if (this.langCode !== undefined) {
|
|
2126
|
-
b.write(Primitive.String.write(this.langCode));
|
|
2058
|
+
b.write((Primitive.String.write(this.langCode)));
|
|
2127
2059
|
}
|
|
2128
2060
|
if (this.hash !== undefined) {
|
|
2129
|
-
b.write(Primitive.Int.write(this.hash));
|
|
2061
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
2130
2062
|
}
|
|
2131
2063
|
return b.buffer;
|
|
2132
2064
|
}
|
|
@@ -2135,23 +2067,23 @@ export class GetPremiumPromo extends TLObject {
|
|
|
2135
2067
|
__response__;
|
|
2136
2068
|
constructor() {
|
|
2137
2069
|
super();
|
|
2138
|
-
this.classType =
|
|
2139
|
-
this.className =
|
|
2070
|
+
this.classType = "functions";
|
|
2071
|
+
this.className = "help.GetPremiumPromo";
|
|
2140
2072
|
this.constructorId = 0xb81b93d4;
|
|
2141
2073
|
this.subclassOfId = 0xc987a338;
|
|
2142
2074
|
this._slots = [];
|
|
2143
2075
|
}
|
|
2144
2076
|
/**
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2077
|
+
* Generate the TLObject from buffer.
|
|
2078
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2079
|
+
*/
|
|
2148
2080
|
static async read(_data, ..._args) {
|
|
2149
2081
|
// no flags
|
|
2150
2082
|
return new GetPremiumPromo();
|
|
2151
2083
|
}
|
|
2152
2084
|
/**
|
|
2153
|
-
|
|
2154
|
-
|
|
2085
|
+
* Generate buffer from TLObject.
|
|
2086
|
+
*/
|
|
2155
2087
|
write() {
|
|
2156
2088
|
const b = new BytesIO();
|
|
2157
2089
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -2164,31 +2096,31 @@ export class GetPeerColors extends TLObject {
|
|
|
2164
2096
|
hash;
|
|
2165
2097
|
constructor(params) {
|
|
2166
2098
|
super();
|
|
2167
|
-
this.classType =
|
|
2168
|
-
this.className =
|
|
2099
|
+
this.classType = "functions";
|
|
2100
|
+
this.className = "help.GetPeerColors";
|
|
2169
2101
|
this.constructorId = 0xda80f42f;
|
|
2170
2102
|
this.subclassOfId = 0xe3f6733;
|
|
2171
|
-
this._slots = [
|
|
2103
|
+
this._slots = ["hash"];
|
|
2172
2104
|
this.hash = params.hash;
|
|
2173
2105
|
}
|
|
2174
2106
|
/**
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2107
|
+
* Generate the TLObject from buffer.
|
|
2108
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2109
|
+
*/
|
|
2178
2110
|
static async read(_data, ..._args) {
|
|
2179
2111
|
// no flags
|
|
2180
2112
|
let hash = await Primitive.Int.read(_data);
|
|
2181
|
-
return new GetPeerColors({ hash: hash });
|
|
2113
|
+
return new GetPeerColors({ "hash": hash });
|
|
2182
2114
|
}
|
|
2183
2115
|
/**
|
|
2184
|
-
|
|
2185
|
-
|
|
2116
|
+
* Generate buffer from TLObject.
|
|
2117
|
+
*/
|
|
2186
2118
|
write() {
|
|
2187
2119
|
const b = new BytesIO();
|
|
2188
2120
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2189
2121
|
// no flags
|
|
2190
2122
|
if (this.hash !== undefined) {
|
|
2191
|
-
b.write(Primitive.Int.write(this.hash));
|
|
2123
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
2192
2124
|
}
|
|
2193
2125
|
return b.buffer;
|
|
2194
2126
|
}
|
|
@@ -2198,31 +2130,31 @@ export class GetPeerProfileColors extends TLObject {
|
|
|
2198
2130
|
hash;
|
|
2199
2131
|
constructor(params) {
|
|
2200
2132
|
super();
|
|
2201
|
-
this.classType =
|
|
2202
|
-
this.className =
|
|
2133
|
+
this.classType = "functions";
|
|
2134
|
+
this.className = "help.GetPeerProfileColors";
|
|
2203
2135
|
this.constructorId = 0xabcfa9fd;
|
|
2204
2136
|
this.subclassOfId = 0xe3f6733;
|
|
2205
|
-
this._slots = [
|
|
2137
|
+
this._slots = ["hash"];
|
|
2206
2138
|
this.hash = params.hash;
|
|
2207
2139
|
}
|
|
2208
2140
|
/**
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2141
|
+
* Generate the TLObject from buffer.
|
|
2142
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2143
|
+
*/
|
|
2212
2144
|
static async read(_data, ..._args) {
|
|
2213
2145
|
// no flags
|
|
2214
2146
|
let hash = await Primitive.Int.read(_data);
|
|
2215
|
-
return new GetPeerProfileColors({ hash: hash });
|
|
2147
|
+
return new GetPeerProfileColors({ "hash": hash });
|
|
2216
2148
|
}
|
|
2217
2149
|
/**
|
|
2218
|
-
|
|
2219
|
-
|
|
2150
|
+
* Generate buffer from TLObject.
|
|
2151
|
+
*/
|
|
2220
2152
|
write() {
|
|
2221
2153
|
const b = new BytesIO();
|
|
2222
2154
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2223
2155
|
// no flags
|
|
2224
2156
|
if (this.hash !== undefined) {
|
|
2225
|
-
b.write(Primitive.Int.write(this.hash));
|
|
2157
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
2226
2158
|
}
|
|
2227
2159
|
return b.buffer;
|
|
2228
2160
|
}
|
|
@@ -2232,31 +2164,31 @@ export class GetTimezonesList extends TLObject {
|
|
|
2232
2164
|
hash;
|
|
2233
2165
|
constructor(params) {
|
|
2234
2166
|
super();
|
|
2235
|
-
this.classType =
|
|
2236
|
-
this.className =
|
|
2167
|
+
this.classType = "functions";
|
|
2168
|
+
this.className = "help.GetTimezonesList";
|
|
2237
2169
|
this.constructorId = 0x49b30240;
|
|
2238
2170
|
this.subclassOfId = 0xca76e475;
|
|
2239
|
-
this._slots = [
|
|
2171
|
+
this._slots = ["hash"];
|
|
2240
2172
|
this.hash = params.hash;
|
|
2241
2173
|
}
|
|
2242
2174
|
/**
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2175
|
+
* Generate the TLObject from buffer.
|
|
2176
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
2177
|
+
*/
|
|
2246
2178
|
static async read(_data, ..._args) {
|
|
2247
2179
|
// no flags
|
|
2248
2180
|
let hash = await Primitive.Int.read(_data);
|
|
2249
|
-
return new GetTimezonesList({ hash: hash });
|
|
2181
|
+
return new GetTimezonesList({ "hash": hash });
|
|
2250
2182
|
}
|
|
2251
2183
|
/**
|
|
2252
|
-
|
|
2253
|
-
|
|
2184
|
+
* Generate buffer from TLObject.
|
|
2185
|
+
*/
|
|
2254
2186
|
write() {
|
|
2255
2187
|
const b = new BytesIO();
|
|
2256
2188
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
2257
2189
|
// no flags
|
|
2258
2190
|
if (this.hash !== undefined) {
|
|
2259
|
-
b.write(Primitive.Int.write(this.hash));
|
|
2191
|
+
b.write((Primitive.Int.write(this.hash)));
|
|
2260
2192
|
}
|
|
2261
2193
|
return b.buffer;
|
|
2262
2194
|
}
|