@mtcute/tl 199.0.0 → 201.0.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/api-schema.json +1 -1
- package/binary/reader.js +31 -13
- package/binary/writer.js +59 -29
- package/compat/index.d.ts +495 -0
- package/compat/reader.d.ts +1 -0
- package/compat/reader.js +18 -0
- package/index.d.ts +280 -157
- package/index.js +9 -5
- package/package.json +1 -1
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import { tl } from '../index.d.ts';
|
|
2
|
+
import _Long from 'long';
|
|
3
|
+
export declare namespace tlCompat {
|
|
4
|
+
const LAYER = 0;
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
type Long = _Long;
|
|
9
|
+
type RawLong = Uint8Array;
|
|
10
|
+
type Int128 = Uint8Array;
|
|
11
|
+
type Int256 = Uint8Array;
|
|
12
|
+
type Double = number;
|
|
13
|
+
|
|
14
|
+
type FindByName<T extends { _: string }, Name extends T['_']> = Extract<T, { _: Name }>
|
|
15
|
+
|
|
16
|
+
type Mutable<T> = {
|
|
17
|
+
-readonly [P in keyof T]: T[P]
|
|
18
|
+
}
|
|
19
|
+
type AnyToNever<T> = any extends T ? never : T;
|
|
20
|
+
/**
|
|
21
|
+
* Compared to the current schema, changes from this entry:
|
|
22
|
+
*
|
|
23
|
+
* Added arguments:
|
|
24
|
+
* owner_address: flags.2?string
|
|
25
|
+
* gift_address: flags.3?string
|
|
26
|
+
* Changed arguments:
|
|
27
|
+
* owner_id: flags.0?int53 => flags.0?Peer
|
|
28
|
+
*/
|
|
29
|
+
interface RawStarGiftUnique_layer197 {
|
|
30
|
+
_: 'starGiftUnique_layer197';
|
|
31
|
+
id: Long;
|
|
32
|
+
title: string;
|
|
33
|
+
slug: string;
|
|
34
|
+
num: number;
|
|
35
|
+
ownerId?: number;
|
|
36
|
+
ownerName?: string;
|
|
37
|
+
attributes: tl.TypeStarGiftAttribute[];
|
|
38
|
+
availabilityIssued: number;
|
|
39
|
+
availabilityTotal: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Compared to the current schema, changes from this entry:
|
|
43
|
+
*
|
|
44
|
+
* Added arguments:
|
|
45
|
+
* flags: #
|
|
46
|
+
* until: flags.0?int
|
|
47
|
+
*/
|
|
48
|
+
interface RawEmojiStatus_layer197 {
|
|
49
|
+
_: 'emojiStatus_layer197';
|
|
50
|
+
documentId: Long;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Compared to the current schema, changes from this entry:
|
|
54
|
+
*
|
|
55
|
+
* Added arguments:
|
|
56
|
+
* video_cover: flags.9?Photo
|
|
57
|
+
* video_timestamp: flags.10?int
|
|
58
|
+
*/
|
|
59
|
+
interface RawMessageMediaDocument_layer197 {
|
|
60
|
+
_: 'messageMediaDocument_layer197';
|
|
61
|
+
nopremium?: boolean;
|
|
62
|
+
spoiler?: boolean;
|
|
63
|
+
video?: boolean;
|
|
64
|
+
round?: boolean;
|
|
65
|
+
voice?: boolean;
|
|
66
|
+
document?: tl.TypeDocument;
|
|
67
|
+
altDocuments?: tl.TypeDocument[];
|
|
68
|
+
ttlSeconds?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Compared to the current schema, changes from this entry:
|
|
72
|
+
*
|
|
73
|
+
* Added arguments:
|
|
74
|
+
* stargifts_available: flags2.19?true
|
|
75
|
+
* paid_messages_available: flags2.20?true
|
|
76
|
+
* stargifts_count: flags2.18?int
|
|
77
|
+
*/
|
|
78
|
+
interface RawChannelFull_layer197 {
|
|
79
|
+
_: 'channelFull_layer197';
|
|
80
|
+
canViewParticipants?: boolean;
|
|
81
|
+
canSetUsername?: boolean;
|
|
82
|
+
canSetStickers?: boolean;
|
|
83
|
+
hiddenPrehistory?: boolean;
|
|
84
|
+
canSetLocation?: boolean;
|
|
85
|
+
hasScheduled?: boolean;
|
|
86
|
+
canViewStats?: boolean;
|
|
87
|
+
blocked?: boolean;
|
|
88
|
+
canDeleteChannel?: boolean;
|
|
89
|
+
antispam?: boolean;
|
|
90
|
+
participantsHidden?: boolean;
|
|
91
|
+
translationsDisabled?: boolean;
|
|
92
|
+
storiesPinnedAvailable?: boolean;
|
|
93
|
+
viewForumAsMessages?: boolean;
|
|
94
|
+
restrictedSponsored?: boolean;
|
|
95
|
+
canViewRevenue?: boolean;
|
|
96
|
+
paidMediaAllowed?: boolean;
|
|
97
|
+
canViewStarsRevenue?: boolean;
|
|
98
|
+
paidReactionsAvailable?: boolean;
|
|
99
|
+
id: number;
|
|
100
|
+
about: string;
|
|
101
|
+
participantsCount?: number;
|
|
102
|
+
adminsCount?: number;
|
|
103
|
+
kickedCount?: number;
|
|
104
|
+
bannedCount?: number;
|
|
105
|
+
onlineCount?: number;
|
|
106
|
+
readInboxMaxId: number;
|
|
107
|
+
readOutboxMaxId: number;
|
|
108
|
+
unreadCount: number;
|
|
109
|
+
chatPhoto: tl.TypePhoto;
|
|
110
|
+
notifySettings: tl.TypePeerNotifySettings;
|
|
111
|
+
exportedInvite?: tl.TypeExportedChatInvite;
|
|
112
|
+
botInfo: tl.TypeBotInfo[];
|
|
113
|
+
migratedFromChatId?: Long;
|
|
114
|
+
migratedFromMaxId?: number;
|
|
115
|
+
pinnedMsgId?: number;
|
|
116
|
+
stickerset?: tl.TypeStickerSet;
|
|
117
|
+
availableMinId?: number;
|
|
118
|
+
folderId?: number;
|
|
119
|
+
linkedChatId?: number;
|
|
120
|
+
location?: tl.TypeChannelLocation;
|
|
121
|
+
slowmodeSeconds?: number;
|
|
122
|
+
slowmodeNextSendDate?: number;
|
|
123
|
+
statsDc?: number;
|
|
124
|
+
pts: number;
|
|
125
|
+
call?: tl.TypeInputGroupCall;
|
|
126
|
+
ttlPeriod?: number;
|
|
127
|
+
pendingSuggestions?: string[];
|
|
128
|
+
groupcallDefaultJoinAs?: tl.TypePeer;
|
|
129
|
+
themeEmoticon?: string;
|
|
130
|
+
requestsPending?: number;
|
|
131
|
+
recentRequesters?: number[];
|
|
132
|
+
defaultSendAs?: tl.TypePeer;
|
|
133
|
+
availableReactions?: tl.TypeChatReactions;
|
|
134
|
+
reactionsLimit?: number;
|
|
135
|
+
stories?: tl.TypePeerStories;
|
|
136
|
+
wallpaper?: tl.TypeWallPaper;
|
|
137
|
+
boostsApplied?: number;
|
|
138
|
+
boostsUnrestrict?: number;
|
|
139
|
+
emojiset?: tl.TypeStickerSet;
|
|
140
|
+
botVerification?: tl.TypeBotVerification;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Compared to the current schema, changes from this entry:
|
|
144
|
+
*
|
|
145
|
+
* Added arguments:
|
|
146
|
+
* from_id: flags.6?Peer
|
|
147
|
+
* peer: flags.7?Peer
|
|
148
|
+
* saved_id: flags.7?long
|
|
149
|
+
*/
|
|
150
|
+
interface RawMessageActionStarGiftUnique_layer197 {
|
|
151
|
+
_: 'messageActionStarGiftUnique_layer197';
|
|
152
|
+
upgrade?: boolean;
|
|
153
|
+
transferred?: boolean;
|
|
154
|
+
saved?: boolean;
|
|
155
|
+
refunded?: boolean;
|
|
156
|
+
gift: tlCompat.TypeStarGift;
|
|
157
|
+
canExportAt?: number;
|
|
158
|
+
transferStars?: Long;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Compared to the current schema, changes from this entry:
|
|
162
|
+
*
|
|
163
|
+
* Added arguments:
|
|
164
|
+
* from_id: flags.11?Peer
|
|
165
|
+
* peer: flags.12?Peer
|
|
166
|
+
* saved_id: flags.12?long
|
|
167
|
+
*/
|
|
168
|
+
interface RawMessageActionStarGift_layer197 {
|
|
169
|
+
_: 'messageActionStarGift_layer197';
|
|
170
|
+
nameHidden?: boolean;
|
|
171
|
+
saved?: boolean;
|
|
172
|
+
converted?: boolean;
|
|
173
|
+
upgraded?: boolean;
|
|
174
|
+
refunded?: boolean;
|
|
175
|
+
canUpgrade?: boolean;
|
|
176
|
+
gift: tlCompat.TypeStarGift;
|
|
177
|
+
message?: tl.TypeTextWithEntities;
|
|
178
|
+
convertStars?: Long;
|
|
179
|
+
upgradeMsgId?: number;
|
|
180
|
+
upgradeStars?: Long;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Compared to the current schema, changes from this entry:
|
|
184
|
+
*
|
|
185
|
+
* Added arguments:
|
|
186
|
+
* gift_address: flags.3?string
|
|
187
|
+
*/
|
|
188
|
+
interface RawStarGiftUnique_layer198 {
|
|
189
|
+
_: 'starGiftUnique_layer198';
|
|
190
|
+
id: Long;
|
|
191
|
+
title: string;
|
|
192
|
+
slug: string;
|
|
193
|
+
num: number;
|
|
194
|
+
ownerId?: tl.TypePeer;
|
|
195
|
+
ownerName?: string;
|
|
196
|
+
ownerAddress?: string;
|
|
197
|
+
attributes: tl.TypeStarGiftAttribute[];
|
|
198
|
+
availabilityIssued: number;
|
|
199
|
+
availabilityTotal: number;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Compared to the current schema, changes from this entry:
|
|
203
|
+
*
|
|
204
|
+
* Added arguments:
|
|
205
|
+
* display_gifts_button: flags2.16?true
|
|
206
|
+
* send_paid_messages_stars: flags2.14?long
|
|
207
|
+
* disallowed_gifts: flags2.15?DisallowedGiftsSettings
|
|
208
|
+
* Removed arguments: premium_gifts
|
|
209
|
+
*/
|
|
210
|
+
interface RawUserFull_layer199 {
|
|
211
|
+
_: 'userFull_layer199';
|
|
212
|
+
blocked?: boolean;
|
|
213
|
+
phoneCallsAvailable?: boolean;
|
|
214
|
+
phoneCallsPrivate?: boolean;
|
|
215
|
+
canPinMessage?: boolean;
|
|
216
|
+
hasScheduled?: boolean;
|
|
217
|
+
videoCallsAvailable?: boolean;
|
|
218
|
+
voiceMessagesForbidden?: boolean;
|
|
219
|
+
translationsDisabled?: boolean;
|
|
220
|
+
storiesPinnedAvailable?: boolean;
|
|
221
|
+
blockedMyStoriesFrom?: boolean;
|
|
222
|
+
wallpaperOverridden?: boolean;
|
|
223
|
+
contactRequirePremium?: boolean;
|
|
224
|
+
readDatesPrivate?: boolean;
|
|
225
|
+
sponsoredEnabled?: boolean;
|
|
226
|
+
canViewRevenue?: boolean;
|
|
227
|
+
botCanManageEmojiStatus?: boolean;
|
|
228
|
+
id: number;
|
|
229
|
+
about?: string;
|
|
230
|
+
settings: tl.TypePeerSettings;
|
|
231
|
+
personalPhoto?: tl.TypePhoto;
|
|
232
|
+
profilePhoto?: tl.TypePhoto;
|
|
233
|
+
fallbackPhoto?: tl.TypePhoto;
|
|
234
|
+
notifySettings: tl.TypePeerNotifySettings;
|
|
235
|
+
botInfo?: tl.TypeBotInfo;
|
|
236
|
+
pinnedMsgId?: number;
|
|
237
|
+
commonChatsCount: number;
|
|
238
|
+
folderId?: number;
|
|
239
|
+
ttlPeriod?: number;
|
|
240
|
+
themeEmoticon?: string;
|
|
241
|
+
privateForwardName?: string;
|
|
242
|
+
botGroupAdminRights?: tl.TypeChatAdminRights;
|
|
243
|
+
botBroadcastAdminRights?: tl.TypeChatAdminRights;
|
|
244
|
+
premiumGifts?: tl.TypePremiumGiftOption[];
|
|
245
|
+
wallpaper?: tl.TypeWallPaper;
|
|
246
|
+
stories?: tl.TypePeerStories;
|
|
247
|
+
businessWorkHours?: tl.TypeBusinessWorkHours;
|
|
248
|
+
businessLocation?: tl.TypeBusinessLocation;
|
|
249
|
+
businessGreetingMessage?: tl.TypeBusinessGreetingMessage;
|
|
250
|
+
businessAwayMessage?: tl.TypeBusinessAwayMessage;
|
|
251
|
+
businessIntro?: tl.TypeBusinessIntro;
|
|
252
|
+
birthday?: tl.TypeBirthday;
|
|
253
|
+
personalChannelId?: number;
|
|
254
|
+
personalChannelMessage?: number;
|
|
255
|
+
stargiftsCount?: number;
|
|
256
|
+
starrefProgram?: tl.TypeStarRefProgram;
|
|
257
|
+
botVerification?: tl.TypeBotVerification;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Compared to the current schema, changes from this entry:
|
|
261
|
+
*
|
|
262
|
+
* Added arguments:
|
|
263
|
+
* send_paid_messages_stars: flags2.15?long
|
|
264
|
+
*/
|
|
265
|
+
interface RawUser_layer199 {
|
|
266
|
+
_: 'user_layer199';
|
|
267
|
+
self?: boolean;
|
|
268
|
+
contact?: boolean;
|
|
269
|
+
mutualContact?: boolean;
|
|
270
|
+
deleted?: boolean;
|
|
271
|
+
bot?: boolean;
|
|
272
|
+
botChatHistory?: boolean;
|
|
273
|
+
botNochats?: boolean;
|
|
274
|
+
verified?: boolean;
|
|
275
|
+
restricted?: boolean;
|
|
276
|
+
min?: boolean;
|
|
277
|
+
botInlineGeo?: boolean;
|
|
278
|
+
support?: boolean;
|
|
279
|
+
scam?: boolean;
|
|
280
|
+
applyMinPhoto?: boolean;
|
|
281
|
+
fake?: boolean;
|
|
282
|
+
botAttachMenu?: boolean;
|
|
283
|
+
premium?: boolean;
|
|
284
|
+
attachMenuEnabled?: boolean;
|
|
285
|
+
botCanEdit?: boolean;
|
|
286
|
+
closeFriend?: boolean;
|
|
287
|
+
storiesHidden?: boolean;
|
|
288
|
+
storiesUnavailable?: boolean;
|
|
289
|
+
contactRequirePremium?: boolean;
|
|
290
|
+
botBusiness?: boolean;
|
|
291
|
+
botHasMainApp?: boolean;
|
|
292
|
+
id: number;
|
|
293
|
+
accessHash?: Long;
|
|
294
|
+
firstName?: string;
|
|
295
|
+
lastName?: string;
|
|
296
|
+
username?: string;
|
|
297
|
+
phone?: string;
|
|
298
|
+
photo?: tl.TypeUserProfilePhoto;
|
|
299
|
+
status?: tl.TypeUserStatus;
|
|
300
|
+
botInfoVersion?: number;
|
|
301
|
+
restrictionReason?: tl.TypeRestrictionReason[];
|
|
302
|
+
botInlinePlaceholder?: string;
|
|
303
|
+
langCode?: string;
|
|
304
|
+
emojiStatus?: tlCompat.TypeEmojiStatus;
|
|
305
|
+
usernames?: tl.TypeUsername[];
|
|
306
|
+
storiesMaxId?: number;
|
|
307
|
+
color?: tl.TypePeerColor;
|
|
308
|
+
profileColor?: tl.TypePeerColor;
|
|
309
|
+
botActiveUsers?: number;
|
|
310
|
+
botVerificationIcon?: Long;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Compared to the current schema, changes from this entry:
|
|
314
|
+
*
|
|
315
|
+
* Added arguments:
|
|
316
|
+
* send_paid_messages_stars: flags2.14?long
|
|
317
|
+
*/
|
|
318
|
+
interface RawChannel_layer199 {
|
|
319
|
+
_: 'channel_layer199';
|
|
320
|
+
creator?: boolean;
|
|
321
|
+
left?: boolean;
|
|
322
|
+
broadcast?: boolean;
|
|
323
|
+
verified?: boolean;
|
|
324
|
+
megagroup?: boolean;
|
|
325
|
+
restricted?: boolean;
|
|
326
|
+
signatures?: boolean;
|
|
327
|
+
min?: boolean;
|
|
328
|
+
scam?: boolean;
|
|
329
|
+
hasLink?: boolean;
|
|
330
|
+
hasGeo?: boolean;
|
|
331
|
+
slowmodeEnabled?: boolean;
|
|
332
|
+
callActive?: boolean;
|
|
333
|
+
callNotEmpty?: boolean;
|
|
334
|
+
fake?: boolean;
|
|
335
|
+
gigagroup?: boolean;
|
|
336
|
+
noforwards?: boolean;
|
|
337
|
+
joinToSend?: boolean;
|
|
338
|
+
joinRequest?: boolean;
|
|
339
|
+
forum?: boolean;
|
|
340
|
+
storiesHidden?: boolean;
|
|
341
|
+
storiesHiddenMin?: boolean;
|
|
342
|
+
storiesUnavailable?: boolean;
|
|
343
|
+
signatureProfiles?: boolean;
|
|
344
|
+
id: number;
|
|
345
|
+
accessHash?: Long;
|
|
346
|
+
title: string;
|
|
347
|
+
username?: string;
|
|
348
|
+
photo: tl.TypeChatPhoto;
|
|
349
|
+
date: number;
|
|
350
|
+
restrictionReason?: tl.TypeRestrictionReason[];
|
|
351
|
+
adminRights?: tl.TypeChatAdminRights;
|
|
352
|
+
bannedRights?: tl.TypeChatBannedRights;
|
|
353
|
+
defaultBannedRights?: tl.TypeChatBannedRights;
|
|
354
|
+
participantsCount?: number;
|
|
355
|
+
usernames?: tl.TypeUsername[];
|
|
356
|
+
storiesMaxId?: number;
|
|
357
|
+
color?: tl.TypePeerColor;
|
|
358
|
+
profileColor?: tl.TypePeerColor;
|
|
359
|
+
emojiStatus?: tlCompat.TypeEmojiStatus;
|
|
360
|
+
level?: number;
|
|
361
|
+
subscriptionUntilDate?: number;
|
|
362
|
+
botVerificationIcon?: Long;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Compared to the current schema, changes from this entry:
|
|
366
|
+
*
|
|
367
|
+
* Added arguments:
|
|
368
|
+
* paid_message_stars: flags2.6?long
|
|
369
|
+
*/
|
|
370
|
+
interface RawMessage_layer199 {
|
|
371
|
+
_: 'message_layer199';
|
|
372
|
+
out?: boolean;
|
|
373
|
+
mentioned?: boolean;
|
|
374
|
+
mediaUnread?: boolean;
|
|
375
|
+
silent?: boolean;
|
|
376
|
+
post?: boolean;
|
|
377
|
+
fromScheduled?: boolean;
|
|
378
|
+
legacy?: boolean;
|
|
379
|
+
editHide?: boolean;
|
|
380
|
+
pinned?: boolean;
|
|
381
|
+
noforwards?: boolean;
|
|
382
|
+
invertMedia?: boolean;
|
|
383
|
+
offline?: boolean;
|
|
384
|
+
videoProcessingPending?: boolean;
|
|
385
|
+
id: number;
|
|
386
|
+
fromId?: tl.TypePeer;
|
|
387
|
+
fromBoostsApplied?: number;
|
|
388
|
+
peerId: tl.TypePeer;
|
|
389
|
+
savedPeerId?: tl.TypePeer;
|
|
390
|
+
fwdFrom?: tl.TypeMessageFwdHeader;
|
|
391
|
+
viaBotId?: number;
|
|
392
|
+
viaBusinessBotId?: number;
|
|
393
|
+
replyTo?: tl.TypeMessageReplyHeader;
|
|
394
|
+
date: number;
|
|
395
|
+
message: string;
|
|
396
|
+
media?: tlCompat.TypeMessageMedia;
|
|
397
|
+
replyMarkup?: tl.TypeReplyMarkup;
|
|
398
|
+
entities?: tl.TypeMessageEntity[];
|
|
399
|
+
views?: number;
|
|
400
|
+
forwards?: number;
|
|
401
|
+
replies?: tl.TypeMessageReplies;
|
|
402
|
+
editDate?: number;
|
|
403
|
+
postAuthor?: string;
|
|
404
|
+
groupedId?: Long;
|
|
405
|
+
reactions?: tl.TypeMessageReactions;
|
|
406
|
+
restrictionReason?: tl.TypeRestrictionReason[];
|
|
407
|
+
ttlPeriod?: number;
|
|
408
|
+
quickReplyShortcutId?: number;
|
|
409
|
+
effect?: Long;
|
|
410
|
+
factcheck?: tl.TypeFactCheck;
|
|
411
|
+
reportDeliveryUntilDate?: number;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Compared to the current schema, changes from this entry:
|
|
415
|
+
*
|
|
416
|
+
* Added arguments:
|
|
417
|
+
* display_gifts_button: flags2.16?true
|
|
418
|
+
* disallowed_gifts: flags2.15?DisallowedGiftsSettings
|
|
419
|
+
*/
|
|
420
|
+
interface RawUserFull_layer200 {
|
|
421
|
+
_: 'userFull_layer200';
|
|
422
|
+
blocked?: boolean;
|
|
423
|
+
phoneCallsAvailable?: boolean;
|
|
424
|
+
phoneCallsPrivate?: boolean;
|
|
425
|
+
canPinMessage?: boolean;
|
|
426
|
+
hasScheduled?: boolean;
|
|
427
|
+
videoCallsAvailable?: boolean;
|
|
428
|
+
voiceMessagesForbidden?: boolean;
|
|
429
|
+
translationsDisabled?: boolean;
|
|
430
|
+
storiesPinnedAvailable?: boolean;
|
|
431
|
+
blockedMyStoriesFrom?: boolean;
|
|
432
|
+
wallpaperOverridden?: boolean;
|
|
433
|
+
contactRequirePremium?: boolean;
|
|
434
|
+
readDatesPrivate?: boolean;
|
|
435
|
+
sponsoredEnabled?: boolean;
|
|
436
|
+
canViewRevenue?: boolean;
|
|
437
|
+
botCanManageEmojiStatus?: boolean;
|
|
438
|
+
id: number;
|
|
439
|
+
about?: string;
|
|
440
|
+
settings: tl.TypePeerSettings;
|
|
441
|
+
personalPhoto?: tl.TypePhoto;
|
|
442
|
+
profilePhoto?: tl.TypePhoto;
|
|
443
|
+
fallbackPhoto?: tl.TypePhoto;
|
|
444
|
+
notifySettings: tl.TypePeerNotifySettings;
|
|
445
|
+
botInfo?: tl.TypeBotInfo;
|
|
446
|
+
pinnedMsgId?: number;
|
|
447
|
+
commonChatsCount: number;
|
|
448
|
+
folderId?: number;
|
|
449
|
+
ttlPeriod?: number;
|
|
450
|
+
themeEmoticon?: string;
|
|
451
|
+
privateForwardName?: string;
|
|
452
|
+
botGroupAdminRights?: tl.TypeChatAdminRights;
|
|
453
|
+
botBroadcastAdminRights?: tl.TypeChatAdminRights;
|
|
454
|
+
wallpaper?: tl.TypeWallPaper;
|
|
455
|
+
stories?: tl.TypePeerStories;
|
|
456
|
+
businessWorkHours?: tl.TypeBusinessWorkHours;
|
|
457
|
+
businessLocation?: tl.TypeBusinessLocation;
|
|
458
|
+
businessGreetingMessage?: tl.TypeBusinessGreetingMessage;
|
|
459
|
+
businessAwayMessage?: tl.TypeBusinessAwayMessage;
|
|
460
|
+
businessIntro?: tl.TypeBusinessIntro;
|
|
461
|
+
birthday?: tl.TypeBirthday;
|
|
462
|
+
personalChannelId?: number;
|
|
463
|
+
personalChannelMessage?: number;
|
|
464
|
+
stargiftsCount?: number;
|
|
465
|
+
starrefProgram?: tl.TypeStarRefProgram;
|
|
466
|
+
botVerification?: tl.TypeBotVerification;
|
|
467
|
+
sendPaidMessagesStars?: Long;
|
|
468
|
+
}
|
|
469
|
+
interface RpcCallReturn {
|
|
470
|
+
}
|
|
471
|
+
type TypeStarGift = tlCompat.RawStarGiftUnique_layer197 | tlCompat.RawStarGiftUnique_layer198 | AnyToNever<tl.TypeStarGift>
|
|
472
|
+
type TypeEmojiStatus = tlCompat.RawEmojiStatus_layer197 | AnyToNever<tl.TypeEmojiStatus>
|
|
473
|
+
type TypeMessageMedia = tlCompat.RawMessageMediaDocument_layer197 | AnyToNever<tl.TypeMessageMedia>
|
|
474
|
+
type TypeChatFull = tlCompat.RawChannelFull_layer197 | AnyToNever<tl.TypeChatFull>
|
|
475
|
+
type TypeMessageAction = tlCompat.RawMessageActionStarGiftUnique_layer197 | tlCompat.RawMessageActionStarGift_layer197 | AnyToNever<tl.TypeMessageAction>
|
|
476
|
+
type TypeUserFull = tlCompat.RawUserFull_layer199 | tlCompat.RawUserFull_layer200 | AnyToNever<tl.TypeUserFull>
|
|
477
|
+
type TypeUser = tlCompat.RawUser_layer199 | AnyToNever<tl.TypeUser>
|
|
478
|
+
type TypeChat = tlCompat.RawChannel_layer199 | AnyToNever<tl.TypeChat>
|
|
479
|
+
type TypeMessage = tlCompat.RawMessage_layer199 | AnyToNever<tl.TypeMessage>
|
|
480
|
+
|
|
481
|
+
type TlObject =
|
|
482
|
+
| tlCompat.RawStarGiftUnique_layer197
|
|
483
|
+
| tlCompat.RawEmojiStatus_layer197
|
|
484
|
+
| tlCompat.RawMessageMediaDocument_layer197
|
|
485
|
+
| tlCompat.RawChannelFull_layer197
|
|
486
|
+
| tlCompat.RawMessageActionStarGiftUnique_layer197
|
|
487
|
+
| tlCompat.RawMessageActionStarGift_layer197
|
|
488
|
+
| tlCompat.RawStarGiftUnique_layer198
|
|
489
|
+
| tlCompat.RawUserFull_layer199
|
|
490
|
+
| tlCompat.RawUser_layer199
|
|
491
|
+
| tlCompat.RawChannel_layer199
|
|
492
|
+
| tlCompat.RawMessage_layer199
|
|
493
|
+
| tlCompat.RawUserFull_layer200
|
|
494
|
+
| tl.TlObject
|
|
495
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __tlReaderMapCompat: Record<number, (r: unknown) => unknown>
|
package/compat/reader.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file is auto-generated. Do not edit.
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var m={
|
|
5
|
+
880997154:function(r){var flags=r.uint();return{_:'starGiftUnique_layer197',id:r.long(),title:r.string(),slug:r.string(),num:r.int(),ownerId:flags&1?r.int53():void 0,ownerName:flags&2?r.string():void 0,attributes:r.vector(r.object),availabilityIssued:r.int(),availabilityTotal:r.int(),}},
|
|
6
|
+
2459656605:function(r){return{_:'emojiStatus_layer197',documentId:r.long(),}},
|
|
7
|
+
3713469397:function(r){var flags=r.uint();return{_:'messageMediaDocument_layer197',nopremium:!!(flags&8),spoiler:!!(flags&16),video:!!(flags&64),round:!!(flags&128),voice:!!(flags&256),document:flags&1?r.object():void 0,altDocuments:flags&32?r.vector(r.object):void 0,ttlSeconds:flags&4?r.int():void 0,}},
|
|
8
|
+
2683549784:function(r){var flags=r.uint(),flags2=r.uint();return{_:'channelFull_layer197',canViewParticipants:!!(flags&8),canSetUsername:!!(flags&64),canSetStickers:!!(flags&128),hiddenPrehistory:!!(flags&1024),canSetLocation:!!(flags&65536),hasScheduled:!!(flags&524288),canViewStats:!!(flags&1048576),blocked:!!(flags&4194304),canDeleteChannel:!!(flags2&1),antispam:!!(flags2&2),participantsHidden:!!(flags2&4),translationsDisabled:!!(flags2&8),storiesPinnedAvailable:!!(flags2&32),viewForumAsMessages:!!(flags2&64),restrictedSponsored:!!(flags2&2048),canViewRevenue:!!(flags2&4096),paidMediaAllowed:!!(flags2&16384),canViewStarsRevenue:!!(flags2&32768),paidReactionsAvailable:!!(flags2&65536),id:r.int53(),about:r.string(),participantsCount:flags&1?r.int():void 0,adminsCount:flags&2?r.int():void 0,kickedCount:flags&4?r.int():void 0,bannedCount:flags&4?r.int():void 0,onlineCount:flags&8192?r.int():void 0,readInboxMaxId:r.int(),readOutboxMaxId:r.int(),unreadCount:r.int(),chatPhoto:r.object(),notifySettings:r.object(),exportedInvite:flags&8388608?r.object():void 0,botInfo:r.vector(r.object),migratedFromChatId:flags&16?r.long():void 0,migratedFromMaxId:flags&16?r.int():void 0,pinnedMsgId:flags&32?r.int():void 0,stickerset:flags&256?r.object():void 0,availableMinId:flags&512?r.int():void 0,folderId:flags&2048?r.int():void 0,linkedChatId:flags&16384?r.int53():void 0,location:flags&32768?r.object():void 0,slowmodeSeconds:flags&131072?r.int():void 0,slowmodeNextSendDate:flags&262144?r.int():void 0,statsDc:flags&4096?r.int():void 0,pts:r.int(),call:flags&2097152?r.object():void 0,ttlPeriod:flags&16777216?r.int():void 0,pendingSuggestions:flags&33554432?r.vector(r.string):void 0,groupcallDefaultJoinAs:flags&67108864?r.object():void 0,themeEmoticon:flags&134217728?r.string():void 0,requestsPending:flags&268435456?r.int():void 0,recentRequesters:flags&268435456?r.vector(r.int53):void 0,defaultSendAs:flags&536870912?r.object():void 0,availableReactions:flags&1073741824?r.object():void 0,reactionsLimit:flags2&8192?r.int():void 0,stories:flags2&16?r.object():void 0,wallpaper:flags2&128?r.object():void 0,boostsApplied:flags2&256?r.int():void 0,boostsUnrestrict:flags2&512?r.int():void 0,emojiset:flags2&1024?r.object():void 0,botVerification:flags2&131072?r.object():void 0,}},
|
|
9
|
+
638024601:function(r){var flags=r.uint();return{_:'messageActionStarGiftUnique_layer197',upgrade:!!(flags&1),transferred:!!(flags&2),saved:!!(flags&4),refunded:!!(flags&32),gift:r.object(),canExportAt:flags&8?r.int():void 0,transferStars:flags&16?r.long():void 0,}},
|
|
10
|
+
3639931047:function(r){var flags=r.uint();return{_:'messageActionStarGift_layer197',nameHidden:!!(flags&1),saved:!!(flags&4),converted:!!(flags&8),upgraded:!!(flags&32),refunded:!!(flags&512),canUpgrade:!!(flags&1024),gift:r.object(),message:flags&2?r.object():void 0,convertStars:flags&16?r.long():void 0,upgradeMsgId:flags&32?r.int():void 0,upgradeStars:flags&256?r.long():void 0,}},
|
|
11
|
+
4076764746:function(r){var flags=r.uint();return{_:'starGiftUnique_layer198',id:r.long(),title:r.string(),slug:r.string(),num:r.int(),ownerId:flags&1?r.object():void 0,ownerName:flags&2?r.string():void 0,ownerAddress:flags&4?r.string():void 0,attributes:r.vector(r.object),availabilityIssued:r.int(),availabilityTotal:r.int(),}},
|
|
12
|
+
1301765052:function(r){var flags=r.uint(),flags2=r.uint();return{_:'userFull_layer199',blocked:!!(flags&1),phoneCallsAvailable:!!(flags&16),phoneCallsPrivate:!!(flags&32),canPinMessage:!!(flags&128),hasScheduled:!!(flags&4096),videoCallsAvailable:!!(flags&8192),voiceMessagesForbidden:!!(flags&1048576),translationsDisabled:!!(flags&8388608),storiesPinnedAvailable:!!(flags&67108864),blockedMyStoriesFrom:!!(flags&134217728),wallpaperOverridden:!!(flags&268435456),contactRequirePremium:!!(flags&536870912),readDatesPrivate:!!(flags&1073741824),sponsoredEnabled:!!(flags2&128),canViewRevenue:!!(flags2&512),botCanManageEmojiStatus:!!(flags2&1024),id:r.int53(),about:flags&2?r.string():void 0,settings:r.object(),personalPhoto:flags&2097152?r.object():void 0,profilePhoto:flags&4?r.object():void 0,fallbackPhoto:flags&4194304?r.object():void 0,notifySettings:r.object(),botInfo:flags&8?r.object():void 0,pinnedMsgId:flags&64?r.int():void 0,commonChatsCount:r.int(),folderId:flags&2048?r.int():void 0,ttlPeriod:flags&16384?r.int():void 0,themeEmoticon:flags&32768?r.string():void 0,privateForwardName:flags&65536?r.string():void 0,botGroupAdminRights:flags&131072?r.object():void 0,botBroadcastAdminRights:flags&262144?r.object():void 0,premiumGifts:flags&524288?r.vector(r.object):void 0,wallpaper:flags&16777216?r.object():void 0,stories:flags&33554432?r.object():void 0,businessWorkHours:flags2&1?r.object():void 0,businessLocation:flags2&2?r.object():void 0,businessGreetingMessage:flags2&4?r.object():void 0,businessAwayMessage:flags2&8?r.object():void 0,businessIntro:flags2&16?r.object():void 0,birthday:flags2&32?r.object():void 0,personalChannelId:flags2&64?r.int53():void 0,personalChannelMessage:flags2&64?r.int():void 0,stargiftsCount:flags2&256?r.int():void 0,starrefProgram:flags2&2048?r.object():void 0,botVerification:flags2&4096?r.object():void 0,}},
|
|
13
|
+
1262928766:function(r){var flags=r.uint(),flags2=r.uint();return{_:'user_layer199',self:!!(flags&1024),contact:!!(flags&2048),mutualContact:!!(flags&4096),deleted:!!(flags&8192),bot:!!(flags&16384),botChatHistory:!!(flags&32768),botNochats:!!(flags&65536),verified:!!(flags&131072),restricted:!!(flags&262144),min:!!(flags&1048576),botInlineGeo:!!(flags&2097152),support:!!(flags&8388608),scam:!!(flags&16777216),applyMinPhoto:!!(flags&33554432),fake:!!(flags&67108864),botAttachMenu:!!(flags&134217728),premium:!!(flags&268435456),attachMenuEnabled:!!(flags&536870912),botCanEdit:!!(flags2&2),closeFriend:!!(flags2&4),storiesHidden:!!(flags2&8),storiesUnavailable:!!(flags2&16),contactRequirePremium:!!(flags2&1024),botBusiness:!!(flags2&2048),botHasMainApp:!!(flags2&8192),id:r.int53(),accessHash:flags&1?r.long():void 0,firstName:flags&2?r.string():void 0,lastName:flags&4?r.string():void 0,username:flags&8?r.string():void 0,phone:flags&16?r.string():void 0,photo:flags&32?r.object():void 0,status:flags&64?r.object():void 0,botInfoVersion:flags&16384?r.int():void 0,restrictionReason:flags&262144?r.vector(r.object):void 0,botInlinePlaceholder:flags&524288?r.string():void 0,langCode:flags&4194304?r.string():void 0,emojiStatus:flags&1073741824?r.object():void 0,usernames:flags2&1?r.vector(r.object):void 0,storiesMaxId:flags2&32?r.int():void 0,color:flags2&256?r.object():void 0,profileColor:flags2&512?r.object():void 0,botActiveUsers:flags2&4096?r.int():void 0,botVerificationIcon:flags2&16384?r.long():void 0,}},
|
|
14
|
+
3758725303:function(r){var flags=r.uint(),flags2=r.uint();return{_:'channel_layer199',creator:!!(flags&1),left:!!(flags&4),broadcast:!!(flags&32),verified:!!(flags&128),megagroup:!!(flags&256),restricted:!!(flags&512),signatures:!!(flags&2048),min:!!(flags&4096),scam:!!(flags&524288),hasLink:!!(flags&1048576),hasGeo:!!(flags&2097152),slowmodeEnabled:!!(flags&4194304),callActive:!!(flags&8388608),callNotEmpty:!!(flags&16777216),fake:!!(flags&33554432),gigagroup:!!(flags&67108864),noforwards:!!(flags&134217728),joinToSend:!!(flags&268435456),joinRequest:!!(flags&536870912),forum:!!(flags&1073741824),storiesHidden:!!(flags2&2),storiesHiddenMin:!!(flags2&4),storiesUnavailable:!!(flags2&8),signatureProfiles:!!(flags2&4096),id:r.int53(),accessHash:flags&8192?r.long():void 0,title:r.string(),username:flags&64?r.string():void 0,photo:r.object(),date:r.int(),restrictionReason:flags&512?r.vector(r.object):void 0,adminRights:flags&16384?r.object():void 0,bannedRights:flags&32768?r.object():void 0,defaultBannedRights:flags&262144?r.object():void 0,participantsCount:flags&131072?r.int():void 0,usernames:flags2&1?r.vector(r.object):void 0,storiesMaxId:flags2&16?r.int():void 0,color:flags2&128?r.object():void 0,profileColor:flags2&256?r.object():void 0,emojiStatus:flags2&512?r.object():void 0,level:flags2&1024?r.int():void 0,subscriptionUntilDate:flags2&2048?r.int():void 0,botVerificationIcon:flags2&8192?r.long():void 0,}},
|
|
15
|
+
2533211113:function(r){var flags=r.uint(),flags2=r.uint();return{_:'message_layer199',out:!!(flags&2),mentioned:!!(flags&16),mediaUnread:!!(flags&32),silent:!!(flags&8192),post:!!(flags&16384),fromScheduled:!!(flags&262144),legacy:!!(flags&524288),editHide:!!(flags&2097152),pinned:!!(flags&16777216),noforwards:!!(flags&67108864),invertMedia:!!(flags&134217728),offline:!!(flags2&2),videoProcessingPending:!!(flags2&16),id:r.int(),fromId:flags&256?r.object():void 0,fromBoostsApplied:flags&536870912?r.int():void 0,peerId:r.object(),savedPeerId:flags&268435456?r.object():void 0,fwdFrom:flags&4?r.object():void 0,viaBotId:flags&2048?r.int53():void 0,viaBusinessBotId:flags2&1?r.int53():void 0,replyTo:flags&8?r.object():void 0,date:r.int(),message:r.string(),media:flags&512?r.object():void 0,replyMarkup:flags&64?r.object():void 0,entities:flags&128?r.vector(r.object):void 0,views:flags&1024?r.int():void 0,forwards:flags&1024?r.int():void 0,replies:flags&8388608?r.object():void 0,editDate:flags&32768?r.int():void 0,postAuthor:flags&65536?r.string():void 0,groupedId:flags&131072?r.long():void 0,reactions:flags&1048576?r.object():void 0,restrictionReason:flags&4194304?r.vector(r.object):void 0,ttlPeriod:flags&33554432?r.int():void 0,quickReplyShortcutId:flags&1073741824?r.int():void 0,effect:flags2&4?r.long():void 0,factcheck:flags2&8?r.object():void 0,reportDeliveryUntilDate:flags2&32?r.int():void 0,}},
|
|
16
|
+
3525529248:function(r){var flags=r.uint(),flags2=r.uint();return{_:'userFull_layer200',blocked:!!(flags&1),phoneCallsAvailable:!!(flags&16),phoneCallsPrivate:!!(flags&32),canPinMessage:!!(flags&128),hasScheduled:!!(flags&4096),videoCallsAvailable:!!(flags&8192),voiceMessagesForbidden:!!(flags&1048576),translationsDisabled:!!(flags&8388608),storiesPinnedAvailable:!!(flags&67108864),blockedMyStoriesFrom:!!(flags&134217728),wallpaperOverridden:!!(flags&268435456),contactRequirePremium:!!(flags&536870912),readDatesPrivate:!!(flags&1073741824),sponsoredEnabled:!!(flags2&128),canViewRevenue:!!(flags2&512),botCanManageEmojiStatus:!!(flags2&1024),id:r.int53(),about:flags&2?r.string():void 0,settings:r.object(),personalPhoto:flags&2097152?r.object():void 0,profilePhoto:flags&4?r.object():void 0,fallbackPhoto:flags&4194304?r.object():void 0,notifySettings:r.object(),botInfo:flags&8?r.object():void 0,pinnedMsgId:flags&64?r.int():void 0,commonChatsCount:r.int(),folderId:flags&2048?r.int():void 0,ttlPeriod:flags&16384?r.int():void 0,themeEmoticon:flags&32768?r.string():void 0,privateForwardName:flags&65536?r.string():void 0,botGroupAdminRights:flags&131072?r.object():void 0,botBroadcastAdminRights:flags&262144?r.object():void 0,wallpaper:flags&16777216?r.object():void 0,stories:flags&33554432?r.object():void 0,businessWorkHours:flags2&1?r.object():void 0,businessLocation:flags2&2?r.object():void 0,businessGreetingMessage:flags2&4?r.object():void 0,businessAwayMessage:flags2&8?r.object():void 0,businessIntro:flags2&16?r.object():void 0,birthday:flags2&32?r.object():void 0,personalChannelId:flags2&64?r.int53():void 0,personalChannelMessage:flags2&64?r.int():void 0,stargiftsCount:flags2&256?r.int():void 0,starrefProgram:flags2&2048?r.object():void 0,botVerification:flags2&4096?r.object():void 0,sendPaidMessagesStars:flags2&16384?r.long():void 0,}},
|
|
17
|
+
}
|
|
18
|
+
exports.__tlReaderMapCompat = m;
|