@tgsnake/skema 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/raw/All.d.ts +82 -28
- package/dist/raw/All.js +82 -28
- package/dist/raw/Raw.d.ts +734 -16
- package/dist/raw/Raw.js +2463 -57
- package/package.json +1 -1
package/dist/raw/Raw.js
CHANGED
|
@@ -5,7 +5,7 @@ const index_js_1 = require("@/raw/core/index.js");
|
|
|
5
5
|
const deps_js_1 = require("@/deps.js");
|
|
6
6
|
var Raw;
|
|
7
7
|
(function (Raw) {
|
|
8
|
-
Raw.Layer =
|
|
8
|
+
Raw.Layer = 225;
|
|
9
9
|
Raw.HighestSCLayer = 144;
|
|
10
10
|
class ResPQ extends index_js_1.TLObject {
|
|
11
11
|
nonce;
|
|
@@ -2351,32 +2351,40 @@ var Raw;
|
|
|
2351
2351
|
Raw.InputMediaEmpty = InputMediaEmpty;
|
|
2352
2352
|
class InputMediaUploadedPhoto extends index_js_1.TLObject {
|
|
2353
2353
|
spoiler;
|
|
2354
|
+
livePhoto;
|
|
2354
2355
|
file;
|
|
2355
2356
|
stickers;
|
|
2356
2357
|
ttlSeconds;
|
|
2358
|
+
video;
|
|
2357
2359
|
constructor(params) {
|
|
2358
2360
|
super();
|
|
2359
2361
|
this.classType = 'types';
|
|
2360
2362
|
this.className = 'InputMediaUploadedPhoto';
|
|
2361
|
-
this.constructorId =
|
|
2363
|
+
this.constructorId = 0x7d8375da;
|
|
2362
2364
|
this.subclassOfId = 0xfaf846f4;
|
|
2363
|
-
this._slots = ['spoiler', 'file', 'stickers', 'ttlSeconds'];
|
|
2365
|
+
this._slots = ['spoiler', 'livePhoto', 'file', 'stickers', 'ttlSeconds', 'video'];
|
|
2364
2366
|
this.spoiler = params.spoiler;
|
|
2367
|
+
this.livePhoto = params.livePhoto;
|
|
2365
2368
|
this.file = params.file;
|
|
2366
2369
|
this.stickers = params.stickers;
|
|
2367
2370
|
this.ttlSeconds = params.ttlSeconds;
|
|
2371
|
+
this.video = params.video;
|
|
2368
2372
|
}
|
|
2369
2373
|
static async read(_data, ..._args) {
|
|
2370
2374
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
2371
2375
|
let spoiler = flags & (1 << 2) ? true : false;
|
|
2376
|
+
let livePhoto = flags & (1 << 3) ? true : false;
|
|
2372
2377
|
let file = await index_js_1.TLObject.read(_data);
|
|
2373
2378
|
let stickers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : [];
|
|
2374
2379
|
let ttlSeconds = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
2380
|
+
let video = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
2375
2381
|
return new Raw.InputMediaUploadedPhoto({
|
|
2376
2382
|
spoiler: spoiler,
|
|
2383
|
+
livePhoto: livePhoto,
|
|
2377
2384
|
file: file,
|
|
2378
2385
|
stickers: stickers,
|
|
2379
2386
|
ttlSeconds: ttlSeconds,
|
|
2387
|
+
video: video,
|
|
2380
2388
|
});
|
|
2381
2389
|
}
|
|
2382
2390
|
write() {
|
|
@@ -2384,8 +2392,10 @@ var Raw;
|
|
|
2384
2392
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
2385
2393
|
let flags = 0;
|
|
2386
2394
|
flags |= this.spoiler ? 1 << 2 : 0;
|
|
2395
|
+
flags |= this.livePhoto ? 1 << 3 : 0;
|
|
2387
2396
|
flags |= this.stickers ? 1 << 0 : 0;
|
|
2388
2397
|
flags |= this.ttlSeconds !== undefined ? 1 << 1 : 0;
|
|
2398
|
+
flags |= this.video !== undefined ? 1 << 3 : 0;
|
|
2389
2399
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
2390
2400
|
if (this.file !== undefined) {
|
|
2391
2401
|
b.write(this.file.write());
|
|
@@ -2396,38 +2406,55 @@ var Raw;
|
|
|
2396
2406
|
if (this.ttlSeconds !== undefined) {
|
|
2397
2407
|
b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
|
|
2398
2408
|
}
|
|
2409
|
+
if (this.video !== undefined) {
|
|
2410
|
+
b.write(this.video.write());
|
|
2411
|
+
}
|
|
2399
2412
|
return deps_js_1.Buffer.from(b.buffer);
|
|
2400
2413
|
}
|
|
2401
2414
|
}
|
|
2402
2415
|
Raw.InputMediaUploadedPhoto = InputMediaUploadedPhoto;
|
|
2403
2416
|
class InputMediaPhoto extends index_js_1.TLObject {
|
|
2404
2417
|
spoiler;
|
|
2418
|
+
livePhoto;
|
|
2405
2419
|
id;
|
|
2406
2420
|
ttlSeconds;
|
|
2421
|
+
video;
|
|
2407
2422
|
constructor(params) {
|
|
2408
2423
|
super();
|
|
2409
2424
|
this.classType = 'types';
|
|
2410
2425
|
this.className = 'InputMediaPhoto';
|
|
2411
|
-
this.constructorId =
|
|
2426
|
+
this.constructorId = 0xe3af4434;
|
|
2412
2427
|
this.subclassOfId = 0xfaf846f4;
|
|
2413
|
-
this._slots = ['spoiler', 'id', 'ttlSeconds'];
|
|
2428
|
+
this._slots = ['spoiler', 'livePhoto', 'id', 'ttlSeconds', 'video'];
|
|
2414
2429
|
this.spoiler = params.spoiler;
|
|
2430
|
+
this.livePhoto = params.livePhoto;
|
|
2415
2431
|
this.id = params.id;
|
|
2416
2432
|
this.ttlSeconds = params.ttlSeconds;
|
|
2433
|
+
this.video = params.video;
|
|
2417
2434
|
}
|
|
2418
2435
|
static async read(_data, ..._args) {
|
|
2419
2436
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
2420
2437
|
let spoiler = flags & (1 << 1) ? true : false;
|
|
2438
|
+
let livePhoto = flags & (1 << 2) ? true : false;
|
|
2421
2439
|
let id = await index_js_1.TLObject.read(_data);
|
|
2422
2440
|
let ttlSeconds = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
2423
|
-
|
|
2441
|
+
let video = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
2442
|
+
return new Raw.InputMediaPhoto({
|
|
2443
|
+
spoiler: spoiler,
|
|
2444
|
+
livePhoto: livePhoto,
|
|
2445
|
+
id: id,
|
|
2446
|
+
ttlSeconds: ttlSeconds,
|
|
2447
|
+
video: video,
|
|
2448
|
+
});
|
|
2424
2449
|
}
|
|
2425
2450
|
write() {
|
|
2426
2451
|
const b = new deps_js_1.BytesIO();
|
|
2427
2452
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
2428
2453
|
let flags = 0;
|
|
2429
2454
|
flags |= this.spoiler ? 1 << 1 : 0;
|
|
2455
|
+
flags |= this.livePhoto ? 1 << 2 : 0;
|
|
2430
2456
|
flags |= this.ttlSeconds !== undefined ? 1 << 0 : 0;
|
|
2457
|
+
flags |= this.video !== undefined ? 1 << 2 : 0;
|
|
2431
2458
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
2432
2459
|
if (this.id !== undefined) {
|
|
2433
2460
|
b.write(this.id.write());
|
|
@@ -2435,6 +2462,9 @@ var Raw;
|
|
|
2435
2462
|
if (this.ttlSeconds !== undefined) {
|
|
2436
2463
|
b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
|
|
2437
2464
|
}
|
|
2465
|
+
if (this.video !== undefined) {
|
|
2466
|
+
b.write(this.video.write());
|
|
2467
|
+
}
|
|
2438
2468
|
return deps_js_1.Buffer.from(b.buffer);
|
|
2439
2469
|
}
|
|
2440
2470
|
}
|
|
@@ -3041,31 +3071,46 @@ var Raw;
|
|
|
3041
3071
|
class InputMediaPoll extends index_js_1.TLObject {
|
|
3042
3072
|
poll;
|
|
3043
3073
|
correctAnswers;
|
|
3074
|
+
attachedMedia;
|
|
3044
3075
|
solution;
|
|
3045
3076
|
solutionEntities;
|
|
3077
|
+
solutionMedia;
|
|
3046
3078
|
constructor(params) {
|
|
3047
3079
|
super();
|
|
3048
3080
|
this.classType = 'types';
|
|
3049
3081
|
this.className = 'InputMediaPoll';
|
|
3050
|
-
this.constructorId =
|
|
3082
|
+
this.constructorId = 0x883a4108;
|
|
3051
3083
|
this.subclassOfId = 0xfaf846f4;
|
|
3052
|
-
this._slots = [
|
|
3084
|
+
this._slots = [
|
|
3085
|
+
'poll',
|
|
3086
|
+
'correctAnswers',
|
|
3087
|
+
'attachedMedia',
|
|
3088
|
+
'solution',
|
|
3089
|
+
'solutionEntities',
|
|
3090
|
+
'solutionMedia',
|
|
3091
|
+
];
|
|
3053
3092
|
this.poll = params.poll;
|
|
3054
3093
|
this.correctAnswers = params.correctAnswers;
|
|
3094
|
+
this.attachedMedia = params.attachedMedia;
|
|
3055
3095
|
this.solution = params.solution;
|
|
3056
3096
|
this.solutionEntities = params.solutionEntities;
|
|
3097
|
+
this.solutionMedia = params.solutionMedia;
|
|
3057
3098
|
}
|
|
3058
3099
|
static async read(_data, ..._args) {
|
|
3059
3100
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
3060
3101
|
let poll = await index_js_1.TLObject.read(_data);
|
|
3061
|
-
let correctAnswers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.
|
|
3102
|
+
let correctAnswers = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
|
|
3103
|
+
let attachedMedia = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
3062
3104
|
let solution = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
3063
3105
|
let solutionEntities = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
3106
|
+
let solutionMedia = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
3064
3107
|
return new Raw.InputMediaPoll({
|
|
3065
3108
|
poll: poll,
|
|
3066
3109
|
correctAnswers: correctAnswers,
|
|
3110
|
+
attachedMedia: attachedMedia,
|
|
3067
3111
|
solution: solution,
|
|
3068
3112
|
solutionEntities: solutionEntities,
|
|
3113
|
+
solutionMedia: solutionMedia,
|
|
3069
3114
|
});
|
|
3070
3115
|
}
|
|
3071
3116
|
write() {
|
|
@@ -3073,14 +3118,19 @@ var Raw;
|
|
|
3073
3118
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
3074
3119
|
let flags = 0;
|
|
3075
3120
|
flags |= this.correctAnswers ? 1 << 0 : 0;
|
|
3121
|
+
flags |= this.attachedMedia !== undefined ? 1 << 3 : 0;
|
|
3076
3122
|
flags |= this.solution !== undefined ? 1 << 1 : 0;
|
|
3077
3123
|
flags |= this.solutionEntities ? 1 << 1 : 0;
|
|
3124
|
+
flags |= this.solutionMedia !== undefined ? 1 << 2 : 0;
|
|
3078
3125
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
3079
3126
|
if (this.poll !== undefined) {
|
|
3080
3127
|
b.write(this.poll.write());
|
|
3081
3128
|
}
|
|
3082
3129
|
if (this.correctAnswers) {
|
|
3083
|
-
b.write(index_js_1.Primitive.Vector.write(this.correctAnswers, index_js_1.Primitive.
|
|
3130
|
+
b.write(index_js_1.Primitive.Vector.write(this.correctAnswers, index_js_1.Primitive.Int));
|
|
3131
|
+
}
|
|
3132
|
+
if (this.attachedMedia !== undefined) {
|
|
3133
|
+
b.write(this.attachedMedia.write());
|
|
3084
3134
|
}
|
|
3085
3135
|
if (this.solution !== undefined) {
|
|
3086
3136
|
b.write(index_js_1.Primitive.String.write(this.solution));
|
|
@@ -3088,6 +3138,9 @@ var Raw;
|
|
|
3088
3138
|
if (this.solutionEntities) {
|
|
3089
3139
|
b.write(index_js_1.Primitive.Vector.write(this.solutionEntities));
|
|
3090
3140
|
}
|
|
3141
|
+
if (this.solutionMedia !== undefined) {
|
|
3142
|
+
b.write(this.solutionMedia.write());
|
|
3143
|
+
}
|
|
3091
3144
|
return deps_js_1.Buffer.from(b.buffer);
|
|
3092
3145
|
}
|
|
3093
3146
|
}
|
|
@@ -4063,6 +4116,8 @@ var Raw;
|
|
|
4063
4116
|
botHasMainApp;
|
|
4064
4117
|
botForumView;
|
|
4065
4118
|
botForumCanManageTopics;
|
|
4119
|
+
botCanManageBots;
|
|
4120
|
+
botGuestchat;
|
|
4066
4121
|
id;
|
|
4067
4122
|
accessHash;
|
|
4068
4123
|
firstName;
|
|
@@ -4117,6 +4172,8 @@ var Raw;
|
|
|
4117
4172
|
'botHasMainApp',
|
|
4118
4173
|
'botForumView',
|
|
4119
4174
|
'botForumCanManageTopics',
|
|
4175
|
+
'botCanManageBots',
|
|
4176
|
+
'botGuestchat',
|
|
4120
4177
|
'id',
|
|
4121
4178
|
'accessHash',
|
|
4122
4179
|
'firstName',
|
|
@@ -4165,6 +4222,8 @@ var Raw;
|
|
|
4165
4222
|
this.botHasMainApp = params.botHasMainApp;
|
|
4166
4223
|
this.botForumView = params.botForumView;
|
|
4167
4224
|
this.botForumCanManageTopics = params.botForumCanManageTopics;
|
|
4225
|
+
this.botCanManageBots = params.botCanManageBots;
|
|
4226
|
+
this.botGuestchat = params.botGuestchat;
|
|
4168
4227
|
this.id = params.id;
|
|
4169
4228
|
this.accessHash = params.accessHash;
|
|
4170
4229
|
this.firstName = params.firstName;
|
|
@@ -4216,6 +4275,8 @@ var Raw;
|
|
|
4216
4275
|
let botHasMainApp = flags2 & (1 << 13) ? true : false;
|
|
4217
4276
|
let botForumView = flags2 & (1 << 16) ? true : false;
|
|
4218
4277
|
let botForumCanManageTopics = flags2 & (1 << 17) ? true : false;
|
|
4278
|
+
let botCanManageBots = flags2 & (1 << 18) ? true : false;
|
|
4279
|
+
let botGuestchat = flags2 & (1 << 19) ? true : false;
|
|
4219
4280
|
let id = await index_js_1.Primitive.Long.read(_data);
|
|
4220
4281
|
let accessHash = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
4221
4282
|
let firstName = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
@@ -4264,6 +4325,8 @@ var Raw;
|
|
|
4264
4325
|
botHasMainApp: botHasMainApp,
|
|
4265
4326
|
botForumView: botForumView,
|
|
4266
4327
|
botForumCanManageTopics: botForumCanManageTopics,
|
|
4328
|
+
botCanManageBots: botCanManageBots,
|
|
4329
|
+
botGuestchat: botGuestchat,
|
|
4267
4330
|
id: id,
|
|
4268
4331
|
accessHash: accessHash,
|
|
4269
4332
|
firstName: firstName,
|
|
@@ -4331,6 +4394,8 @@ var Raw;
|
|
|
4331
4394
|
flags2 |= this.botHasMainApp ? 1 << 13 : 0;
|
|
4332
4395
|
flags2 |= this.botForumView ? 1 << 16 : 0;
|
|
4333
4396
|
flags2 |= this.botForumCanManageTopics ? 1 << 17 : 0;
|
|
4397
|
+
flags2 |= this.botCanManageBots ? 1 << 18 : 0;
|
|
4398
|
+
flags2 |= this.botGuestchat ? 1 << 19 : 0;
|
|
4334
4399
|
flags2 |= this.usernames ? 1 << 0 : 0;
|
|
4335
4400
|
flags2 |= this.storiesMaxId !== undefined ? 1 << 5 : 0;
|
|
4336
4401
|
flags2 |= this.color !== undefined ? 1 << 8 : 0;
|
|
@@ -6357,6 +6422,7 @@ var Raw;
|
|
|
6357
6422
|
fwdFrom;
|
|
6358
6423
|
viaBotId;
|
|
6359
6424
|
viaBusinessBotId;
|
|
6425
|
+
guestchatViaFrom;
|
|
6360
6426
|
replyTo;
|
|
6361
6427
|
date;
|
|
6362
6428
|
message;
|
|
@@ -6384,7 +6450,7 @@ var Raw;
|
|
|
6384
6450
|
super();
|
|
6385
6451
|
this.classType = 'types';
|
|
6386
6452
|
this.className = 'Message';
|
|
6387
|
-
this.constructorId =
|
|
6453
|
+
this.constructorId = 0x95ef6f2b;
|
|
6388
6454
|
this.subclassOfId = 0x790009e3;
|
|
6389
6455
|
this._slots = [
|
|
6390
6456
|
'out',
|
|
@@ -6411,6 +6477,7 @@ var Raw;
|
|
|
6411
6477
|
'fwdFrom',
|
|
6412
6478
|
'viaBotId',
|
|
6413
6479
|
'viaBusinessBotId',
|
|
6480
|
+
'guestchatViaFrom',
|
|
6414
6481
|
'replyTo',
|
|
6415
6482
|
'date',
|
|
6416
6483
|
'message',
|
|
@@ -6459,6 +6526,7 @@ var Raw;
|
|
|
6459
6526
|
this.fwdFrom = params.fwdFrom;
|
|
6460
6527
|
this.viaBotId = params.viaBotId;
|
|
6461
6528
|
this.viaBusinessBotId = params.viaBusinessBotId;
|
|
6529
|
+
this.guestchatViaFrom = params.guestchatViaFrom;
|
|
6462
6530
|
this.replyTo = params.replyTo;
|
|
6463
6531
|
this.date = params.date;
|
|
6464
6532
|
this.message = params.message;
|
|
@@ -6510,6 +6578,7 @@ var Raw;
|
|
|
6510
6578
|
let fwdFrom = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
6511
6579
|
let viaBotId = flags & (1 << 11) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
6512
6580
|
let viaBusinessBotId = flags2 & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
6581
|
+
let guestchatViaFrom = flags2 & (1 << 19) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
6513
6582
|
let replyTo = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
6514
6583
|
let date = await index_js_1.Primitive.Int.read(_data);
|
|
6515
6584
|
let message = await index_js_1.Primitive.String.read(_data);
|
|
@@ -6558,6 +6627,7 @@ var Raw;
|
|
|
6558
6627
|
fwdFrom: fwdFrom,
|
|
6559
6628
|
viaBotId: viaBotId,
|
|
6560
6629
|
viaBusinessBotId: viaBusinessBotId,
|
|
6630
|
+
guestchatViaFrom: guestchatViaFrom,
|
|
6561
6631
|
replyTo: replyTo,
|
|
6562
6632
|
date: date,
|
|
6563
6633
|
message: message,
|
|
@@ -6625,6 +6695,7 @@ var Raw;
|
|
|
6625
6695
|
flags2 |= this.paidSuggestedPostTon ? 1 << 9 : 0;
|
|
6626
6696
|
flags2 |= this.fromRank !== undefined ? 1 << 12 : 0;
|
|
6627
6697
|
flags2 |= this.viaBusinessBotId !== undefined ? 1 << 0 : 0;
|
|
6698
|
+
flags2 |= this.guestchatViaFrom !== undefined ? 1 << 19 : 0;
|
|
6628
6699
|
flags2 |= this.effect !== undefined ? 1 << 2 : 0;
|
|
6629
6700
|
flags2 |= this.factcheck !== undefined ? 1 << 3 : 0;
|
|
6630
6701
|
flags2 |= this.reportDeliveryUntilDate !== undefined ? 1 << 5 : 0;
|
|
@@ -6660,6 +6731,9 @@ var Raw;
|
|
|
6660
6731
|
if (this.viaBusinessBotId !== undefined) {
|
|
6661
6732
|
b.write(index_js_1.Primitive.Long.write(this.viaBusinessBotId));
|
|
6662
6733
|
}
|
|
6734
|
+
if (this.guestchatViaFrom !== undefined) {
|
|
6735
|
+
b.write(this.guestchatViaFrom.write());
|
|
6736
|
+
}
|
|
6663
6737
|
if (this.replyTo !== undefined) {
|
|
6664
6738
|
b.write(this.replyTo.write());
|
|
6665
6739
|
}
|
|
@@ -6897,33 +6971,47 @@ var Raw;
|
|
|
6897
6971
|
Raw.MessageMediaEmpty = MessageMediaEmpty;
|
|
6898
6972
|
class MessageMediaPhoto extends index_js_1.TLObject {
|
|
6899
6973
|
spoiler;
|
|
6974
|
+
livePhoto;
|
|
6900
6975
|
photo;
|
|
6901
6976
|
ttlSeconds;
|
|
6977
|
+
video;
|
|
6902
6978
|
constructor(params) {
|
|
6903
6979
|
super();
|
|
6904
6980
|
this.classType = 'types';
|
|
6905
6981
|
this.className = 'MessageMediaPhoto';
|
|
6906
|
-
this.constructorId =
|
|
6982
|
+
this.constructorId = 0xe216eb63;
|
|
6907
6983
|
this.subclassOfId = 0x476cbe32;
|
|
6908
|
-
this._slots = ['spoiler', 'photo', 'ttlSeconds'];
|
|
6984
|
+
this._slots = ['spoiler', 'livePhoto', 'photo', 'ttlSeconds', 'video'];
|
|
6909
6985
|
this.spoiler = params.spoiler;
|
|
6986
|
+
this.livePhoto = params.livePhoto;
|
|
6910
6987
|
this.photo = params.photo;
|
|
6911
6988
|
this.ttlSeconds = params.ttlSeconds;
|
|
6989
|
+
this.video = params.video;
|
|
6912
6990
|
}
|
|
6913
6991
|
static async read(_data, ..._args) {
|
|
6914
6992
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
6915
6993
|
let spoiler = flags & (1 << 3) ? true : false;
|
|
6994
|
+
let livePhoto = flags & (1 << 4) ? true : false;
|
|
6916
6995
|
let photo = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
6917
6996
|
let ttlSeconds = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
6918
|
-
|
|
6997
|
+
let video = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
6998
|
+
return new Raw.MessageMediaPhoto({
|
|
6999
|
+
spoiler: spoiler,
|
|
7000
|
+
livePhoto: livePhoto,
|
|
7001
|
+
photo: photo,
|
|
7002
|
+
ttlSeconds: ttlSeconds,
|
|
7003
|
+
video: video,
|
|
7004
|
+
});
|
|
6919
7005
|
}
|
|
6920
7006
|
write() {
|
|
6921
7007
|
const b = new deps_js_1.BytesIO();
|
|
6922
7008
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
6923
7009
|
let flags = 0;
|
|
6924
7010
|
flags |= this.spoiler ? 1 << 3 : 0;
|
|
7011
|
+
flags |= this.livePhoto ? 1 << 4 : 0;
|
|
6925
7012
|
flags |= this.photo !== undefined ? 1 << 0 : 0;
|
|
6926
7013
|
flags |= this.ttlSeconds !== undefined ? 1 << 2 : 0;
|
|
7014
|
+
flags |= this.video !== undefined ? 1 << 4 : 0;
|
|
6927
7015
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
6928
7016
|
if (this.photo !== undefined) {
|
|
6929
7017
|
b.write(this.photo.write());
|
|
@@ -6931,6 +7019,9 @@ var Raw;
|
|
|
6931
7019
|
if (this.ttlSeconds !== undefined) {
|
|
6932
7020
|
b.write(index_js_1.Primitive.Int.write(this.ttlSeconds));
|
|
6933
7021
|
}
|
|
7022
|
+
if (this.video !== undefined) {
|
|
7023
|
+
b.write(this.video.write());
|
|
7024
|
+
}
|
|
6934
7025
|
return deps_js_1.Buffer.from(b.buffer);
|
|
6935
7026
|
}
|
|
6936
7027
|
}
|
|
@@ -7429,30 +7520,44 @@ var Raw;
|
|
|
7429
7520
|
class MessageMediaPoll extends index_js_1.TLObject {
|
|
7430
7521
|
poll;
|
|
7431
7522
|
results;
|
|
7523
|
+
attachedMedia;
|
|
7432
7524
|
constructor(params) {
|
|
7433
7525
|
super();
|
|
7434
7526
|
this.classType = 'types';
|
|
7435
7527
|
this.className = 'MessageMediaPoll';
|
|
7436
|
-
this.constructorId =
|
|
7528
|
+
this.constructorId = 0x773f4e66;
|
|
7437
7529
|
this.subclassOfId = 0x476cbe32;
|
|
7438
|
-
this._slots = ['poll', 'results'];
|
|
7530
|
+
this._slots = ['poll', 'results', 'attachedMedia'];
|
|
7439
7531
|
this.poll = params.poll;
|
|
7440
7532
|
this.results = params.results;
|
|
7533
|
+
this.attachedMedia = params.attachedMedia;
|
|
7441
7534
|
}
|
|
7442
7535
|
static async read(_data, ..._args) {
|
|
7536
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
7443
7537
|
let poll = await index_js_1.TLObject.read(_data);
|
|
7444
7538
|
let results = await index_js_1.TLObject.read(_data);
|
|
7445
|
-
|
|
7539
|
+
let attachedMedia = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
7540
|
+
return new Raw.MessageMediaPoll({
|
|
7541
|
+
poll: poll,
|
|
7542
|
+
results: results,
|
|
7543
|
+
attachedMedia: attachedMedia,
|
|
7544
|
+
});
|
|
7446
7545
|
}
|
|
7447
7546
|
write() {
|
|
7448
7547
|
const b = new deps_js_1.BytesIO();
|
|
7449
7548
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
7549
|
+
let flags = 0;
|
|
7550
|
+
flags |= this.attachedMedia !== undefined ? 1 << 0 : 0;
|
|
7551
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
7450
7552
|
if (this.poll !== undefined) {
|
|
7451
7553
|
b.write(this.poll.write());
|
|
7452
7554
|
}
|
|
7453
7555
|
if (this.results !== undefined) {
|
|
7454
7556
|
b.write(this.results.write());
|
|
7455
7557
|
}
|
|
7558
|
+
if (this.attachedMedia !== undefined) {
|
|
7559
|
+
b.write(this.attachedMedia.write());
|
|
7560
|
+
}
|
|
7456
7561
|
return deps_js_1.Buffer.from(b.buffer);
|
|
7457
7562
|
}
|
|
7458
7563
|
}
|
|
@@ -10517,6 +10622,81 @@ var Raw;
|
|
|
10517
10622
|
}
|
|
10518
10623
|
}
|
|
10519
10624
|
Raw.MessageActionNoForwardsRequest = MessageActionNoForwardsRequest;
|
|
10625
|
+
class MessageActionPollAppendAnswer extends index_js_1.TLObject {
|
|
10626
|
+
answer;
|
|
10627
|
+
constructor(params) {
|
|
10628
|
+
super();
|
|
10629
|
+
this.classType = 'types';
|
|
10630
|
+
this.className = 'MessageActionPollAppendAnswer';
|
|
10631
|
+
this.constructorId = 0x9da1cd6c;
|
|
10632
|
+
this.subclassOfId = 0x8680d126;
|
|
10633
|
+
this._slots = ['answer'];
|
|
10634
|
+
this.answer = params.answer;
|
|
10635
|
+
}
|
|
10636
|
+
static async read(_data, ..._args) {
|
|
10637
|
+
let answer = await index_js_1.TLObject.read(_data);
|
|
10638
|
+
return new Raw.MessageActionPollAppendAnswer({ answer: answer });
|
|
10639
|
+
}
|
|
10640
|
+
write() {
|
|
10641
|
+
const b = new deps_js_1.BytesIO();
|
|
10642
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
10643
|
+
if (this.answer !== undefined) {
|
|
10644
|
+
b.write(this.answer.write());
|
|
10645
|
+
}
|
|
10646
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
Raw.MessageActionPollAppendAnswer = MessageActionPollAppendAnswer;
|
|
10650
|
+
class MessageActionPollDeleteAnswer extends index_js_1.TLObject {
|
|
10651
|
+
answer;
|
|
10652
|
+
constructor(params) {
|
|
10653
|
+
super();
|
|
10654
|
+
this.classType = 'types';
|
|
10655
|
+
this.className = 'MessageActionPollDeleteAnswer';
|
|
10656
|
+
this.constructorId = 0x399674dc;
|
|
10657
|
+
this.subclassOfId = 0x8680d126;
|
|
10658
|
+
this._slots = ['answer'];
|
|
10659
|
+
this.answer = params.answer;
|
|
10660
|
+
}
|
|
10661
|
+
static async read(_data, ..._args) {
|
|
10662
|
+
let answer = await index_js_1.TLObject.read(_data);
|
|
10663
|
+
return new Raw.MessageActionPollDeleteAnswer({ answer: answer });
|
|
10664
|
+
}
|
|
10665
|
+
write() {
|
|
10666
|
+
const b = new deps_js_1.BytesIO();
|
|
10667
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
10668
|
+
if (this.answer !== undefined) {
|
|
10669
|
+
b.write(this.answer.write());
|
|
10670
|
+
}
|
|
10671
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
Raw.MessageActionPollDeleteAnswer = MessageActionPollDeleteAnswer;
|
|
10675
|
+
class MessageActionManagedBotCreated extends index_js_1.TLObject {
|
|
10676
|
+
botId;
|
|
10677
|
+
constructor(params) {
|
|
10678
|
+
super();
|
|
10679
|
+
this.classType = 'types';
|
|
10680
|
+
this.className = 'MessageActionManagedBotCreated';
|
|
10681
|
+
this.constructorId = 0x16605e3e;
|
|
10682
|
+
this.subclassOfId = 0x8680d126;
|
|
10683
|
+
this._slots = ['botId'];
|
|
10684
|
+
this.botId = params.botId;
|
|
10685
|
+
}
|
|
10686
|
+
static async read(_data, ..._args) {
|
|
10687
|
+
let botId = await index_js_1.Primitive.Long.read(_data);
|
|
10688
|
+
return new Raw.MessageActionManagedBotCreated({ botId: botId });
|
|
10689
|
+
}
|
|
10690
|
+
write() {
|
|
10691
|
+
const b = new deps_js_1.BytesIO();
|
|
10692
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
10693
|
+
if (this.botId !== undefined) {
|
|
10694
|
+
b.write(index_js_1.Primitive.Long.write(this.botId));
|
|
10695
|
+
}
|
|
10696
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
10697
|
+
}
|
|
10698
|
+
}
|
|
10699
|
+
Raw.MessageActionManagedBotCreated = MessageActionManagedBotCreated;
|
|
10520
10700
|
class Dialog extends index_js_1.TLObject {
|
|
10521
10701
|
pinned;
|
|
10522
10702
|
unreadMark;
|
|
@@ -10528,6 +10708,7 @@ var Raw;
|
|
|
10528
10708
|
unreadCount;
|
|
10529
10709
|
unreadMentionsCount;
|
|
10530
10710
|
unreadReactionsCount;
|
|
10711
|
+
unreadPollVotesCount;
|
|
10531
10712
|
notifySettings;
|
|
10532
10713
|
pts;
|
|
10533
10714
|
draft;
|
|
@@ -10537,7 +10718,7 @@ var Raw;
|
|
|
10537
10718
|
super();
|
|
10538
10719
|
this.classType = 'types';
|
|
10539
10720
|
this.className = 'Dialog';
|
|
10540
|
-
this.constructorId =
|
|
10721
|
+
this.constructorId = 0xfc89f7f3;
|
|
10541
10722
|
this.subclassOfId = 0x42cddd54;
|
|
10542
10723
|
this._slots = [
|
|
10543
10724
|
'pinned',
|
|
@@ -10550,6 +10731,7 @@ var Raw;
|
|
|
10550
10731
|
'unreadCount',
|
|
10551
10732
|
'unreadMentionsCount',
|
|
10552
10733
|
'unreadReactionsCount',
|
|
10734
|
+
'unreadPollVotesCount',
|
|
10553
10735
|
'notifySettings',
|
|
10554
10736
|
'pts',
|
|
10555
10737
|
'draft',
|
|
@@ -10566,6 +10748,7 @@ var Raw;
|
|
|
10566
10748
|
this.unreadCount = params.unreadCount;
|
|
10567
10749
|
this.unreadMentionsCount = params.unreadMentionsCount;
|
|
10568
10750
|
this.unreadReactionsCount = params.unreadReactionsCount;
|
|
10751
|
+
this.unreadPollVotesCount = params.unreadPollVotesCount;
|
|
10569
10752
|
this.notifySettings = params.notifySettings;
|
|
10570
10753
|
this.pts = params.pts;
|
|
10571
10754
|
this.draft = params.draft;
|
|
@@ -10584,6 +10767,7 @@ var Raw;
|
|
|
10584
10767
|
let unreadCount = await index_js_1.Primitive.Int.read(_data);
|
|
10585
10768
|
let unreadMentionsCount = await index_js_1.Primitive.Int.read(_data);
|
|
10586
10769
|
let unreadReactionsCount = await index_js_1.Primitive.Int.read(_data);
|
|
10770
|
+
let unreadPollVotesCount = await index_js_1.Primitive.Int.read(_data);
|
|
10587
10771
|
let notifySettings = await index_js_1.TLObject.read(_data);
|
|
10588
10772
|
let pts = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
10589
10773
|
let draft = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
@@ -10600,6 +10784,7 @@ var Raw;
|
|
|
10600
10784
|
unreadCount: unreadCount,
|
|
10601
10785
|
unreadMentionsCount: unreadMentionsCount,
|
|
10602
10786
|
unreadReactionsCount: unreadReactionsCount,
|
|
10787
|
+
unreadPollVotesCount: unreadPollVotesCount,
|
|
10603
10788
|
notifySettings: notifySettings,
|
|
10604
10789
|
pts: pts,
|
|
10605
10790
|
draft: draft,
|
|
@@ -10640,6 +10825,9 @@ var Raw;
|
|
|
10640
10825
|
if (this.unreadReactionsCount !== undefined) {
|
|
10641
10826
|
b.write(index_js_1.Primitive.Int.write(this.unreadReactionsCount));
|
|
10642
10827
|
}
|
|
10828
|
+
if (this.unreadPollVotesCount !== undefined) {
|
|
10829
|
+
b.write(index_js_1.Primitive.Int.write(this.unreadPollVotesCount));
|
|
10830
|
+
}
|
|
10643
10831
|
if (this.notifySettings !== undefined) {
|
|
10644
10832
|
b.write(this.notifySettings.write());
|
|
10645
10833
|
}
|
|
@@ -11989,6 +12177,7 @@ var Raw;
|
|
|
11989
12177
|
displayGiftsButton;
|
|
11990
12178
|
noforwardsMyEnabled;
|
|
11991
12179
|
noforwardsPeerEnabled;
|
|
12180
|
+
unofficialSecurityRisk;
|
|
11992
12181
|
id;
|
|
11993
12182
|
about;
|
|
11994
12183
|
settings;
|
|
@@ -12026,11 +12215,12 @@ var Raw;
|
|
|
12026
12215
|
mainTab;
|
|
12027
12216
|
savedMusic;
|
|
12028
12217
|
note;
|
|
12218
|
+
botManagerId;
|
|
12029
12219
|
constructor(params) {
|
|
12030
12220
|
super();
|
|
12031
12221
|
this.classType = 'types';
|
|
12032
12222
|
this.className = 'UserFull';
|
|
12033
|
-
this.constructorId =
|
|
12223
|
+
this.constructorId = 0x6cbe645;
|
|
12034
12224
|
this.subclassOfId = 0x1f4661b9;
|
|
12035
12225
|
this._slots = [
|
|
12036
12226
|
'blocked',
|
|
@@ -12052,6 +12242,7 @@ var Raw;
|
|
|
12052
12242
|
'displayGiftsButton',
|
|
12053
12243
|
'noforwardsMyEnabled',
|
|
12054
12244
|
'noforwardsPeerEnabled',
|
|
12245
|
+
'unofficialSecurityRisk',
|
|
12055
12246
|
'id',
|
|
12056
12247
|
'about',
|
|
12057
12248
|
'settings',
|
|
@@ -12089,6 +12280,7 @@ var Raw;
|
|
|
12089
12280
|
'mainTab',
|
|
12090
12281
|
'savedMusic',
|
|
12091
12282
|
'note',
|
|
12283
|
+
'botManagerId',
|
|
12092
12284
|
];
|
|
12093
12285
|
this.blocked = params.blocked;
|
|
12094
12286
|
this.phoneCallsAvailable = params.phoneCallsAvailable;
|
|
@@ -12109,6 +12301,7 @@ var Raw;
|
|
|
12109
12301
|
this.displayGiftsButton = params.displayGiftsButton;
|
|
12110
12302
|
this.noforwardsMyEnabled = params.noforwardsMyEnabled;
|
|
12111
12303
|
this.noforwardsPeerEnabled = params.noforwardsPeerEnabled;
|
|
12304
|
+
this.unofficialSecurityRisk = params.unofficialSecurityRisk;
|
|
12112
12305
|
this.id = params.id;
|
|
12113
12306
|
this.about = params.about;
|
|
12114
12307
|
this.settings = params.settings;
|
|
@@ -12146,6 +12339,7 @@ var Raw;
|
|
|
12146
12339
|
this.mainTab = params.mainTab;
|
|
12147
12340
|
this.savedMusic = params.savedMusic;
|
|
12148
12341
|
this.note = params.note;
|
|
12342
|
+
this.botManagerId = params.botManagerId;
|
|
12149
12343
|
}
|
|
12150
12344
|
static async read(_data, ..._args) {
|
|
12151
12345
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -12169,6 +12363,7 @@ var Raw;
|
|
|
12169
12363
|
let displayGiftsButton = flags2 & (1 << 16) ? true : false;
|
|
12170
12364
|
let noforwardsMyEnabled = flags2 & (1 << 23) ? true : false;
|
|
12171
12365
|
let noforwardsPeerEnabled = flags2 & (1 << 24) ? true : false;
|
|
12366
|
+
let unofficialSecurityRisk = flags2 & (1 << 26) ? true : false;
|
|
12172
12367
|
let id = await index_js_1.Primitive.Long.read(_data);
|
|
12173
12368
|
let about = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
12174
12369
|
let settings = await index_js_1.TLObject.read(_data);
|
|
@@ -12206,6 +12401,7 @@ var Raw;
|
|
|
12206
12401
|
let mainTab = flags2 & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
12207
12402
|
let savedMusic = flags2 & (1 << 21) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
12208
12403
|
let note = flags2 & (1 << 22) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
12404
|
+
let botManagerId = flags2 & (1 << 25) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
12209
12405
|
return new Raw.UserFull({
|
|
12210
12406
|
blocked: blocked,
|
|
12211
12407
|
phoneCallsAvailable: phoneCallsAvailable,
|
|
@@ -12226,6 +12422,7 @@ var Raw;
|
|
|
12226
12422
|
displayGiftsButton: displayGiftsButton,
|
|
12227
12423
|
noforwardsMyEnabled: noforwardsMyEnabled,
|
|
12228
12424
|
noforwardsPeerEnabled: noforwardsPeerEnabled,
|
|
12425
|
+
unofficialSecurityRisk: unofficialSecurityRisk,
|
|
12229
12426
|
id: id,
|
|
12230
12427
|
about: about,
|
|
12231
12428
|
settings: settings,
|
|
@@ -12263,6 +12460,7 @@ var Raw;
|
|
|
12263
12460
|
mainTab: mainTab,
|
|
12264
12461
|
savedMusic: savedMusic,
|
|
12265
12462
|
note: note,
|
|
12463
|
+
botManagerId: botManagerId,
|
|
12266
12464
|
});
|
|
12267
12465
|
}
|
|
12268
12466
|
write() {
|
|
@@ -12304,6 +12502,7 @@ var Raw;
|
|
|
12304
12502
|
flags2 |= this.displayGiftsButton ? 1 << 16 : 0;
|
|
12305
12503
|
flags2 |= this.noforwardsMyEnabled ? 1 << 23 : 0;
|
|
12306
12504
|
flags2 |= this.noforwardsPeerEnabled ? 1 << 24 : 0;
|
|
12505
|
+
flags2 |= this.unofficialSecurityRisk ? 1 << 26 : 0;
|
|
12307
12506
|
flags2 |= this.businessWorkHours !== undefined ? 1 << 0 : 0;
|
|
12308
12507
|
flags2 |= this.businessLocation !== undefined ? 1 << 1 : 0;
|
|
12309
12508
|
flags2 |= this.businessGreetingMessage !== undefined ? 1 << 2 : 0;
|
|
@@ -12323,6 +12522,7 @@ var Raw;
|
|
|
12323
12522
|
flags2 |= this.mainTab !== undefined ? 1 << 20 : 0;
|
|
12324
12523
|
flags2 |= this.savedMusic !== undefined ? 1 << 21 : 0;
|
|
12325
12524
|
flags2 |= this.note !== undefined ? 1 << 22 : 0;
|
|
12525
|
+
flags2 |= this.botManagerId !== undefined ? 1 << 25 : 0;
|
|
12326
12526
|
b.write(index_js_1.Primitive.Int.write(flags2));
|
|
12327
12527
|
if (this.id !== undefined) {
|
|
12328
12528
|
b.write(index_js_1.Primitive.Long.write(this.id));
|
|
@@ -12435,6 +12635,9 @@ var Raw;
|
|
|
12435
12635
|
if (this.note !== undefined) {
|
|
12436
12636
|
b.write(this.note.write());
|
|
12437
12637
|
}
|
|
12638
|
+
if (this.botManagerId !== undefined) {
|
|
12639
|
+
b.write(index_js_1.Primitive.Long.write(this.botManagerId));
|
|
12640
|
+
}
|
|
12438
12641
|
return deps_js_1.Buffer.from(b.buffer);
|
|
12439
12642
|
}
|
|
12440
12643
|
}
|
|
@@ -12862,6 +13065,25 @@ var Raw;
|
|
|
12862
13065
|
}
|
|
12863
13066
|
}
|
|
12864
13067
|
Raw.InputMessagesFilterPinned = InputMessagesFilterPinned;
|
|
13068
|
+
class InputMessagesFilterPoll extends index_js_1.TLObject {
|
|
13069
|
+
constructor() {
|
|
13070
|
+
super();
|
|
13071
|
+
this.classType = 'types';
|
|
13072
|
+
this.className = 'InputMessagesFilterPoll';
|
|
13073
|
+
this.constructorId = 0xfa2bc90a;
|
|
13074
|
+
this.subclassOfId = 0x8a36ec14;
|
|
13075
|
+
this._slots = [];
|
|
13076
|
+
}
|
|
13077
|
+
static async read(_data, ..._args) {
|
|
13078
|
+
return new Raw.InputMessagesFilterPoll();
|
|
13079
|
+
}
|
|
13080
|
+
write() {
|
|
13081
|
+
const b = new deps_js_1.BytesIO();
|
|
13082
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
13083
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
13084
|
+
}
|
|
13085
|
+
}
|
|
13086
|
+
Raw.InputMessagesFilterPoll = InputMessagesFilterPoll;
|
|
12865
13087
|
class UpdateNewMessage extends index_js_1.TLObject {
|
|
12866
13088
|
message;
|
|
12867
13089
|
pts;
|
|
@@ -15294,6 +15516,9 @@ var Raw;
|
|
|
15294
15516
|
}
|
|
15295
15517
|
Raw.UpdateDialogUnreadMark = UpdateDialogUnreadMark;
|
|
15296
15518
|
class UpdateMessagePoll extends index_js_1.TLObject {
|
|
15519
|
+
peer;
|
|
15520
|
+
msgId;
|
|
15521
|
+
topMsgId;
|
|
15297
15522
|
pollId;
|
|
15298
15523
|
poll;
|
|
15299
15524
|
results;
|
|
@@ -15301,26 +15526,51 @@ var Raw;
|
|
|
15301
15526
|
super();
|
|
15302
15527
|
this.classType = 'types';
|
|
15303
15528
|
this.className = 'UpdateMessagePoll';
|
|
15304
|
-
this.constructorId =
|
|
15529
|
+
this.constructorId = 0xd64c522b;
|
|
15305
15530
|
this.subclassOfId = 0x9f89304e;
|
|
15306
|
-
this._slots = ['pollId', 'poll', 'results'];
|
|
15531
|
+
this._slots = ['peer', 'msgId', 'topMsgId', 'pollId', 'poll', 'results'];
|
|
15532
|
+
this.peer = params.peer;
|
|
15533
|
+
this.msgId = params.msgId;
|
|
15534
|
+
this.topMsgId = params.topMsgId;
|
|
15307
15535
|
this.pollId = params.pollId;
|
|
15308
15536
|
this.poll = params.poll;
|
|
15309
15537
|
this.results = params.results;
|
|
15310
15538
|
}
|
|
15311
15539
|
static async read(_data, ..._args) {
|
|
15312
15540
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
15541
|
+
let peer = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
15542
|
+
let msgId = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
15543
|
+
let topMsgId = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
15313
15544
|
let pollId = await index_js_1.Primitive.Long.read(_data);
|
|
15314
15545
|
let poll = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
15315
15546
|
let results = await index_js_1.TLObject.read(_data);
|
|
15316
|
-
return new Raw.UpdateMessagePoll({
|
|
15547
|
+
return new Raw.UpdateMessagePoll({
|
|
15548
|
+
peer: peer,
|
|
15549
|
+
msgId: msgId,
|
|
15550
|
+
topMsgId: topMsgId,
|
|
15551
|
+
pollId: pollId,
|
|
15552
|
+
poll: poll,
|
|
15553
|
+
results: results,
|
|
15554
|
+
});
|
|
15317
15555
|
}
|
|
15318
15556
|
write() {
|
|
15319
15557
|
const b = new deps_js_1.BytesIO();
|
|
15320
15558
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
15321
15559
|
let flags = 0;
|
|
15560
|
+
flags |= this.peer !== undefined ? 1 << 1 : 0;
|
|
15561
|
+
flags |= this.msgId !== undefined ? 1 << 1 : 0;
|
|
15562
|
+
flags |= this.topMsgId !== undefined ? 1 << 2 : 0;
|
|
15322
15563
|
flags |= this.poll !== undefined ? 1 << 0 : 0;
|
|
15323
15564
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
15565
|
+
if (this.peer !== undefined) {
|
|
15566
|
+
b.write(this.peer.write());
|
|
15567
|
+
}
|
|
15568
|
+
if (this.msgId !== undefined) {
|
|
15569
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
15570
|
+
}
|
|
15571
|
+
if (this.topMsgId !== undefined) {
|
|
15572
|
+
b.write(index_js_1.Primitive.Int.write(this.topMsgId));
|
|
15573
|
+
}
|
|
15324
15574
|
if (this.pollId !== undefined) {
|
|
15325
15575
|
b.write(index_js_1.Primitive.Long.write(this.pollId));
|
|
15326
15576
|
}
|
|
@@ -15617,28 +15867,32 @@ var Raw;
|
|
|
15617
15867
|
pollId;
|
|
15618
15868
|
peer;
|
|
15619
15869
|
options;
|
|
15870
|
+
positions;
|
|
15620
15871
|
qts;
|
|
15621
15872
|
constructor(params) {
|
|
15622
15873
|
super();
|
|
15623
15874
|
this.classType = 'types';
|
|
15624
15875
|
this.className = 'UpdateMessagePollVote';
|
|
15625
|
-
this.constructorId =
|
|
15876
|
+
this.constructorId = 0x7699f014;
|
|
15626
15877
|
this.subclassOfId = 0x9f89304e;
|
|
15627
|
-
this._slots = ['pollId', 'peer', 'options', 'qts'];
|
|
15878
|
+
this._slots = ['pollId', 'peer', 'options', 'positions', 'qts'];
|
|
15628
15879
|
this.pollId = params.pollId;
|
|
15629
15880
|
this.peer = params.peer;
|
|
15630
15881
|
this.options = params.options;
|
|
15882
|
+
this.positions = params.positions;
|
|
15631
15883
|
this.qts = params.qts;
|
|
15632
15884
|
}
|
|
15633
15885
|
static async read(_data, ..._args) {
|
|
15634
15886
|
let pollId = await index_js_1.Primitive.Long.read(_data);
|
|
15635
15887
|
let peer = await index_js_1.TLObject.read(_data);
|
|
15636
15888
|
let options = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Bytes);
|
|
15889
|
+
let positions = await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int);
|
|
15637
15890
|
let qts = await index_js_1.Primitive.Int.read(_data);
|
|
15638
15891
|
return new Raw.UpdateMessagePollVote({
|
|
15639
15892
|
pollId: pollId,
|
|
15640
15893
|
peer: peer,
|
|
15641
15894
|
options: options,
|
|
15895
|
+
positions: positions,
|
|
15642
15896
|
qts: qts,
|
|
15643
15897
|
});
|
|
15644
15898
|
}
|
|
@@ -15654,6 +15908,9 @@ var Raw;
|
|
|
15654
15908
|
if (this.options) {
|
|
15655
15909
|
b.write(index_js_1.Primitive.Vector.write(this.options, index_js_1.Primitive.Bytes));
|
|
15656
15910
|
}
|
|
15911
|
+
if (this.positions) {
|
|
15912
|
+
b.write(index_js_1.Primitive.Vector.write(this.positions, index_js_1.Primitive.Int));
|
|
15913
|
+
}
|
|
15657
15914
|
if (this.qts !== undefined) {
|
|
15658
15915
|
b.write(index_js_1.Primitive.Int.write(this.qts));
|
|
15659
15916
|
}
|
|
@@ -18656,6 +18913,114 @@ var Raw;
|
|
|
18656
18913
|
}
|
|
18657
18914
|
}
|
|
18658
18915
|
Raw.UpdateChatParticipantRank = UpdateChatParticipantRank;
|
|
18916
|
+
class UpdateManagedBot extends index_js_1.TLObject {
|
|
18917
|
+
userId;
|
|
18918
|
+
botId;
|
|
18919
|
+
qts;
|
|
18920
|
+
constructor(params) {
|
|
18921
|
+
super();
|
|
18922
|
+
this.classType = 'types';
|
|
18923
|
+
this.className = 'UpdateManagedBot';
|
|
18924
|
+
this.constructorId = 0x4880ed9a;
|
|
18925
|
+
this.subclassOfId = 0x9f89304e;
|
|
18926
|
+
this._slots = ['userId', 'botId', 'qts'];
|
|
18927
|
+
this.userId = params.userId;
|
|
18928
|
+
this.botId = params.botId;
|
|
18929
|
+
this.qts = params.qts;
|
|
18930
|
+
}
|
|
18931
|
+
static async read(_data, ..._args) {
|
|
18932
|
+
let userId = await index_js_1.Primitive.Long.read(_data);
|
|
18933
|
+
let botId = await index_js_1.Primitive.Long.read(_data);
|
|
18934
|
+
let qts = await index_js_1.Primitive.Int.read(_data);
|
|
18935
|
+
return new Raw.UpdateManagedBot({ userId: userId, botId: botId, qts: qts });
|
|
18936
|
+
}
|
|
18937
|
+
write() {
|
|
18938
|
+
const b = new deps_js_1.BytesIO();
|
|
18939
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
18940
|
+
if (this.userId !== undefined) {
|
|
18941
|
+
b.write(index_js_1.Primitive.Long.write(this.userId));
|
|
18942
|
+
}
|
|
18943
|
+
if (this.botId !== undefined) {
|
|
18944
|
+
b.write(index_js_1.Primitive.Long.write(this.botId));
|
|
18945
|
+
}
|
|
18946
|
+
if (this.qts !== undefined) {
|
|
18947
|
+
b.write(index_js_1.Primitive.Int.write(this.qts));
|
|
18948
|
+
}
|
|
18949
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
18950
|
+
}
|
|
18951
|
+
}
|
|
18952
|
+
Raw.UpdateManagedBot = UpdateManagedBot;
|
|
18953
|
+
class UpdateBotGuestChatQuery extends index_js_1.TLObject {
|
|
18954
|
+
queryId;
|
|
18955
|
+
message;
|
|
18956
|
+
referenceMessages;
|
|
18957
|
+
qts;
|
|
18958
|
+
constructor(params) {
|
|
18959
|
+
super();
|
|
18960
|
+
this.classType = 'types';
|
|
18961
|
+
this.className = 'UpdateBotGuestChatQuery';
|
|
18962
|
+
this.constructorId = 0xcdd4093d;
|
|
18963
|
+
this.subclassOfId = 0x9f89304e;
|
|
18964
|
+
this._slots = ['queryId', 'message', 'referenceMessages', 'qts'];
|
|
18965
|
+
this.queryId = params.queryId;
|
|
18966
|
+
this.message = params.message;
|
|
18967
|
+
this.referenceMessages = params.referenceMessages;
|
|
18968
|
+
this.qts = params.qts;
|
|
18969
|
+
}
|
|
18970
|
+
static async read(_data, ..._args) {
|
|
18971
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
18972
|
+
let queryId = await index_js_1.Primitive.Long.read(_data);
|
|
18973
|
+
let message = await index_js_1.TLObject.read(_data);
|
|
18974
|
+
let referenceMessages = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : [];
|
|
18975
|
+
let qts = await index_js_1.Primitive.Int.read(_data);
|
|
18976
|
+
return new Raw.UpdateBotGuestChatQuery({
|
|
18977
|
+
queryId: queryId,
|
|
18978
|
+
message: message,
|
|
18979
|
+
referenceMessages: referenceMessages,
|
|
18980
|
+
qts: qts,
|
|
18981
|
+
});
|
|
18982
|
+
}
|
|
18983
|
+
write() {
|
|
18984
|
+
const b = new deps_js_1.BytesIO();
|
|
18985
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
18986
|
+
let flags = 0;
|
|
18987
|
+
flags |= this.referenceMessages ? 1 << 0 : 0;
|
|
18988
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
18989
|
+
if (this.queryId !== undefined) {
|
|
18990
|
+
b.write(index_js_1.Primitive.Long.write(this.queryId));
|
|
18991
|
+
}
|
|
18992
|
+
if (this.message !== undefined) {
|
|
18993
|
+
b.write(this.message.write());
|
|
18994
|
+
}
|
|
18995
|
+
if (this.referenceMessages) {
|
|
18996
|
+
b.write(index_js_1.Primitive.Vector.write(this.referenceMessages));
|
|
18997
|
+
}
|
|
18998
|
+
if (this.qts !== undefined) {
|
|
18999
|
+
b.write(index_js_1.Primitive.Int.write(this.qts));
|
|
19000
|
+
}
|
|
19001
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
19002
|
+
}
|
|
19003
|
+
}
|
|
19004
|
+
Raw.UpdateBotGuestChatQuery = UpdateBotGuestChatQuery;
|
|
19005
|
+
class UpdateAiComposeTones extends index_js_1.TLObject {
|
|
19006
|
+
constructor() {
|
|
19007
|
+
super();
|
|
19008
|
+
this.classType = 'types';
|
|
19009
|
+
this.className = 'UpdateAiComposeTones';
|
|
19010
|
+
this.constructorId = 0x8c0f91fb;
|
|
19011
|
+
this.subclassOfId = 0x9f89304e;
|
|
19012
|
+
this._slots = [];
|
|
19013
|
+
}
|
|
19014
|
+
static async read(_data, ..._args) {
|
|
19015
|
+
return new Raw.UpdateAiComposeTones();
|
|
19016
|
+
}
|
|
19017
|
+
write() {
|
|
19018
|
+
const b = new deps_js_1.BytesIO();
|
|
19019
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
19020
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
19021
|
+
}
|
|
19022
|
+
}
|
|
19023
|
+
Raw.UpdateAiComposeTones = UpdateAiComposeTones;
|
|
18659
19024
|
class UpdatesTooLong extends index_js_1.TLObject {
|
|
18660
19025
|
constructor() {
|
|
18661
19026
|
super();
|
|
@@ -25713,6 +26078,105 @@ var Raw;
|
|
|
25713
26078
|
}
|
|
25714
26079
|
}
|
|
25715
26080
|
Raw.MessageEntityFormattedDate = MessageEntityFormattedDate;
|
|
26081
|
+
class MessageEntityDiffInsert extends index_js_1.TLObject {
|
|
26082
|
+
offset;
|
|
26083
|
+
length;
|
|
26084
|
+
constructor(params) {
|
|
26085
|
+
super();
|
|
26086
|
+
this.classType = 'types';
|
|
26087
|
+
this.className = 'MessageEntityDiffInsert';
|
|
26088
|
+
this.constructorId = 0x71777116;
|
|
26089
|
+
this.subclassOfId = 0xcf6419dc;
|
|
26090
|
+
this._slots = ['offset', 'length'];
|
|
26091
|
+
this.offset = params.offset;
|
|
26092
|
+
this.length = params.length;
|
|
26093
|
+
}
|
|
26094
|
+
static async read(_data, ..._args) {
|
|
26095
|
+
let offset = await index_js_1.Primitive.Int.read(_data);
|
|
26096
|
+
let length = await index_js_1.Primitive.Int.read(_data);
|
|
26097
|
+
return new Raw.MessageEntityDiffInsert({ offset: offset, length: length });
|
|
26098
|
+
}
|
|
26099
|
+
write() {
|
|
26100
|
+
const b = new deps_js_1.BytesIO();
|
|
26101
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
26102
|
+
if (this.offset !== undefined) {
|
|
26103
|
+
b.write(index_js_1.Primitive.Int.write(this.offset));
|
|
26104
|
+
}
|
|
26105
|
+
if (this.length !== undefined) {
|
|
26106
|
+
b.write(index_js_1.Primitive.Int.write(this.length));
|
|
26107
|
+
}
|
|
26108
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
26109
|
+
}
|
|
26110
|
+
}
|
|
26111
|
+
Raw.MessageEntityDiffInsert = MessageEntityDiffInsert;
|
|
26112
|
+
class MessageEntityDiffReplace extends index_js_1.TLObject {
|
|
26113
|
+
offset;
|
|
26114
|
+
length;
|
|
26115
|
+
oldText;
|
|
26116
|
+
constructor(params) {
|
|
26117
|
+
super();
|
|
26118
|
+
this.classType = 'types';
|
|
26119
|
+
this.className = 'MessageEntityDiffReplace';
|
|
26120
|
+
this.constructorId = 0xc6c1e5a7;
|
|
26121
|
+
this.subclassOfId = 0xcf6419dc;
|
|
26122
|
+
this._slots = ['offset', 'length', 'oldText'];
|
|
26123
|
+
this.offset = params.offset;
|
|
26124
|
+
this.length = params.length;
|
|
26125
|
+
this.oldText = params.oldText;
|
|
26126
|
+
}
|
|
26127
|
+
static async read(_data, ..._args) {
|
|
26128
|
+
let offset = await index_js_1.Primitive.Int.read(_data);
|
|
26129
|
+
let length = await index_js_1.Primitive.Int.read(_data);
|
|
26130
|
+
let oldText = await index_js_1.Primitive.String.read(_data);
|
|
26131
|
+
return new Raw.MessageEntityDiffReplace({ offset: offset, length: length, oldText: oldText });
|
|
26132
|
+
}
|
|
26133
|
+
write() {
|
|
26134
|
+
const b = new deps_js_1.BytesIO();
|
|
26135
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
26136
|
+
if (this.offset !== undefined) {
|
|
26137
|
+
b.write(index_js_1.Primitive.Int.write(this.offset));
|
|
26138
|
+
}
|
|
26139
|
+
if (this.length !== undefined) {
|
|
26140
|
+
b.write(index_js_1.Primitive.Int.write(this.length));
|
|
26141
|
+
}
|
|
26142
|
+
if (this.oldText !== undefined) {
|
|
26143
|
+
b.write(index_js_1.Primitive.String.write(this.oldText));
|
|
26144
|
+
}
|
|
26145
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
26146
|
+
}
|
|
26147
|
+
}
|
|
26148
|
+
Raw.MessageEntityDiffReplace = MessageEntityDiffReplace;
|
|
26149
|
+
class MessageEntityDiffDelete extends index_js_1.TLObject {
|
|
26150
|
+
offset;
|
|
26151
|
+
length;
|
|
26152
|
+
constructor(params) {
|
|
26153
|
+
super();
|
|
26154
|
+
this.classType = 'types';
|
|
26155
|
+
this.className = 'MessageEntityDiffDelete';
|
|
26156
|
+
this.constructorId = 0x652c1c5;
|
|
26157
|
+
this.subclassOfId = 0xcf6419dc;
|
|
26158
|
+
this._slots = ['offset', 'length'];
|
|
26159
|
+
this.offset = params.offset;
|
|
26160
|
+
this.length = params.length;
|
|
26161
|
+
}
|
|
26162
|
+
static async read(_data, ..._args) {
|
|
26163
|
+
let offset = await index_js_1.Primitive.Int.read(_data);
|
|
26164
|
+
let length = await index_js_1.Primitive.Int.read(_data);
|
|
26165
|
+
return new Raw.MessageEntityDiffDelete({ offset: offset, length: length });
|
|
26166
|
+
}
|
|
26167
|
+
write() {
|
|
26168
|
+
const b = new deps_js_1.BytesIO();
|
|
26169
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
26170
|
+
if (this.offset !== undefined) {
|
|
26171
|
+
b.write(index_js_1.Primitive.Int.write(this.offset));
|
|
26172
|
+
}
|
|
26173
|
+
if (this.length !== undefined) {
|
|
26174
|
+
b.write(index_js_1.Primitive.Int.write(this.length));
|
|
26175
|
+
}
|
|
26176
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
26177
|
+
}
|
|
26178
|
+
}
|
|
26179
|
+
Raw.MessageEntityDiffDelete = MessageEntityDiffDelete;
|
|
25716
26180
|
class InputChannelEmpty extends index_js_1.TLObject {
|
|
25717
26181
|
constructor() {
|
|
25718
26182
|
super();
|
|
@@ -28302,6 +28766,25 @@ var Raw;
|
|
|
28302
28766
|
}
|
|
28303
28767
|
}
|
|
28304
28768
|
Raw.TopPeerCategoryBotsApp = TopPeerCategoryBotsApp;
|
|
28769
|
+
class TopPeerCategoryBotsGuestChat extends index_js_1.TLObject {
|
|
28770
|
+
constructor() {
|
|
28771
|
+
super();
|
|
28772
|
+
this.classType = 'types';
|
|
28773
|
+
this.className = 'TopPeerCategoryBotsGuestChat';
|
|
28774
|
+
this.constructorId = 0x6c24f3dd;
|
|
28775
|
+
this.subclassOfId = 0xddf02502;
|
|
28776
|
+
this._slots = [];
|
|
28777
|
+
}
|
|
28778
|
+
static async read(_data, ..._args) {
|
|
28779
|
+
return new Raw.TopPeerCategoryBotsGuestChat();
|
|
28780
|
+
}
|
|
28781
|
+
write() {
|
|
28782
|
+
const b = new deps_js_1.BytesIO();
|
|
28783
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
28784
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
28785
|
+
}
|
|
28786
|
+
}
|
|
28787
|
+
Raw.TopPeerCategoryBotsGuestChat = TopPeerCategoryBotsGuestChat;
|
|
28305
28788
|
class TopPeerCategoryPeers extends index_js_1.TLObject {
|
|
28306
28789
|
category;
|
|
28307
28790
|
count;
|
|
@@ -36725,49 +37208,122 @@ var Raw;
|
|
|
36725
37208
|
class PollAnswer extends index_js_1.TLObject {
|
|
36726
37209
|
text;
|
|
36727
37210
|
option;
|
|
37211
|
+
media;
|
|
37212
|
+
addedBy;
|
|
37213
|
+
date;
|
|
36728
37214
|
constructor(params) {
|
|
36729
37215
|
super();
|
|
36730
37216
|
this.classType = 'types';
|
|
36731
37217
|
this.className = 'PollAnswer';
|
|
36732
|
-
this.constructorId =
|
|
37218
|
+
this.constructorId = 0x4b7d786a;
|
|
36733
37219
|
this.subclassOfId = 0x7ea5dd9e;
|
|
36734
|
-
this._slots = ['text', 'option'];
|
|
37220
|
+
this._slots = ['text', 'option', 'media', 'addedBy', 'date'];
|
|
36735
37221
|
this.text = params.text;
|
|
36736
37222
|
this.option = params.option;
|
|
37223
|
+
this.media = params.media;
|
|
37224
|
+
this.addedBy = params.addedBy;
|
|
37225
|
+
this.date = params.date;
|
|
36737
37226
|
}
|
|
36738
37227
|
static async read(_data, ..._args) {
|
|
37228
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
36739
37229
|
let text = await index_js_1.TLObject.read(_data);
|
|
36740
37230
|
let option = await index_js_1.Primitive.Bytes.read(_data);
|
|
36741
|
-
|
|
37231
|
+
let media = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
37232
|
+
let addedBy = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
37233
|
+
let date = flags & (1 << 1) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
37234
|
+
return new Raw.PollAnswer({
|
|
37235
|
+
text: text,
|
|
37236
|
+
option: option,
|
|
37237
|
+
media: media,
|
|
37238
|
+
addedBy: addedBy,
|
|
37239
|
+
date: date,
|
|
37240
|
+
});
|
|
36742
37241
|
}
|
|
36743
37242
|
write() {
|
|
36744
37243
|
const b = new deps_js_1.BytesIO();
|
|
36745
37244
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
37245
|
+
let flags = 0;
|
|
37246
|
+
flags |= this.media !== undefined ? 1 << 0 : 0;
|
|
37247
|
+
flags |= this.addedBy !== undefined ? 1 << 1 : 0;
|
|
37248
|
+
flags |= this.date !== undefined ? 1 << 1 : 0;
|
|
37249
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
36746
37250
|
if (this.text !== undefined) {
|
|
36747
37251
|
b.write(this.text.write());
|
|
36748
37252
|
}
|
|
36749
37253
|
if (this.option !== undefined) {
|
|
36750
37254
|
b.write(index_js_1.Primitive.Bytes.write(this.option));
|
|
36751
37255
|
}
|
|
37256
|
+
if (this.media !== undefined) {
|
|
37257
|
+
b.write(this.media.write());
|
|
37258
|
+
}
|
|
37259
|
+
if (this.addedBy !== undefined) {
|
|
37260
|
+
b.write(this.addedBy.write());
|
|
37261
|
+
}
|
|
37262
|
+
if (this.date !== undefined) {
|
|
37263
|
+
b.write(index_js_1.Primitive.Int.write(this.date));
|
|
37264
|
+
}
|
|
36752
37265
|
return deps_js_1.Buffer.from(b.buffer);
|
|
36753
37266
|
}
|
|
36754
37267
|
}
|
|
36755
37268
|
Raw.PollAnswer = PollAnswer;
|
|
37269
|
+
class InputPollAnswer extends index_js_1.TLObject {
|
|
37270
|
+
text;
|
|
37271
|
+
media;
|
|
37272
|
+
constructor(params) {
|
|
37273
|
+
super();
|
|
37274
|
+
this.classType = 'types';
|
|
37275
|
+
this.className = 'InputPollAnswer';
|
|
37276
|
+
this.constructorId = 0x199fed96;
|
|
37277
|
+
this.subclassOfId = 0x7ea5dd9e;
|
|
37278
|
+
this._slots = ['text', 'media'];
|
|
37279
|
+
this.text = params.text;
|
|
37280
|
+
this.media = params.media;
|
|
37281
|
+
}
|
|
37282
|
+
static async read(_data, ..._args) {
|
|
37283
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
37284
|
+
let text = await index_js_1.TLObject.read(_data);
|
|
37285
|
+
let media = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
37286
|
+
return new Raw.InputPollAnswer({ text: text, media: media });
|
|
37287
|
+
}
|
|
37288
|
+
write() {
|
|
37289
|
+
const b = new deps_js_1.BytesIO();
|
|
37290
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
37291
|
+
let flags = 0;
|
|
37292
|
+
flags |= this.media !== undefined ? 1 << 0 : 0;
|
|
37293
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
37294
|
+
if (this.text !== undefined) {
|
|
37295
|
+
b.write(this.text.write());
|
|
37296
|
+
}
|
|
37297
|
+
if (this.media !== undefined) {
|
|
37298
|
+
b.write(this.media.write());
|
|
37299
|
+
}
|
|
37300
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
37301
|
+
}
|
|
37302
|
+
}
|
|
37303
|
+
Raw.InputPollAnswer = InputPollAnswer;
|
|
36756
37304
|
class Poll extends index_js_1.TLObject {
|
|
36757
37305
|
id;
|
|
36758
37306
|
closed;
|
|
36759
37307
|
publicVoters;
|
|
36760
37308
|
multipleChoice;
|
|
36761
37309
|
quiz;
|
|
37310
|
+
openAnswers;
|
|
37311
|
+
revotingDisabled;
|
|
37312
|
+
shuffleAnswers;
|
|
37313
|
+
hideResultsUntilClose;
|
|
37314
|
+
creator;
|
|
37315
|
+
subscribersOnly;
|
|
36762
37316
|
question;
|
|
36763
37317
|
answers;
|
|
36764
37318
|
closePeriod;
|
|
36765
37319
|
closeDate;
|
|
37320
|
+
countriesIso2;
|
|
37321
|
+
hash;
|
|
36766
37322
|
constructor(params) {
|
|
36767
37323
|
super();
|
|
36768
37324
|
this.classType = 'types';
|
|
36769
37325
|
this.className = 'Poll';
|
|
36770
|
-
this.constructorId =
|
|
37326
|
+
this.constructorId = 0x966e2dbf;
|
|
36771
37327
|
this.subclassOfId = 0x248e557b;
|
|
36772
37328
|
this._slots = [
|
|
36773
37329
|
'id',
|
|
@@ -36775,20 +37331,36 @@ var Raw;
|
|
|
36775
37331
|
'publicVoters',
|
|
36776
37332
|
'multipleChoice',
|
|
36777
37333
|
'quiz',
|
|
37334
|
+
'openAnswers',
|
|
37335
|
+
'revotingDisabled',
|
|
37336
|
+
'shuffleAnswers',
|
|
37337
|
+
'hideResultsUntilClose',
|
|
37338
|
+
'creator',
|
|
37339
|
+
'subscribersOnly',
|
|
36778
37340
|
'question',
|
|
36779
37341
|
'answers',
|
|
36780
37342
|
'closePeriod',
|
|
36781
37343
|
'closeDate',
|
|
37344
|
+
'countriesIso2',
|
|
37345
|
+
'hash',
|
|
36782
37346
|
];
|
|
36783
37347
|
this.id = params.id;
|
|
36784
37348
|
this.closed = params.closed;
|
|
36785
37349
|
this.publicVoters = params.publicVoters;
|
|
36786
37350
|
this.multipleChoice = params.multipleChoice;
|
|
36787
37351
|
this.quiz = params.quiz;
|
|
37352
|
+
this.openAnswers = params.openAnswers;
|
|
37353
|
+
this.revotingDisabled = params.revotingDisabled;
|
|
37354
|
+
this.shuffleAnswers = params.shuffleAnswers;
|
|
37355
|
+
this.hideResultsUntilClose = params.hideResultsUntilClose;
|
|
37356
|
+
this.creator = params.creator;
|
|
37357
|
+
this.subscribersOnly = params.subscribersOnly;
|
|
36788
37358
|
this.question = params.question;
|
|
36789
37359
|
this.answers = params.answers;
|
|
36790
37360
|
this.closePeriod = params.closePeriod;
|
|
36791
37361
|
this.closeDate = params.closeDate;
|
|
37362
|
+
this.countriesIso2 = params.countriesIso2;
|
|
37363
|
+
this.hash = params.hash;
|
|
36792
37364
|
}
|
|
36793
37365
|
static async read(_data, ..._args) {
|
|
36794
37366
|
let id = await index_js_1.Primitive.Long.read(_data);
|
|
@@ -36797,20 +37369,36 @@ var Raw;
|
|
|
36797
37369
|
let publicVoters = flags & (1 << 1) ? true : false;
|
|
36798
37370
|
let multipleChoice = flags & (1 << 2) ? true : false;
|
|
36799
37371
|
let quiz = flags & (1 << 3) ? true : false;
|
|
37372
|
+
let openAnswers = flags & (1 << 6) ? true : false;
|
|
37373
|
+
let revotingDisabled = flags & (1 << 7) ? true : false;
|
|
37374
|
+
let shuffleAnswers = flags & (1 << 8) ? true : false;
|
|
37375
|
+
let hideResultsUntilClose = flags & (1 << 9) ? true : false;
|
|
37376
|
+
let creator = flags & (1 << 10) ? true : false;
|
|
37377
|
+
let subscribersOnly = flags & (1 << 11) ? true : false;
|
|
36800
37378
|
let question = await index_js_1.TLObject.read(_data);
|
|
36801
37379
|
let answers = await index_js_1.TLObject.read(_data);
|
|
36802
37380
|
let closePeriod = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
36803
37381
|
let closeDate = flags & (1 << 5) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
37382
|
+
let countriesIso2 = flags & (1 << 12) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.String) : [];
|
|
37383
|
+
let hash = await index_js_1.Primitive.Long.read(_data);
|
|
36804
37384
|
return new Raw.Poll({
|
|
36805
37385
|
id: id,
|
|
36806
37386
|
closed: closed,
|
|
36807
37387
|
publicVoters: publicVoters,
|
|
36808
37388
|
multipleChoice: multipleChoice,
|
|
36809
37389
|
quiz: quiz,
|
|
37390
|
+
openAnswers: openAnswers,
|
|
37391
|
+
revotingDisabled: revotingDisabled,
|
|
37392
|
+
shuffleAnswers: shuffleAnswers,
|
|
37393
|
+
hideResultsUntilClose: hideResultsUntilClose,
|
|
37394
|
+
creator: creator,
|
|
37395
|
+
subscribersOnly: subscribersOnly,
|
|
36810
37396
|
question: question,
|
|
36811
37397
|
answers: answers,
|
|
36812
37398
|
closePeriod: closePeriod,
|
|
36813
37399
|
closeDate: closeDate,
|
|
37400
|
+
countriesIso2: countriesIso2,
|
|
37401
|
+
hash: hash,
|
|
36814
37402
|
});
|
|
36815
37403
|
}
|
|
36816
37404
|
write() {
|
|
@@ -36824,8 +37412,15 @@ var Raw;
|
|
|
36824
37412
|
flags |= this.publicVoters ? 1 << 1 : 0;
|
|
36825
37413
|
flags |= this.multipleChoice ? 1 << 2 : 0;
|
|
36826
37414
|
flags |= this.quiz ? 1 << 3 : 0;
|
|
37415
|
+
flags |= this.openAnswers ? 1 << 6 : 0;
|
|
37416
|
+
flags |= this.revotingDisabled ? 1 << 7 : 0;
|
|
37417
|
+
flags |= this.shuffleAnswers ? 1 << 8 : 0;
|
|
37418
|
+
flags |= this.hideResultsUntilClose ? 1 << 9 : 0;
|
|
37419
|
+
flags |= this.creator ? 1 << 10 : 0;
|
|
37420
|
+
flags |= this.subscribersOnly ? 1 << 11 : 0;
|
|
36827
37421
|
flags |= this.closePeriod !== undefined ? 1 << 4 : 0;
|
|
36828
37422
|
flags |= this.closeDate !== undefined ? 1 << 5 : 0;
|
|
37423
|
+
flags |= this.countriesIso2 ? 1 << 12 : 0;
|
|
36829
37424
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
36830
37425
|
if (this.question !== undefined) {
|
|
36831
37426
|
b.write(this.question.write());
|
|
@@ -36839,6 +37434,12 @@ var Raw;
|
|
|
36839
37434
|
if (this.closeDate !== undefined) {
|
|
36840
37435
|
b.write(index_js_1.Primitive.Int.write(this.closeDate));
|
|
36841
37436
|
}
|
|
37437
|
+
if (this.countriesIso2) {
|
|
37438
|
+
b.write(index_js_1.Primitive.Vector.write(this.countriesIso2, index_js_1.Primitive.String));
|
|
37439
|
+
}
|
|
37440
|
+
if (this.hash !== undefined) {
|
|
37441
|
+
b.write(index_js_1.Primitive.Long.write(this.hash));
|
|
37442
|
+
}
|
|
36842
37443
|
return deps_js_1.Buffer.from(b.buffer);
|
|
36843
37444
|
}
|
|
36844
37445
|
}
|
|
@@ -36848,29 +37449,33 @@ var Raw;
|
|
|
36848
37449
|
correct;
|
|
36849
37450
|
option;
|
|
36850
37451
|
voters;
|
|
37452
|
+
recentVoters;
|
|
36851
37453
|
constructor(params) {
|
|
36852
37454
|
super();
|
|
36853
37455
|
this.classType = 'types';
|
|
36854
37456
|
this.className = 'PollAnswerVoters';
|
|
36855
|
-
this.constructorId =
|
|
37457
|
+
this.constructorId = 0x3645230a;
|
|
36856
37458
|
this.subclassOfId = 0x7ce0cf91;
|
|
36857
|
-
this._slots = ['chosen', 'correct', 'option', 'voters'];
|
|
37459
|
+
this._slots = ['chosen', 'correct', 'option', 'voters', 'recentVoters'];
|
|
36858
37460
|
this.chosen = params.chosen;
|
|
36859
37461
|
this.correct = params.correct;
|
|
36860
37462
|
this.option = params.option;
|
|
36861
37463
|
this.voters = params.voters;
|
|
37464
|
+
this.recentVoters = params.recentVoters;
|
|
36862
37465
|
}
|
|
36863
37466
|
static async read(_data, ..._args) {
|
|
36864
37467
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
36865
37468
|
let chosen = flags & (1 << 0) ? true : false;
|
|
36866
37469
|
let correct = flags & (1 << 1) ? true : false;
|
|
36867
37470
|
let option = await index_js_1.Primitive.Bytes.read(_data);
|
|
36868
|
-
let voters = await index_js_1.Primitive.Int.read(_data);
|
|
37471
|
+
let voters = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
37472
|
+
let recentVoters = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
|
|
36869
37473
|
return new Raw.PollAnswerVoters({
|
|
36870
37474
|
chosen: chosen,
|
|
36871
37475
|
correct: correct,
|
|
36872
37476
|
option: option,
|
|
36873
37477
|
voters: voters,
|
|
37478
|
+
recentVoters: recentVoters,
|
|
36874
37479
|
});
|
|
36875
37480
|
}
|
|
36876
37481
|
write() {
|
|
@@ -36879,6 +37484,8 @@ var Raw;
|
|
|
36879
37484
|
let flags = 0;
|
|
36880
37485
|
flags |= this.chosen ? 1 << 0 : 0;
|
|
36881
37486
|
flags |= this.correct ? 1 << 1 : 0;
|
|
37487
|
+
flags |= this.voters !== undefined ? 1 << 2 : 0;
|
|
37488
|
+
flags |= this.recentVoters ? 1 << 2 : 0;
|
|
36882
37489
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
36883
37490
|
if (this.option !== undefined) {
|
|
36884
37491
|
b.write(index_js_1.Primitive.Bytes.write(this.option));
|
|
@@ -36886,53 +37493,71 @@ var Raw;
|
|
|
36886
37493
|
if (this.voters !== undefined) {
|
|
36887
37494
|
b.write(index_js_1.Primitive.Int.write(this.voters));
|
|
36888
37495
|
}
|
|
37496
|
+
if (this.recentVoters) {
|
|
37497
|
+
b.write(index_js_1.Primitive.Vector.write(this.recentVoters));
|
|
37498
|
+
}
|
|
36889
37499
|
return deps_js_1.Buffer.from(b.buffer);
|
|
36890
37500
|
}
|
|
36891
37501
|
}
|
|
36892
37502
|
Raw.PollAnswerVoters = PollAnswerVoters;
|
|
36893
37503
|
class PollResults extends index_js_1.TLObject {
|
|
36894
37504
|
min;
|
|
37505
|
+
hasUnreadVotes;
|
|
37506
|
+
canViewStats;
|
|
36895
37507
|
results;
|
|
36896
37508
|
totalVoters;
|
|
36897
37509
|
recentVoters;
|
|
36898
37510
|
solution;
|
|
36899
37511
|
solutionEntities;
|
|
37512
|
+
solutionMedia;
|
|
36900
37513
|
constructor(params) {
|
|
36901
37514
|
super();
|
|
36902
37515
|
this.classType = 'types';
|
|
36903
37516
|
this.className = 'PollResults';
|
|
36904
|
-
this.constructorId =
|
|
37517
|
+
this.constructorId = 0xba7bb15e;
|
|
36905
37518
|
this.subclassOfId = 0xc3b4f687;
|
|
36906
37519
|
this._slots = [
|
|
36907
37520
|
'min',
|
|
37521
|
+
'hasUnreadVotes',
|
|
37522
|
+
'canViewStats',
|
|
36908
37523
|
'results',
|
|
36909
37524
|
'totalVoters',
|
|
36910
37525
|
'recentVoters',
|
|
36911
37526
|
'solution',
|
|
36912
37527
|
'solutionEntities',
|
|
37528
|
+
'solutionMedia',
|
|
36913
37529
|
];
|
|
36914
37530
|
this.min = params.min;
|
|
37531
|
+
this.hasUnreadVotes = params.hasUnreadVotes;
|
|
37532
|
+
this.canViewStats = params.canViewStats;
|
|
36915
37533
|
this.results = params.results;
|
|
36916
37534
|
this.totalVoters = params.totalVoters;
|
|
36917
37535
|
this.recentVoters = params.recentVoters;
|
|
36918
37536
|
this.solution = params.solution;
|
|
36919
37537
|
this.solutionEntities = params.solutionEntities;
|
|
37538
|
+
this.solutionMedia = params.solutionMedia;
|
|
36920
37539
|
}
|
|
36921
37540
|
static async read(_data, ..._args) {
|
|
36922
37541
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
36923
37542
|
let min = flags & (1 << 0) ? true : false;
|
|
37543
|
+
let hasUnreadVotes = flags & (1 << 6) ? true : false;
|
|
37544
|
+
let canViewStats = flags & (1 << 7) ? true : false;
|
|
36924
37545
|
let results = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
36925
37546
|
let totalVoters = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
36926
37547
|
let recentVoters = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
|
|
36927
37548
|
let solution = flags & (1 << 4) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
36928
37549
|
let solutionEntities = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : [];
|
|
37550
|
+
let solutionMedia = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
36929
37551
|
return new Raw.PollResults({
|
|
36930
37552
|
min: min,
|
|
37553
|
+
hasUnreadVotes: hasUnreadVotes,
|
|
37554
|
+
canViewStats: canViewStats,
|
|
36931
37555
|
results: results,
|
|
36932
37556
|
totalVoters: totalVoters,
|
|
36933
37557
|
recentVoters: recentVoters,
|
|
36934
37558
|
solution: solution,
|
|
36935
37559
|
solutionEntities: solutionEntities,
|
|
37560
|
+
solutionMedia: solutionMedia,
|
|
36936
37561
|
});
|
|
36937
37562
|
}
|
|
36938
37563
|
write() {
|
|
@@ -36940,11 +37565,14 @@ var Raw;
|
|
|
36940
37565
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
36941
37566
|
let flags = 0;
|
|
36942
37567
|
flags |= this.min ? 1 << 0 : 0;
|
|
37568
|
+
flags |= this.hasUnreadVotes ? 1 << 6 : 0;
|
|
37569
|
+
flags |= this.canViewStats ? 1 << 7 : 0;
|
|
36943
37570
|
flags |= this.results ? 1 << 1 : 0;
|
|
36944
37571
|
flags |= this.totalVoters !== undefined ? 1 << 2 : 0;
|
|
36945
37572
|
flags |= this.recentVoters ? 1 << 3 : 0;
|
|
36946
37573
|
flags |= this.solution !== undefined ? 1 << 4 : 0;
|
|
36947
37574
|
flags |= this.solutionEntities ? 1 << 4 : 0;
|
|
37575
|
+
flags |= this.solutionMedia !== undefined ? 1 << 5 : 0;
|
|
36948
37576
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
36949
37577
|
if (this.results) {
|
|
36950
37578
|
b.write(index_js_1.Primitive.Vector.write(this.results));
|
|
@@ -36961,6 +37589,9 @@ var Raw;
|
|
|
36961
37589
|
if (this.solutionEntities) {
|
|
36962
37590
|
b.write(index_js_1.Primitive.Vector.write(this.solutionEntities));
|
|
36963
37591
|
}
|
|
37592
|
+
if (this.solutionMedia !== undefined) {
|
|
37593
|
+
b.write(this.solutionMedia.write());
|
|
37594
|
+
}
|
|
36964
37595
|
return deps_js_1.Buffer.from(b.buffer);
|
|
36965
37596
|
}
|
|
36966
37597
|
}
|
|
@@ -37163,6 +37794,7 @@ var Raw;
|
|
|
37163
37794
|
sendDocs;
|
|
37164
37795
|
sendPlain;
|
|
37165
37796
|
editRank;
|
|
37797
|
+
sendReactions;
|
|
37166
37798
|
untilDate;
|
|
37167
37799
|
constructor(params) {
|
|
37168
37800
|
super();
|
|
@@ -37192,6 +37824,7 @@ var Raw;
|
|
|
37192
37824
|
'sendDocs',
|
|
37193
37825
|
'sendPlain',
|
|
37194
37826
|
'editRank',
|
|
37827
|
+
'sendReactions',
|
|
37195
37828
|
'untilDate',
|
|
37196
37829
|
];
|
|
37197
37830
|
this.viewMessages = params.viewMessages;
|
|
@@ -37215,6 +37848,7 @@ var Raw;
|
|
|
37215
37848
|
this.sendDocs = params.sendDocs;
|
|
37216
37849
|
this.sendPlain = params.sendPlain;
|
|
37217
37850
|
this.editRank = params.editRank;
|
|
37851
|
+
this.sendReactions = params.sendReactions;
|
|
37218
37852
|
this.untilDate = params.untilDate;
|
|
37219
37853
|
}
|
|
37220
37854
|
static async read(_data, ..._args) {
|
|
@@ -37240,6 +37874,7 @@ var Raw;
|
|
|
37240
37874
|
let sendDocs = flags & (1 << 24) ? true : false;
|
|
37241
37875
|
let sendPlain = flags & (1 << 25) ? true : false;
|
|
37242
37876
|
let editRank = flags & (1 << 26) ? true : false;
|
|
37877
|
+
let sendReactions = flags & (1 << 27) ? true : false;
|
|
37243
37878
|
let untilDate = await index_js_1.Primitive.Int.read(_data);
|
|
37244
37879
|
return new Raw.ChatBannedRights({
|
|
37245
37880
|
viewMessages: viewMessages,
|
|
@@ -37263,6 +37898,7 @@ var Raw;
|
|
|
37263
37898
|
sendDocs: sendDocs,
|
|
37264
37899
|
sendPlain: sendPlain,
|
|
37265
37900
|
editRank: editRank,
|
|
37901
|
+
sendReactions: sendReactions,
|
|
37266
37902
|
untilDate: untilDate,
|
|
37267
37903
|
});
|
|
37268
37904
|
}
|
|
@@ -37291,6 +37927,7 @@ var Raw;
|
|
|
37291
37927
|
flags |= this.sendDocs ? 1 << 24 : 0;
|
|
37292
37928
|
flags |= this.sendPlain ? 1 << 25 : 0;
|
|
37293
37929
|
flags |= this.editRank ? 1 << 26 : 0;
|
|
37930
|
+
flags |= this.sendReactions ? 1 << 27 : 0;
|
|
37294
37931
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
37295
37932
|
if (this.untilDate !== undefined) {
|
|
37296
37933
|
b.write(index_js_1.Primitive.Int.write(this.untilDate));
|
|
@@ -37961,6 +38598,7 @@ var Raw;
|
|
|
37961
38598
|
requestWriteAccess;
|
|
37962
38599
|
requestPhoneNumber;
|
|
37963
38600
|
matchCodesFirst;
|
|
38601
|
+
isApp;
|
|
37964
38602
|
bot;
|
|
37965
38603
|
domain;
|
|
37966
38604
|
browser;
|
|
@@ -37969,16 +38607,18 @@ var Raw;
|
|
|
37969
38607
|
region;
|
|
37970
38608
|
matchCodes;
|
|
37971
38609
|
userIdHint;
|
|
38610
|
+
verifiedAppName;
|
|
37972
38611
|
constructor(params) {
|
|
37973
38612
|
super();
|
|
37974
38613
|
this.classType = 'types';
|
|
37975
38614
|
this.className = 'UrlAuthResultRequest';
|
|
37976
|
-
this.constructorId =
|
|
38615
|
+
this.constructorId = 0x3cd623ec;
|
|
37977
38616
|
this.subclassOfId = 0x7765cb1e;
|
|
37978
38617
|
this._slots = [
|
|
37979
38618
|
'requestWriteAccess',
|
|
37980
38619
|
'requestPhoneNumber',
|
|
37981
38620
|
'matchCodesFirst',
|
|
38621
|
+
'isApp',
|
|
37982
38622
|
'bot',
|
|
37983
38623
|
'domain',
|
|
37984
38624
|
'browser',
|
|
@@ -37987,10 +38627,12 @@ var Raw;
|
|
|
37987
38627
|
'region',
|
|
37988
38628
|
'matchCodes',
|
|
37989
38629
|
'userIdHint',
|
|
38630
|
+
'verifiedAppName',
|
|
37990
38631
|
];
|
|
37991
38632
|
this.requestWriteAccess = params.requestWriteAccess;
|
|
37992
38633
|
this.requestPhoneNumber = params.requestPhoneNumber;
|
|
37993
38634
|
this.matchCodesFirst = params.matchCodesFirst;
|
|
38635
|
+
this.isApp = params.isApp;
|
|
37994
38636
|
this.bot = params.bot;
|
|
37995
38637
|
this.domain = params.domain;
|
|
37996
38638
|
this.browser = params.browser;
|
|
@@ -37999,12 +38641,14 @@ var Raw;
|
|
|
37999
38641
|
this.region = params.region;
|
|
38000
38642
|
this.matchCodes = params.matchCodes;
|
|
38001
38643
|
this.userIdHint = params.userIdHint;
|
|
38644
|
+
this.verifiedAppName = params.verifiedAppName;
|
|
38002
38645
|
}
|
|
38003
38646
|
static async read(_data, ..._args) {
|
|
38004
38647
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
38005
38648
|
let requestWriteAccess = flags & (1 << 0) ? true : false;
|
|
38006
38649
|
let requestPhoneNumber = flags & (1 << 1) ? true : false;
|
|
38007
38650
|
let matchCodesFirst = flags & (1 << 5) ? true : false;
|
|
38651
|
+
let isApp = flags & (1 << 6) ? true : false;
|
|
38008
38652
|
let bot = await index_js_1.TLObject.read(_data);
|
|
38009
38653
|
let domain = await index_js_1.Primitive.String.read(_data);
|
|
38010
38654
|
let browser = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
@@ -38013,10 +38657,12 @@ var Raw;
|
|
|
38013
38657
|
let region = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
38014
38658
|
let matchCodes = flags & (1 << 3) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.String) : [];
|
|
38015
38659
|
let userIdHint = flags & (1 << 4) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
38660
|
+
let verifiedAppName = flags & (1 << 7) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
38016
38661
|
return new Raw.UrlAuthResultRequest({
|
|
38017
38662
|
requestWriteAccess: requestWriteAccess,
|
|
38018
38663
|
requestPhoneNumber: requestPhoneNumber,
|
|
38019
38664
|
matchCodesFirst: matchCodesFirst,
|
|
38665
|
+
isApp: isApp,
|
|
38020
38666
|
bot: bot,
|
|
38021
38667
|
domain: domain,
|
|
38022
38668
|
browser: browser,
|
|
@@ -38025,6 +38671,7 @@ var Raw;
|
|
|
38025
38671
|
region: region,
|
|
38026
38672
|
matchCodes: matchCodes,
|
|
38027
38673
|
userIdHint: userIdHint,
|
|
38674
|
+
verifiedAppName: verifiedAppName,
|
|
38028
38675
|
});
|
|
38029
38676
|
}
|
|
38030
38677
|
write() {
|
|
@@ -38034,12 +38681,14 @@ var Raw;
|
|
|
38034
38681
|
flags |= this.requestWriteAccess ? 1 << 0 : 0;
|
|
38035
38682
|
flags |= this.requestPhoneNumber ? 1 << 1 : 0;
|
|
38036
38683
|
flags |= this.matchCodesFirst ? 1 << 5 : 0;
|
|
38684
|
+
flags |= this.isApp ? 1 << 6 : 0;
|
|
38037
38685
|
flags |= this.browser !== undefined ? 1 << 2 : 0;
|
|
38038
38686
|
flags |= this.platform !== undefined ? 1 << 2 : 0;
|
|
38039
38687
|
flags |= this.ip !== undefined ? 1 << 2 : 0;
|
|
38040
38688
|
flags |= this.region !== undefined ? 1 << 2 : 0;
|
|
38041
38689
|
flags |= this.matchCodes ? 1 << 3 : 0;
|
|
38042
38690
|
flags |= this.userIdHint !== undefined ? 1 << 4 : 0;
|
|
38691
|
+
flags |= this.verifiedAppName !== undefined ? 1 << 7 : 0;
|
|
38043
38692
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
38044
38693
|
if (this.bot !== undefined) {
|
|
38045
38694
|
b.write(this.bot.write());
|
|
@@ -38065,6 +38714,9 @@ var Raw;
|
|
|
38065
38714
|
if (this.userIdHint !== undefined) {
|
|
38066
38715
|
b.write(index_js_1.Primitive.Long.write(this.userIdHint));
|
|
38067
38716
|
}
|
|
38717
|
+
if (this.verifiedAppName !== undefined) {
|
|
38718
|
+
b.write(index_js_1.Primitive.String.write(this.verifiedAppName));
|
|
38719
|
+
}
|
|
38068
38720
|
return deps_js_1.Buffer.from(b.buffer);
|
|
38069
38721
|
}
|
|
38070
38722
|
}
|
|
@@ -38880,6 +39532,31 @@ var Raw;
|
|
|
38880
39532
|
}
|
|
38881
39533
|
}
|
|
38882
39534
|
Raw.WebPageAttributeStarGiftAuction = WebPageAttributeStarGiftAuction;
|
|
39535
|
+
class WebPageAttributeAiComposeTone extends index_js_1.TLObject {
|
|
39536
|
+
emojiId;
|
|
39537
|
+
constructor(params) {
|
|
39538
|
+
super();
|
|
39539
|
+
this.classType = 'types';
|
|
39540
|
+
this.className = 'WebPageAttributeAiComposeTone';
|
|
39541
|
+
this.constructorId = 0x7781fe18;
|
|
39542
|
+
this.subclassOfId = 0xafcfe9c7;
|
|
39543
|
+
this._slots = ['emojiId'];
|
|
39544
|
+
this.emojiId = params.emojiId;
|
|
39545
|
+
}
|
|
39546
|
+
static async read(_data, ..._args) {
|
|
39547
|
+
let emojiId = await index_js_1.Primitive.Long.read(_data);
|
|
39548
|
+
return new Raw.WebPageAttributeAiComposeTone({ emojiId: emojiId });
|
|
39549
|
+
}
|
|
39550
|
+
write() {
|
|
39551
|
+
const b = new deps_js_1.BytesIO();
|
|
39552
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
39553
|
+
if (this.emojiId !== undefined) {
|
|
39554
|
+
b.write(index_js_1.Primitive.Long.write(this.emojiId));
|
|
39555
|
+
}
|
|
39556
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
39557
|
+
}
|
|
39558
|
+
}
|
|
39559
|
+
Raw.WebPageAttributeAiComposeTone = WebPageAttributeAiComposeTone;
|
|
38883
39560
|
class BankCardOpenUrl extends index_js_1.TLObject {
|
|
38884
39561
|
url;
|
|
38885
39562
|
name;
|
|
@@ -39740,11 +40417,12 @@ var Raw;
|
|
|
39740
40417
|
quoteEntities;
|
|
39741
40418
|
quoteOffset;
|
|
39742
40419
|
todoItemId;
|
|
40420
|
+
pollOption;
|
|
39743
40421
|
constructor(params) {
|
|
39744
40422
|
super();
|
|
39745
40423
|
this.classType = 'types';
|
|
39746
40424
|
this.className = 'MessageReplyHeader';
|
|
39747
|
-
this.constructorId =
|
|
40425
|
+
this.constructorId = 0x1b97dd66;
|
|
39748
40426
|
this.subclassOfId = 0x5b4d9167;
|
|
39749
40427
|
this._slots = [
|
|
39750
40428
|
'replyToScheduled',
|
|
@@ -39759,6 +40437,7 @@ var Raw;
|
|
|
39759
40437
|
'quoteEntities',
|
|
39760
40438
|
'quoteOffset',
|
|
39761
40439
|
'todoItemId',
|
|
40440
|
+
'pollOption',
|
|
39762
40441
|
];
|
|
39763
40442
|
this.replyToScheduled = params.replyToScheduled;
|
|
39764
40443
|
this.forumTopic = params.forumTopic;
|
|
@@ -39772,6 +40451,7 @@ var Raw;
|
|
|
39772
40451
|
this.quoteEntities = params.quoteEntities;
|
|
39773
40452
|
this.quoteOffset = params.quoteOffset;
|
|
39774
40453
|
this.todoItemId = params.todoItemId;
|
|
40454
|
+
this.pollOption = params.pollOption;
|
|
39775
40455
|
}
|
|
39776
40456
|
static async read(_data, ..._args) {
|
|
39777
40457
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -39787,6 +40467,7 @@ var Raw;
|
|
|
39787
40467
|
let quoteEntities = flags & (1 << 7) ? await index_js_1.TLObject.read(_data) : [];
|
|
39788
40468
|
let quoteOffset = flags & (1 << 10) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
39789
40469
|
let todoItemId = flags & (1 << 11) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
40470
|
+
let pollOption = flags & (1 << 12) ? await index_js_1.Primitive.Bytes.read(_data) : undefined;
|
|
39790
40471
|
return new Raw.MessageReplyHeader({
|
|
39791
40472
|
replyToScheduled: replyToScheduled,
|
|
39792
40473
|
forumTopic: forumTopic,
|
|
@@ -39800,6 +40481,7 @@ var Raw;
|
|
|
39800
40481
|
quoteEntities: quoteEntities,
|
|
39801
40482
|
quoteOffset: quoteOffset,
|
|
39802
40483
|
todoItemId: todoItemId,
|
|
40484
|
+
pollOption: pollOption,
|
|
39803
40485
|
});
|
|
39804
40486
|
}
|
|
39805
40487
|
write() {
|
|
@@ -39818,6 +40500,7 @@ var Raw;
|
|
|
39818
40500
|
flags |= this.quoteEntities ? 1 << 7 : 0;
|
|
39819
40501
|
flags |= this.quoteOffset !== undefined ? 1 << 10 : 0;
|
|
39820
40502
|
flags |= this.todoItemId !== undefined ? 1 << 11 : 0;
|
|
40503
|
+
flags |= this.pollOption !== undefined ? 1 << 12 : 0;
|
|
39821
40504
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
39822
40505
|
if (this.replyToMsgId !== undefined) {
|
|
39823
40506
|
b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
|
|
@@ -39846,6 +40529,9 @@ var Raw;
|
|
|
39846
40529
|
if (this.todoItemId !== undefined) {
|
|
39847
40530
|
b.write(index_js_1.Primitive.Int.write(this.todoItemId));
|
|
39848
40531
|
}
|
|
40532
|
+
if (this.pollOption !== undefined) {
|
|
40533
|
+
b.write(index_js_1.Primitive.Bytes.write(this.pollOption));
|
|
40534
|
+
}
|
|
39849
40535
|
return deps_js_1.Buffer.from(b.buffer);
|
|
39850
40536
|
}
|
|
39851
40537
|
}
|
|
@@ -43124,18 +43810,27 @@ var Raw;
|
|
|
43124
43810
|
restore;
|
|
43125
43811
|
phoneNumber;
|
|
43126
43812
|
phoneCodeHash;
|
|
43813
|
+
premiumDays;
|
|
43127
43814
|
currency;
|
|
43128
43815
|
amount;
|
|
43129
43816
|
constructor(params) {
|
|
43130
43817
|
super();
|
|
43131
43818
|
this.classType = 'types';
|
|
43132
43819
|
this.className = 'InputStorePaymentAuthCode';
|
|
43133
|
-
this.constructorId =
|
|
43820
|
+
this.constructorId = 0x3fc18057;
|
|
43134
43821
|
this.subclassOfId = 0xe7a4174d;
|
|
43135
|
-
this._slots = [
|
|
43822
|
+
this._slots = [
|
|
43823
|
+
'restore',
|
|
43824
|
+
'phoneNumber',
|
|
43825
|
+
'phoneCodeHash',
|
|
43826
|
+
'premiumDays',
|
|
43827
|
+
'currency',
|
|
43828
|
+
'amount',
|
|
43829
|
+
];
|
|
43136
43830
|
this.restore = params.restore;
|
|
43137
43831
|
this.phoneNumber = params.phoneNumber;
|
|
43138
43832
|
this.phoneCodeHash = params.phoneCodeHash;
|
|
43833
|
+
this.premiumDays = params.premiumDays;
|
|
43139
43834
|
this.currency = params.currency;
|
|
43140
43835
|
this.amount = params.amount;
|
|
43141
43836
|
}
|
|
@@ -43144,12 +43839,14 @@ var Raw;
|
|
|
43144
43839
|
let restore = flags & (1 << 0) ? true : false;
|
|
43145
43840
|
let phoneNumber = await index_js_1.Primitive.String.read(_data);
|
|
43146
43841
|
let phoneCodeHash = await index_js_1.Primitive.String.read(_data);
|
|
43842
|
+
let premiumDays = await index_js_1.Primitive.Int.read(_data);
|
|
43147
43843
|
let currency = await index_js_1.Primitive.String.read(_data);
|
|
43148
43844
|
let amount = await index_js_1.Primitive.Long.read(_data);
|
|
43149
43845
|
return new Raw.InputStorePaymentAuthCode({
|
|
43150
43846
|
restore: restore,
|
|
43151
43847
|
phoneNumber: phoneNumber,
|
|
43152
43848
|
phoneCodeHash: phoneCodeHash,
|
|
43849
|
+
premiumDays: premiumDays,
|
|
43153
43850
|
currency: currency,
|
|
43154
43851
|
amount: amount,
|
|
43155
43852
|
});
|
|
@@ -43166,6 +43863,9 @@ var Raw;
|
|
|
43166
43863
|
if (this.phoneCodeHash !== undefined) {
|
|
43167
43864
|
b.write(index_js_1.Primitive.String.write(this.phoneCodeHash));
|
|
43168
43865
|
}
|
|
43866
|
+
if (this.premiumDays !== undefined) {
|
|
43867
|
+
b.write(index_js_1.Primitive.Int.write(this.premiumDays));
|
|
43868
|
+
}
|
|
43169
43869
|
if (this.currency !== undefined) {
|
|
43170
43870
|
b.write(index_js_1.Primitive.String.write(this.currency));
|
|
43171
43871
|
}
|
|
@@ -44015,6 +44715,7 @@ var Raw;
|
|
|
44015
44715
|
unreadCount;
|
|
44016
44716
|
unreadMentionsCount;
|
|
44017
44717
|
unreadReactionsCount;
|
|
44718
|
+
unreadPollVotesCount;
|
|
44018
44719
|
fromId;
|
|
44019
44720
|
notifySettings;
|
|
44020
44721
|
draft;
|
|
@@ -44022,7 +44723,7 @@ var Raw;
|
|
|
44022
44723
|
super();
|
|
44023
44724
|
this.classType = 'types';
|
|
44024
44725
|
this.className = 'ForumTopic';
|
|
44025
|
-
this.constructorId =
|
|
44726
|
+
this.constructorId = 0xfcdad815;
|
|
44026
44727
|
this.subclassOfId = 0x8d182203;
|
|
44027
44728
|
this._slots = [
|
|
44028
44729
|
'my',
|
|
@@ -44043,6 +44744,7 @@ var Raw;
|
|
|
44043
44744
|
'unreadCount',
|
|
44044
44745
|
'unreadMentionsCount',
|
|
44045
44746
|
'unreadReactionsCount',
|
|
44747
|
+
'unreadPollVotesCount',
|
|
44046
44748
|
'fromId',
|
|
44047
44749
|
'notifySettings',
|
|
44048
44750
|
'draft',
|
|
@@ -44065,6 +44767,7 @@ var Raw;
|
|
|
44065
44767
|
this.unreadCount = params.unreadCount;
|
|
44066
44768
|
this.unreadMentionsCount = params.unreadMentionsCount;
|
|
44067
44769
|
this.unreadReactionsCount = params.unreadReactionsCount;
|
|
44770
|
+
this.unreadPollVotesCount = params.unreadPollVotesCount;
|
|
44068
44771
|
this.fromId = params.fromId;
|
|
44069
44772
|
this.notifySettings = params.notifySettings;
|
|
44070
44773
|
this.draft = params.draft;
|
|
@@ -44089,6 +44792,7 @@ var Raw;
|
|
|
44089
44792
|
let unreadCount = await index_js_1.Primitive.Int.read(_data);
|
|
44090
44793
|
let unreadMentionsCount = await index_js_1.Primitive.Int.read(_data);
|
|
44091
44794
|
let unreadReactionsCount = await index_js_1.Primitive.Int.read(_data);
|
|
44795
|
+
let unreadPollVotesCount = await index_js_1.Primitive.Int.read(_data);
|
|
44092
44796
|
let fromId = await index_js_1.TLObject.read(_data);
|
|
44093
44797
|
let notifySettings = await index_js_1.TLObject.read(_data);
|
|
44094
44798
|
let draft = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
@@ -44111,6 +44815,7 @@ var Raw;
|
|
|
44111
44815
|
unreadCount: unreadCount,
|
|
44112
44816
|
unreadMentionsCount: unreadMentionsCount,
|
|
44113
44817
|
unreadReactionsCount: unreadReactionsCount,
|
|
44818
|
+
unreadPollVotesCount: unreadPollVotesCount,
|
|
44114
44819
|
fromId: fromId,
|
|
44115
44820
|
notifySettings: notifySettings,
|
|
44116
44821
|
draft: draft,
|
|
@@ -44165,6 +44870,9 @@ var Raw;
|
|
|
44165
44870
|
if (this.unreadReactionsCount !== undefined) {
|
|
44166
44871
|
b.write(index_js_1.Primitive.Int.write(this.unreadReactionsCount));
|
|
44167
44872
|
}
|
|
44873
|
+
if (this.unreadPollVotesCount !== undefined) {
|
|
44874
|
+
b.write(index_js_1.Primitive.Int.write(this.unreadPollVotesCount));
|
|
44875
|
+
}
|
|
44168
44876
|
if (this.fromId !== undefined) {
|
|
44169
44877
|
b.write(this.fromId.write());
|
|
44170
44878
|
}
|
|
@@ -44394,6 +45102,50 @@ var Raw;
|
|
|
44394
45102
|
}
|
|
44395
45103
|
}
|
|
44396
45104
|
Raw.RequestPeerTypeBroadcast = RequestPeerTypeBroadcast;
|
|
45105
|
+
class RequestPeerTypeCreateBot extends index_js_1.TLObject {
|
|
45106
|
+
botManaged;
|
|
45107
|
+
suggestedName;
|
|
45108
|
+
suggestedUsername;
|
|
45109
|
+
constructor(params) {
|
|
45110
|
+
super();
|
|
45111
|
+
this.classType = 'types';
|
|
45112
|
+
this.className = 'RequestPeerTypeCreateBot';
|
|
45113
|
+
this.constructorId = 0x3e81e078;
|
|
45114
|
+
this.subclassOfId = 0xe9a0e814;
|
|
45115
|
+
this._slots = ['botManaged', 'suggestedName', 'suggestedUsername'];
|
|
45116
|
+
this.botManaged = params.botManaged;
|
|
45117
|
+
this.suggestedName = params.suggestedName;
|
|
45118
|
+
this.suggestedUsername = params.suggestedUsername;
|
|
45119
|
+
}
|
|
45120
|
+
static async read(_data, ..._args) {
|
|
45121
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
45122
|
+
let botManaged = flags & (1 << 0) ? true : false;
|
|
45123
|
+
let suggestedName = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
45124
|
+
let suggestedUsername = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
45125
|
+
return new Raw.RequestPeerTypeCreateBot({
|
|
45126
|
+
botManaged: botManaged,
|
|
45127
|
+
suggestedName: suggestedName,
|
|
45128
|
+
suggestedUsername: suggestedUsername,
|
|
45129
|
+
});
|
|
45130
|
+
}
|
|
45131
|
+
write() {
|
|
45132
|
+
const b = new deps_js_1.BytesIO();
|
|
45133
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
45134
|
+
let flags = 0;
|
|
45135
|
+
flags |= this.botManaged ? 1 << 0 : 0;
|
|
45136
|
+
flags |= this.suggestedName !== undefined ? 1 << 1 : 0;
|
|
45137
|
+
flags |= this.suggestedUsername !== undefined ? 1 << 2 : 0;
|
|
45138
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
45139
|
+
if (this.suggestedName !== undefined) {
|
|
45140
|
+
b.write(index_js_1.Primitive.String.write(this.suggestedName));
|
|
45141
|
+
}
|
|
45142
|
+
if (this.suggestedUsername !== undefined) {
|
|
45143
|
+
b.write(index_js_1.Primitive.String.write(this.suggestedUsername));
|
|
45144
|
+
}
|
|
45145
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
45146
|
+
}
|
|
45147
|
+
}
|
|
45148
|
+
Raw.RequestPeerTypeCreateBot = RequestPeerTypeCreateBot;
|
|
44397
45149
|
class EmojiListNotModified extends index_js_1.TLObject {
|
|
44398
45150
|
constructor() {
|
|
44399
45151
|
super();
|
|
@@ -45234,11 +45986,12 @@ var Raw;
|
|
|
45234
45986
|
views;
|
|
45235
45987
|
sentReaction;
|
|
45236
45988
|
albums;
|
|
45989
|
+
music;
|
|
45237
45990
|
constructor(params) {
|
|
45238
45991
|
super();
|
|
45239
45992
|
this.classType = 'types';
|
|
45240
45993
|
this.className = 'StoryItem';
|
|
45241
|
-
this.constructorId =
|
|
45994
|
+
this.constructorId = 0x16a4b93c;
|
|
45242
45995
|
this.subclassOfId = 0xd477b133;
|
|
45243
45996
|
this._slots = [
|
|
45244
45997
|
'pinned',
|
|
@@ -45263,6 +46016,7 @@ var Raw;
|
|
|
45263
46016
|
'views',
|
|
45264
46017
|
'sentReaction',
|
|
45265
46018
|
'albums',
|
|
46019
|
+
'music',
|
|
45266
46020
|
];
|
|
45267
46021
|
this.pinned = params.pinned;
|
|
45268
46022
|
this.public = params.public;
|
|
@@ -45286,6 +46040,7 @@ var Raw;
|
|
|
45286
46040
|
this.views = params.views;
|
|
45287
46041
|
this.sentReaction = params.sentReaction;
|
|
45288
46042
|
this.albums = params.albums;
|
|
46043
|
+
this.music = params.music;
|
|
45289
46044
|
}
|
|
45290
46045
|
static async read(_data, ..._args) {
|
|
45291
46046
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -45311,6 +46066,7 @@ var Raw;
|
|
|
45311
46066
|
let views = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
45312
46067
|
let sentReaction = flags & (1 << 15) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
45313
46068
|
let albums = flags & (1 << 19) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
|
|
46069
|
+
let music = flags & (1 << 20) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
45314
46070
|
return new Raw.StoryItem({
|
|
45315
46071
|
pinned: pinned,
|
|
45316
46072
|
public: _public,
|
|
@@ -45334,6 +46090,7 @@ var Raw;
|
|
|
45334
46090
|
views: views,
|
|
45335
46091
|
sentReaction: sentReaction,
|
|
45336
46092
|
albums: albums,
|
|
46093
|
+
music: music,
|
|
45337
46094
|
});
|
|
45338
46095
|
}
|
|
45339
46096
|
write() {
|
|
@@ -45358,6 +46115,7 @@ var Raw;
|
|
|
45358
46115
|
flags |= this.views !== undefined ? 1 << 3 : 0;
|
|
45359
46116
|
flags |= this.sentReaction !== undefined ? 1 << 15 : 0;
|
|
45360
46117
|
flags |= this.albums ? 1 << 19 : 0;
|
|
46118
|
+
flags |= this.music !== undefined ? 1 << 20 : 0;
|
|
45361
46119
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
45362
46120
|
if (this.id !== undefined) {
|
|
45363
46121
|
b.write(index_js_1.Primitive.Int.write(this.id));
|
|
@@ -45398,6 +46156,9 @@ var Raw;
|
|
|
45398
46156
|
if (this.albums) {
|
|
45399
46157
|
b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
|
|
45400
46158
|
}
|
|
46159
|
+
if (this.music !== undefined) {
|
|
46160
|
+
b.write(this.music.write());
|
|
46161
|
+
}
|
|
45401
46162
|
return deps_js_1.Buffer.from(b.buffer);
|
|
45402
46163
|
}
|
|
45403
46164
|
}
|
|
@@ -45553,11 +46314,12 @@ var Raw;
|
|
|
45553
46314
|
quoteOffset;
|
|
45554
46315
|
monoforumPeerId;
|
|
45555
46316
|
todoItemId;
|
|
46317
|
+
pollOption;
|
|
45556
46318
|
constructor(params) {
|
|
45557
46319
|
super();
|
|
45558
46320
|
this.classType = 'types';
|
|
45559
46321
|
this.className = 'InputReplyToMessage';
|
|
45560
|
-
this.constructorId =
|
|
46322
|
+
this.constructorId = 0x3bd4b7c2;
|
|
45561
46323
|
this.subclassOfId = 0x8c71131d;
|
|
45562
46324
|
this._slots = [
|
|
45563
46325
|
'replyToMsgId',
|
|
@@ -45568,6 +46330,7 @@ var Raw;
|
|
|
45568
46330
|
'quoteOffset',
|
|
45569
46331
|
'monoforumPeerId',
|
|
45570
46332
|
'todoItemId',
|
|
46333
|
+
'pollOption',
|
|
45571
46334
|
];
|
|
45572
46335
|
this.replyToMsgId = params.replyToMsgId;
|
|
45573
46336
|
this.topMsgId = params.topMsgId;
|
|
@@ -45577,6 +46340,7 @@ var Raw;
|
|
|
45577
46340
|
this.quoteOffset = params.quoteOffset;
|
|
45578
46341
|
this.monoforumPeerId = params.monoforumPeerId;
|
|
45579
46342
|
this.todoItemId = params.todoItemId;
|
|
46343
|
+
this.pollOption = params.pollOption;
|
|
45580
46344
|
}
|
|
45581
46345
|
static async read(_data, ..._args) {
|
|
45582
46346
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -45588,6 +46352,7 @@ var Raw;
|
|
|
45588
46352
|
let quoteOffset = flags & (1 << 4) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
45589
46353
|
let monoforumPeerId = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
45590
46354
|
let todoItemId = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
46355
|
+
let pollOption = flags & (1 << 7) ? await index_js_1.Primitive.Bytes.read(_data) : undefined;
|
|
45591
46356
|
return new Raw.InputReplyToMessage({
|
|
45592
46357
|
replyToMsgId: replyToMsgId,
|
|
45593
46358
|
topMsgId: topMsgId,
|
|
@@ -45597,6 +46362,7 @@ var Raw;
|
|
|
45597
46362
|
quoteOffset: quoteOffset,
|
|
45598
46363
|
monoforumPeerId: monoforumPeerId,
|
|
45599
46364
|
todoItemId: todoItemId,
|
|
46365
|
+
pollOption: pollOption,
|
|
45600
46366
|
});
|
|
45601
46367
|
}
|
|
45602
46368
|
write() {
|
|
@@ -45610,6 +46376,7 @@ var Raw;
|
|
|
45610
46376
|
flags |= this.quoteOffset !== undefined ? 1 << 4 : 0;
|
|
45611
46377
|
flags |= this.monoforumPeerId !== undefined ? 1 << 5 : 0;
|
|
45612
46378
|
flags |= this.todoItemId !== undefined ? 1 << 6 : 0;
|
|
46379
|
+
flags |= this.pollOption !== undefined ? 1 << 7 : 0;
|
|
45613
46380
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
45614
46381
|
if (this.replyToMsgId !== undefined) {
|
|
45615
46382
|
b.write(index_js_1.Primitive.Int.write(this.replyToMsgId));
|
|
@@ -45635,6 +46402,9 @@ var Raw;
|
|
|
45635
46402
|
if (this.todoItemId !== undefined) {
|
|
45636
46403
|
b.write(index_js_1.Primitive.Int.write(this.todoItemId));
|
|
45637
46404
|
}
|
|
46405
|
+
if (this.pollOption !== undefined) {
|
|
46406
|
+
b.write(index_js_1.Primitive.Bytes.write(this.pollOption));
|
|
46407
|
+
}
|
|
45638
46408
|
return deps_js_1.Buffer.from(b.buffer);
|
|
45639
46409
|
}
|
|
45640
46410
|
}
|
|
@@ -48712,17 +49482,25 @@ var Raw;
|
|
|
48712
49482
|
class ReactionsNotifySettings extends index_js_1.TLObject {
|
|
48713
49483
|
messagesNotifyFrom;
|
|
48714
49484
|
storiesNotifyFrom;
|
|
49485
|
+
pollVotesNotifyFrom;
|
|
48715
49486
|
sound;
|
|
48716
49487
|
showPreviews;
|
|
48717
49488
|
constructor(params) {
|
|
48718
49489
|
super();
|
|
48719
49490
|
this.classType = 'types';
|
|
48720
49491
|
this.className = 'ReactionsNotifySettings';
|
|
48721
|
-
this.constructorId =
|
|
49492
|
+
this.constructorId = 0x71e4ea58;
|
|
48722
49493
|
this.subclassOfId = 0x8dff0851;
|
|
48723
|
-
this._slots = [
|
|
49494
|
+
this._slots = [
|
|
49495
|
+
'messagesNotifyFrom',
|
|
49496
|
+
'storiesNotifyFrom',
|
|
49497
|
+
'pollVotesNotifyFrom',
|
|
49498
|
+
'sound',
|
|
49499
|
+
'showPreviews',
|
|
49500
|
+
];
|
|
48724
49501
|
this.messagesNotifyFrom = params.messagesNotifyFrom;
|
|
48725
49502
|
this.storiesNotifyFrom = params.storiesNotifyFrom;
|
|
49503
|
+
this.pollVotesNotifyFrom = params.pollVotesNotifyFrom;
|
|
48726
49504
|
this.sound = params.sound;
|
|
48727
49505
|
this.showPreviews = params.showPreviews;
|
|
48728
49506
|
}
|
|
@@ -48730,11 +49508,13 @@ var Raw;
|
|
|
48730
49508
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
48731
49509
|
let messagesNotifyFrom = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
48732
49510
|
let storiesNotifyFrom = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
49511
|
+
let pollVotesNotifyFrom = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
48733
49512
|
let sound = await index_js_1.TLObject.read(_data);
|
|
48734
49513
|
let showPreviews = await index_js_1.Primitive.Bool.read(_data);
|
|
48735
49514
|
return new Raw.ReactionsNotifySettings({
|
|
48736
49515
|
messagesNotifyFrom: messagesNotifyFrom,
|
|
48737
49516
|
storiesNotifyFrom: storiesNotifyFrom,
|
|
49517
|
+
pollVotesNotifyFrom: pollVotesNotifyFrom,
|
|
48738
49518
|
sound: sound,
|
|
48739
49519
|
showPreviews: showPreviews,
|
|
48740
49520
|
});
|
|
@@ -48745,6 +49525,7 @@ var Raw;
|
|
|
48745
49525
|
let flags = 0;
|
|
48746
49526
|
flags |= this.messagesNotifyFrom !== undefined ? 1 << 0 : 0;
|
|
48747
49527
|
flags |= this.storiesNotifyFrom !== undefined ? 1 << 1 : 0;
|
|
49528
|
+
flags |= this.pollVotesNotifyFrom !== undefined ? 1 << 2 : 0;
|
|
48748
49529
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
48749
49530
|
if (this.messagesNotifyFrom !== undefined) {
|
|
48750
49531
|
b.write(this.messagesNotifyFrom.write());
|
|
@@ -48752,6 +49533,9 @@ var Raw;
|
|
|
48752
49533
|
if (this.storiesNotifyFrom !== undefined) {
|
|
48753
49534
|
b.write(this.storiesNotifyFrom.write());
|
|
48754
49535
|
}
|
|
49536
|
+
if (this.pollVotesNotifyFrom !== undefined) {
|
|
49537
|
+
b.write(this.pollVotesNotifyFrom.write());
|
|
49538
|
+
}
|
|
48755
49539
|
if (this.sound !== undefined) {
|
|
48756
49540
|
b.write(this.sound.write());
|
|
48757
49541
|
}
|
|
@@ -53723,6 +54507,331 @@ var Raw;
|
|
|
53723
54507
|
}
|
|
53724
54508
|
}
|
|
53725
54509
|
Raw.KeyboardButtonStyle = KeyboardButtonStyle;
|
|
54510
|
+
class InputMessageReadMetric extends index_js_1.TLObject {
|
|
54511
|
+
msgId;
|
|
54512
|
+
viewId;
|
|
54513
|
+
timeInViewMs;
|
|
54514
|
+
activeTimeInViewMs;
|
|
54515
|
+
heightToViewportRatioPermille;
|
|
54516
|
+
seenRangeRatioPermille;
|
|
54517
|
+
constructor(params) {
|
|
54518
|
+
super();
|
|
54519
|
+
this.classType = 'types';
|
|
54520
|
+
this.className = 'InputMessageReadMetric';
|
|
54521
|
+
this.constructorId = 0x402b4495;
|
|
54522
|
+
this.subclassOfId = 0xed5a5ca5;
|
|
54523
|
+
this._slots = [
|
|
54524
|
+
'msgId',
|
|
54525
|
+
'viewId',
|
|
54526
|
+
'timeInViewMs',
|
|
54527
|
+
'activeTimeInViewMs',
|
|
54528
|
+
'heightToViewportRatioPermille',
|
|
54529
|
+
'seenRangeRatioPermille',
|
|
54530
|
+
];
|
|
54531
|
+
this.msgId = params.msgId;
|
|
54532
|
+
this.viewId = params.viewId;
|
|
54533
|
+
this.timeInViewMs = params.timeInViewMs;
|
|
54534
|
+
this.activeTimeInViewMs = params.activeTimeInViewMs;
|
|
54535
|
+
this.heightToViewportRatioPermille = params.heightToViewportRatioPermille;
|
|
54536
|
+
this.seenRangeRatioPermille = params.seenRangeRatioPermille;
|
|
54537
|
+
}
|
|
54538
|
+
static async read(_data, ..._args) {
|
|
54539
|
+
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
54540
|
+
let viewId = await index_js_1.Primitive.Long.read(_data);
|
|
54541
|
+
let timeInViewMs = await index_js_1.Primitive.Int.read(_data);
|
|
54542
|
+
let activeTimeInViewMs = await index_js_1.Primitive.Int.read(_data);
|
|
54543
|
+
let heightToViewportRatioPermille = await index_js_1.Primitive.Int.read(_data);
|
|
54544
|
+
let seenRangeRatioPermille = await index_js_1.Primitive.Int.read(_data);
|
|
54545
|
+
return new Raw.InputMessageReadMetric({
|
|
54546
|
+
msgId: msgId,
|
|
54547
|
+
viewId: viewId,
|
|
54548
|
+
timeInViewMs: timeInViewMs,
|
|
54549
|
+
activeTimeInViewMs: activeTimeInViewMs,
|
|
54550
|
+
heightToViewportRatioPermille: heightToViewportRatioPermille,
|
|
54551
|
+
seenRangeRatioPermille: seenRangeRatioPermille,
|
|
54552
|
+
});
|
|
54553
|
+
}
|
|
54554
|
+
write() {
|
|
54555
|
+
const b = new deps_js_1.BytesIO();
|
|
54556
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54557
|
+
if (this.msgId !== undefined) {
|
|
54558
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
54559
|
+
}
|
|
54560
|
+
if (this.viewId !== undefined) {
|
|
54561
|
+
b.write(index_js_1.Primitive.Long.write(this.viewId));
|
|
54562
|
+
}
|
|
54563
|
+
if (this.timeInViewMs !== undefined) {
|
|
54564
|
+
b.write(index_js_1.Primitive.Int.write(this.timeInViewMs));
|
|
54565
|
+
}
|
|
54566
|
+
if (this.activeTimeInViewMs !== undefined) {
|
|
54567
|
+
b.write(index_js_1.Primitive.Int.write(this.activeTimeInViewMs));
|
|
54568
|
+
}
|
|
54569
|
+
if (this.heightToViewportRatioPermille !== undefined) {
|
|
54570
|
+
b.write(index_js_1.Primitive.Int.write(this.heightToViewportRatioPermille));
|
|
54571
|
+
}
|
|
54572
|
+
if (this.seenRangeRatioPermille !== undefined) {
|
|
54573
|
+
b.write(index_js_1.Primitive.Int.write(this.seenRangeRatioPermille));
|
|
54574
|
+
}
|
|
54575
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54576
|
+
}
|
|
54577
|
+
}
|
|
54578
|
+
Raw.InputMessageReadMetric = InputMessageReadMetric;
|
|
54579
|
+
class InputAiComposeToneDefault extends index_js_1.TLObject {
|
|
54580
|
+
tone;
|
|
54581
|
+
constructor(params) {
|
|
54582
|
+
super();
|
|
54583
|
+
this.classType = 'types';
|
|
54584
|
+
this.className = 'InputAiComposeToneDefault';
|
|
54585
|
+
this.constructorId = 0x1fe9a9bf;
|
|
54586
|
+
this.subclassOfId = 0xd52856b7;
|
|
54587
|
+
this._slots = ['tone'];
|
|
54588
|
+
this.tone = params.tone;
|
|
54589
|
+
}
|
|
54590
|
+
static async read(_data, ..._args) {
|
|
54591
|
+
let tone = await index_js_1.Primitive.String.read(_data);
|
|
54592
|
+
return new Raw.InputAiComposeToneDefault({ tone: tone });
|
|
54593
|
+
}
|
|
54594
|
+
write() {
|
|
54595
|
+
const b = new deps_js_1.BytesIO();
|
|
54596
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54597
|
+
if (this.tone !== undefined) {
|
|
54598
|
+
b.write(index_js_1.Primitive.String.write(this.tone));
|
|
54599
|
+
}
|
|
54600
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54601
|
+
}
|
|
54602
|
+
}
|
|
54603
|
+
Raw.InputAiComposeToneDefault = InputAiComposeToneDefault;
|
|
54604
|
+
class InputAiComposeToneID extends index_js_1.TLObject {
|
|
54605
|
+
id;
|
|
54606
|
+
accessHash;
|
|
54607
|
+
constructor(params) {
|
|
54608
|
+
super();
|
|
54609
|
+
this.classType = 'types';
|
|
54610
|
+
this.className = 'InputAiComposeToneID';
|
|
54611
|
+
this.constructorId = 0x773c080;
|
|
54612
|
+
this.subclassOfId = 0xd52856b7;
|
|
54613
|
+
this._slots = ['id', 'accessHash'];
|
|
54614
|
+
this.id = params.id;
|
|
54615
|
+
this.accessHash = params.accessHash;
|
|
54616
|
+
}
|
|
54617
|
+
static async read(_data, ..._args) {
|
|
54618
|
+
let id = await index_js_1.Primitive.Long.read(_data);
|
|
54619
|
+
let accessHash = await index_js_1.Primitive.Long.read(_data);
|
|
54620
|
+
return new Raw.InputAiComposeToneID({ id: id, accessHash: accessHash });
|
|
54621
|
+
}
|
|
54622
|
+
write() {
|
|
54623
|
+
const b = new deps_js_1.BytesIO();
|
|
54624
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54625
|
+
if (this.id !== undefined) {
|
|
54626
|
+
b.write(index_js_1.Primitive.Long.write(this.id));
|
|
54627
|
+
}
|
|
54628
|
+
if (this.accessHash !== undefined) {
|
|
54629
|
+
b.write(index_js_1.Primitive.Long.write(this.accessHash));
|
|
54630
|
+
}
|
|
54631
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54632
|
+
}
|
|
54633
|
+
}
|
|
54634
|
+
Raw.InputAiComposeToneID = InputAiComposeToneID;
|
|
54635
|
+
class InputAiComposeToneSlug extends index_js_1.TLObject {
|
|
54636
|
+
slug;
|
|
54637
|
+
constructor(params) {
|
|
54638
|
+
super();
|
|
54639
|
+
this.classType = 'types';
|
|
54640
|
+
this.className = 'InputAiComposeToneSlug';
|
|
54641
|
+
this.constructorId = 0x1fa01357;
|
|
54642
|
+
this.subclassOfId = 0xd52856b7;
|
|
54643
|
+
this._slots = ['slug'];
|
|
54644
|
+
this.slug = params.slug;
|
|
54645
|
+
}
|
|
54646
|
+
static async read(_data, ..._args) {
|
|
54647
|
+
let slug = await index_js_1.Primitive.String.read(_data);
|
|
54648
|
+
return new Raw.InputAiComposeToneSlug({ slug: slug });
|
|
54649
|
+
}
|
|
54650
|
+
write() {
|
|
54651
|
+
const b = new deps_js_1.BytesIO();
|
|
54652
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54653
|
+
if (this.slug !== undefined) {
|
|
54654
|
+
b.write(index_js_1.Primitive.String.write(this.slug));
|
|
54655
|
+
}
|
|
54656
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54657
|
+
}
|
|
54658
|
+
}
|
|
54659
|
+
Raw.InputAiComposeToneSlug = InputAiComposeToneSlug;
|
|
54660
|
+
class AiComposeTone extends index_js_1.TLObject {
|
|
54661
|
+
creator;
|
|
54662
|
+
id;
|
|
54663
|
+
accessHash;
|
|
54664
|
+
slug;
|
|
54665
|
+
title;
|
|
54666
|
+
emojiId;
|
|
54667
|
+
prompt;
|
|
54668
|
+
installsCount;
|
|
54669
|
+
authorId;
|
|
54670
|
+
exampleEnglish;
|
|
54671
|
+
constructor(params) {
|
|
54672
|
+
super();
|
|
54673
|
+
this.classType = 'types';
|
|
54674
|
+
this.className = 'AiComposeTone';
|
|
54675
|
+
this.constructorId = 0xcff63ea9;
|
|
54676
|
+
this.subclassOfId = 0xd476f30d;
|
|
54677
|
+
this._slots = [
|
|
54678
|
+
'creator',
|
|
54679
|
+
'id',
|
|
54680
|
+
'accessHash',
|
|
54681
|
+
'slug',
|
|
54682
|
+
'title',
|
|
54683
|
+
'emojiId',
|
|
54684
|
+
'prompt',
|
|
54685
|
+
'installsCount',
|
|
54686
|
+
'authorId',
|
|
54687
|
+
'exampleEnglish',
|
|
54688
|
+
];
|
|
54689
|
+
this.creator = params.creator;
|
|
54690
|
+
this.id = params.id;
|
|
54691
|
+
this.accessHash = params.accessHash;
|
|
54692
|
+
this.slug = params.slug;
|
|
54693
|
+
this.title = params.title;
|
|
54694
|
+
this.emojiId = params.emojiId;
|
|
54695
|
+
this.prompt = params.prompt;
|
|
54696
|
+
this.installsCount = params.installsCount;
|
|
54697
|
+
this.authorId = params.authorId;
|
|
54698
|
+
this.exampleEnglish = params.exampleEnglish;
|
|
54699
|
+
}
|
|
54700
|
+
static async read(_data, ..._args) {
|
|
54701
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
54702
|
+
let creator = flags & (1 << 0) ? true : false;
|
|
54703
|
+
let id = await index_js_1.Primitive.Long.read(_data);
|
|
54704
|
+
let accessHash = await index_js_1.Primitive.Long.read(_data);
|
|
54705
|
+
let slug = await index_js_1.Primitive.String.read(_data);
|
|
54706
|
+
let title = await index_js_1.Primitive.String.read(_data);
|
|
54707
|
+
let emojiId = flags & (1 << 1) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
54708
|
+
let prompt = flags & (1 << 4) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
54709
|
+
let installsCount = flags & (1 << 2) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
54710
|
+
let authorId = flags & (1 << 3) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
54711
|
+
let exampleEnglish = flags & (1 << 5) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
54712
|
+
return new Raw.AiComposeTone({
|
|
54713
|
+
creator: creator,
|
|
54714
|
+
id: id,
|
|
54715
|
+
accessHash: accessHash,
|
|
54716
|
+
slug: slug,
|
|
54717
|
+
title: title,
|
|
54718
|
+
emojiId: emojiId,
|
|
54719
|
+
prompt: prompt,
|
|
54720
|
+
installsCount: installsCount,
|
|
54721
|
+
authorId: authorId,
|
|
54722
|
+
exampleEnglish: exampleEnglish,
|
|
54723
|
+
});
|
|
54724
|
+
}
|
|
54725
|
+
write() {
|
|
54726
|
+
const b = new deps_js_1.BytesIO();
|
|
54727
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54728
|
+
let flags = 0;
|
|
54729
|
+
flags |= this.creator ? 1 << 0 : 0;
|
|
54730
|
+
flags |= this.emojiId !== undefined ? 1 << 1 : 0;
|
|
54731
|
+
flags |= this.prompt !== undefined ? 1 << 4 : 0;
|
|
54732
|
+
flags |= this.installsCount !== undefined ? 1 << 2 : 0;
|
|
54733
|
+
flags |= this.authorId !== undefined ? 1 << 3 : 0;
|
|
54734
|
+
flags |= this.exampleEnglish !== undefined ? 1 << 5 : 0;
|
|
54735
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
54736
|
+
if (this.id !== undefined) {
|
|
54737
|
+
b.write(index_js_1.Primitive.Long.write(this.id));
|
|
54738
|
+
}
|
|
54739
|
+
if (this.accessHash !== undefined) {
|
|
54740
|
+
b.write(index_js_1.Primitive.Long.write(this.accessHash));
|
|
54741
|
+
}
|
|
54742
|
+
if (this.slug !== undefined) {
|
|
54743
|
+
b.write(index_js_1.Primitive.String.write(this.slug));
|
|
54744
|
+
}
|
|
54745
|
+
if (this.title !== undefined) {
|
|
54746
|
+
b.write(index_js_1.Primitive.String.write(this.title));
|
|
54747
|
+
}
|
|
54748
|
+
if (this.emojiId !== undefined) {
|
|
54749
|
+
b.write(index_js_1.Primitive.Long.write(this.emojiId));
|
|
54750
|
+
}
|
|
54751
|
+
if (this.prompt !== undefined) {
|
|
54752
|
+
b.write(index_js_1.Primitive.String.write(this.prompt));
|
|
54753
|
+
}
|
|
54754
|
+
if (this.installsCount !== undefined) {
|
|
54755
|
+
b.write(index_js_1.Primitive.Int.write(this.installsCount));
|
|
54756
|
+
}
|
|
54757
|
+
if (this.authorId !== undefined) {
|
|
54758
|
+
b.write(index_js_1.Primitive.Long.write(this.authorId));
|
|
54759
|
+
}
|
|
54760
|
+
if (this.exampleEnglish !== undefined) {
|
|
54761
|
+
b.write(this.exampleEnglish.write());
|
|
54762
|
+
}
|
|
54763
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54764
|
+
}
|
|
54765
|
+
}
|
|
54766
|
+
Raw.AiComposeTone = AiComposeTone;
|
|
54767
|
+
class AiComposeToneDefault extends index_js_1.TLObject {
|
|
54768
|
+
tone;
|
|
54769
|
+
emojiId;
|
|
54770
|
+
title;
|
|
54771
|
+
constructor(params) {
|
|
54772
|
+
super();
|
|
54773
|
+
this.classType = 'types';
|
|
54774
|
+
this.className = 'AiComposeToneDefault';
|
|
54775
|
+
this.constructorId = 0x9bad6414;
|
|
54776
|
+
this.subclassOfId = 0xd476f30d;
|
|
54777
|
+
this._slots = ['tone', 'emojiId', 'title'];
|
|
54778
|
+
this.tone = params.tone;
|
|
54779
|
+
this.emojiId = params.emojiId;
|
|
54780
|
+
this.title = params.title;
|
|
54781
|
+
}
|
|
54782
|
+
static async read(_data, ..._args) {
|
|
54783
|
+
let tone = await index_js_1.Primitive.String.read(_data);
|
|
54784
|
+
let emojiId = await index_js_1.Primitive.Long.read(_data);
|
|
54785
|
+
let title = await index_js_1.Primitive.String.read(_data);
|
|
54786
|
+
return new Raw.AiComposeToneDefault({ tone: tone, emojiId: emojiId, title: title });
|
|
54787
|
+
}
|
|
54788
|
+
write() {
|
|
54789
|
+
const b = new deps_js_1.BytesIO();
|
|
54790
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54791
|
+
if (this.tone !== undefined) {
|
|
54792
|
+
b.write(index_js_1.Primitive.String.write(this.tone));
|
|
54793
|
+
}
|
|
54794
|
+
if (this.emojiId !== undefined) {
|
|
54795
|
+
b.write(index_js_1.Primitive.Long.write(this.emojiId));
|
|
54796
|
+
}
|
|
54797
|
+
if (this.title !== undefined) {
|
|
54798
|
+
b.write(index_js_1.Primitive.String.write(this.title));
|
|
54799
|
+
}
|
|
54800
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54801
|
+
}
|
|
54802
|
+
}
|
|
54803
|
+
Raw.AiComposeToneDefault = AiComposeToneDefault;
|
|
54804
|
+
class AiComposeToneExample extends index_js_1.TLObject {
|
|
54805
|
+
from;
|
|
54806
|
+
to;
|
|
54807
|
+
constructor(params) {
|
|
54808
|
+
super();
|
|
54809
|
+
this.classType = 'types';
|
|
54810
|
+
this.className = 'AiComposeToneExample';
|
|
54811
|
+
this.constructorId = 0xf1d628ec;
|
|
54812
|
+
this.subclassOfId = 0x8c2493d5;
|
|
54813
|
+
this._slots = ['from', 'to'];
|
|
54814
|
+
this.from = params.from;
|
|
54815
|
+
this.to = params.to;
|
|
54816
|
+
}
|
|
54817
|
+
static async read(_data, ..._args) {
|
|
54818
|
+
let from = await index_js_1.TLObject.read(_data);
|
|
54819
|
+
let to = await index_js_1.TLObject.read(_data);
|
|
54820
|
+
return new Raw.AiComposeToneExample({ from: from, to: to });
|
|
54821
|
+
}
|
|
54822
|
+
write() {
|
|
54823
|
+
const b = new deps_js_1.BytesIO();
|
|
54824
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
54825
|
+
if (this.from !== undefined) {
|
|
54826
|
+
b.write(this.from.write());
|
|
54827
|
+
}
|
|
54828
|
+
if (this.to !== undefined) {
|
|
54829
|
+
b.write(this.to.write());
|
|
54830
|
+
}
|
|
54831
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
54832
|
+
}
|
|
54833
|
+
}
|
|
54834
|
+
Raw.AiComposeToneExample = AiComposeToneExample;
|
|
53726
54835
|
class InvokeAfterMsg extends index_js_1.TLObject {
|
|
53727
54836
|
__response__;
|
|
53728
54837
|
msgId;
|
|
@@ -58628,19 +59737,21 @@ var Raw;
|
|
|
58628
59737
|
phoneCodeHash;
|
|
58629
59738
|
supportEmailAddress;
|
|
58630
59739
|
supportEmailSubject;
|
|
59740
|
+
premiumDays;
|
|
58631
59741
|
currency;
|
|
58632
59742
|
amount;
|
|
58633
59743
|
constructor(params) {
|
|
58634
59744
|
super();
|
|
58635
59745
|
this.classType = 'types';
|
|
58636
59746
|
this.className = 'auth.SentCodePaymentRequired';
|
|
58637
|
-
this.constructorId =
|
|
59747
|
+
this.constructorId = 0xf8827ebf;
|
|
58638
59748
|
this.subclassOfId = 0x6ce87081;
|
|
58639
59749
|
this._slots = [
|
|
58640
59750
|
'storeProduct',
|
|
58641
59751
|
'phoneCodeHash',
|
|
58642
59752
|
'supportEmailAddress',
|
|
58643
59753
|
'supportEmailSubject',
|
|
59754
|
+
'premiumDays',
|
|
58644
59755
|
'currency',
|
|
58645
59756
|
'amount',
|
|
58646
59757
|
];
|
|
@@ -58648,6 +59759,7 @@ var Raw;
|
|
|
58648
59759
|
this.phoneCodeHash = params.phoneCodeHash;
|
|
58649
59760
|
this.supportEmailAddress = params.supportEmailAddress;
|
|
58650
59761
|
this.supportEmailSubject = params.supportEmailSubject;
|
|
59762
|
+
this.premiumDays = params.premiumDays;
|
|
58651
59763
|
this.currency = params.currency;
|
|
58652
59764
|
this.amount = params.amount;
|
|
58653
59765
|
}
|
|
@@ -58656,6 +59768,7 @@ var Raw;
|
|
|
58656
59768
|
let phoneCodeHash = await index_js_1.Primitive.String.read(_data);
|
|
58657
59769
|
let supportEmailAddress = await index_js_1.Primitive.String.read(_data);
|
|
58658
59770
|
let supportEmailSubject = await index_js_1.Primitive.String.read(_data);
|
|
59771
|
+
let premiumDays = await index_js_1.Primitive.Int.read(_data);
|
|
58659
59772
|
let currency = await index_js_1.Primitive.String.read(_data);
|
|
58660
59773
|
let amount = await index_js_1.Primitive.Long.read(_data);
|
|
58661
59774
|
return new Raw.auth.SentCodePaymentRequired({
|
|
@@ -58663,6 +59776,7 @@ var Raw;
|
|
|
58663
59776
|
phoneCodeHash: phoneCodeHash,
|
|
58664
59777
|
supportEmailAddress: supportEmailAddress,
|
|
58665
59778
|
supportEmailSubject: supportEmailSubject,
|
|
59779
|
+
premiumDays: premiumDays,
|
|
58666
59780
|
currency: currency,
|
|
58667
59781
|
amount: amount,
|
|
58668
59782
|
});
|
|
@@ -58682,6 +59796,9 @@ var Raw;
|
|
|
58682
59796
|
if (this.supportEmailSubject !== undefined) {
|
|
58683
59797
|
b.write(index_js_1.Primitive.String.write(this.supportEmailSubject));
|
|
58684
59798
|
}
|
|
59799
|
+
if (this.premiumDays !== undefined) {
|
|
59800
|
+
b.write(index_js_1.Primitive.Int.write(this.premiumDays));
|
|
59801
|
+
}
|
|
58685
59802
|
if (this.currency !== undefined) {
|
|
58686
59803
|
b.write(index_js_1.Primitive.String.write(this.currency));
|
|
58687
59804
|
}
|
|
@@ -61235,6 +62352,7 @@ var Raw;
|
|
|
61235
62352
|
groups;
|
|
61236
62353
|
channels;
|
|
61237
62354
|
botsApp;
|
|
62355
|
+
botsGuestchat;
|
|
61238
62356
|
offset;
|
|
61239
62357
|
limit;
|
|
61240
62358
|
hash;
|
|
@@ -61254,6 +62372,7 @@ var Raw;
|
|
|
61254
62372
|
'groups',
|
|
61255
62373
|
'channels',
|
|
61256
62374
|
'botsApp',
|
|
62375
|
+
'botsGuestchat',
|
|
61257
62376
|
'offset',
|
|
61258
62377
|
'limit',
|
|
61259
62378
|
'hash',
|
|
@@ -61267,6 +62386,7 @@ var Raw;
|
|
|
61267
62386
|
this.groups = params.groups;
|
|
61268
62387
|
this.channels = params.channels;
|
|
61269
62388
|
this.botsApp = params.botsApp;
|
|
62389
|
+
this.botsGuestchat = params.botsGuestchat;
|
|
61270
62390
|
this.offset = params.offset;
|
|
61271
62391
|
this.limit = params.limit;
|
|
61272
62392
|
this.hash = params.hash;
|
|
@@ -61282,6 +62402,7 @@ var Raw;
|
|
|
61282
62402
|
let groups = flags & (1 << 10) ? true : false;
|
|
61283
62403
|
let channels = flags & (1 << 15) ? true : false;
|
|
61284
62404
|
let botsApp = flags & (1 << 16) ? true : false;
|
|
62405
|
+
let botsGuestchat = flags & (1 << 17) ? true : false;
|
|
61285
62406
|
let offset = await index_js_1.Primitive.Int.read(_data);
|
|
61286
62407
|
let limit = await index_js_1.Primitive.Int.read(_data);
|
|
61287
62408
|
let hash = await index_js_1.Primitive.Long.read(_data);
|
|
@@ -61295,6 +62416,7 @@ var Raw;
|
|
|
61295
62416
|
groups: groups,
|
|
61296
62417
|
channels: channels,
|
|
61297
62418
|
botsApp: botsApp,
|
|
62419
|
+
botsGuestchat: botsGuestchat,
|
|
61298
62420
|
offset: offset,
|
|
61299
62421
|
limit: limit,
|
|
61300
62422
|
hash: hash,
|
|
@@ -61313,6 +62435,7 @@ var Raw;
|
|
|
61313
62435
|
flags |= this.groups ? 1 << 10 : 0;
|
|
61314
62436
|
flags |= this.channels ? 1 << 15 : 0;
|
|
61315
62437
|
flags |= this.botsApp ? 1 << 16 : 0;
|
|
62438
|
+
flags |= this.botsGuestchat ? 1 << 17 : 0;
|
|
61316
62439
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
61317
62440
|
if (this.offset !== undefined) {
|
|
61318
62441
|
b.write(index_js_1.Primitive.Int.write(this.offset));
|
|
@@ -65294,6 +66417,44 @@ var Raw;
|
|
|
65294
66417
|
}
|
|
65295
66418
|
}
|
|
65296
66419
|
messages_1.EmojiGameDiceInfo = EmojiGameDiceInfo;
|
|
66420
|
+
class ComposedMessageWithAI extends index_js_1.TLObject {
|
|
66421
|
+
resultText;
|
|
66422
|
+
diffText;
|
|
66423
|
+
constructor(params) {
|
|
66424
|
+
super();
|
|
66425
|
+
this.classType = 'types';
|
|
66426
|
+
this.className = 'messages.ComposedMessageWithAI';
|
|
66427
|
+
this.constructorId = 0x90d7adfa;
|
|
66428
|
+
this.subclassOfId = 0x140803df;
|
|
66429
|
+
this._slots = ['resultText', 'diffText'];
|
|
66430
|
+
this.resultText = params.resultText;
|
|
66431
|
+
this.diffText = params.diffText;
|
|
66432
|
+
}
|
|
66433
|
+
static async read(_data, ..._args) {
|
|
66434
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
66435
|
+
let resultText = await index_js_1.TLObject.read(_data);
|
|
66436
|
+
let diffText = flags & (1 << 0) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
66437
|
+
return new Raw.messages.ComposedMessageWithAI({
|
|
66438
|
+
resultText: resultText,
|
|
66439
|
+
diffText: diffText,
|
|
66440
|
+
});
|
|
66441
|
+
}
|
|
66442
|
+
write() {
|
|
66443
|
+
const b = new deps_js_1.BytesIO();
|
|
66444
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
66445
|
+
let flags = 0;
|
|
66446
|
+
flags |= this.diffText !== undefined ? 1 << 0 : 0;
|
|
66447
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
66448
|
+
if (this.resultText !== undefined) {
|
|
66449
|
+
b.write(this.resultText.write());
|
|
66450
|
+
}
|
|
66451
|
+
if (this.diffText !== undefined) {
|
|
66452
|
+
b.write(this.diffText.write());
|
|
66453
|
+
}
|
|
66454
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
66455
|
+
}
|
|
66456
|
+
}
|
|
66457
|
+
messages_1.ComposedMessageWithAI = ComposedMessageWithAI;
|
|
65297
66458
|
class GetMessages extends index_js_1.TLObject {
|
|
65298
66459
|
__response__;
|
|
65299
66460
|
id;
|
|
@@ -70070,20 +71231,23 @@ var Raw;
|
|
|
70070
71231
|
__response__;
|
|
70071
71232
|
peer;
|
|
70072
71233
|
msgId;
|
|
71234
|
+
pollHash;
|
|
70073
71235
|
constructor(params) {
|
|
70074
71236
|
super();
|
|
70075
71237
|
this.classType = 'functions';
|
|
70076
71238
|
this.className = 'messages.GetPollResults';
|
|
70077
|
-
this.constructorId =
|
|
71239
|
+
this.constructorId = 0xeda3e33b;
|
|
70078
71240
|
this.subclassOfId = 0x8af52aac;
|
|
70079
|
-
this._slots = ['peer', 'msgId'];
|
|
71241
|
+
this._slots = ['peer', 'msgId', 'pollHash'];
|
|
70080
71242
|
this.peer = params.peer;
|
|
70081
71243
|
this.msgId = params.msgId;
|
|
71244
|
+
this.pollHash = params.pollHash;
|
|
70082
71245
|
}
|
|
70083
71246
|
static async read(_data, ..._args) {
|
|
70084
71247
|
let peer = await index_js_1.TLObject.read(_data);
|
|
70085
71248
|
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
70086
|
-
|
|
71249
|
+
let pollHash = await index_js_1.Primitive.Long.read(_data);
|
|
71250
|
+
return new Raw.messages.GetPollResults({ peer: peer, msgId: msgId, pollHash: pollHash });
|
|
70087
71251
|
}
|
|
70088
71252
|
write() {
|
|
70089
71253
|
const b = new deps_js_1.BytesIO();
|
|
@@ -70094,6 +71258,9 @@ var Raw;
|
|
|
70094
71258
|
if (this.msgId !== undefined) {
|
|
70095
71259
|
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
70096
71260
|
}
|
|
71261
|
+
if (this.pollHash !== undefined) {
|
|
71262
|
+
b.write(index_js_1.Primitive.Long.write(this.pollHash));
|
|
71263
|
+
}
|
|
70097
71264
|
return deps_js_1.Buffer.from(b.buffer);
|
|
70098
71265
|
}
|
|
70099
71266
|
}
|
|
@@ -72348,17 +73515,19 @@ var Raw;
|
|
|
72348
73515
|
id;
|
|
72349
73516
|
text;
|
|
72350
73517
|
toLang;
|
|
73518
|
+
tone;
|
|
72351
73519
|
constructor(params) {
|
|
72352
73520
|
super();
|
|
72353
73521
|
this.classType = 'functions';
|
|
72354
73522
|
this.className = 'messages.TranslateText';
|
|
72355
|
-
this.constructorId =
|
|
73523
|
+
this.constructorId = 0xa5eec345;
|
|
72356
73524
|
this.subclassOfId = 0x24243e8;
|
|
72357
|
-
this._slots = ['peer', 'id', 'text', 'toLang'];
|
|
73525
|
+
this._slots = ['peer', 'id', 'text', 'toLang', 'tone'];
|
|
72358
73526
|
this.peer = params.peer;
|
|
72359
73527
|
this.id = params.id;
|
|
72360
73528
|
this.text = params.text;
|
|
72361
73529
|
this.toLang = params.toLang;
|
|
73530
|
+
this.tone = params.tone;
|
|
72362
73531
|
}
|
|
72363
73532
|
static async read(_data, ..._args) {
|
|
72364
73533
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -72366,7 +73535,14 @@ var Raw;
|
|
|
72366
73535
|
let id = flags & (1 << 0) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
|
|
72367
73536
|
let text = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
72368
73537
|
let toLang = await index_js_1.Primitive.String.read(_data);
|
|
72369
|
-
|
|
73538
|
+
let tone = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
73539
|
+
return new Raw.messages.TranslateText({
|
|
73540
|
+
peer: peer,
|
|
73541
|
+
id: id,
|
|
73542
|
+
text: text,
|
|
73543
|
+
toLang: toLang,
|
|
73544
|
+
tone: tone,
|
|
73545
|
+
});
|
|
72370
73546
|
}
|
|
72371
73547
|
write() {
|
|
72372
73548
|
const b = new deps_js_1.BytesIO();
|
|
@@ -72375,6 +73551,7 @@ var Raw;
|
|
|
72375
73551
|
flags |= this.peer !== undefined ? 1 << 0 : 0;
|
|
72376
73552
|
flags |= this.id ? 1 << 0 : 0;
|
|
72377
73553
|
flags |= this.text ? 1 << 1 : 0;
|
|
73554
|
+
flags |= this.tone !== undefined ? 1 << 2 : 0;
|
|
72378
73555
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
72379
73556
|
if (this.peer !== undefined) {
|
|
72380
73557
|
b.write(this.peer.write());
|
|
@@ -72388,6 +73565,9 @@ var Raw;
|
|
|
72388
73565
|
if (this.toLang !== undefined) {
|
|
72389
73566
|
b.write(index_js_1.Primitive.String.write(this.toLang));
|
|
72390
73567
|
}
|
|
73568
|
+
if (this.tone !== undefined) {
|
|
73569
|
+
b.write(index_js_1.Primitive.String.write(this.tone));
|
|
73570
|
+
}
|
|
72391
73571
|
return deps_js_1.Buffer.from(b.buffer);
|
|
72392
73572
|
}
|
|
72393
73573
|
}
|
|
@@ -73386,28 +74566,33 @@ var Raw;
|
|
|
73386
74566
|
__response__;
|
|
73387
74567
|
peer;
|
|
73388
74568
|
msgId;
|
|
74569
|
+
webappReqId;
|
|
73389
74570
|
buttonId;
|
|
73390
74571
|
requestedPeers;
|
|
73391
74572
|
constructor(params) {
|
|
73392
74573
|
super();
|
|
73393
74574
|
this.classType = 'functions';
|
|
73394
74575
|
this.className = 'messages.SendBotRequestedPeer';
|
|
73395
|
-
this.constructorId =
|
|
74576
|
+
this.constructorId = 0x6c5cf2a7;
|
|
73396
74577
|
this.subclassOfId = 0x8af52aac;
|
|
73397
|
-
this._slots = ['peer', 'msgId', 'buttonId', 'requestedPeers'];
|
|
74578
|
+
this._slots = ['peer', 'msgId', 'webappReqId', 'buttonId', 'requestedPeers'];
|
|
73398
74579
|
this.peer = params.peer;
|
|
73399
74580
|
this.msgId = params.msgId;
|
|
74581
|
+
this.webappReqId = params.webappReqId;
|
|
73400
74582
|
this.buttonId = params.buttonId;
|
|
73401
74583
|
this.requestedPeers = params.requestedPeers;
|
|
73402
74584
|
}
|
|
73403
74585
|
static async read(_data, ..._args) {
|
|
74586
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
73404
74587
|
let peer = await index_js_1.TLObject.read(_data);
|
|
73405
|
-
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
74588
|
+
let msgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
74589
|
+
let webappReqId = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
73406
74590
|
let buttonId = await index_js_1.Primitive.Int.read(_data);
|
|
73407
74591
|
let requestedPeers = await index_js_1.TLObject.read(_data);
|
|
73408
74592
|
return new Raw.messages.SendBotRequestedPeer({
|
|
73409
74593
|
peer: peer,
|
|
73410
74594
|
msgId: msgId,
|
|
74595
|
+
webappReqId: webappReqId,
|
|
73411
74596
|
buttonId: buttonId,
|
|
73412
74597
|
requestedPeers: requestedPeers,
|
|
73413
74598
|
});
|
|
@@ -73415,12 +74600,19 @@ var Raw;
|
|
|
73415
74600
|
write() {
|
|
73416
74601
|
const b = new deps_js_1.BytesIO();
|
|
73417
74602
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
74603
|
+
let flags = 0;
|
|
74604
|
+
flags |= this.msgId !== undefined ? 1 << 0 : 0;
|
|
74605
|
+
flags |= this.webappReqId !== undefined ? 1 << 1 : 0;
|
|
74606
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
73418
74607
|
if (this.peer !== undefined) {
|
|
73419
74608
|
b.write(this.peer.write());
|
|
73420
74609
|
}
|
|
73421
74610
|
if (this.msgId !== undefined) {
|
|
73422
74611
|
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
73423
74612
|
}
|
|
74613
|
+
if (this.webappReqId !== undefined) {
|
|
74614
|
+
b.write(index_js_1.Primitive.String.write(this.webappReqId));
|
|
74615
|
+
}
|
|
73424
74616
|
if (this.buttonId !== undefined) {
|
|
73425
74617
|
b.write(index_js_1.Primitive.Int.write(this.buttonId));
|
|
73426
74618
|
}
|
|
@@ -75874,29 +77066,33 @@ var Raw;
|
|
|
75874
77066
|
peer;
|
|
75875
77067
|
id;
|
|
75876
77068
|
toLang;
|
|
77069
|
+
tone;
|
|
75877
77070
|
constructor(params) {
|
|
75878
77071
|
super();
|
|
75879
77072
|
this.classType = 'functions';
|
|
75880
77073
|
this.className = 'messages.SummarizeText';
|
|
75881
|
-
this.constructorId =
|
|
77074
|
+
this.constructorId = 0xabbbd346;
|
|
75882
77075
|
this.subclassOfId = 0x95ca4b05;
|
|
75883
|
-
this._slots = ['peer', 'id', 'toLang'];
|
|
77076
|
+
this._slots = ['peer', 'id', 'toLang', 'tone'];
|
|
75884
77077
|
this.peer = params.peer;
|
|
75885
77078
|
this.id = params.id;
|
|
75886
77079
|
this.toLang = params.toLang;
|
|
77080
|
+
this.tone = params.tone;
|
|
75887
77081
|
}
|
|
75888
77082
|
static async read(_data, ..._args) {
|
|
75889
77083
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
75890
77084
|
let peer = await index_js_1.TLObject.read(_data);
|
|
75891
77085
|
let id = await index_js_1.Primitive.Int.read(_data);
|
|
75892
77086
|
let toLang = flags & (1 << 0) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
75893
|
-
|
|
77087
|
+
let tone = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
77088
|
+
return new Raw.messages.SummarizeText({ peer: peer, id: id, toLang: toLang, tone: tone });
|
|
75894
77089
|
}
|
|
75895
77090
|
write() {
|
|
75896
77091
|
const b = new deps_js_1.BytesIO();
|
|
75897
77092
|
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
75898
77093
|
let flags = 0;
|
|
75899
77094
|
flags |= this.toLang !== undefined ? 1 << 0 : 0;
|
|
77095
|
+
flags |= this.tone !== undefined ? 1 << 2 : 0;
|
|
75900
77096
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
75901
77097
|
if (this.peer !== undefined) {
|
|
75902
77098
|
b.write(this.peer.write());
|
|
@@ -75907,6 +77103,9 @@ var Raw;
|
|
|
75907
77103
|
if (this.toLang !== undefined) {
|
|
75908
77104
|
b.write(index_js_1.Primitive.String.write(this.toLang));
|
|
75909
77105
|
}
|
|
77106
|
+
if (this.tone !== undefined) {
|
|
77107
|
+
b.write(index_js_1.Primitive.String.write(this.tone));
|
|
77108
|
+
}
|
|
75910
77109
|
return deps_js_1.Buffer.from(b.buffer);
|
|
75911
77110
|
}
|
|
75912
77111
|
}
|
|
@@ -76075,6 +77274,478 @@ var Raw;
|
|
|
76075
77274
|
}
|
|
76076
77275
|
}
|
|
76077
77276
|
messages_1.CheckUrlAuthMatchCode = CheckUrlAuthMatchCode;
|
|
77277
|
+
class ComposeMessageWithAI extends index_js_1.TLObject {
|
|
77278
|
+
__response__;
|
|
77279
|
+
proofread;
|
|
77280
|
+
emojify;
|
|
77281
|
+
text;
|
|
77282
|
+
translateToLang;
|
|
77283
|
+
tone;
|
|
77284
|
+
constructor(params) {
|
|
77285
|
+
super();
|
|
77286
|
+
this.classType = 'functions';
|
|
77287
|
+
this.className = 'messages.ComposeMessageWithAI';
|
|
77288
|
+
this.constructorId = 0xdaecc589;
|
|
77289
|
+
this.subclassOfId = 0x140803df;
|
|
77290
|
+
this._slots = ['proofread', 'emojify', 'text', 'translateToLang', 'tone'];
|
|
77291
|
+
this.proofread = params.proofread;
|
|
77292
|
+
this.emojify = params.emojify;
|
|
77293
|
+
this.text = params.text;
|
|
77294
|
+
this.translateToLang = params.translateToLang;
|
|
77295
|
+
this.tone = params.tone;
|
|
77296
|
+
}
|
|
77297
|
+
static async read(_data, ..._args) {
|
|
77298
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
77299
|
+
let proofread = flags & (1 << 0) ? true : false;
|
|
77300
|
+
let emojify = flags & (1 << 3) ? true : false;
|
|
77301
|
+
let text = await index_js_1.TLObject.read(_data);
|
|
77302
|
+
let translateToLang = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
77303
|
+
let tone = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
77304
|
+
return new Raw.messages.ComposeMessageWithAI({
|
|
77305
|
+
proofread: proofread,
|
|
77306
|
+
emojify: emojify,
|
|
77307
|
+
text: text,
|
|
77308
|
+
translateToLang: translateToLang,
|
|
77309
|
+
tone: tone,
|
|
77310
|
+
});
|
|
77311
|
+
}
|
|
77312
|
+
write() {
|
|
77313
|
+
const b = new deps_js_1.BytesIO();
|
|
77314
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77315
|
+
let flags = 0;
|
|
77316
|
+
flags |= this.proofread ? 1 << 0 : 0;
|
|
77317
|
+
flags |= this.emojify ? 1 << 3 : 0;
|
|
77318
|
+
flags |= this.translateToLang !== undefined ? 1 << 1 : 0;
|
|
77319
|
+
flags |= this.tone !== undefined ? 1 << 2 : 0;
|
|
77320
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
77321
|
+
if (this.text !== undefined) {
|
|
77322
|
+
b.write(this.text.write());
|
|
77323
|
+
}
|
|
77324
|
+
if (this.translateToLang !== undefined) {
|
|
77325
|
+
b.write(index_js_1.Primitive.String.write(this.translateToLang));
|
|
77326
|
+
}
|
|
77327
|
+
if (this.tone !== undefined) {
|
|
77328
|
+
b.write(this.tone.write());
|
|
77329
|
+
}
|
|
77330
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77331
|
+
}
|
|
77332
|
+
}
|
|
77333
|
+
messages_1.ComposeMessageWithAI = ComposeMessageWithAI;
|
|
77334
|
+
class ReportReadMetrics extends index_js_1.TLObject {
|
|
77335
|
+
__response__;
|
|
77336
|
+
peer;
|
|
77337
|
+
metrics;
|
|
77338
|
+
constructor(params) {
|
|
77339
|
+
super();
|
|
77340
|
+
this.classType = 'functions';
|
|
77341
|
+
this.className = 'messages.ReportReadMetrics';
|
|
77342
|
+
this.constructorId = 0x4067c5e6;
|
|
77343
|
+
this.subclassOfId = 0xf5b399ac;
|
|
77344
|
+
this._slots = ['peer', 'metrics'];
|
|
77345
|
+
this.peer = params.peer;
|
|
77346
|
+
this.metrics = params.metrics;
|
|
77347
|
+
}
|
|
77348
|
+
static async read(_data, ..._args) {
|
|
77349
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77350
|
+
let metrics = await index_js_1.TLObject.read(_data);
|
|
77351
|
+
return new Raw.messages.ReportReadMetrics({ peer: peer, metrics: metrics });
|
|
77352
|
+
}
|
|
77353
|
+
write() {
|
|
77354
|
+
const b = new deps_js_1.BytesIO();
|
|
77355
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77356
|
+
if (this.peer !== undefined) {
|
|
77357
|
+
b.write(this.peer.write());
|
|
77358
|
+
}
|
|
77359
|
+
if (this.metrics) {
|
|
77360
|
+
b.write(index_js_1.Primitive.Vector.write(this.metrics));
|
|
77361
|
+
}
|
|
77362
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77363
|
+
}
|
|
77364
|
+
}
|
|
77365
|
+
messages_1.ReportReadMetrics = ReportReadMetrics;
|
|
77366
|
+
class ReportMusicListen extends index_js_1.TLObject {
|
|
77367
|
+
__response__;
|
|
77368
|
+
id;
|
|
77369
|
+
listenedDuration;
|
|
77370
|
+
constructor(params) {
|
|
77371
|
+
super();
|
|
77372
|
+
this.classType = 'functions';
|
|
77373
|
+
this.className = 'messages.ReportMusicListen';
|
|
77374
|
+
this.constructorId = 0xddbcd819;
|
|
77375
|
+
this.subclassOfId = 0xf5b399ac;
|
|
77376
|
+
this._slots = ['id', 'listenedDuration'];
|
|
77377
|
+
this.id = params.id;
|
|
77378
|
+
this.listenedDuration = params.listenedDuration;
|
|
77379
|
+
}
|
|
77380
|
+
static async read(_data, ..._args) {
|
|
77381
|
+
let id = await index_js_1.TLObject.read(_data);
|
|
77382
|
+
let listenedDuration = await index_js_1.Primitive.Int.read(_data);
|
|
77383
|
+
return new Raw.messages.ReportMusicListen({ id: id, listenedDuration: listenedDuration });
|
|
77384
|
+
}
|
|
77385
|
+
write() {
|
|
77386
|
+
const b = new deps_js_1.BytesIO();
|
|
77387
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77388
|
+
if (this.id !== undefined) {
|
|
77389
|
+
b.write(this.id.write());
|
|
77390
|
+
}
|
|
77391
|
+
if (this.listenedDuration !== undefined) {
|
|
77392
|
+
b.write(index_js_1.Primitive.Int.write(this.listenedDuration));
|
|
77393
|
+
}
|
|
77394
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77395
|
+
}
|
|
77396
|
+
}
|
|
77397
|
+
messages_1.ReportMusicListen = ReportMusicListen;
|
|
77398
|
+
class AddPollAnswer extends index_js_1.TLObject {
|
|
77399
|
+
__response__;
|
|
77400
|
+
peer;
|
|
77401
|
+
msgId;
|
|
77402
|
+
answer;
|
|
77403
|
+
constructor(params) {
|
|
77404
|
+
super();
|
|
77405
|
+
this.classType = 'functions';
|
|
77406
|
+
this.className = 'messages.AddPollAnswer';
|
|
77407
|
+
this.constructorId = 0x19bc4b6d;
|
|
77408
|
+
this.subclassOfId = 0x8af52aac;
|
|
77409
|
+
this._slots = ['peer', 'msgId', 'answer'];
|
|
77410
|
+
this.peer = params.peer;
|
|
77411
|
+
this.msgId = params.msgId;
|
|
77412
|
+
this.answer = params.answer;
|
|
77413
|
+
}
|
|
77414
|
+
static async read(_data, ..._args) {
|
|
77415
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77416
|
+
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
77417
|
+
let answer = await index_js_1.TLObject.read(_data);
|
|
77418
|
+
return new Raw.messages.AddPollAnswer({ peer: peer, msgId: msgId, answer: answer });
|
|
77419
|
+
}
|
|
77420
|
+
write() {
|
|
77421
|
+
const b = new deps_js_1.BytesIO();
|
|
77422
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77423
|
+
if (this.peer !== undefined) {
|
|
77424
|
+
b.write(this.peer.write());
|
|
77425
|
+
}
|
|
77426
|
+
if (this.msgId !== undefined) {
|
|
77427
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
77428
|
+
}
|
|
77429
|
+
if (this.answer !== undefined) {
|
|
77430
|
+
b.write(this.answer.write());
|
|
77431
|
+
}
|
|
77432
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77433
|
+
}
|
|
77434
|
+
}
|
|
77435
|
+
messages_1.AddPollAnswer = AddPollAnswer;
|
|
77436
|
+
class DeletePollAnswer extends index_js_1.TLObject {
|
|
77437
|
+
__response__;
|
|
77438
|
+
peer;
|
|
77439
|
+
msgId;
|
|
77440
|
+
option;
|
|
77441
|
+
constructor(params) {
|
|
77442
|
+
super();
|
|
77443
|
+
this.classType = 'functions';
|
|
77444
|
+
this.className = 'messages.DeletePollAnswer';
|
|
77445
|
+
this.constructorId = 0xac8505a5;
|
|
77446
|
+
this.subclassOfId = 0x8af52aac;
|
|
77447
|
+
this._slots = ['peer', 'msgId', 'option'];
|
|
77448
|
+
this.peer = params.peer;
|
|
77449
|
+
this.msgId = params.msgId;
|
|
77450
|
+
this.option = params.option;
|
|
77451
|
+
}
|
|
77452
|
+
static async read(_data, ..._args) {
|
|
77453
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77454
|
+
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
77455
|
+
let option = await index_js_1.Primitive.Bytes.read(_data);
|
|
77456
|
+
return new Raw.messages.DeletePollAnswer({ peer: peer, msgId: msgId, option: option });
|
|
77457
|
+
}
|
|
77458
|
+
write() {
|
|
77459
|
+
const b = new deps_js_1.BytesIO();
|
|
77460
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77461
|
+
if (this.peer !== undefined) {
|
|
77462
|
+
b.write(this.peer.write());
|
|
77463
|
+
}
|
|
77464
|
+
if (this.msgId !== undefined) {
|
|
77465
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
77466
|
+
}
|
|
77467
|
+
if (this.option !== undefined) {
|
|
77468
|
+
b.write(index_js_1.Primitive.Bytes.write(this.option));
|
|
77469
|
+
}
|
|
77470
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77471
|
+
}
|
|
77472
|
+
}
|
|
77473
|
+
messages_1.DeletePollAnswer = DeletePollAnswer;
|
|
77474
|
+
class GetUnreadPollVotes extends index_js_1.TLObject {
|
|
77475
|
+
__response__;
|
|
77476
|
+
peer;
|
|
77477
|
+
topMsgId;
|
|
77478
|
+
offsetId;
|
|
77479
|
+
addOffset;
|
|
77480
|
+
limit;
|
|
77481
|
+
maxId;
|
|
77482
|
+
minId;
|
|
77483
|
+
constructor(params) {
|
|
77484
|
+
super();
|
|
77485
|
+
this.classType = 'functions';
|
|
77486
|
+
this.className = 'messages.GetUnreadPollVotes';
|
|
77487
|
+
this.constructorId = 0x43286cf2;
|
|
77488
|
+
this.subclassOfId = 0xd4b40b5e;
|
|
77489
|
+
this._slots = ['peer', 'topMsgId', 'offsetId', 'addOffset', 'limit', 'maxId', 'minId'];
|
|
77490
|
+
this.peer = params.peer;
|
|
77491
|
+
this.topMsgId = params.topMsgId;
|
|
77492
|
+
this.offsetId = params.offsetId;
|
|
77493
|
+
this.addOffset = params.addOffset;
|
|
77494
|
+
this.limit = params.limit;
|
|
77495
|
+
this.maxId = params.maxId;
|
|
77496
|
+
this.minId = params.minId;
|
|
77497
|
+
}
|
|
77498
|
+
static async read(_data, ..._args) {
|
|
77499
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
77500
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77501
|
+
let topMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
77502
|
+
let offsetId = await index_js_1.Primitive.Int.read(_data);
|
|
77503
|
+
let addOffset = await index_js_1.Primitive.Int.read(_data);
|
|
77504
|
+
let limit = await index_js_1.Primitive.Int.read(_data);
|
|
77505
|
+
let maxId = await index_js_1.Primitive.Int.read(_data);
|
|
77506
|
+
let minId = await index_js_1.Primitive.Int.read(_data);
|
|
77507
|
+
return new Raw.messages.GetUnreadPollVotes({
|
|
77508
|
+
peer: peer,
|
|
77509
|
+
topMsgId: topMsgId,
|
|
77510
|
+
offsetId: offsetId,
|
|
77511
|
+
addOffset: addOffset,
|
|
77512
|
+
limit: limit,
|
|
77513
|
+
maxId: maxId,
|
|
77514
|
+
minId: minId,
|
|
77515
|
+
});
|
|
77516
|
+
}
|
|
77517
|
+
write() {
|
|
77518
|
+
const b = new deps_js_1.BytesIO();
|
|
77519
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77520
|
+
let flags = 0;
|
|
77521
|
+
flags |= this.topMsgId !== undefined ? 1 << 0 : 0;
|
|
77522
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
77523
|
+
if (this.peer !== undefined) {
|
|
77524
|
+
b.write(this.peer.write());
|
|
77525
|
+
}
|
|
77526
|
+
if (this.topMsgId !== undefined) {
|
|
77527
|
+
b.write(index_js_1.Primitive.Int.write(this.topMsgId));
|
|
77528
|
+
}
|
|
77529
|
+
if (this.offsetId !== undefined) {
|
|
77530
|
+
b.write(index_js_1.Primitive.Int.write(this.offsetId));
|
|
77531
|
+
}
|
|
77532
|
+
if (this.addOffset !== undefined) {
|
|
77533
|
+
b.write(index_js_1.Primitive.Int.write(this.addOffset));
|
|
77534
|
+
}
|
|
77535
|
+
if (this.limit !== undefined) {
|
|
77536
|
+
b.write(index_js_1.Primitive.Int.write(this.limit));
|
|
77537
|
+
}
|
|
77538
|
+
if (this.maxId !== undefined) {
|
|
77539
|
+
b.write(index_js_1.Primitive.Int.write(this.maxId));
|
|
77540
|
+
}
|
|
77541
|
+
if (this.minId !== undefined) {
|
|
77542
|
+
b.write(index_js_1.Primitive.Int.write(this.minId));
|
|
77543
|
+
}
|
|
77544
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77545
|
+
}
|
|
77546
|
+
}
|
|
77547
|
+
messages_1.GetUnreadPollVotes = GetUnreadPollVotes;
|
|
77548
|
+
class ReadPollVotes extends index_js_1.TLObject {
|
|
77549
|
+
__response__;
|
|
77550
|
+
peer;
|
|
77551
|
+
topMsgId;
|
|
77552
|
+
constructor(params) {
|
|
77553
|
+
super();
|
|
77554
|
+
this.classType = 'functions';
|
|
77555
|
+
this.className = 'messages.ReadPollVotes';
|
|
77556
|
+
this.constructorId = 0x1720b4d8;
|
|
77557
|
+
this.subclassOfId = 0x2c49c116;
|
|
77558
|
+
this._slots = ['peer', 'topMsgId'];
|
|
77559
|
+
this.peer = params.peer;
|
|
77560
|
+
this.topMsgId = params.topMsgId;
|
|
77561
|
+
}
|
|
77562
|
+
static async read(_data, ..._args) {
|
|
77563
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
77564
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77565
|
+
let topMsgId = flags & (1 << 0) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
77566
|
+
return new Raw.messages.ReadPollVotes({ peer: peer, topMsgId: topMsgId });
|
|
77567
|
+
}
|
|
77568
|
+
write() {
|
|
77569
|
+
const b = new deps_js_1.BytesIO();
|
|
77570
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77571
|
+
let flags = 0;
|
|
77572
|
+
flags |= this.topMsgId !== undefined ? 1 << 0 : 0;
|
|
77573
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
77574
|
+
if (this.peer !== undefined) {
|
|
77575
|
+
b.write(this.peer.write());
|
|
77576
|
+
}
|
|
77577
|
+
if (this.topMsgId !== undefined) {
|
|
77578
|
+
b.write(index_js_1.Primitive.Int.write(this.topMsgId));
|
|
77579
|
+
}
|
|
77580
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77581
|
+
}
|
|
77582
|
+
}
|
|
77583
|
+
messages_1.ReadPollVotes = ReadPollVotes;
|
|
77584
|
+
class SetBotGuestChatResult extends index_js_1.TLObject {
|
|
77585
|
+
__response__;
|
|
77586
|
+
queryId;
|
|
77587
|
+
result;
|
|
77588
|
+
constructor(params) {
|
|
77589
|
+
super();
|
|
77590
|
+
this.classType = 'functions';
|
|
77591
|
+
this.className = 'messages.SetBotGuestChatResult';
|
|
77592
|
+
this.constructorId = 0x52b08db;
|
|
77593
|
+
this.subclassOfId = 0xf5b399ac;
|
|
77594
|
+
this._slots = ['queryId', 'result'];
|
|
77595
|
+
this.queryId = params.queryId;
|
|
77596
|
+
this.result = params.result;
|
|
77597
|
+
}
|
|
77598
|
+
static async read(_data, ..._args) {
|
|
77599
|
+
let queryId = await index_js_1.Primitive.Long.read(_data);
|
|
77600
|
+
let result = await index_js_1.TLObject.read(_data);
|
|
77601
|
+
return new Raw.messages.SetBotGuestChatResult({ queryId: queryId, result: result });
|
|
77602
|
+
}
|
|
77603
|
+
write() {
|
|
77604
|
+
const b = new deps_js_1.BytesIO();
|
|
77605
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77606
|
+
if (this.queryId !== undefined) {
|
|
77607
|
+
b.write(index_js_1.Primitive.Long.write(this.queryId));
|
|
77608
|
+
}
|
|
77609
|
+
if (this.result !== undefined) {
|
|
77610
|
+
b.write(this.result.write());
|
|
77611
|
+
}
|
|
77612
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77613
|
+
}
|
|
77614
|
+
}
|
|
77615
|
+
messages_1.SetBotGuestChatResult = SetBotGuestChatResult;
|
|
77616
|
+
class DeleteParticipantReactions extends index_js_1.TLObject {
|
|
77617
|
+
__response__;
|
|
77618
|
+
peer;
|
|
77619
|
+
participant;
|
|
77620
|
+
constructor(params) {
|
|
77621
|
+
super();
|
|
77622
|
+
this.classType = 'functions';
|
|
77623
|
+
this.className = 'messages.DeleteParticipantReactions';
|
|
77624
|
+
this.constructorId = 0xa0b80cf8;
|
|
77625
|
+
this.subclassOfId = 0xf5b399ac;
|
|
77626
|
+
this._slots = ['peer', 'participant'];
|
|
77627
|
+
this.peer = params.peer;
|
|
77628
|
+
this.participant = params.participant;
|
|
77629
|
+
}
|
|
77630
|
+
static async read(_data, ..._args) {
|
|
77631
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77632
|
+
let participant = await index_js_1.TLObject.read(_data);
|
|
77633
|
+
return new Raw.messages.DeleteParticipantReactions({
|
|
77634
|
+
peer: peer,
|
|
77635
|
+
participant: participant,
|
|
77636
|
+
});
|
|
77637
|
+
}
|
|
77638
|
+
write() {
|
|
77639
|
+
const b = new deps_js_1.BytesIO();
|
|
77640
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77641
|
+
if (this.peer !== undefined) {
|
|
77642
|
+
b.write(this.peer.write());
|
|
77643
|
+
}
|
|
77644
|
+
if (this.participant !== undefined) {
|
|
77645
|
+
b.write(this.participant.write());
|
|
77646
|
+
}
|
|
77647
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77648
|
+
}
|
|
77649
|
+
}
|
|
77650
|
+
messages_1.DeleteParticipantReactions = DeleteParticipantReactions;
|
|
77651
|
+
class DeleteParticipantReaction extends index_js_1.TLObject {
|
|
77652
|
+
__response__;
|
|
77653
|
+
peer;
|
|
77654
|
+
msgId;
|
|
77655
|
+
participant;
|
|
77656
|
+
constructor(params) {
|
|
77657
|
+
super();
|
|
77658
|
+
this.classType = 'functions';
|
|
77659
|
+
this.className = 'messages.DeleteParticipantReaction';
|
|
77660
|
+
this.constructorId = 0xe3b7f82c;
|
|
77661
|
+
this.subclassOfId = 0x8af52aac;
|
|
77662
|
+
this._slots = ['peer', 'msgId', 'participant'];
|
|
77663
|
+
this.peer = params.peer;
|
|
77664
|
+
this.msgId = params.msgId;
|
|
77665
|
+
this.participant = params.participant;
|
|
77666
|
+
}
|
|
77667
|
+
static async read(_data, ..._args) {
|
|
77668
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
77669
|
+
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
77670
|
+
let participant = await index_js_1.TLObject.read(_data);
|
|
77671
|
+
return new Raw.messages.DeleteParticipantReaction({
|
|
77672
|
+
peer: peer,
|
|
77673
|
+
msgId: msgId,
|
|
77674
|
+
participant: participant,
|
|
77675
|
+
});
|
|
77676
|
+
}
|
|
77677
|
+
write() {
|
|
77678
|
+
const b = new deps_js_1.BytesIO();
|
|
77679
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77680
|
+
if (this.peer !== undefined) {
|
|
77681
|
+
b.write(this.peer.write());
|
|
77682
|
+
}
|
|
77683
|
+
if (this.msgId !== undefined) {
|
|
77684
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
77685
|
+
}
|
|
77686
|
+
if (this.participant !== undefined) {
|
|
77687
|
+
b.write(this.participant.write());
|
|
77688
|
+
}
|
|
77689
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77690
|
+
}
|
|
77691
|
+
}
|
|
77692
|
+
messages_1.DeleteParticipantReaction = DeleteParticipantReaction;
|
|
77693
|
+
class GetPersonalChannelHistory extends index_js_1.TLObject {
|
|
77694
|
+
__response__;
|
|
77695
|
+
userId;
|
|
77696
|
+
limit;
|
|
77697
|
+
maxId;
|
|
77698
|
+
minId;
|
|
77699
|
+
hash;
|
|
77700
|
+
constructor(params) {
|
|
77701
|
+
super();
|
|
77702
|
+
this.classType = 'functions';
|
|
77703
|
+
this.className = 'messages.GetPersonalChannelHistory';
|
|
77704
|
+
this.constructorId = 0x55fb0996;
|
|
77705
|
+
this.subclassOfId = 0xd4b40b5e;
|
|
77706
|
+
this._slots = ['userId', 'limit', 'maxId', 'minId', 'hash'];
|
|
77707
|
+
this.userId = params.userId;
|
|
77708
|
+
this.limit = params.limit;
|
|
77709
|
+
this.maxId = params.maxId;
|
|
77710
|
+
this.minId = params.minId;
|
|
77711
|
+
this.hash = params.hash;
|
|
77712
|
+
}
|
|
77713
|
+
static async read(_data, ..._args) {
|
|
77714
|
+
let userId = await index_js_1.TLObject.read(_data);
|
|
77715
|
+
let limit = await index_js_1.Primitive.Int.read(_data);
|
|
77716
|
+
let maxId = await index_js_1.Primitive.Int.read(_data);
|
|
77717
|
+
let minId = await index_js_1.Primitive.Int.read(_data);
|
|
77718
|
+
let hash = await index_js_1.Primitive.Long.read(_data);
|
|
77719
|
+
return new Raw.messages.GetPersonalChannelHistory({
|
|
77720
|
+
userId: userId,
|
|
77721
|
+
limit: limit,
|
|
77722
|
+
maxId: maxId,
|
|
77723
|
+
minId: minId,
|
|
77724
|
+
hash: hash,
|
|
77725
|
+
});
|
|
77726
|
+
}
|
|
77727
|
+
write() {
|
|
77728
|
+
const b = new deps_js_1.BytesIO();
|
|
77729
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
77730
|
+
if (this.userId !== undefined) {
|
|
77731
|
+
b.write(this.userId.write());
|
|
77732
|
+
}
|
|
77733
|
+
if (this.limit !== undefined) {
|
|
77734
|
+
b.write(index_js_1.Primitive.Int.write(this.limit));
|
|
77735
|
+
}
|
|
77736
|
+
if (this.maxId !== undefined) {
|
|
77737
|
+
b.write(index_js_1.Primitive.Int.write(this.maxId));
|
|
77738
|
+
}
|
|
77739
|
+
if (this.minId !== undefined) {
|
|
77740
|
+
b.write(index_js_1.Primitive.Int.write(this.minId));
|
|
77741
|
+
}
|
|
77742
|
+
if (this.hash !== undefined) {
|
|
77743
|
+
b.write(index_js_1.Primitive.Long.write(this.hash));
|
|
77744
|
+
}
|
|
77745
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
77746
|
+
}
|
|
77747
|
+
}
|
|
77748
|
+
messages_1.GetPersonalChannelHistory = GetPersonalChannelHistory;
|
|
76078
77749
|
})(messages = Raw.messages || (Raw.messages = {}));
|
|
76079
77750
|
let updates;
|
|
76080
77751
|
(function (updates) {
|
|
@@ -88768,6 +90439,7 @@ var Raw;
|
|
|
88768
90439
|
sortByPrice;
|
|
88769
90440
|
sortByNum;
|
|
88770
90441
|
forCraft;
|
|
90442
|
+
starsOnly;
|
|
88771
90443
|
attributesHash;
|
|
88772
90444
|
giftId;
|
|
88773
90445
|
attributes;
|
|
@@ -88783,6 +90455,7 @@ var Raw;
|
|
|
88783
90455
|
'sortByPrice',
|
|
88784
90456
|
'sortByNum',
|
|
88785
90457
|
'forCraft',
|
|
90458
|
+
'starsOnly',
|
|
88786
90459
|
'attributesHash',
|
|
88787
90460
|
'giftId',
|
|
88788
90461
|
'attributes',
|
|
@@ -88792,6 +90465,7 @@ var Raw;
|
|
|
88792
90465
|
this.sortByPrice = params.sortByPrice;
|
|
88793
90466
|
this.sortByNum = params.sortByNum;
|
|
88794
90467
|
this.forCraft = params.forCraft;
|
|
90468
|
+
this.starsOnly = params.starsOnly;
|
|
88795
90469
|
this.attributesHash = params.attributesHash;
|
|
88796
90470
|
this.giftId = params.giftId;
|
|
88797
90471
|
this.attributes = params.attributes;
|
|
@@ -88803,6 +90477,7 @@ var Raw;
|
|
|
88803
90477
|
let sortByPrice = flags & (1 << 1) ? true : false;
|
|
88804
90478
|
let sortByNum = flags & (1 << 2) ? true : false;
|
|
88805
90479
|
let forCraft = flags & (1 << 4) ? true : false;
|
|
90480
|
+
let starsOnly = flags & (1 << 5) ? true : false;
|
|
88806
90481
|
let attributesHash = flags & (1 << 0) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
88807
90482
|
let giftId = await index_js_1.Primitive.Long.read(_data);
|
|
88808
90483
|
let attributes = flags & (1 << 3) ? await index_js_1.TLObject.read(_data) : [];
|
|
@@ -88812,6 +90487,7 @@ var Raw;
|
|
|
88812
90487
|
sortByPrice: sortByPrice,
|
|
88813
90488
|
sortByNum: sortByNum,
|
|
88814
90489
|
forCraft: forCraft,
|
|
90490
|
+
starsOnly: starsOnly,
|
|
88815
90491
|
attributesHash: attributesHash,
|
|
88816
90492
|
giftId: giftId,
|
|
88817
90493
|
attributes: attributes,
|
|
@@ -88826,6 +90502,7 @@ var Raw;
|
|
|
88826
90502
|
flags |= this.sortByPrice ? 1 << 1 : 0;
|
|
88827
90503
|
flags |= this.sortByNum ? 1 << 2 : 0;
|
|
88828
90504
|
flags |= this.forCraft ? 1 << 4 : 0;
|
|
90505
|
+
flags |= this.starsOnly ? 1 << 5 : 0;
|
|
88829
90506
|
flags |= this.attributesHash !== undefined ? 1 << 0 : 0;
|
|
88830
90507
|
flags |= this.attributes ? 1 << 3 : 0;
|
|
88831
90508
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
@@ -92015,6 +93692,31 @@ var Raw;
|
|
|
92015
93692
|
}
|
|
92016
93693
|
}
|
|
92017
93694
|
stats.PublicForwards = PublicForwards;
|
|
93695
|
+
class PollStats extends index_js_1.TLObject {
|
|
93696
|
+
votesGraph;
|
|
93697
|
+
constructor(params) {
|
|
93698
|
+
super();
|
|
93699
|
+
this.classType = 'types';
|
|
93700
|
+
this.className = 'stats.PollStats';
|
|
93701
|
+
this.constructorId = 0x2999beed;
|
|
93702
|
+
this.subclassOfId = 0xe95194cf;
|
|
93703
|
+
this._slots = ['votesGraph'];
|
|
93704
|
+
this.votesGraph = params.votesGraph;
|
|
93705
|
+
}
|
|
93706
|
+
static async read(_data, ..._args) {
|
|
93707
|
+
let votesGraph = await index_js_1.TLObject.read(_data);
|
|
93708
|
+
return new Raw.stats.PollStats({ votesGraph: votesGraph });
|
|
93709
|
+
}
|
|
93710
|
+
write() {
|
|
93711
|
+
const b = new deps_js_1.BytesIO();
|
|
93712
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
93713
|
+
if (this.votesGraph !== undefined) {
|
|
93714
|
+
b.write(this.votesGraph.write());
|
|
93715
|
+
}
|
|
93716
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
93717
|
+
}
|
|
93718
|
+
}
|
|
93719
|
+
stats.PollStats = PollStats;
|
|
92018
93720
|
class GetBroadcastStats extends index_js_1.TLObject {
|
|
92019
93721
|
__response__;
|
|
92020
93722
|
dark;
|
|
@@ -92293,6 +93995,45 @@ var Raw;
|
|
|
92293
93995
|
}
|
|
92294
93996
|
}
|
|
92295
93997
|
stats.GetStoryPublicForwards = GetStoryPublicForwards;
|
|
93998
|
+
class GetPollStats extends index_js_1.TLObject {
|
|
93999
|
+
__response__;
|
|
94000
|
+
dark;
|
|
94001
|
+
peer;
|
|
94002
|
+
msgId;
|
|
94003
|
+
constructor(params) {
|
|
94004
|
+
super();
|
|
94005
|
+
this.classType = 'functions';
|
|
94006
|
+
this.className = 'stats.GetPollStats';
|
|
94007
|
+
this.constructorId = 0xc27dfa68;
|
|
94008
|
+
this.subclassOfId = 0xe95194cf;
|
|
94009
|
+
this._slots = ['dark', 'peer', 'msgId'];
|
|
94010
|
+
this.dark = params.dark;
|
|
94011
|
+
this.peer = params.peer;
|
|
94012
|
+
this.msgId = params.msgId;
|
|
94013
|
+
}
|
|
94014
|
+
static async read(_data, ..._args) {
|
|
94015
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
94016
|
+
let dark = flags & (1 << 0) ? true : false;
|
|
94017
|
+
let peer = await index_js_1.TLObject.read(_data);
|
|
94018
|
+
let msgId = await index_js_1.Primitive.Int.read(_data);
|
|
94019
|
+
return new Raw.stats.GetPollStats({ dark: dark, peer: peer, msgId: msgId });
|
|
94020
|
+
}
|
|
94021
|
+
write() {
|
|
94022
|
+
const b = new deps_js_1.BytesIO();
|
|
94023
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
94024
|
+
let flags = 0;
|
|
94025
|
+
flags |= this.dark ? 1 << 0 : 0;
|
|
94026
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
94027
|
+
if (this.peer !== undefined) {
|
|
94028
|
+
b.write(this.peer.write());
|
|
94029
|
+
}
|
|
94030
|
+
if (this.msgId !== undefined) {
|
|
94031
|
+
b.write(index_js_1.Primitive.Int.write(this.msgId));
|
|
94032
|
+
}
|
|
94033
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
94034
|
+
}
|
|
94035
|
+
}
|
|
94036
|
+
stats.GetPollStats = GetPollStats;
|
|
92296
94037
|
})(stats = Raw.stats || (Raw.stats = {}));
|
|
92297
94038
|
let stickers;
|
|
92298
94039
|
(function (stickers_1) {
|
|
@@ -93809,6 +95550,89 @@ var Raw;
|
|
|
93809
95550
|
}
|
|
93810
95551
|
}
|
|
93811
95552
|
bots.PreviewInfo = PreviewInfo;
|
|
95553
|
+
class ExportedBotToken extends index_js_1.TLObject {
|
|
95554
|
+
token;
|
|
95555
|
+
constructor(params) {
|
|
95556
|
+
super();
|
|
95557
|
+
this.classType = 'types';
|
|
95558
|
+
this.className = 'bots.ExportedBotToken';
|
|
95559
|
+
this.constructorId = 0x3c60b621;
|
|
95560
|
+
this.subclassOfId = 0x78496c77;
|
|
95561
|
+
this._slots = ['token'];
|
|
95562
|
+
this.token = params.token;
|
|
95563
|
+
}
|
|
95564
|
+
static async read(_data, ..._args) {
|
|
95565
|
+
let token = await index_js_1.Primitive.String.read(_data);
|
|
95566
|
+
return new Raw.bots.ExportedBotToken({ token: token });
|
|
95567
|
+
}
|
|
95568
|
+
write() {
|
|
95569
|
+
const b = new deps_js_1.BytesIO();
|
|
95570
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
95571
|
+
if (this.token !== undefined) {
|
|
95572
|
+
b.write(index_js_1.Primitive.String.write(this.token));
|
|
95573
|
+
}
|
|
95574
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
95575
|
+
}
|
|
95576
|
+
}
|
|
95577
|
+
bots.ExportedBotToken = ExportedBotToken;
|
|
95578
|
+
class RequestedButton extends index_js_1.TLObject {
|
|
95579
|
+
webappReqId;
|
|
95580
|
+
constructor(params) {
|
|
95581
|
+
super();
|
|
95582
|
+
this.classType = 'types';
|
|
95583
|
+
this.className = 'bots.RequestedButton';
|
|
95584
|
+
this.constructorId = 0xf13bbcd7;
|
|
95585
|
+
this.subclassOfId = 0xf9df53a;
|
|
95586
|
+
this._slots = ['webappReqId'];
|
|
95587
|
+
this.webappReqId = params.webappReqId;
|
|
95588
|
+
}
|
|
95589
|
+
static async read(_data, ..._args) {
|
|
95590
|
+
let webappReqId = await index_js_1.Primitive.String.read(_data);
|
|
95591
|
+
return new Raw.bots.RequestedButton({ webappReqId: webappReqId });
|
|
95592
|
+
}
|
|
95593
|
+
write() {
|
|
95594
|
+
const b = new deps_js_1.BytesIO();
|
|
95595
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
95596
|
+
if (this.webappReqId !== undefined) {
|
|
95597
|
+
b.write(index_js_1.Primitive.String.write(this.webappReqId));
|
|
95598
|
+
}
|
|
95599
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
95600
|
+
}
|
|
95601
|
+
}
|
|
95602
|
+
bots.RequestedButton = RequestedButton;
|
|
95603
|
+
class AccessSettings extends index_js_1.TLObject {
|
|
95604
|
+
restricted;
|
|
95605
|
+
addUsers;
|
|
95606
|
+
constructor(params) {
|
|
95607
|
+
super();
|
|
95608
|
+
this.classType = 'types';
|
|
95609
|
+
this.className = 'bots.AccessSettings';
|
|
95610
|
+
this.constructorId = 0xdd1fbf93;
|
|
95611
|
+
this.subclassOfId = 0xeca109c2;
|
|
95612
|
+
this._slots = ['restricted', 'addUsers'];
|
|
95613
|
+
this.restricted = params.restricted;
|
|
95614
|
+
this.addUsers = params.addUsers;
|
|
95615
|
+
}
|
|
95616
|
+
static async read(_data, ..._args) {
|
|
95617
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
95618
|
+
let restricted = flags & (1 << 0) ? true : false;
|
|
95619
|
+
let addUsers = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
95620
|
+
return new Raw.bots.AccessSettings({ restricted: restricted, addUsers: addUsers });
|
|
95621
|
+
}
|
|
95622
|
+
write() {
|
|
95623
|
+
const b = new deps_js_1.BytesIO();
|
|
95624
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
95625
|
+
let flags = 0;
|
|
95626
|
+
flags |= this.restricted ? 1 << 0 : 0;
|
|
95627
|
+
flags |= this.addUsers ? 1 << 1 : 0;
|
|
95628
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
95629
|
+
if (this.addUsers) {
|
|
95630
|
+
b.write(index_js_1.Primitive.Vector.write(this.addUsers));
|
|
95631
|
+
}
|
|
95632
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
95633
|
+
}
|
|
95634
|
+
}
|
|
95635
|
+
bots.AccessSettings = AccessSettings;
|
|
93812
95636
|
class SendCustomRequest extends index_js_1.TLObject {
|
|
93813
95637
|
__response__;
|
|
93814
95638
|
customMethod;
|
|
@@ -94851,6 +96675,248 @@ var Raw;
|
|
|
94851
96675
|
}
|
|
94852
96676
|
}
|
|
94853
96677
|
bots.GetBotRecommendations = GetBotRecommendations;
|
|
96678
|
+
class CheckUsername extends index_js_1.TLObject {
|
|
96679
|
+
__response__;
|
|
96680
|
+
username;
|
|
96681
|
+
constructor(params) {
|
|
96682
|
+
super();
|
|
96683
|
+
this.classType = 'functions';
|
|
96684
|
+
this.className = 'bots.CheckUsername';
|
|
96685
|
+
this.constructorId = 0x87f2219b;
|
|
96686
|
+
this.subclassOfId = 0xf5b399ac;
|
|
96687
|
+
this._slots = ['username'];
|
|
96688
|
+
this.username = params.username;
|
|
96689
|
+
}
|
|
96690
|
+
static async read(_data, ..._args) {
|
|
96691
|
+
let username = await index_js_1.Primitive.String.read(_data);
|
|
96692
|
+
return new Raw.bots.CheckUsername({ username: username });
|
|
96693
|
+
}
|
|
96694
|
+
write() {
|
|
96695
|
+
const b = new deps_js_1.BytesIO();
|
|
96696
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96697
|
+
if (this.username !== undefined) {
|
|
96698
|
+
b.write(index_js_1.Primitive.String.write(this.username));
|
|
96699
|
+
}
|
|
96700
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96701
|
+
}
|
|
96702
|
+
}
|
|
96703
|
+
bots.CheckUsername = CheckUsername;
|
|
96704
|
+
class CreateBot extends index_js_1.TLObject {
|
|
96705
|
+
__response__;
|
|
96706
|
+
viaDeeplink;
|
|
96707
|
+
name;
|
|
96708
|
+
username;
|
|
96709
|
+
managerId;
|
|
96710
|
+
constructor(params) {
|
|
96711
|
+
super();
|
|
96712
|
+
this.classType = 'functions';
|
|
96713
|
+
this.className = 'bots.CreateBot';
|
|
96714
|
+
this.constructorId = 0xe5b17f2b;
|
|
96715
|
+
this.subclassOfId = 0x2da17977;
|
|
96716
|
+
this._slots = ['viaDeeplink', 'name', 'username', 'managerId'];
|
|
96717
|
+
this.viaDeeplink = params.viaDeeplink;
|
|
96718
|
+
this.name = params.name;
|
|
96719
|
+
this.username = params.username;
|
|
96720
|
+
this.managerId = params.managerId;
|
|
96721
|
+
}
|
|
96722
|
+
static async read(_data, ..._args) {
|
|
96723
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
96724
|
+
let viaDeeplink = flags & (1 << 0) ? true : false;
|
|
96725
|
+
let name = await index_js_1.Primitive.String.read(_data);
|
|
96726
|
+
let username = await index_js_1.Primitive.String.read(_data);
|
|
96727
|
+
let managerId = await index_js_1.TLObject.read(_data);
|
|
96728
|
+
return new Raw.bots.CreateBot({
|
|
96729
|
+
viaDeeplink: viaDeeplink,
|
|
96730
|
+
name: name,
|
|
96731
|
+
username: username,
|
|
96732
|
+
managerId: managerId,
|
|
96733
|
+
});
|
|
96734
|
+
}
|
|
96735
|
+
write() {
|
|
96736
|
+
const b = new deps_js_1.BytesIO();
|
|
96737
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96738
|
+
let flags = 0;
|
|
96739
|
+
flags |= this.viaDeeplink ? 1 << 0 : 0;
|
|
96740
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
96741
|
+
if (this.name !== undefined) {
|
|
96742
|
+
b.write(index_js_1.Primitive.String.write(this.name));
|
|
96743
|
+
}
|
|
96744
|
+
if (this.username !== undefined) {
|
|
96745
|
+
b.write(index_js_1.Primitive.String.write(this.username));
|
|
96746
|
+
}
|
|
96747
|
+
if (this.managerId !== undefined) {
|
|
96748
|
+
b.write(this.managerId.write());
|
|
96749
|
+
}
|
|
96750
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96751
|
+
}
|
|
96752
|
+
}
|
|
96753
|
+
bots.CreateBot = CreateBot;
|
|
96754
|
+
class ExportBotToken extends index_js_1.TLObject {
|
|
96755
|
+
__response__;
|
|
96756
|
+
bot;
|
|
96757
|
+
revoke;
|
|
96758
|
+
constructor(params) {
|
|
96759
|
+
super();
|
|
96760
|
+
this.classType = 'functions';
|
|
96761
|
+
this.className = 'bots.ExportBotToken';
|
|
96762
|
+
this.constructorId = 0xbd0d99eb;
|
|
96763
|
+
this.subclassOfId = 0x78496c77;
|
|
96764
|
+
this._slots = ['bot', 'revoke'];
|
|
96765
|
+
this.bot = params.bot;
|
|
96766
|
+
this.revoke = params.revoke;
|
|
96767
|
+
}
|
|
96768
|
+
static async read(_data, ..._args) {
|
|
96769
|
+
let bot = await index_js_1.TLObject.read(_data);
|
|
96770
|
+
let revoke = await index_js_1.Primitive.Bool.read(_data);
|
|
96771
|
+
return new Raw.bots.ExportBotToken({ bot: bot, revoke: revoke });
|
|
96772
|
+
}
|
|
96773
|
+
write() {
|
|
96774
|
+
const b = new deps_js_1.BytesIO();
|
|
96775
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96776
|
+
if (this.bot !== undefined) {
|
|
96777
|
+
b.write(this.bot.write());
|
|
96778
|
+
}
|
|
96779
|
+
if (this.revoke !== undefined) {
|
|
96780
|
+
b.write(index_js_1.Primitive.Bool.write(this.revoke));
|
|
96781
|
+
}
|
|
96782
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96783
|
+
}
|
|
96784
|
+
}
|
|
96785
|
+
bots.ExportBotToken = ExportBotToken;
|
|
96786
|
+
class RequestWebViewButton extends index_js_1.TLObject {
|
|
96787
|
+
__response__;
|
|
96788
|
+
userId;
|
|
96789
|
+
button;
|
|
96790
|
+
constructor(params) {
|
|
96791
|
+
super();
|
|
96792
|
+
this.classType = 'functions';
|
|
96793
|
+
this.className = 'bots.RequestWebViewButton';
|
|
96794
|
+
this.constructorId = 0x31a2a35e;
|
|
96795
|
+
this.subclassOfId = 0xf9df53a;
|
|
96796
|
+
this._slots = ['userId', 'button'];
|
|
96797
|
+
this.userId = params.userId;
|
|
96798
|
+
this.button = params.button;
|
|
96799
|
+
}
|
|
96800
|
+
static async read(_data, ..._args) {
|
|
96801
|
+
let userId = await index_js_1.TLObject.read(_data);
|
|
96802
|
+
let button = await index_js_1.TLObject.read(_data);
|
|
96803
|
+
return new Raw.bots.RequestWebViewButton({ userId: userId, button: button });
|
|
96804
|
+
}
|
|
96805
|
+
write() {
|
|
96806
|
+
const b = new deps_js_1.BytesIO();
|
|
96807
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96808
|
+
if (this.userId !== undefined) {
|
|
96809
|
+
b.write(this.userId.write());
|
|
96810
|
+
}
|
|
96811
|
+
if (this.button !== undefined) {
|
|
96812
|
+
b.write(this.button.write());
|
|
96813
|
+
}
|
|
96814
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96815
|
+
}
|
|
96816
|
+
}
|
|
96817
|
+
bots.RequestWebViewButton = RequestWebViewButton;
|
|
96818
|
+
class GetRequestedWebViewButton extends index_js_1.TLObject {
|
|
96819
|
+
__response__;
|
|
96820
|
+
bot;
|
|
96821
|
+
webappReqId;
|
|
96822
|
+
constructor(params) {
|
|
96823
|
+
super();
|
|
96824
|
+
this.classType = 'functions';
|
|
96825
|
+
this.className = 'bots.GetRequestedWebViewButton';
|
|
96826
|
+
this.constructorId = 0xbf25b7f3;
|
|
96827
|
+
this.subclassOfId = 0xbad74a3;
|
|
96828
|
+
this._slots = ['bot', 'webappReqId'];
|
|
96829
|
+
this.bot = params.bot;
|
|
96830
|
+
this.webappReqId = params.webappReqId;
|
|
96831
|
+
}
|
|
96832
|
+
static async read(_data, ..._args) {
|
|
96833
|
+
let bot = await index_js_1.TLObject.read(_data);
|
|
96834
|
+
let webappReqId = await index_js_1.Primitive.String.read(_data);
|
|
96835
|
+
return new Raw.bots.GetRequestedWebViewButton({ bot: bot, webappReqId: webappReqId });
|
|
96836
|
+
}
|
|
96837
|
+
write() {
|
|
96838
|
+
const b = new deps_js_1.BytesIO();
|
|
96839
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96840
|
+
if (this.bot !== undefined) {
|
|
96841
|
+
b.write(this.bot.write());
|
|
96842
|
+
}
|
|
96843
|
+
if (this.webappReqId !== undefined) {
|
|
96844
|
+
b.write(index_js_1.Primitive.String.write(this.webappReqId));
|
|
96845
|
+
}
|
|
96846
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96847
|
+
}
|
|
96848
|
+
}
|
|
96849
|
+
bots.GetRequestedWebViewButton = GetRequestedWebViewButton;
|
|
96850
|
+
class GetAccessSettings extends index_js_1.TLObject {
|
|
96851
|
+
__response__;
|
|
96852
|
+
bot;
|
|
96853
|
+
constructor(params) {
|
|
96854
|
+
super();
|
|
96855
|
+
this.classType = 'functions';
|
|
96856
|
+
this.className = 'bots.GetAccessSettings';
|
|
96857
|
+
this.constructorId = 0x213853a3;
|
|
96858
|
+
this.subclassOfId = 0xeca109c2;
|
|
96859
|
+
this._slots = ['bot'];
|
|
96860
|
+
this.bot = params.bot;
|
|
96861
|
+
}
|
|
96862
|
+
static async read(_data, ..._args) {
|
|
96863
|
+
let bot = await index_js_1.TLObject.read(_data);
|
|
96864
|
+
return new Raw.bots.GetAccessSettings({ bot: bot });
|
|
96865
|
+
}
|
|
96866
|
+
write() {
|
|
96867
|
+
const b = new deps_js_1.BytesIO();
|
|
96868
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96869
|
+
if (this.bot !== undefined) {
|
|
96870
|
+
b.write(this.bot.write());
|
|
96871
|
+
}
|
|
96872
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96873
|
+
}
|
|
96874
|
+
}
|
|
96875
|
+
bots.GetAccessSettings = GetAccessSettings;
|
|
96876
|
+
class EditAccessSettings extends index_js_1.TLObject {
|
|
96877
|
+
__response__;
|
|
96878
|
+
restricted;
|
|
96879
|
+
bot;
|
|
96880
|
+
addUsers;
|
|
96881
|
+
constructor(params) {
|
|
96882
|
+
super();
|
|
96883
|
+
this.classType = 'functions';
|
|
96884
|
+
this.className = 'bots.EditAccessSettings';
|
|
96885
|
+
this.constructorId = 0x31813cd8;
|
|
96886
|
+
this.subclassOfId = 0xf5b399ac;
|
|
96887
|
+
this._slots = ['restricted', 'bot', 'addUsers'];
|
|
96888
|
+
this.restricted = params.restricted;
|
|
96889
|
+
this.bot = params.bot;
|
|
96890
|
+
this.addUsers = params.addUsers;
|
|
96891
|
+
}
|
|
96892
|
+
static async read(_data, ..._args) {
|
|
96893
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
96894
|
+
let restricted = flags & (1 << 0) ? true : false;
|
|
96895
|
+
let bot = await index_js_1.TLObject.read(_data);
|
|
96896
|
+
let addUsers = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
96897
|
+
return new Raw.bots.EditAccessSettings({
|
|
96898
|
+
restricted: restricted,
|
|
96899
|
+
bot: bot,
|
|
96900
|
+
addUsers: addUsers,
|
|
96901
|
+
});
|
|
96902
|
+
}
|
|
96903
|
+
write() {
|
|
96904
|
+
const b = new deps_js_1.BytesIO();
|
|
96905
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
96906
|
+
let flags = 0;
|
|
96907
|
+
flags |= this.restricted ? 1 << 0 : 0;
|
|
96908
|
+
flags |= this.addUsers ? 1 << 1 : 0;
|
|
96909
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
96910
|
+
if (this.bot !== undefined) {
|
|
96911
|
+
b.write(this.bot.write());
|
|
96912
|
+
}
|
|
96913
|
+
if (this.addUsers) {
|
|
96914
|
+
b.write(index_js_1.Primitive.Vector.write(this.addUsers));
|
|
96915
|
+
}
|
|
96916
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
96917
|
+
}
|
|
96918
|
+
}
|
|
96919
|
+
bots.EditAccessSettings = EditAccessSettings;
|
|
94854
96920
|
})(bots = Raw.bots || (Raw.bots = {}));
|
|
94855
96921
|
let stories;
|
|
94856
96922
|
(function (stories_1) {
|
|
@@ -95409,11 +97475,12 @@ var Raw;
|
|
|
95409
97475
|
fwdFromId;
|
|
95410
97476
|
fwdFromStory;
|
|
95411
97477
|
albums;
|
|
97478
|
+
music;
|
|
95412
97479
|
constructor(params) {
|
|
95413
97480
|
super();
|
|
95414
97481
|
this.classType = 'functions';
|
|
95415
97482
|
this.className = 'stories.SendStory';
|
|
95416
|
-
this.constructorId =
|
|
97483
|
+
this.constructorId = 0x8f9e6898;
|
|
95417
97484
|
this.subclassOfId = 0x8af52aac;
|
|
95418
97485
|
this._slots = [
|
|
95419
97486
|
'pinned',
|
|
@@ -95430,6 +97497,7 @@ var Raw;
|
|
|
95430
97497
|
'fwdFromId',
|
|
95431
97498
|
'fwdFromStory',
|
|
95432
97499
|
'albums',
|
|
97500
|
+
'music',
|
|
95433
97501
|
];
|
|
95434
97502
|
this.pinned = params.pinned;
|
|
95435
97503
|
this.noforwards = params.noforwards;
|
|
@@ -95445,6 +97513,7 @@ var Raw;
|
|
|
95445
97513
|
this.fwdFromId = params.fwdFromId;
|
|
95446
97514
|
this.fwdFromStory = params.fwdFromStory;
|
|
95447
97515
|
this.albums = params.albums;
|
|
97516
|
+
this.music = params.music;
|
|
95448
97517
|
}
|
|
95449
97518
|
static async read(_data, ..._args) {
|
|
95450
97519
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -95462,6 +97531,7 @@ var Raw;
|
|
|
95462
97531
|
let fwdFromId = flags & (1 << 6) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
95463
97532
|
let fwdFromStory = flags & (1 << 6) ? await index_js_1.Primitive.Int.read(_data) : undefined;
|
|
95464
97533
|
let albums = flags & (1 << 8) ? await index_js_1.TLObject.read(_data, index_js_1.Primitive.Int) : [];
|
|
97534
|
+
let music = flags & (1 << 9) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
95465
97535
|
return new Raw.stories.SendStory({
|
|
95466
97536
|
pinned: pinned,
|
|
95467
97537
|
noforwards: noforwards,
|
|
@@ -95477,6 +97547,7 @@ var Raw;
|
|
|
95477
97547
|
fwdFromId: fwdFromId,
|
|
95478
97548
|
fwdFromStory: fwdFromStory,
|
|
95479
97549
|
albums: albums,
|
|
97550
|
+
music: music,
|
|
95480
97551
|
});
|
|
95481
97552
|
}
|
|
95482
97553
|
write() {
|
|
@@ -95493,6 +97564,7 @@ var Raw;
|
|
|
95493
97564
|
flags |= this.fwdFromId !== undefined ? 1 << 6 : 0;
|
|
95494
97565
|
flags |= this.fwdFromStory !== undefined ? 1 << 6 : 0;
|
|
95495
97566
|
flags |= this.albums ? 1 << 8 : 0;
|
|
97567
|
+
flags |= this.music !== undefined ? 1 << 9 : 0;
|
|
95496
97568
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
95497
97569
|
if (this.peer !== undefined) {
|
|
95498
97570
|
b.write(this.peer.write());
|
|
@@ -95527,6 +97599,9 @@ var Raw;
|
|
|
95527
97599
|
if (this.albums) {
|
|
95528
97600
|
b.write(index_js_1.Primitive.Vector.write(this.albums, index_js_1.Primitive.Int));
|
|
95529
97601
|
}
|
|
97602
|
+
if (this.music !== undefined) {
|
|
97603
|
+
b.write(this.music.write());
|
|
97604
|
+
}
|
|
95530
97605
|
return deps_js_1.Buffer.from(b.buffer);
|
|
95531
97606
|
}
|
|
95532
97607
|
}
|
|
@@ -95540,13 +97615,23 @@ var Raw;
|
|
|
95540
97615
|
caption;
|
|
95541
97616
|
entities;
|
|
95542
97617
|
privacyRules;
|
|
97618
|
+
music;
|
|
95543
97619
|
constructor(params) {
|
|
95544
97620
|
super();
|
|
95545
97621
|
this.classType = 'functions';
|
|
95546
97622
|
this.className = 'stories.EditStory';
|
|
95547
|
-
this.constructorId =
|
|
97623
|
+
this.constructorId = 0x2c63a72b;
|
|
95548
97624
|
this.subclassOfId = 0x8af52aac;
|
|
95549
|
-
this._slots = [
|
|
97625
|
+
this._slots = [
|
|
97626
|
+
'peer',
|
|
97627
|
+
'id',
|
|
97628
|
+
'media',
|
|
97629
|
+
'mediaAreas',
|
|
97630
|
+
'caption',
|
|
97631
|
+
'entities',
|
|
97632
|
+
'privacyRules',
|
|
97633
|
+
'music',
|
|
97634
|
+
];
|
|
95550
97635
|
this.peer = params.peer;
|
|
95551
97636
|
this.id = params.id;
|
|
95552
97637
|
this.media = params.media;
|
|
@@ -95554,6 +97639,7 @@ var Raw;
|
|
|
95554
97639
|
this.caption = params.caption;
|
|
95555
97640
|
this.entities = params.entities;
|
|
95556
97641
|
this.privacyRules = params.privacyRules;
|
|
97642
|
+
this.music = params.music;
|
|
95557
97643
|
}
|
|
95558
97644
|
static async read(_data, ..._args) {
|
|
95559
97645
|
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
@@ -95564,6 +97650,7 @@ var Raw;
|
|
|
95564
97650
|
let caption = flags & (1 << 1) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
95565
97651
|
let entities = flags & (1 << 1) ? await index_js_1.TLObject.read(_data) : [];
|
|
95566
97652
|
let privacyRules = flags & (1 << 2) ? await index_js_1.TLObject.read(_data) : [];
|
|
97653
|
+
let music = flags & (1 << 4) ? await index_js_1.TLObject.read(_data) : undefined;
|
|
95567
97654
|
return new Raw.stories.EditStory({
|
|
95568
97655
|
peer: peer,
|
|
95569
97656
|
id: id,
|
|
@@ -95572,6 +97659,7 @@ var Raw;
|
|
|
95572
97659
|
caption: caption,
|
|
95573
97660
|
entities: entities,
|
|
95574
97661
|
privacyRules: privacyRules,
|
|
97662
|
+
music: music,
|
|
95575
97663
|
});
|
|
95576
97664
|
}
|
|
95577
97665
|
write() {
|
|
@@ -95583,6 +97671,7 @@ var Raw;
|
|
|
95583
97671
|
flags |= this.caption !== undefined ? 1 << 1 : 0;
|
|
95584
97672
|
flags |= this.entities ? 1 << 1 : 0;
|
|
95585
97673
|
flags |= this.privacyRules ? 1 << 2 : 0;
|
|
97674
|
+
flags |= this.music !== undefined ? 1 << 4 : 0;
|
|
95586
97675
|
b.write(index_js_1.Primitive.Int.write(flags));
|
|
95587
97676
|
if (this.peer !== undefined) {
|
|
95588
97677
|
b.write(this.peer.write());
|
|
@@ -95605,6 +97694,9 @@ var Raw;
|
|
|
95605
97694
|
if (this.privacyRules) {
|
|
95606
97695
|
b.write(index_js_1.Primitive.Vector.write(this.privacyRules));
|
|
95607
97696
|
}
|
|
97697
|
+
if (this.music !== undefined) {
|
|
97698
|
+
b.write(this.music.write());
|
|
97699
|
+
}
|
|
95608
97700
|
return deps_js_1.Buffer.from(b.buffer);
|
|
95609
97701
|
}
|
|
95610
97702
|
}
|
|
@@ -97583,6 +99675,320 @@ var Raw;
|
|
|
97583
99675
|
}
|
|
97584
99676
|
fragment.GetCollectibleInfo = GetCollectibleInfo;
|
|
97585
99677
|
})(fragment = Raw.fragment || (Raw.fragment = {}));
|
|
99678
|
+
let aicompose;
|
|
99679
|
+
(function (aicompose) {
|
|
99680
|
+
class TonesNotModified extends index_js_1.TLObject {
|
|
99681
|
+
constructor() {
|
|
99682
|
+
super();
|
|
99683
|
+
this.classType = 'types';
|
|
99684
|
+
this.className = 'aicompose.TonesNotModified';
|
|
99685
|
+
this.constructorId = 0xc1f46103;
|
|
99686
|
+
this.subclassOfId = 0xf25ffed9;
|
|
99687
|
+
this._slots = [];
|
|
99688
|
+
}
|
|
99689
|
+
static async read(_data, ..._args) {
|
|
99690
|
+
return new Raw.aicompose.TonesNotModified();
|
|
99691
|
+
}
|
|
99692
|
+
write() {
|
|
99693
|
+
const b = new deps_js_1.BytesIO();
|
|
99694
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99695
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99696
|
+
}
|
|
99697
|
+
}
|
|
99698
|
+
aicompose.TonesNotModified = TonesNotModified;
|
|
99699
|
+
class Tones extends index_js_1.TLObject {
|
|
99700
|
+
hash;
|
|
99701
|
+
tones;
|
|
99702
|
+
users;
|
|
99703
|
+
constructor(params) {
|
|
99704
|
+
super();
|
|
99705
|
+
this.classType = 'types';
|
|
99706
|
+
this.className = 'aicompose.Tones';
|
|
99707
|
+
this.constructorId = 0x6c9d0efe;
|
|
99708
|
+
this.subclassOfId = 0xf25ffed9;
|
|
99709
|
+
this._slots = ['hash', 'tones', 'users'];
|
|
99710
|
+
this.hash = params.hash;
|
|
99711
|
+
this.tones = params.tones;
|
|
99712
|
+
this.users = params.users;
|
|
99713
|
+
}
|
|
99714
|
+
static async read(_data, ..._args) {
|
|
99715
|
+
let hash = await index_js_1.Primitive.Long.read(_data);
|
|
99716
|
+
let tones = await index_js_1.TLObject.read(_data);
|
|
99717
|
+
let users = await index_js_1.TLObject.read(_data);
|
|
99718
|
+
return new Raw.aicompose.Tones({ hash: hash, tones: tones, users: users });
|
|
99719
|
+
}
|
|
99720
|
+
write() {
|
|
99721
|
+
const b = new deps_js_1.BytesIO();
|
|
99722
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99723
|
+
if (this.hash !== undefined) {
|
|
99724
|
+
b.write(index_js_1.Primitive.Long.write(this.hash));
|
|
99725
|
+
}
|
|
99726
|
+
if (this.tones) {
|
|
99727
|
+
b.write(index_js_1.Primitive.Vector.write(this.tones));
|
|
99728
|
+
}
|
|
99729
|
+
if (this.users) {
|
|
99730
|
+
b.write(index_js_1.Primitive.Vector.write(this.users));
|
|
99731
|
+
}
|
|
99732
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99733
|
+
}
|
|
99734
|
+
}
|
|
99735
|
+
aicompose.Tones = Tones;
|
|
99736
|
+
class CreateTone extends index_js_1.TLObject {
|
|
99737
|
+
__response__;
|
|
99738
|
+
displayAuthor;
|
|
99739
|
+
emojiId;
|
|
99740
|
+
title;
|
|
99741
|
+
prompt;
|
|
99742
|
+
constructor(params) {
|
|
99743
|
+
super();
|
|
99744
|
+
this.classType = 'functions';
|
|
99745
|
+
this.className = 'aicompose.CreateTone';
|
|
99746
|
+
this.constructorId = 0x4aa83913;
|
|
99747
|
+
this.subclassOfId = 0xd476f30d;
|
|
99748
|
+
this._slots = ['displayAuthor', 'emojiId', 'title', 'prompt'];
|
|
99749
|
+
this.displayAuthor = params.displayAuthor;
|
|
99750
|
+
this.emojiId = params.emojiId;
|
|
99751
|
+
this.title = params.title;
|
|
99752
|
+
this.prompt = params.prompt;
|
|
99753
|
+
}
|
|
99754
|
+
static async read(_data, ..._args) {
|
|
99755
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
99756
|
+
let displayAuthor = flags & (1 << 0) ? true : false;
|
|
99757
|
+
let emojiId = await index_js_1.Primitive.Long.read(_data);
|
|
99758
|
+
let title = await index_js_1.Primitive.String.read(_data);
|
|
99759
|
+
let prompt = await index_js_1.Primitive.String.read(_data);
|
|
99760
|
+
return new Raw.aicompose.CreateTone({
|
|
99761
|
+
displayAuthor: displayAuthor,
|
|
99762
|
+
emojiId: emojiId,
|
|
99763
|
+
title: title,
|
|
99764
|
+
prompt: prompt,
|
|
99765
|
+
});
|
|
99766
|
+
}
|
|
99767
|
+
write() {
|
|
99768
|
+
const b = new deps_js_1.BytesIO();
|
|
99769
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99770
|
+
let flags = 0;
|
|
99771
|
+
flags |= this.displayAuthor ? 1 << 0 : 0;
|
|
99772
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
99773
|
+
if (this.emojiId !== undefined) {
|
|
99774
|
+
b.write(index_js_1.Primitive.Long.write(this.emojiId));
|
|
99775
|
+
}
|
|
99776
|
+
if (this.title !== undefined) {
|
|
99777
|
+
b.write(index_js_1.Primitive.String.write(this.title));
|
|
99778
|
+
}
|
|
99779
|
+
if (this.prompt !== undefined) {
|
|
99780
|
+
b.write(index_js_1.Primitive.String.write(this.prompt));
|
|
99781
|
+
}
|
|
99782
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99783
|
+
}
|
|
99784
|
+
}
|
|
99785
|
+
aicompose.CreateTone = CreateTone;
|
|
99786
|
+
class UpdateTone extends index_js_1.TLObject {
|
|
99787
|
+
__response__;
|
|
99788
|
+
tone;
|
|
99789
|
+
displayAuthor;
|
|
99790
|
+
emojiId;
|
|
99791
|
+
title;
|
|
99792
|
+
prompt;
|
|
99793
|
+
constructor(params) {
|
|
99794
|
+
super();
|
|
99795
|
+
this.classType = 'functions';
|
|
99796
|
+
this.className = 'aicompose.UpdateTone';
|
|
99797
|
+
this.constructorId = 0x903bcf59;
|
|
99798
|
+
this.subclassOfId = 0xd476f30d;
|
|
99799
|
+
this._slots = ['tone', 'displayAuthor', 'emojiId', 'title', 'prompt'];
|
|
99800
|
+
this.tone = params.tone;
|
|
99801
|
+
this.displayAuthor = params.displayAuthor;
|
|
99802
|
+
this.emojiId = params.emojiId;
|
|
99803
|
+
this.title = params.title;
|
|
99804
|
+
this.prompt = params.prompt;
|
|
99805
|
+
}
|
|
99806
|
+
static async read(_data, ..._args) {
|
|
99807
|
+
let flags = await index_js_1.Primitive.Int.read(_data);
|
|
99808
|
+
let tone = await index_js_1.TLObject.read(_data);
|
|
99809
|
+
let displayAuthor = flags & (1 << 0) ? await index_js_1.Primitive.Bool.read(_data) : undefined;
|
|
99810
|
+
let emojiId = flags & (1 << 1) ? await index_js_1.Primitive.Long.read(_data) : undefined;
|
|
99811
|
+
let title = flags & (1 << 2) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
99812
|
+
let prompt = flags & (1 << 3) ? await index_js_1.Primitive.String.read(_data) : undefined;
|
|
99813
|
+
return new Raw.aicompose.UpdateTone({
|
|
99814
|
+
tone: tone,
|
|
99815
|
+
displayAuthor: displayAuthor,
|
|
99816
|
+
emojiId: emojiId,
|
|
99817
|
+
title: title,
|
|
99818
|
+
prompt: prompt,
|
|
99819
|
+
});
|
|
99820
|
+
}
|
|
99821
|
+
write() {
|
|
99822
|
+
const b = new deps_js_1.BytesIO();
|
|
99823
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99824
|
+
let flags = 0;
|
|
99825
|
+
flags |= this.displayAuthor !== undefined ? 1 << 0 : 0;
|
|
99826
|
+
flags |= this.emojiId !== undefined ? 1 << 1 : 0;
|
|
99827
|
+
flags |= this.title !== undefined ? 1 << 2 : 0;
|
|
99828
|
+
flags |= this.prompt !== undefined ? 1 << 3 : 0;
|
|
99829
|
+
b.write(index_js_1.Primitive.Int.write(flags));
|
|
99830
|
+
if (this.tone !== undefined) {
|
|
99831
|
+
b.write(this.tone.write());
|
|
99832
|
+
}
|
|
99833
|
+
if (this.displayAuthor !== undefined) {
|
|
99834
|
+
b.write(index_js_1.Primitive.Bool.write(this.displayAuthor));
|
|
99835
|
+
}
|
|
99836
|
+
if (this.emojiId !== undefined) {
|
|
99837
|
+
b.write(index_js_1.Primitive.Long.write(this.emojiId));
|
|
99838
|
+
}
|
|
99839
|
+
if (this.title !== undefined) {
|
|
99840
|
+
b.write(index_js_1.Primitive.String.write(this.title));
|
|
99841
|
+
}
|
|
99842
|
+
if (this.prompt !== undefined) {
|
|
99843
|
+
b.write(index_js_1.Primitive.String.write(this.prompt));
|
|
99844
|
+
}
|
|
99845
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99846
|
+
}
|
|
99847
|
+
}
|
|
99848
|
+
aicompose.UpdateTone = UpdateTone;
|
|
99849
|
+
class SaveTone extends index_js_1.TLObject {
|
|
99850
|
+
__response__;
|
|
99851
|
+
tone;
|
|
99852
|
+
unsave;
|
|
99853
|
+
constructor(params) {
|
|
99854
|
+
super();
|
|
99855
|
+
this.classType = 'functions';
|
|
99856
|
+
this.className = 'aicompose.SaveTone';
|
|
99857
|
+
this.constructorId = 0x1782cbb1;
|
|
99858
|
+
this.subclassOfId = 0xf5b399ac;
|
|
99859
|
+
this._slots = ['tone', 'unsave'];
|
|
99860
|
+
this.tone = params.tone;
|
|
99861
|
+
this.unsave = params.unsave;
|
|
99862
|
+
}
|
|
99863
|
+
static async read(_data, ..._args) {
|
|
99864
|
+
let tone = await index_js_1.TLObject.read(_data);
|
|
99865
|
+
let unsave = await index_js_1.Primitive.Bool.read(_data);
|
|
99866
|
+
return new Raw.aicompose.SaveTone({ tone: tone, unsave: unsave });
|
|
99867
|
+
}
|
|
99868
|
+
write() {
|
|
99869
|
+
const b = new deps_js_1.BytesIO();
|
|
99870
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99871
|
+
if (this.tone !== undefined) {
|
|
99872
|
+
b.write(this.tone.write());
|
|
99873
|
+
}
|
|
99874
|
+
if (this.unsave !== undefined) {
|
|
99875
|
+
b.write(index_js_1.Primitive.Bool.write(this.unsave));
|
|
99876
|
+
}
|
|
99877
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99878
|
+
}
|
|
99879
|
+
}
|
|
99880
|
+
aicompose.SaveTone = SaveTone;
|
|
99881
|
+
class DeleteTone extends index_js_1.TLObject {
|
|
99882
|
+
__response__;
|
|
99883
|
+
tone;
|
|
99884
|
+
constructor(params) {
|
|
99885
|
+
super();
|
|
99886
|
+
this.classType = 'functions';
|
|
99887
|
+
this.className = 'aicompose.DeleteTone';
|
|
99888
|
+
this.constructorId = 0xdd39316a;
|
|
99889
|
+
this.subclassOfId = 0xf5b399ac;
|
|
99890
|
+
this._slots = ['tone'];
|
|
99891
|
+
this.tone = params.tone;
|
|
99892
|
+
}
|
|
99893
|
+
static async read(_data, ..._args) {
|
|
99894
|
+
let tone = await index_js_1.TLObject.read(_data);
|
|
99895
|
+
return new Raw.aicompose.DeleteTone({ tone: tone });
|
|
99896
|
+
}
|
|
99897
|
+
write() {
|
|
99898
|
+
const b = new deps_js_1.BytesIO();
|
|
99899
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99900
|
+
if (this.tone !== undefined) {
|
|
99901
|
+
b.write(this.tone.write());
|
|
99902
|
+
}
|
|
99903
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99904
|
+
}
|
|
99905
|
+
}
|
|
99906
|
+
aicompose.DeleteTone = DeleteTone;
|
|
99907
|
+
class GetTone extends index_js_1.TLObject {
|
|
99908
|
+
__response__;
|
|
99909
|
+
tone;
|
|
99910
|
+
constructor(params) {
|
|
99911
|
+
super();
|
|
99912
|
+
this.classType = 'functions';
|
|
99913
|
+
this.className = 'aicompose.GetTone';
|
|
99914
|
+
this.constructorId = 0xb2e8ba03;
|
|
99915
|
+
this.subclassOfId = 0xf25ffed9;
|
|
99916
|
+
this._slots = ['tone'];
|
|
99917
|
+
this.tone = params.tone;
|
|
99918
|
+
}
|
|
99919
|
+
static async read(_data, ..._args) {
|
|
99920
|
+
let tone = await index_js_1.TLObject.read(_data);
|
|
99921
|
+
return new Raw.aicompose.GetTone({ tone: tone });
|
|
99922
|
+
}
|
|
99923
|
+
write() {
|
|
99924
|
+
const b = new deps_js_1.BytesIO();
|
|
99925
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99926
|
+
if (this.tone !== undefined) {
|
|
99927
|
+
b.write(this.tone.write());
|
|
99928
|
+
}
|
|
99929
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99930
|
+
}
|
|
99931
|
+
}
|
|
99932
|
+
aicompose.GetTone = GetTone;
|
|
99933
|
+
class GetTones extends index_js_1.TLObject {
|
|
99934
|
+
__response__;
|
|
99935
|
+
hash;
|
|
99936
|
+
constructor(params) {
|
|
99937
|
+
super();
|
|
99938
|
+
this.classType = 'functions';
|
|
99939
|
+
this.className = 'aicompose.GetTones';
|
|
99940
|
+
this.constructorId = 0xabd59201;
|
|
99941
|
+
this.subclassOfId = 0xf25ffed9;
|
|
99942
|
+
this._slots = ['hash'];
|
|
99943
|
+
this.hash = params.hash;
|
|
99944
|
+
}
|
|
99945
|
+
static async read(_data, ..._args) {
|
|
99946
|
+
let hash = await index_js_1.Primitive.Long.read(_data);
|
|
99947
|
+
return new Raw.aicompose.GetTones({ hash: hash });
|
|
99948
|
+
}
|
|
99949
|
+
write() {
|
|
99950
|
+
const b = new deps_js_1.BytesIO();
|
|
99951
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99952
|
+
if (this.hash !== undefined) {
|
|
99953
|
+
b.write(index_js_1.Primitive.Long.write(this.hash));
|
|
99954
|
+
}
|
|
99955
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99956
|
+
}
|
|
99957
|
+
}
|
|
99958
|
+
aicompose.GetTones = GetTones;
|
|
99959
|
+
class GetToneExample extends index_js_1.TLObject {
|
|
99960
|
+
__response__;
|
|
99961
|
+
tone;
|
|
99962
|
+
num;
|
|
99963
|
+
constructor(params) {
|
|
99964
|
+
super();
|
|
99965
|
+
this.classType = 'functions';
|
|
99966
|
+
this.className = 'aicompose.GetToneExample';
|
|
99967
|
+
this.constructorId = 0xd1b4ab14;
|
|
99968
|
+
this.subclassOfId = 0x8c2493d5;
|
|
99969
|
+
this._slots = ['tone', 'num'];
|
|
99970
|
+
this.tone = params.tone;
|
|
99971
|
+
this.num = params.num;
|
|
99972
|
+
}
|
|
99973
|
+
static async read(_data, ..._args) {
|
|
99974
|
+
let tone = await index_js_1.TLObject.read(_data);
|
|
99975
|
+
let num = await index_js_1.Primitive.Int.read(_data);
|
|
99976
|
+
return new Raw.aicompose.GetToneExample({ tone: tone, num: num });
|
|
99977
|
+
}
|
|
99978
|
+
write() {
|
|
99979
|
+
const b = new deps_js_1.BytesIO();
|
|
99980
|
+
b.write(index_js_1.Primitive.Int.write(this.constructorId, false));
|
|
99981
|
+
if (this.tone !== undefined) {
|
|
99982
|
+
b.write(this.tone.write());
|
|
99983
|
+
}
|
|
99984
|
+
if (this.num !== undefined) {
|
|
99985
|
+
b.write(index_js_1.Primitive.Int.write(this.num));
|
|
99986
|
+
}
|
|
99987
|
+
return deps_js_1.Buffer.from(b.buffer);
|
|
99988
|
+
}
|
|
99989
|
+
}
|
|
99990
|
+
aicompose.GetToneExample = GetToneExample;
|
|
99991
|
+
})(aicompose = Raw.aicompose || (Raw.aicompose = {}));
|
|
97586
99992
|
let langpack;
|
|
97587
99993
|
(function (langpack) {
|
|
97588
99994
|
class GetLangPack extends index_js_1.TLObject {
|