@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,29 +16,29 @@ export class File extends TLObject {
|
|
|
16
16
|
bytes;
|
|
17
17
|
constructor(params) {
|
|
18
18
|
super();
|
|
19
|
-
this.classType =
|
|
20
|
-
this.className =
|
|
19
|
+
this.classType = "types";
|
|
20
|
+
this.className = "upload.File";
|
|
21
21
|
this.constructorId = 0x96a18d5;
|
|
22
22
|
this.subclassOfId = 0x6c9bd728;
|
|
23
|
-
this._slots = [
|
|
23
|
+
this._slots = ["type", "mtime", "bytes"];
|
|
24
24
|
this.type = params.type;
|
|
25
25
|
this.mtime = params.mtime;
|
|
26
26
|
this.bytes = params.bytes;
|
|
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 type = await TLObject.read(_data);
|
|
35
35
|
let mtime = await Primitive.Int.read(_data);
|
|
36
36
|
let bytes = await Primitive.Bytes.read(_data);
|
|
37
|
-
return new File({ type: type, mtime: mtime, bytes: bytes });
|
|
37
|
+
return new File({ "type": type, "mtime": mtime, "bytes": bytes });
|
|
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));
|
|
@@ -47,10 +47,10 @@ export class File extends TLObject {
|
|
|
47
47
|
b.write(this.type.write());
|
|
48
48
|
}
|
|
49
49
|
if (this.mtime !== undefined) {
|
|
50
|
-
b.write(Primitive.Int.write(this.mtime));
|
|
50
|
+
b.write((Primitive.Int.write(this.mtime)));
|
|
51
51
|
}
|
|
52
52
|
if (this.bytes !== undefined) {
|
|
53
|
-
b.write(Primitive.Bytes.write(this.bytes));
|
|
53
|
+
b.write((Primitive.Bytes.write(this.bytes)));
|
|
54
54
|
}
|
|
55
55
|
return b.buffer;
|
|
56
56
|
}
|
|
@@ -63,11 +63,11 @@ export class FileCdnRedirect extends TLObject {
|
|
|
63
63
|
fileHashes;
|
|
64
64
|
constructor(params) {
|
|
65
65
|
super();
|
|
66
|
-
this.classType =
|
|
67
|
-
this.className =
|
|
66
|
+
this.classType = "types";
|
|
67
|
+
this.className = "upload.FileCdnRedirect";
|
|
68
68
|
this.constructorId = 0xf18cda44;
|
|
69
69
|
this.subclassOfId = 0x6c9bd728;
|
|
70
|
-
this._slots = [
|
|
70
|
+
this._slots = ["dcId", "fileToken", "encryptionKey", "encryptionIv", "fileHashes"];
|
|
71
71
|
this.dcId = params.dcId;
|
|
72
72
|
this.fileToken = params.fileToken;
|
|
73
73
|
this.encryptionKey = params.encryptionKey;
|
|
@@ -75,9 +75,9 @@ export class FileCdnRedirect extends TLObject {
|
|
|
75
75
|
this.fileHashes = params.fileHashes;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
* Generate the TLObject from buffer.
|
|
79
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
80
|
+
*/
|
|
81
81
|
static async read(_data, ..._args) {
|
|
82
82
|
// no flags
|
|
83
83
|
let dcId = await Primitive.Int.read(_data);
|
|
@@ -85,35 +85,29 @@ export class FileCdnRedirect extends TLObject {
|
|
|
85
85
|
let encryptionKey = await Primitive.Bytes.read(_data);
|
|
86
86
|
let encryptionIv = await Primitive.Bytes.read(_data);
|
|
87
87
|
let fileHashes = await TLObject.read(_data);
|
|
88
|
-
return new FileCdnRedirect({
|
|
89
|
-
dcId: dcId,
|
|
90
|
-
fileToken: fileToken,
|
|
91
|
-
encryptionKey: encryptionKey,
|
|
92
|
-
encryptionIv: encryptionIv,
|
|
93
|
-
fileHashes: fileHashes,
|
|
94
|
-
});
|
|
88
|
+
return new FileCdnRedirect({ "dcId": dcId, "fileToken": fileToken, "encryptionKey": encryptionKey, "encryptionIv": encryptionIv, "fileHashes": fileHashes });
|
|
95
89
|
}
|
|
96
90
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
* Generate buffer from TLObject.
|
|
92
|
+
*/
|
|
99
93
|
write() {
|
|
100
94
|
const b = new BytesIO();
|
|
101
95
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
102
96
|
// no flags
|
|
103
97
|
if (this.dcId !== undefined) {
|
|
104
|
-
b.write(Primitive.Int.write(this.dcId));
|
|
98
|
+
b.write((Primitive.Int.write(this.dcId)));
|
|
105
99
|
}
|
|
106
100
|
if (this.fileToken !== undefined) {
|
|
107
|
-
b.write(Primitive.Bytes.write(this.fileToken));
|
|
101
|
+
b.write((Primitive.Bytes.write(this.fileToken)));
|
|
108
102
|
}
|
|
109
103
|
if (this.encryptionKey !== undefined) {
|
|
110
|
-
b.write(Primitive.Bytes.write(this.encryptionKey));
|
|
104
|
+
b.write((Primitive.Bytes.write(this.encryptionKey)));
|
|
111
105
|
}
|
|
112
106
|
if (this.encryptionIv !== undefined) {
|
|
113
|
-
b.write(Primitive.Bytes.write(this.encryptionIv));
|
|
107
|
+
b.write((Primitive.Bytes.write(this.encryptionIv)));
|
|
114
108
|
}
|
|
115
109
|
if (this.fileHashes) {
|
|
116
|
-
b.write(Primitive.Vector.write(this.fileHashes));
|
|
110
|
+
b.write((Primitive.Vector.write(this.fileHashes)));
|
|
117
111
|
}
|
|
118
112
|
return b.buffer;
|
|
119
113
|
}
|
|
@@ -126,11 +120,11 @@ export class WebFile extends TLObject {
|
|
|
126
120
|
bytes;
|
|
127
121
|
constructor(params) {
|
|
128
122
|
super();
|
|
129
|
-
this.classType =
|
|
130
|
-
this.className =
|
|
123
|
+
this.classType = "types";
|
|
124
|
+
this.className = "upload.WebFile";
|
|
131
125
|
this.constructorId = 0x21e753bc;
|
|
132
126
|
this.subclassOfId = 0x68f17f51;
|
|
133
|
-
this._slots = [
|
|
127
|
+
this._slots = ["size", "mimeType", "fileType", "mtime", "bytes"];
|
|
134
128
|
this.size = params.size;
|
|
135
129
|
this.mimeType = params.mimeType;
|
|
136
130
|
this.fileType = params.fileType;
|
|
@@ -138,9 +132,9 @@ export class WebFile extends TLObject {
|
|
|
138
132
|
this.bytes = params.bytes;
|
|
139
133
|
}
|
|
140
134
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
* Generate the TLObject from buffer.
|
|
136
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
137
|
+
*/
|
|
144
138
|
static async read(_data, ..._args) {
|
|
145
139
|
// no flags
|
|
146
140
|
let size = await Primitive.Int.read(_data);
|
|
@@ -148,35 +142,29 @@ export class WebFile extends TLObject {
|
|
|
148
142
|
let fileType = await TLObject.read(_data);
|
|
149
143
|
let mtime = await Primitive.Int.read(_data);
|
|
150
144
|
let bytes = await Primitive.Bytes.read(_data);
|
|
151
|
-
return new WebFile({
|
|
152
|
-
size: size,
|
|
153
|
-
mimeType: mimeType,
|
|
154
|
-
fileType: fileType,
|
|
155
|
-
mtime: mtime,
|
|
156
|
-
bytes: bytes,
|
|
157
|
-
});
|
|
145
|
+
return new WebFile({ "size": size, "mimeType": mimeType, "fileType": fileType, "mtime": mtime, "bytes": bytes });
|
|
158
146
|
}
|
|
159
147
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
148
|
+
* Generate buffer from TLObject.
|
|
149
|
+
*/
|
|
162
150
|
write() {
|
|
163
151
|
const b = new BytesIO();
|
|
164
152
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
165
153
|
// no flags
|
|
166
154
|
if (this.size !== undefined) {
|
|
167
|
-
b.write(Primitive.Int.write(this.size));
|
|
155
|
+
b.write((Primitive.Int.write(this.size)));
|
|
168
156
|
}
|
|
169
157
|
if (this.mimeType !== undefined) {
|
|
170
|
-
b.write(Primitive.String.write(this.mimeType));
|
|
158
|
+
b.write((Primitive.String.write(this.mimeType)));
|
|
171
159
|
}
|
|
172
160
|
if (this.fileType !== undefined) {
|
|
173
161
|
b.write(this.fileType.write());
|
|
174
162
|
}
|
|
175
163
|
if (this.mtime !== undefined) {
|
|
176
|
-
b.write(Primitive.Int.write(this.mtime));
|
|
164
|
+
b.write((Primitive.Int.write(this.mtime)));
|
|
177
165
|
}
|
|
178
166
|
if (this.bytes !== undefined) {
|
|
179
|
-
b.write(Primitive.Bytes.write(this.bytes));
|
|
167
|
+
b.write((Primitive.Bytes.write(this.bytes)));
|
|
180
168
|
}
|
|
181
169
|
return b.buffer;
|
|
182
170
|
}
|
|
@@ -185,31 +173,31 @@ export class CdnFileReuploadNeeded extends TLObject {
|
|
|
185
173
|
requestToken;
|
|
186
174
|
constructor(params) {
|
|
187
175
|
super();
|
|
188
|
-
this.classType =
|
|
189
|
-
this.className =
|
|
176
|
+
this.classType = "types";
|
|
177
|
+
this.className = "upload.CdnFileReuploadNeeded";
|
|
190
178
|
this.constructorId = 0xeea8e46e;
|
|
191
179
|
this.subclassOfId = 0xf5ccf928;
|
|
192
|
-
this._slots = [
|
|
180
|
+
this._slots = ["requestToken"];
|
|
193
181
|
this.requestToken = params.requestToken;
|
|
194
182
|
}
|
|
195
183
|
/**
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
* Generate the TLObject from buffer.
|
|
185
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
186
|
+
*/
|
|
199
187
|
static async read(_data, ..._args) {
|
|
200
188
|
// no flags
|
|
201
189
|
let requestToken = await Primitive.Bytes.read(_data);
|
|
202
|
-
return new CdnFileReuploadNeeded({ requestToken: requestToken });
|
|
190
|
+
return new CdnFileReuploadNeeded({ "requestToken": requestToken });
|
|
203
191
|
}
|
|
204
192
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
193
|
+
* Generate buffer from TLObject.
|
|
194
|
+
*/
|
|
207
195
|
write() {
|
|
208
196
|
const b = new BytesIO();
|
|
209
197
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
210
198
|
// no flags
|
|
211
199
|
if (this.requestToken !== undefined) {
|
|
212
|
-
b.write(Primitive.Bytes.write(this.requestToken));
|
|
200
|
+
b.write((Primitive.Bytes.write(this.requestToken)));
|
|
213
201
|
}
|
|
214
202
|
return b.buffer;
|
|
215
203
|
}
|
|
@@ -218,31 +206,31 @@ export class CdnFile extends TLObject {
|
|
|
218
206
|
bytes;
|
|
219
207
|
constructor(params) {
|
|
220
208
|
super();
|
|
221
|
-
this.classType =
|
|
222
|
-
this.className =
|
|
209
|
+
this.classType = "types";
|
|
210
|
+
this.className = "upload.CdnFile";
|
|
223
211
|
this.constructorId = 0xa99fca4f;
|
|
224
212
|
this.subclassOfId = 0xf5ccf928;
|
|
225
|
-
this._slots = [
|
|
213
|
+
this._slots = ["bytes"];
|
|
226
214
|
this.bytes = params.bytes;
|
|
227
215
|
}
|
|
228
216
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
* Generate the TLObject from buffer.
|
|
218
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
219
|
+
*/
|
|
232
220
|
static async read(_data, ..._args) {
|
|
233
221
|
// no flags
|
|
234
222
|
let bytes = await Primitive.Bytes.read(_data);
|
|
235
|
-
return new CdnFile({ bytes: bytes });
|
|
223
|
+
return new CdnFile({ "bytes": bytes });
|
|
236
224
|
}
|
|
237
225
|
/**
|
|
238
|
-
|
|
239
|
-
|
|
226
|
+
* Generate buffer from TLObject.
|
|
227
|
+
*/
|
|
240
228
|
write() {
|
|
241
229
|
const b = new BytesIO();
|
|
242
230
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
243
231
|
// no flags
|
|
244
232
|
if (this.bytes !== undefined) {
|
|
245
|
-
b.write(Primitive.Bytes.write(this.bytes));
|
|
233
|
+
b.write((Primitive.Bytes.write(this.bytes)));
|
|
246
234
|
}
|
|
247
235
|
return b.buffer;
|
|
248
236
|
}
|
|
@@ -254,41 +242,41 @@ export class SaveFilePart extends TLObject {
|
|
|
254
242
|
bytes;
|
|
255
243
|
constructor(params) {
|
|
256
244
|
super();
|
|
257
|
-
this.classType =
|
|
258
|
-
this.className =
|
|
245
|
+
this.classType = "functions";
|
|
246
|
+
this.className = "upload.SaveFilePart";
|
|
259
247
|
this.constructorId = 0xb304a621;
|
|
260
248
|
this.subclassOfId = 0xf5b399ac;
|
|
261
|
-
this._slots = [
|
|
249
|
+
this._slots = ["fileId", "filePart", "bytes"];
|
|
262
250
|
this.fileId = params.fileId;
|
|
263
251
|
this.filePart = params.filePart;
|
|
264
252
|
this.bytes = params.bytes;
|
|
265
253
|
}
|
|
266
254
|
/**
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
255
|
+
* Generate the TLObject from buffer.
|
|
256
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
257
|
+
*/
|
|
270
258
|
static async read(_data, ..._args) {
|
|
271
259
|
// no flags
|
|
272
260
|
let fileId = await Primitive.Long.read(_data);
|
|
273
261
|
let filePart = await Primitive.Int.read(_data);
|
|
274
262
|
let bytes = await Primitive.Bytes.read(_data);
|
|
275
|
-
return new SaveFilePart({ fileId: fileId, filePart: filePart, bytes: bytes });
|
|
263
|
+
return new SaveFilePart({ "fileId": fileId, "filePart": filePart, "bytes": bytes });
|
|
276
264
|
}
|
|
277
265
|
/**
|
|
278
|
-
|
|
279
|
-
|
|
266
|
+
* Generate buffer from TLObject.
|
|
267
|
+
*/
|
|
280
268
|
write() {
|
|
281
269
|
const b = new BytesIO();
|
|
282
270
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
283
271
|
// no flags
|
|
284
272
|
if (this.fileId !== undefined) {
|
|
285
|
-
b.write(Primitive.Long.write(this.fileId));
|
|
273
|
+
b.write((Primitive.Long.write(this.fileId)));
|
|
286
274
|
}
|
|
287
275
|
if (this.filePart !== undefined) {
|
|
288
|
-
b.write(Primitive.Int.write(this.filePart));
|
|
276
|
+
b.write((Primitive.Int.write(this.filePart)));
|
|
289
277
|
}
|
|
290
278
|
if (this.bytes !== undefined) {
|
|
291
|
-
b.write(Primitive.Bytes.write(this.bytes));
|
|
279
|
+
b.write((Primitive.Bytes.write(this.bytes)));
|
|
292
280
|
}
|
|
293
281
|
return b.buffer;
|
|
294
282
|
}
|
|
@@ -302,11 +290,11 @@ export class GetFile extends TLObject {
|
|
|
302
290
|
limit;
|
|
303
291
|
constructor(params) {
|
|
304
292
|
super();
|
|
305
|
-
this.classType =
|
|
306
|
-
this.className =
|
|
293
|
+
this.classType = "functions";
|
|
294
|
+
this.className = "upload.GetFile";
|
|
307
295
|
this.constructorId = 0xbe5335be;
|
|
308
296
|
this.subclassOfId = 0x6c9bd728;
|
|
309
|
-
this._slots = [
|
|
297
|
+
this._slots = ["precise", "cdnSupported", "location", "offset", "limit"];
|
|
310
298
|
this.precise = params.precise;
|
|
311
299
|
this.cdnSupported = params.cdnSupported;
|
|
312
300
|
this.location = params.location;
|
|
@@ -314,44 +302,38 @@ export class GetFile extends TLObject {
|
|
|
314
302
|
this.limit = params.limit;
|
|
315
303
|
}
|
|
316
304
|
/**
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
305
|
+
* Generate the TLObject from buffer.
|
|
306
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
307
|
+
*/
|
|
320
308
|
static async read(_data, ..._args) {
|
|
321
309
|
// @ts-ignore
|
|
322
310
|
let flags = await Primitive.Int.read(_data);
|
|
323
|
-
let precise = flags & (1 << 0) ? true : false;
|
|
324
|
-
let cdnSupported = flags & (1 << 1) ? true : false;
|
|
311
|
+
let precise = (flags & (1 << 0)) ? true : false;
|
|
312
|
+
let cdnSupported = (flags & (1 << 1)) ? true : false;
|
|
325
313
|
let location = await TLObject.read(_data);
|
|
326
314
|
let offset = await Primitive.Long.read(_data);
|
|
327
315
|
let limit = await Primitive.Int.read(_data);
|
|
328
|
-
return new GetFile({
|
|
329
|
-
precise: precise,
|
|
330
|
-
cdnSupported: cdnSupported,
|
|
331
|
-
location: location,
|
|
332
|
-
offset: offset,
|
|
333
|
-
limit: limit,
|
|
334
|
-
});
|
|
316
|
+
return new GetFile({ "precise": precise, "cdnSupported": cdnSupported, "location": location, "offset": offset, "limit": limit });
|
|
335
317
|
}
|
|
336
318
|
/**
|
|
337
|
-
|
|
338
|
-
|
|
319
|
+
* Generate buffer from TLObject.
|
|
320
|
+
*/
|
|
339
321
|
write() {
|
|
340
322
|
const b = new BytesIO();
|
|
341
323
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
342
324
|
// @ts-ignore
|
|
343
325
|
let flags = 0;
|
|
344
|
-
flags |= this.precise ? 1 << 0 : 0;
|
|
345
|
-
flags |= this.cdnSupported ? 1 << 1 : 0;
|
|
346
|
-
b.write(Primitive.Int.write(flags));
|
|
326
|
+
flags |= this.precise ? (1 << 0) : 0;
|
|
327
|
+
flags |= this.cdnSupported ? (1 << 1) : 0;
|
|
328
|
+
b.write((Primitive.Int.write(flags)));
|
|
347
329
|
if (this.location !== undefined) {
|
|
348
330
|
b.write(this.location.write());
|
|
349
331
|
}
|
|
350
332
|
if (this.offset !== undefined) {
|
|
351
|
-
b.write(Primitive.Long.write(this.offset));
|
|
333
|
+
b.write((Primitive.Long.write(this.offset)));
|
|
352
334
|
}
|
|
353
335
|
if (this.limit !== undefined) {
|
|
354
|
-
b.write(Primitive.Int.write(this.limit));
|
|
336
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
355
337
|
}
|
|
356
338
|
return b.buffer;
|
|
357
339
|
}
|
|
@@ -364,51 +346,46 @@ export class SaveBigFilePart extends TLObject {
|
|
|
364
346
|
bytes;
|
|
365
347
|
constructor(params) {
|
|
366
348
|
super();
|
|
367
|
-
this.classType =
|
|
368
|
-
this.className =
|
|
349
|
+
this.classType = "functions";
|
|
350
|
+
this.className = "upload.SaveBigFilePart";
|
|
369
351
|
this.constructorId = 0xde7b673d;
|
|
370
352
|
this.subclassOfId = 0xf5b399ac;
|
|
371
|
-
this._slots = [
|
|
353
|
+
this._slots = ["fileId", "filePart", "fileTotalParts", "bytes"];
|
|
372
354
|
this.fileId = params.fileId;
|
|
373
355
|
this.filePart = params.filePart;
|
|
374
356
|
this.fileTotalParts = params.fileTotalParts;
|
|
375
357
|
this.bytes = params.bytes;
|
|
376
358
|
}
|
|
377
359
|
/**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
360
|
+
* Generate the TLObject from buffer.
|
|
361
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
362
|
+
*/
|
|
381
363
|
static async read(_data, ..._args) {
|
|
382
364
|
// no flags
|
|
383
365
|
let fileId = await Primitive.Long.read(_data);
|
|
384
366
|
let filePart = await Primitive.Int.read(_data);
|
|
385
367
|
let fileTotalParts = await Primitive.Int.read(_data);
|
|
386
368
|
let bytes = await Primitive.Bytes.read(_data);
|
|
387
|
-
return new SaveBigFilePart({
|
|
388
|
-
fileId: fileId,
|
|
389
|
-
filePart: filePart,
|
|
390
|
-
fileTotalParts: fileTotalParts,
|
|
391
|
-
bytes: bytes,
|
|
392
|
-
});
|
|
369
|
+
return new SaveBigFilePart({ "fileId": fileId, "filePart": filePart, "fileTotalParts": fileTotalParts, "bytes": bytes });
|
|
393
370
|
}
|
|
394
371
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
372
|
+
* Generate buffer from TLObject.
|
|
373
|
+
*/
|
|
397
374
|
write() {
|
|
398
375
|
const b = new BytesIO();
|
|
399
376
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
400
377
|
// no flags
|
|
401
378
|
if (this.fileId !== undefined) {
|
|
402
|
-
b.write(Primitive.Long.write(this.fileId));
|
|
379
|
+
b.write((Primitive.Long.write(this.fileId)));
|
|
403
380
|
}
|
|
404
381
|
if (this.filePart !== undefined) {
|
|
405
|
-
b.write(Primitive.Int.write(this.filePart));
|
|
382
|
+
b.write((Primitive.Int.write(this.filePart)));
|
|
406
383
|
}
|
|
407
384
|
if (this.fileTotalParts !== undefined) {
|
|
408
|
-
b.write(Primitive.Int.write(this.fileTotalParts));
|
|
385
|
+
b.write((Primitive.Int.write(this.fileTotalParts)));
|
|
409
386
|
}
|
|
410
387
|
if (this.bytes !== undefined) {
|
|
411
|
-
b.write(Primitive.Bytes.write(this.bytes));
|
|
388
|
+
b.write((Primitive.Bytes.write(this.bytes)));
|
|
412
389
|
}
|
|
413
390
|
return b.buffer;
|
|
414
391
|
}
|
|
@@ -420,29 +397,29 @@ export class GetWebFile extends TLObject {
|
|
|
420
397
|
limit;
|
|
421
398
|
constructor(params) {
|
|
422
399
|
super();
|
|
423
|
-
this.classType =
|
|
424
|
-
this.className =
|
|
400
|
+
this.classType = "functions";
|
|
401
|
+
this.className = "upload.GetWebFile";
|
|
425
402
|
this.constructorId = 0x24e6818d;
|
|
426
403
|
this.subclassOfId = 0x68f17f51;
|
|
427
|
-
this._slots = [
|
|
404
|
+
this._slots = ["location", "offset", "limit"];
|
|
428
405
|
this.location = params.location;
|
|
429
406
|
this.offset = params.offset;
|
|
430
407
|
this.limit = params.limit;
|
|
431
408
|
}
|
|
432
409
|
/**
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
410
|
+
* Generate the TLObject from buffer.
|
|
411
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
412
|
+
*/
|
|
436
413
|
static async read(_data, ..._args) {
|
|
437
414
|
// no flags
|
|
438
415
|
let location = await TLObject.read(_data);
|
|
439
416
|
let offset = await Primitive.Int.read(_data);
|
|
440
417
|
let limit = await Primitive.Int.read(_data);
|
|
441
|
-
return new GetWebFile({ location: location, offset: offset, limit: limit });
|
|
418
|
+
return new GetWebFile({ "location": location, "offset": offset, "limit": limit });
|
|
442
419
|
}
|
|
443
420
|
/**
|
|
444
|
-
|
|
445
|
-
|
|
421
|
+
* Generate buffer from TLObject.
|
|
422
|
+
*/
|
|
446
423
|
write() {
|
|
447
424
|
const b = new BytesIO();
|
|
448
425
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -451,10 +428,10 @@ export class GetWebFile extends TLObject {
|
|
|
451
428
|
b.write(this.location.write());
|
|
452
429
|
}
|
|
453
430
|
if (this.offset !== undefined) {
|
|
454
|
-
b.write(Primitive.Int.write(this.offset));
|
|
431
|
+
b.write((Primitive.Int.write(this.offset)));
|
|
455
432
|
}
|
|
456
433
|
if (this.limit !== undefined) {
|
|
457
|
-
b.write(Primitive.Int.write(this.limit));
|
|
434
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
458
435
|
}
|
|
459
436
|
return b.buffer;
|
|
460
437
|
}
|
|
@@ -466,41 +443,41 @@ export class GetCdnFile extends TLObject {
|
|
|
466
443
|
limit;
|
|
467
444
|
constructor(params) {
|
|
468
445
|
super();
|
|
469
|
-
this.classType =
|
|
470
|
-
this.className =
|
|
446
|
+
this.classType = "functions";
|
|
447
|
+
this.className = "upload.GetCdnFile";
|
|
471
448
|
this.constructorId = 0x395f69da;
|
|
472
449
|
this.subclassOfId = 0xf5ccf928;
|
|
473
|
-
this._slots = [
|
|
450
|
+
this._slots = ["fileToken", "offset", "limit"];
|
|
474
451
|
this.fileToken = params.fileToken;
|
|
475
452
|
this.offset = params.offset;
|
|
476
453
|
this.limit = params.limit;
|
|
477
454
|
}
|
|
478
455
|
/**
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
456
|
+
* Generate the TLObject from buffer.
|
|
457
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
458
|
+
*/
|
|
482
459
|
static async read(_data, ..._args) {
|
|
483
460
|
// no flags
|
|
484
461
|
let fileToken = await Primitive.Bytes.read(_data);
|
|
485
462
|
let offset = await Primitive.Long.read(_data);
|
|
486
463
|
let limit = await Primitive.Int.read(_data);
|
|
487
|
-
return new GetCdnFile({ fileToken: fileToken, offset: offset, limit: limit });
|
|
464
|
+
return new GetCdnFile({ "fileToken": fileToken, "offset": offset, "limit": limit });
|
|
488
465
|
}
|
|
489
466
|
/**
|
|
490
|
-
|
|
491
|
-
|
|
467
|
+
* Generate buffer from TLObject.
|
|
468
|
+
*/
|
|
492
469
|
write() {
|
|
493
470
|
const b = new BytesIO();
|
|
494
471
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
495
472
|
// no flags
|
|
496
473
|
if (this.fileToken !== undefined) {
|
|
497
|
-
b.write(Primitive.Bytes.write(this.fileToken));
|
|
474
|
+
b.write((Primitive.Bytes.write(this.fileToken)));
|
|
498
475
|
}
|
|
499
476
|
if (this.offset !== undefined) {
|
|
500
|
-
b.write(Primitive.Long.write(this.offset));
|
|
477
|
+
b.write((Primitive.Long.write(this.offset)));
|
|
501
478
|
}
|
|
502
479
|
if (this.limit !== undefined) {
|
|
503
|
-
b.write(Primitive.Int.write(this.limit));
|
|
480
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
504
481
|
}
|
|
505
482
|
return b.buffer;
|
|
506
483
|
}
|
|
@@ -511,36 +488,36 @@ export class ReuploadCdnFile extends TLObject {
|
|
|
511
488
|
requestToken;
|
|
512
489
|
constructor(params) {
|
|
513
490
|
super();
|
|
514
|
-
this.classType =
|
|
515
|
-
this.className =
|
|
491
|
+
this.classType = "functions";
|
|
492
|
+
this.className = "upload.ReuploadCdnFile";
|
|
516
493
|
this.constructorId = 0x9b2754a8;
|
|
517
494
|
this.subclassOfId = 0xa5940726;
|
|
518
|
-
this._slots = [
|
|
495
|
+
this._slots = ["fileToken", "requestToken"];
|
|
519
496
|
this.fileToken = params.fileToken;
|
|
520
497
|
this.requestToken = params.requestToken;
|
|
521
498
|
}
|
|
522
499
|
/**
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
500
|
+
* Generate the TLObject from buffer.
|
|
501
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
502
|
+
*/
|
|
526
503
|
static async read(_data, ..._args) {
|
|
527
504
|
// no flags
|
|
528
505
|
let fileToken = await Primitive.Bytes.read(_data);
|
|
529
506
|
let requestToken = await Primitive.Bytes.read(_data);
|
|
530
|
-
return new ReuploadCdnFile({ fileToken: fileToken, requestToken: requestToken });
|
|
507
|
+
return new ReuploadCdnFile({ "fileToken": fileToken, "requestToken": requestToken });
|
|
531
508
|
}
|
|
532
509
|
/**
|
|
533
|
-
|
|
534
|
-
|
|
510
|
+
* Generate buffer from TLObject.
|
|
511
|
+
*/
|
|
535
512
|
write() {
|
|
536
513
|
const b = new BytesIO();
|
|
537
514
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
538
515
|
// no flags
|
|
539
516
|
if (this.fileToken !== undefined) {
|
|
540
|
-
b.write(Primitive.Bytes.write(this.fileToken));
|
|
517
|
+
b.write((Primitive.Bytes.write(this.fileToken)));
|
|
541
518
|
}
|
|
542
519
|
if (this.requestToken !== undefined) {
|
|
543
|
-
b.write(Primitive.Bytes.write(this.requestToken));
|
|
520
|
+
b.write((Primitive.Bytes.write(this.requestToken)));
|
|
544
521
|
}
|
|
545
522
|
return b.buffer;
|
|
546
523
|
}
|
|
@@ -551,36 +528,36 @@ export class GetCdnFileHashes extends TLObject {
|
|
|
551
528
|
offset;
|
|
552
529
|
constructor(params) {
|
|
553
530
|
super();
|
|
554
|
-
this.classType =
|
|
555
|
-
this.className =
|
|
531
|
+
this.classType = "functions";
|
|
532
|
+
this.className = "upload.GetCdnFileHashes";
|
|
556
533
|
this.constructorId = 0x91dc3f31;
|
|
557
534
|
this.subclassOfId = 0xa5940726;
|
|
558
|
-
this._slots = [
|
|
535
|
+
this._slots = ["fileToken", "offset"];
|
|
559
536
|
this.fileToken = params.fileToken;
|
|
560
537
|
this.offset = params.offset;
|
|
561
538
|
}
|
|
562
539
|
/**
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
540
|
+
* Generate the TLObject from buffer.
|
|
541
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
542
|
+
*/
|
|
566
543
|
static async read(_data, ..._args) {
|
|
567
544
|
// no flags
|
|
568
545
|
let fileToken = await Primitive.Bytes.read(_data);
|
|
569
546
|
let offset = await Primitive.Long.read(_data);
|
|
570
|
-
return new GetCdnFileHashes({ fileToken: fileToken, offset: offset });
|
|
547
|
+
return new GetCdnFileHashes({ "fileToken": fileToken, "offset": offset });
|
|
571
548
|
}
|
|
572
549
|
/**
|
|
573
|
-
|
|
574
|
-
|
|
550
|
+
* Generate buffer from TLObject.
|
|
551
|
+
*/
|
|
575
552
|
write() {
|
|
576
553
|
const b = new BytesIO();
|
|
577
554
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
578
555
|
// no flags
|
|
579
556
|
if (this.fileToken !== undefined) {
|
|
580
|
-
b.write(Primitive.Bytes.write(this.fileToken));
|
|
557
|
+
b.write((Primitive.Bytes.write(this.fileToken)));
|
|
581
558
|
}
|
|
582
559
|
if (this.offset !== undefined) {
|
|
583
|
-
b.write(Primitive.Long.write(this.offset));
|
|
560
|
+
b.write((Primitive.Long.write(this.offset)));
|
|
584
561
|
}
|
|
585
562
|
return b.buffer;
|
|
586
563
|
}
|
|
@@ -591,27 +568,27 @@ export class GetFileHashes extends TLObject {
|
|
|
591
568
|
offset;
|
|
592
569
|
constructor(params) {
|
|
593
570
|
super();
|
|
594
|
-
this.classType =
|
|
595
|
-
this.className =
|
|
571
|
+
this.classType = "functions";
|
|
572
|
+
this.className = "upload.GetFileHashes";
|
|
596
573
|
this.constructorId = 0x9156982a;
|
|
597
574
|
this.subclassOfId = 0xa5940726;
|
|
598
|
-
this._slots = [
|
|
575
|
+
this._slots = ["location", "offset"];
|
|
599
576
|
this.location = params.location;
|
|
600
577
|
this.offset = params.offset;
|
|
601
578
|
}
|
|
602
579
|
/**
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
580
|
+
* Generate the TLObject from buffer.
|
|
581
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
582
|
+
*/
|
|
606
583
|
static async read(_data, ..._args) {
|
|
607
584
|
// no flags
|
|
608
585
|
let location = await TLObject.read(_data);
|
|
609
586
|
let offset = await Primitive.Long.read(_data);
|
|
610
|
-
return new GetFileHashes({ location: location, offset: offset });
|
|
587
|
+
return new GetFileHashes({ "location": location, "offset": offset });
|
|
611
588
|
}
|
|
612
589
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
590
|
+
* Generate buffer from TLObject.
|
|
591
|
+
*/
|
|
615
592
|
write() {
|
|
616
593
|
const b = new BytesIO();
|
|
617
594
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -620,7 +597,7 @@ export class GetFileHashes extends TLObject {
|
|
|
620
597
|
b.write(this.location.write());
|
|
621
598
|
}
|
|
622
599
|
if (this.offset !== undefined) {
|
|
623
|
-
b.write(Primitive.Long.write(this.offset));
|
|
600
|
+
b.write((Primitive.Long.write(this.offset)));
|
|
624
601
|
}
|
|
625
602
|
return b.buffer;
|
|
626
603
|
}
|